sql_error(); $debug_text = ''; if ($sql_error['message'] != '') $debug_text .= '

'. T_('SQL Error') .' : '. $sql_error['code'] .' '. $sql_error['message']; if ($sql_store != '') $debug_text .= '

'. $sql_store; if ($err_line != '' && $err_file != '') $debug_text .= '

'. T_('Line') .' : '. $err_line .'
'. T_('File') .' :'. $err_file; } switch($msg_code) { case GENERAL_MESSAGE: if ($msg_title == '') $msg_title = T_('Information'); break; case CRITICAL_MESSAGE: if ($msg_title == '') $msg_title = T_('Critical Information'); break; case GENERAL_ERROR: if ($msg_text == '') $msg_text = T_('An error occured'); if ($msg_title == '') $msg_title = T_('General Error'); break; case CRITICAL_ERROR: // Critical errors mean we cannot rely on _ANY_ DB information being // available so we're going to dump out a simple echo'd statement if ($msg_text == '') $msg_text = T_('An critical error occured'); if ($msg_title == '') $msg_title = T_('Critical Error'); break; } // Add on DEBUG info if we've enabled debug mode and this is an error. This // prevents debug info being output for general messages should DEBUG be // set TRUE by accident (preventing confusion for the end user!) if (DEBUG && ($msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR)) { if ($debug_text != '') $msg_text = $msg_text . '

'. T_('DEBUG MODE') .''. $debug_text; } echo "\n\n". $msg_title ."\n

\n". $msg_text ."\n"; exit; } ?>