diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-10 17:49:00 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-10 17:49:00 -0700 |
commit | 5f1f9c14ff60b8ae26edbd6a819c5d159da0026d (patch) | |
tree | f7ea927bb5d587aa615959a3ed56d8385dfd2509 | |
parent | 8cc65436b7d5552af54c8d93feed85f63ad7fa4e (diff) | |
download | pathery-5f1f9c14ff60b8ae26edbd6a819c5d159da0026d.tar.xz |
Retrieve solution.
-rw-r--r-- | ajax/misc.ajax.php | 23 |
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 |