task/20210226/various_fix #21
@ -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