Example #1
0
function db_show_error($sql, $failnote, $additional = '')
{
    global $openSISTitle, $openSISVersion, $openSISNotifyAddress;
    PopTable('header', 'Error');
    $tb = debug_backtrace();
    $error = $tb[1]['file'] . " at " . $tb[1]['line'];
    echo "\r\n\t\t<TABLE CELLSPACING=10 BORDER=0>\r\n\t\t\t<TD align=right><b>Date:</TD>\r\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Failure Notice:</b></TD>\r\n\t\t\t<TD><pre> {$failnote} </pre></TD>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>SQL:</b></TD>\r\n\t\t\t<TD>{$sql}</TD>\r\n\t\t</TR>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Traceback:</b></TD>\r\n\t\t\t<TD>{$error}</TD>\r\n\t\t</TR>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Additional Information:</b></TD>\r\n\t\t\t<TD>{$additional}</TD>\r\n\t\t</TR>\r\n\t\t</TABLE>";
    /*echo "
    		<TABLE CELLSPACING=10 BORDER=0>
    			<TR><TD align=right><b>Date:</TD>
    			<TD><pre>".date("m/d/Y h:i:s")."</pre></TD>
    		</TR><TR>
    			<TD align=right></TD>
    			<TD>openSIS has encountered an error that could have resulted from any of the following:
    			<br/>
    			<ul>
    			<li>Invalid data input</li>
    			<li>Database SQL error</li>
    			<li>Program error</li>
    			</ul>
    			
    			Please take this screen shot and send it to your openSIS representative for debugging and resolution.
    			</TD>
    		</TR>
    		
    		</TABLE>";*/
    //Something you have asked the system to do has thrown a database error.  A system administrator has been notified, and the problem will be fixed as soon as possible.  It might be that changing the input parameters sent to this program will cause it to run properly.  Thanks for your patience.
    PopTable('footer');
    echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
    /*if(false && function_exists('mysql_query'))
    	{
    		$link = @mysql_connect('os4ed.com','openSIS_log','openSIS_log');
    		@mysql_select_db('openSIS_log');
    		@mysql_query("INSERT INTO SQL_ERROR_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME,MODNAME,USERNAME,SQL,REQUEST) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','$openSISVersion','$_SERVER[PHP_SELF]','$_SERVER[DOCUMENT_ROOT]','$_SERVER[SCRIPT_NAME]','$_REQUEST[modname]','".User('USERNAME')."','$sql','".ShowVar($_REQUEST,'Y', 'N')."')");
    		@mysql_close($link);
    	}*/
    if ($openSISNotifyAddress) {
        $message = "System: {$openSISTitle} \n";
        $message .= "Date: " . date("m/d/Y h:i:s") . "\n";
        $message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
        $message .= "Failure Notice:  {$failnote} \n";
        $message .= "Additional Info: {$additional} \n";
        $message .= "\n {$sql} \n";
        $message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
        $message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
        mail($openSISNotifyAddress, 'openSIS Database Error', $message);
    }
    die;
}
function db_show_error($sql, $failnote, $additional = '')
{
    global $openSISTitle, $openSISVersion, $openSISNotifyAddress;
    PopTable('header', 'Error');
    $tb = debug_backtrace();
    $error = $tb[1]['file'] . " at " . $tb[1]['line'];
    /*echo "
    		<TABLE CELLSPACING=10 BORDER=0>
    			<TD align=right><b>Date:</TD>
    			<TD><pre>".date("m/d/Y h:i:s")."</pre></TD>
    		</TR><TR>
    			<TD align=right><b>Failure Notice:</b></TD>
    			<TD><pre> $failnote </pre></TD>
    		</TR><TR>
    			<TD align=right><b>SQL:</b></TD>
    			<TD>$sql</TD>
    		</TR>
    		</TR><TR>
    			<TD align=right><b>Traceback:</b></TD>
    			<TD>$error</TD>
    		</TR>
    		</TR><TR>
    			<TD align=right><b>Additional Information:</b></TD>
    			<TD>$additional</TD>
    		</TR>
    		</TABLE>";*/
    echo "\n\t\t<TABLE CELLSPACING=10 BORDER=0>\n\t\t\t<TR><TD align=right><b>Date:</TD>\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\n\t\t</TR><TR>\n\t\t\t<TD align=right></TD>\n\t\t\t<TD>openSIS has encountered an error that could have resulted from any of the following:\n\t\t\t<br/>\n\t\t\t<ul>\n\t\t\t<li>Invalid data input</li>\n\t\t\t<li>Database SQL error</li>\n\t\t\t<li>Program error</li>\n\t\t\t</ul>\n\t\t\t\n\t\t\tPlease take this screen shot and send it to your openSIS representative for debugging and resolution.\n\t\t\t</TD>\n\t\t</TR>\n\t\t\n\t\t</TABLE>";
    //Something you have asked the system to do has thrown a database error.  A system administrator has been notified, and the problem will be fixed as soon as possible.  It might be that changing the input parameters sent to this program will cause it to run properly.  Thanks for your patience.
    PopTable('footer');
    echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
    if ($openSISNotifyAddress) {
        $message = "System: {$openSISTitle} \n";
        $message .= "Date: " . date("m/d/Y h:i:s") . "\n";
        $message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
        $message .= "Failure Notice:  {$failnote} \n";
        $message .= "Additional Info: {$additional} \n";
        $message .= "\n {$sql} \n";
        $message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
        $message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
        mail($openSISNotifyAddress, 'openSIS Database Error', $message);
    }
    die;
}
Example #3
0
function db_show_error($sql, $failnote, $additional = '')
{
    global $openSISTitle, $openSISVersion, $openSISNotifyAddress, $openSISMode;
    $tb = debug_backtrace();
    $error = $tb[1]['file'] . " at " . $tb[1]['line'];
    echo "\n                    <TABLE CELLSPACING=10 BORDER=0>\n                            <TD align=right><b>Date:</TD>\n                            <TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\n                    </TR><TR>\n                            <TD align=right><b>Failure Notice:</b></TD>\n                            <TD><pre> {$failnote} </pre></TD>\n                    </TR><TR>\n                            <TD align=right><b>SQL:</b></TD>\n                            <TD>{$sql}</TD>\n                    </TR>\n                    </TR><TR>\n                            <TD align=right><b>Traceback:</b></TD>\n                            <TD>{$error}</TD>\n                    </TR>\n                    </TR><TR>\n                            <TD align=right><b>Additional Information:</b></TD>\n                            <TD>{$additional}</TD>\n                    </TR>\n                    </TABLE>";
    echo "\n\t\t<TABLE CELLSPACING=10 BORDER=0>\n\t\t\t<TR><TD align=right><b>Date:</TD>\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\n\t\t</TR><TR>\n\t\t\t<TD align=right></TD>\n\t\t\t<TD>openSIS has encountered an error that could have resulted from any of the following:\n\t\t\t<br/>\n\t\t\t<ul>\n\t\t\t<li>Invalid data input</li>\n\t\t\t<li>Database SQL error</li>\n\t\t\t<li>Program error</li>\n\t\t\t</ul>\n\t\t\t\n\t\t\tPlease take this screen shot and send it to your openSIS representative for debugging and resolution.\n\t\t\t</TD>\n\t\t</TR>\n\t\t\n\t\t</TABLE>";
    echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
    if ($openSISNotifyAddress) {
        $message = "System: {$openSISTitle} \n";
        $message .= "Date: " . date("m/d/Y h:i:s") . "\n";
        $message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
        $message .= "Failure Notice:  {$failnote} \n";
        $message .= "Additional Info: {$additional} \n";
        $message .= "\n {$sql} \n";
        $message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
        $message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
        mail($openSISNotifyAddress, 'openSIS Database Error', $message);
    }
    die;
}
Example #4
0
function db_show_error($sql, $failnote, $additional = '')
{
    global $CentreTitle, $CentreVersion, $CentreNotifyAddress;
    echo '<BR>';
    PopTable('header', _('We have a problem, please contact technical support ...'));
    // TRANSLATION: do NOT translate these since error messages need to stay in English for technical support
    echo "\n\t\t<TABLE CELLSPACING=10 BORDER=0>\n\t\t\t<TD align=right><b>Date:</TD>\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\n\t\t</TR><TR>\n\t\t\t<TD align=right><b>Failure Notice:</b></TD>\n\t\t\t<TD><pre> {$failnote} </pre></TD>\n\t\t</TR><TR>\n\t\t\t<TD align=right><b>Additional Information:</b></TD>\n\t\t\t<TD>{$additional}</TD>\n\t\t</TR>\n\t\t</TABLE>";
    //Something you have asked the system to do has thrown a database error.  A system administrator has been notified, and the problem will be fixed as soon as possible.  It might be that changing the input parameters sent to this program will cause it to run properly.  Thanks for your patience.
    PopTable('footer');
    echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
    if ($CentreNotifyAddress) {
        $message = "System: {$CentreTitle} \n";
        $message .= "Date: " . date("m/d/Y h:i:s") . "\n";
        $message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
        $message .= "Failure Notice:  {$failnote} \n";
        $message .= "Additional Info: {$additional} \n";
        $message .= "\n {$sql} \n";
        $message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
        $message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
        mail($CentreNotifyAddress, 'Centre Database Error', $message);
    }
    die;
}