";
echo "
op: l'operation a executer ('inc', 'dec')";
echo "pos: la position du hero dans la liste";
echo "";
echo "
";
echo "La requete aura ete executee avec succes lorsque la page retournera un code 200";
echo "
Parametres POST recu: ";
var_dump($_POST);
echo "
Parametres GET recu: ";
var_dump($_GET);
exit();
}
if (!isset($_POST["op"])) {
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.
*/
switch($op) {
case "withdrawMine": withdrawMine(); break;
case "createGuild": createGuild(); break;
case "hireMiner": hireMiner(); break;
case "getCraftMine": sendCraftMine(); break;
case "buildShop": buildShop(); break;
case "buyItem": buyItem(); break;
case "buildDungeon" : buildDungeon(); break;
case "launchDungeon" : launchDungeon(); break;
case "exitDungeon" : exitDungeon(); break;
case "saveGame": saveGame(); break;
case "downSave": downSave(); break;
case "listSaves": listSaves(); break;
case "loadSave": loadSave(); break;
case "deleteSave": deleteSave(); break;
default: reportBadRequest();
}
?>