forked from halo-battle/game
Correction de la page d'admin des alliances (qui n'est pas fini, mais bon, au moins y'a plus d'erreur)
This commit is contained in:
parent
ff69ed0d54
commit
ea3860f79d
@ -12,7 +12,7 @@ if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
$pagea = 'print_key';
|
||||
$id_plan = $_GET['id'];
|
||||
$key = $_GET['key'];
|
||||
$chapeau->connexion();
|
||||
$chapeau = new BDD();
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->escape($key);
|
||||
$reqA = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
@ -27,20 +27,20 @@ if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
$key = $_POST['key'];
|
||||
$mod = $_POST['mod'];
|
||||
$chapeau->connexion();
|
||||
$chapeau = new BDD();
|
||||
$chapeau->escape($mod);
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->query("UPDATE $table_alliances SET $key = '$mod' WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
}
|
||||
$chapeau->connexion();
|
||||
$chapeau = new BDD();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = $_GET['name'];
|
||||
$chapeau->connexion();
|
||||
$chapeau = new BDD();
|
||||
$chapeau->escape($name);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE nom = '$name';");
|
||||
$chapeau->deconnexion();
|
||||
|
Loading…
Reference in New Issue
Block a user