<?php
/*
Copyright (C) 2001-2003 ZZOSS GbR, http://www.zzoss.com
----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
----------------------------------------------------------------------
$Id: callbacks.php,v 1.2 2004/01/29 14:07:06 ordnas Exp $
*/
function zzoss_error_default_handler()
{
$do_something = ZZOSS_Error::status('ident');
}
// Function for email error notification output.
function zzoss_error_default_mail_subj()
{
return
ZZOSS_Error::statusTranslated('type').", ".
ZZOSS_Error::status('host').', '.
ZZOSS_Error::status('date');
}
function zzoss_error_default_mail_body()
{
return
"Message: \n"
.ZZOSS_Error::status('message')
."\n\nFile: ".ZZOSS_Error::status('file')
."\nLine: ".ZZOSS_Error::status('line')
."\nParent: ".ZZOSS_Error::status('parent');
}
// Function for client error notification output in production mode.
function zzoss_error_default_client()
{
?>
<p>An error occured.</p>
<?php
}
// Function for client error notification output in development mode.
function zzoss_error_default_dev()
{
?>
<script>
<!-- Hide Script
alert("<?php echo ZZOSS_Error::statusTranslated('type'); ?>: <?php echo addslashes(ZZOSS_Error::status('message')); ?>\nFile: <?php echo addslashes(ZZOSS_Error::status('file')); ?>\nLine:<?php echo addslashes(ZZOSS_Error::status('line')); ?>\nParent:<?php echo addslashes(ZZOSS_Error::status('parent')); ?>")
//End Hide Script-->
</script>
<br clear="all"/>
<table cellspacing=0 cellpadding=8 border=0 align=center>
<tr bgcolor=#cccccc>
<td>
<h1 align=left>Developer Mode</h1>
<b>Behaviour: </b><?php echo ZZOSS_Error::statusTranslated('behaviour'); ?><br/><br/>
<b>To: </b><?php echo ZZOSS_Error::status('recipients'); ?><br>
<b>Subject: </b><?php echo zzoss_error_default_mail_subj(); ?><br><br>
<b>Body: </b><pre><?php echo zzoss_error_default_mail_body(); ?></pre>
</td>
</tr>
</table>
<?php
}
function zzoss_error_default_log()
{
return ZZOSS_Error::status('message').' in '.ZZOSS_Error::status('file').' on line '.ZZOSS_Error::status('line');
}
?>