if (($fp = @fopen(LEGAL_PATH."/legal.log", 'a')) != FALSE) {
/* Unix time | session | nickname | IP | where was | mesg */
- fwrite($fp, sprintf("%ld|%s|%s|%s|%s|%s|%s|\n", $curtime, $user->sess,
- ($user->is_auth() ? 'A' : 'N'),
- $user->name, $addr, $where , $mesg));
+ fwrite($fp, sprintf("%ld|%s|%s|%s|%s|%s|%s|\n", $curtime, ($user ? $user->sess : "NOSESS"),
+ ($user ? ($user->is_auth() ? 'A' : 'N') : "U"),
+ ($user ? $user->name : "NO-USER"), $addr, $where , $mesg));
fclose($fp);
}
}
$list_web_arr[intval($this->list_web[$i])] = $this->list_web[$i];
}
- log_legal(time(), '127.0.0.1', 'BRISK', 'MAIN', 'LOG:START');
+ log_legal(time(), '127.0.0.1', FALSE, 'MAIN', 'LOG:START');
$lastime = 0;
$dump_users = TRUE;
$mtime_unfi = 100.0 * $mtsum_unfi / $mtime_diff;
$mtime_mana = 100.0 * $mtsum_mana / $mtime_diff;
- log_legal(time(), '127.0.0.1', 'BRISK', 'MAIN',
+ log_legal(time(), '127.0.0.1', FALSE, 'MAIN',
sprintf('LOG:PROF: tot(%.3f) idle: %.2f read: %.2f garb: %.2f unfi: %.2f mana: %.2f',
$mtime_diff, $mtime_idle, $mtime_read, $mtime_garb, $mtime_unfi, $mtime_mana
));
$mtsum_garb = 0.0;
$mtsum_unfi = 0.0;
$mtsum_mana = 0.0;
- $mtime_begin = $mtime_end;
+ $mtime_start = $mtime_finish;
}
fprintf(STDERR, "\nIN LOOP: Current opened: %d pending_pages: %d\n", count($this->socks), count($this->pending_pages));
}