]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - Classes/class-log.php
Users: Scratch the "Secure" column, as it's less useful nowadays that
[irc/unrealircd/unrealircd-webpanel.git] / Classes / class-log.php
CommitLineData
26971737
VP
1<?php
2
3if (!defined('UPATH'))
371aa651 4 die("Access denied");
26971737
VP
5
6
7class Log
8{
371aa651
VP
9 function __construct()
10 {
26971737 11
371aa651
VP
12 /*
13 if (!is_dir("log/"))
14 mkdir("log/");
15 $filename = "log/".date("Y-m-d")."log";
16 if (!file_exists($filename))
17 {
18 $open = fopen($filename, 'w');
19 $close = fclose($open);
20 } */
21 }
22 function it(...$string)
23 {
24 foreach($string as $str)
25 {
0576a3f9 26 if (get_config("debug")) {
371aa651
VP
27 highlight_string(var_export($str, true));
28 }
29 }
30 }
26971737
VP
31}
32
33function do_log(...$strings)
34{
371aa651
VP
35 $log = new Log();
36 $log->it($strings);
26971737
VP
37}
38
39function get_date($year, $month, $day, $hour, $minute)
40{
371aa651 41 return "$year-$month-$day" . "T$hour-$minute" . "Z";
26971737 42}