aboutsummaryrefslogtreecommitdiffstats
path: root/toj/php/event.php
diff options
context:
space:
mode:
Diffstat (limited to 'toj/php/event.php')
-rw-r--r--toj/php/event.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/toj/php/event.php b/toj/php/event.php
new file mode 100644
index 0000000..e121287
--- /dev/null
+++ b/toj/php/event.php
@@ -0,0 +1,24 @@
+<?php
+ require_once('event.inc.php');
+ if (!empty($_SERVER['HTTP_CLIENT_IP']))
+ $ip=$_SERVER['HTTP_CLIENT_IP'];
+ else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
+ $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
+ else
+ $ip=$_SERVER['REMOTE_ADDR'];
+ if(!event::validate_ip())
+ {
+ exit;
+ }
+ $fname = $_POST['fname'];
+ $name = $_POST['name'];
+ $arg = json_decode($_POST['arg']);
+ if(event::exec_func($fname, $name, $arg) === false)
+ {
+ echo "false";
+ }
+ else
+ {
+ echo "true";
+ }
+?>