public static function runlog($file, $message, $halt = 0) { global $_G; $nowurl = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']); $log = dgmdate($_G['timestamp'], 'Y-m-d H:i:s') . "\t" . $_G['clientip'] . "\t{$_G['uid']}\t{$nowurl}\t" . str_replace(array("\r", "\n"), array(' ', ' '), trim($message)) . "\n"; helper_log::writelog($file, $log); if ($halt) { exit; } }
function writelog($file, $log) { helper_log::writelog($file, $log); }