forked from halo-battle/game
Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
|
|
@ -5,7 +5,17 @@ $titre = 'Vérification planète';
|
|||
|
||||
$template->assign('linkpage', 'vplanetes');
|
||||
|
||||
if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] == 'hash_planete') {
|
||||
$id_plan = $_GET['id'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->query("UPDATE $table_planete SET hash_planete = SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)) WHERE id = $id_plan;");
|
||||
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
}
|
||||
elseif (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
$pagea = 'print_key';
|
||||
$id_plan = $_GET['id'];
|
||||
$key = $_GET['key'];
|
||||
|
|
@ -22,16 +32,16 @@ if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
|||
}
|
||||
elseif (!empty($_GET['id'])) {
|
||||
$id_plan = $_GET['id'];
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
if (isset($_POST['key']) && isset($_POST['mod']) && $_POST['key'] != 'id') {
|
||||
$key = $_POST['key'];
|
||||
$mod = $_POST['mod'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($mod);
|
||||
$chapeau->query("UPDATE $table_planete SET $key = '$mod' WHERE id = '$id_plan';");
|
||||
$chapeau->query("UPDATE $table_planete SET $key = '$mod' WHERE id = $id_plan;");
|
||||
$chapeau->deconnexion();
|
||||
}
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_planete WHERE id = '$id_plan';");
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue