";
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"])) {
reportBadRequest();
}
/**
* 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;
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;
default: reportBadRequest();
}
?>