Location: PHPKode > projects > TimeSheet4dotProject > ts4dp/timesheet/global4app.php
<?php
function userErrorHandler($errno, $errmsg, $filename, $linenum, $vars)
{
   // timestamp for the error entry
    $dt = date("Y-m-d H:i:s (T)");

    // define an assoc array of error string
    // in reality the only entries we should
    // consider are E_WARNING, E_NOTICE, E_USER_ERROR,
    // E_USER_WARNING and E_USER_NOTICE
    $errortype = array (
                E_ERROR              => 'Error',
                E_WARNING            => 'Warning',
                E_PARSE              => 'Parsing Error',
                E_NOTICE             => 'Notice',
                E_CORE_ERROR         => 'Core Error',
                E_CORE_WARNING       => 'Core Warning',
                E_COMPILE_ERROR      => 'Compile Error',
                E_COMPILE_WARNING    => 'Compile Warning',
                E_USER_ERROR         => 'User Error',
                E_USER_WARNING       => 'User Warning',
                E_USER_NOTICE        => 'User Notice',
                E_STRICT             => 'Runtime Notice',
                E_RECOVERABLE_ERROR  => 'Catchable Fatal Error'
                );
    // set of errors for which a var trace will be saved
    $user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
    $err = "\n<br>". $dt . " - " . $errno . " - " . $errortype[$errno] . " - " . $errmsg. " - " . $filename . " - " . $linenum . " - " ;
    if (in_array($errno, $user_errors)) {
        $err .= " - " . wddx_serialize_value($vars, "Variables") ;
    }
    //print $err;
}
// error handling
// we will do our own error handling
error_reporting(0);
$old_error_handler = set_error_handler("userErrorHandler");

//define ('DP_BASE_DIR','GPL_GNU_HOLY_COW'); // cheating

//STUPID DOTPROJECT HACK BELOW, IF YOU COULD MAKE IT BETTER, WELCOME



require_once '../base.php';
require_once '../includes/main_functions.php';
require_once '../includes/config.php';
require_once '../includes/db_adodb.php';
require_once '../includes/db_connect.php';
require_once '../includes/session.php';
require_once '../classes/ui.class.php';

?>
Return current item: TimeSheet4dotProject