Exemple #1
0
    echo $start . "Tu as un peu trop forcé sur le Calvok ! La distance ne peut être négative !" . $end;
}
if (intval($_POST["level"]) < 1) {
    echo $start . "Tu veux rechercher un spot de sous-monstre ?" . $end;
}
if (intval($_POST["number"]) < 2) {
    echo $start . "Un spot se compose d'au moins 2 monstres !" . $end;
}
if ($_POST["id"] == -1) {
    echo $start . "Choisit un Troll !" . $end;
}
if (!isset($_SESSION["AuthNomTroll"])) {
    echo $start . "Il faut être connecté !" . $end;
}
// Affichage des spots
if (checkScriptCall($_POST["id"], $db_vue_rm) && isset($_SESSION["AuthNomTroll"]) && intval($_POST["range"]) >= 0 && intval($_POST["level"]) >= 1 && intval($_POST["number"]) >= 2 && $_POST["id"] != -1) {
    // Récupération du md5 du troll selectionné
    $sql = "SELECT pass_troll,nom_troll";
    $sql .= " FROM trolls WHERE id_troll='" . $_POST["id"] . "';";
    $troll = mysql_fetch_array(mysql_query($sql, $db_vue_rm), MYSQL_NUM);
    echo mysql_error();
    $_POST["name"] = $troll["1"];
    /*$clientWs = new nusoap_client('http://sp.mountyhall.com/SP_WebService.php');
    		$vue = $clientWs ->call('Vue', array('numero' => $_POST["id"], 'mdp' => $troll["0"]));		
    		var_dump($vue);	
    		die;*/
    // Récupération de la vue
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://sp.mountyhall.com/SP_Vue2.php?Numero=" . $_POST["id"] . "&Motdepasse=" . $troll["0"]);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $_POST["view"] = curl_exec($ch);
Exemple #2
0
            // Mise à jour des appels de scripts
            updateScriptCall($_SESSION["AuthTroll"], $db_vue_rm, "SP_Profil");
            sleep(1);
            updateScriptCall($_SESSION["AuthTroll"], $db_vue_rm, "SP_Mouche");
            sleep(1);
            updateScriptCall($_SESSION["AuthTroll"], $db_vue_rm, "SP_Equipement");
            // Création de l'objet Troll, mise à jour et sauvegarde
            $troll = new c_Troll($_SESSION["AuthTroll"], $_SESSION["AuthNomTroll"]);
            $troll->updateTroll($_SESSION);
            $troll->saveTroll();
            echo "Le Troll a bien été mis à jour !";
        }
    }
    // Met à jour les Tanières si l'appel de script n'a pas été dépassé
    if ($_POST["updateType"] == "Mettre à jour les tanières !") {
        if (checkScriptCall($_SESSION["AuthTroll"], $db_vue_rm, "SP_Tanieres")) {
            // Mise à jour des appels de scripts
            updateScriptCall($_SESSION["AuthTroll"], $db_vue_rm, "SP_Tanieres");
            // Mise à jour des tanières
            updateTanieres($_SESSION);
            echo "Les tanières sont maintenant à jour !";
        }
    }
}
?>
		</td>
		<tr class='mh_tdtitre' align='center'><td class='mh_tdpage'>
			<a href="index.php" style="text-decoration:none;"><img src="img/flecheg.jpg" alt="back"/></a>
		</tr>		
	</tr>
</table>