From 2370dbbbddfcbee9e69e1133d78b9992118682bc Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 27 Nov 2013 19:23:45 +0100 Subject: Added client log feature/view --- apis/clientlog.inc.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 apis/clientlog.inc.php (limited to 'apis') diff --git a/apis/clientlog.inc.php b/apis/clientlog.inc.php new file mode 100644 index 00000000..bc235903 --- /dev/null +++ b/apis/clientlog.inc.php @@ -0,0 +1,23 @@ + UNIX_TIMESTAMP()', array(':client' => $ip)); +if ($row !== false && $row['cnt'] > 150) exit(0); + +Database::exec('INSERT INTO clientlog (dateline, logtypeid, clientip, description, extra) VALUES (UNIX_TIMESTAMP(), :type, :client, :description, :longdesc)', array( + ':type' => $type, + ':client' => $ip, + ':description' => $description, + ':longdesc' => $longdesc, +)); +echo "OK.\n"; + -- cgit v1.2.3-55-g7522