diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2013-03-12 20:01:10 -0500 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2013-03-12 20:01:10 -0500 |
commit | 6ce00969ead28f357ff924340da524d6f2fede65 (patch) | |
tree | b51cab9e4f1ce9715962eb481d1fe892e8a8677b /ajax/misc.ajax.php | |
parent | 2b852b97cb6e6d0270c5f3ffbfb28a8279e37f90 (diff) | |
parent | d9958bde9c3feddf15eced5c786c164db21b1efe (diff) | |
download | pathery-6ce00969ead28f357ff924340da524d6f2fede65.tar.xz |
Merge branch 'master' of git.raylu.net:pathery
Conflicts:
db updates.sql
Diffstat (limited to 'ajax/misc.ajax.php')
-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 |