diff options
Diffstat (limited to 'ajax')
-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 |