Ejemplo n.º 1
0
    $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);
    curl_close($ch);
    // Vérifie si la vue a bien été récupéré
    if (preg_match("#.*paramètres incorrects.*#", $_POST["view"]) || preg_match("#mot de passe incorrect#", $_POST["view"])) {
        echo $start . $_POST["view"] . $end;
    } else {
        updateScriptCall($_POST["id"], $db_vue_rm);
        //set_time_limit (0);
        echo $start . htmlDisplaySpots($_POST) . $end;
    }
}
?>
<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>
</table>
<?php 
include "../foot.php";
Ejemplo n.º 2
0
            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>
<?php 
include '../foot.php';