forked from halo-battle/game
Version 1.7i
This commit is contained in:
parent
8a8280758b
commit
ba5e741c99
136 changed files with 2561 additions and 2105 deletions
|
|
@ -8,10 +8,12 @@ $titre = 'Bandeau d\'information';
|
|||
if (!empty($_GET['i']) && $_GET['i'] == 'add') {
|
||||
if (!empty($_POST['texte']) && isset($_POST['color'])) {
|
||||
$texte = $_POST['texte'];
|
||||
$chapeau->escape($texte);
|
||||
$color = $_POST['color'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($texte);
|
||||
$chapeau->escape($color);
|
||||
$chapeau->query("INSERT INTO `infoshead` VALUES (NULL, '$texte', '$color');");
|
||||
$chapeau->query("INSERT INTO $table_infoshead VALUES (NULL, '$texte', '$color');");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
|
|
@ -23,28 +25,36 @@ elseif (!empty($_GET['i'])) {
|
|||
$id = $_GET['i'];
|
||||
if (!empty($_POST['texte']) && isset($_POST['color'])) {
|
||||
$texte = $_POST['texte'];
|
||||
$chapeau->escape($texte);
|
||||
$color = $_POST['color'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($texte);
|
||||
$chapeau->escape($color);
|
||||
$chapeau->query("UPDATE `infoshead` SET `texte` = '$texte', `color` = '$color' WHERE `id` = '$id';");
|
||||
$chapeau->query("UPDATE $table_infoshead SET texte = '$texte', color = '$color' WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
$req = $chapeau->unique_query("SELECT * FROM `infoshead` WHERE `id` = '$id';");
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_infoshead WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('mod', $req);
|
||||
$template->assign('id', $id);
|
||||
$pagea = 'bandeau_add';
|
||||
}
|
||||
elseif (!empty($_GET['d'])) {
|
||||
$id = $_GET['d'];
|
||||
$chapeau->query("DELETE FROM `infoshead` WHERE `id` = '$id';");
|
||||
$chapeau->connexion();
|
||||
$chapeau->query("DELETE FROM $table_infoshead WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$req = $chapeau->query("SELECT * FROM `infoshead`;");
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->query("SELECT * FROM $table_infoshead;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue