summaryrefslogtreecommitdiffstats
path: root/apis
diff options
context:
space:
mode:
authorSimon Rettberg2014-10-15 15:14:06 +0200
committerSimon Rettberg2014-10-15 15:14:06 +0200
commit429ba64e17dd5d5acd542cf34774cdbe96d9818f (patch)
treeade66c974bafa900d8786a701e338bcb599c6a55 /apis
parentUpdate translations (diff)
downloadslx-admin-429ba64e17dd5d5acd542cf34774cdbe96d9818f.tar.gz
slx-admin-429ba64e17dd5d5acd542cf34774cdbe96d9818f.tar.xz
slx-admin-429ba64e17dd5d5acd542cf34774cdbe96d9818f.zip
eventlog: add api, add page to view events
Diffstat (limited to 'apis')
-rw-r--r--apis/event.inc.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/apis/event.inc.php b/apis/event.inc.php
new file mode 100644
index 00000000..443c6935
--- /dev/null
+++ b/apis/event.inc.php
@@ -0,0 +1,20 @@
+<?php
+
+if (!isLocalExecution())
+ die('Nope');
+
+if ($argc < 3)
+ die("Not enough parameters");
+
+switch ($argc[1]) {
+case 'info':
+ EventLog::info($argc[2]);
+ break;
+case 'warning':
+ EventLog::warning($argc[2]);
+ break;
+case 'failure':
+ EventLog::failure($argc[2]);
+ break;
+}
+