summaryrefslogtreecommitdiffstats
path: root/ajax
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-03-12 20:01:10 -0500
committerBlueRaja <BlueRaja.admin@gmail.com>2013-03-12 20:01:10 -0500
commit6ce00969ead28f357ff924340da524d6f2fede65 (patch)
treeb51cab9e4f1ce9715962eb481d1fe892e8a8677b /ajax
parent2b852b97cb6e6d0270c5f3ffbfb28a8279e37f90 (diff)
parentd9958bde9c3feddf15eced5c786c164db21b1efe (diff)
downloadpathery-6ce00969ead28f357ff924340da524d6f2fede65.tar.xz
Merge branch 'master' of git.raylu.net:pathery
Conflicts: db updates.sql
Diffstat (limited to 'ajax')
-rw-r--r--ajax/misc.ajax.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/ajax/misc.ajax.php b/ajax/misc.ajax.php
new file mode 100644
index 0000000..64eeccc
--- /dev/null
+++ b/ajax/misc.ajax.php
@@ -0,0 +1,23 @@
+<?
+ob_start("ob_gzhandler");
+
+if ($_GET[r] == 'solution') {
+ solutionRespond();
+ exit;
+}
+
+function solutionRespond() {
+ session_start();
+ session_write_close();
+ if ($_SESSION['accepted'] != 1) exit;
+ include_once('../includes/maps.php');
+
+ $userID = $_SESSION['userID'];
+ $mapID = $_GET['mapid'] * 1;
+ if (!is_int($mapID)) exit;
+ $solution = getSolution($userID, $mapID);
+ echo json_encode($solution);
+ exit;
+}
+
+?> \ No newline at end of file