inc/database.inc.php
changeset 142 edd0c3ee3e1d
parent 136 c795dd75a77e
equal deleted inserted replaced
141:1ede5203910d 142:edd0c3ee3e1d
    21 
    21 
    22 require_once("MDB2.php");
    22 require_once("MDB2.php");
    23 
    23 
    24 function dbError($msg)
    24 function dbError($msg)
    25 {
    25 {
    26         // General function for printing critical errors.
    26 	echo "     <div class=\"error\">Error: " . $msg->getDebugInfo() . "</div>\n";
    27         include_once("header.inc.php");
       
    28         ?>
       
    29 	<h2><?php echo _('Oops! An error occured!'); ?></h2>
       
    30 	<p class="error"><?php echo $msg->getDebugInfo(); ?></p>
       
    31 	<?php        
       
    32 	include_once("footer.inc.php");
    27 	include_once("footer.inc.php");
    33         die();
    28         die();
    34 }
    29 }
    35 
    30 
    36 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dbError');
    31 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dbError');