+function do_err($str, $exit = TRUE) {
+ echo '<p><font color="red"><b>ERROR:</b></font> ' .$str. "</p>\n";
+ if($exit) {
+ echo '</body></html>';
+ exit;
+ }
+}
+
+$IND = str_repeat(' ',4);
+
+ob_implicit_flush();
+define('SM_PATH', '../');
+
+/*
+ * Load config before output begins. functions/strings.php depends on
+ * functions/globals.php. functions/global.php needs to be run before
+ * any html output starts. If config.php is missing, error will be displayed
+ * later.
+ */
+if (file_exists(SM_PATH . 'config/config.php')) {
+ include(SM_PATH . 'config/config.php');
+ include(SM_PATH . 'functions/strings.php');
+}