aboutsummaryrefslogtreecommitdiffstats
path: root/craftmine.php
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-05-09 22:06:30 +0200
committerpiernov <piernov@piernov.org>2016-05-09 22:06:30 +0200
commitf10c51f07a755d75a583f85316efbcd3bd1e4b6d (patch)
tree87419a11e12f5b7433459fcb5cb9da5211dcbd9e /craftmine.php
parent54635d17eef27eb2546d69599e4107b242509ced (diff)
parent2f32bc3153b7f2c2561e4603f912573921e6449f (diff)
downloadcandybox-f10c51f07a755d75a583f85316efbcd3bd1e4b6d.tar.gz
candybox-f10c51f07a755d75a583f85316efbcd3bd1e4b6d.tar.bz2
candybox-f10c51f07a755d75a583f85316efbcd3bd1e4b6d.tar.xz
candybox-f10c51f07a755d75a583f85316efbcd3bd1e4b6d.zip
Merge branch 'alexichi' of ssh://piernov.org/srv/git/candybox into alexichi
Diffstat (limited to 'craftmine.php')
-rw-r--r--craftmine.php25
1 files changed, 22 insertions, 3 deletions
diff --git a/craftmine.php b/craftmine.php
index 78c5e37..9a8806b 100644
--- a/craftmine.php
+++ b/craftmine.php
@@ -4,9 +4,14 @@ require_once("inc/mine.inc");
require_once("inc/guild.inc");
require_once("inc/shop.inc");
require_once("inc/craftmine.inc");
+require_once("inc/dungeon.inc");
+require_once("inc/savegame.inc");
+require_once("inc/perso.inc");
session_start(); // Must be placed *BEFORE* $_SESSION is actually used and *AFTER* all classes are imported
+$op = "";
+
/**
* Indique au client une message requete.
*/
@@ -27,14 +32,16 @@ function reportBadRequest() {
exit();
}
if (!isset($_POST["op"])) {
- reportBadRequest();
-}
+ if(!isset($_GET["op"]))
+ reportBadRequest();
+ else
+ $op = $_GET["op"];
+} else $op = $_POST["op"];
/**
* On récupère l'opération à exécuter et on le fait.
*/
-$op = $_POST["op"];
switch($op) {
case "withdrawMine": withdrawMine(); break;
case "createGuild": createGuild(); break;
@@ -42,6 +49,18 @@ switch($op) {
case "getCraftMine": sendCraftMine(); break;
case "buildShop": buildShop(); break;
case "buyItem": buyItem(); break;
+ case "useItem": useItem(); break;
+ case "buildDungeon" : buildDungeon(); break;
+ case "launchDungeon" : launchDungeon(); break;
+ case "exitDungeon" : exitDungeon(); break;
+ case "sendDungeonProgress" : sendDungeonProgress(); break;
+ case "updatePerso" : updatePerso(); break;
+ case "sendPerso" : sendPerso(); break;
+ case "saveGame": saveGame(); break;
+ case "downSave": downSave(); break;
+ case "listSaves": listSaves(); break;
+ case "loadSave": loadSave(); break;
+ case "deleteSave": deleteSave(); break;
default: reportBadRequest();
}