1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<?php
/*
+-------------------------------------------------------------------+
| BasiliX - Copyright (C) 2000 Murat Arslan <arslanm@cyberdude.com> |
+-------------------------------------------------------------------+
*/
// Error specific functions
// ------------------------------------------------------------------
// Error reporting
// $old_error_reporting = error_reporting(E_PARSE | E_CORE_ERROR | E_CORE_WARNING);
// close the connections if still exist
function close_cons() {
global $sql, $imap;
if($sql) $sql->close();
if($imap) $imap->close();
}
// Show the error message and exit
function err_exit($msg = "") {
$msg .= "<br>" . imap_last_error() . "<br>\n";
close_cons();
if($msg) {
echo "<b>Error:</b> $msg<br>\n";
}
exit();
}
// normal exit
function my_exit() {
global $imap, $sql;
exit();
}
?>
|