forked from halo-battle/game
Version 1.9a
This commit is contained in:
parent
5f81f76b17
commit
d028822d0b
437 changed files with 27543 additions and 81793 deletions
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$pagea = 'bandeau';
|
||||
$titre = 'Bandeau d\'information';
|
||||
|
||||
$template->assign('linkpage', 'bandeau');
|
||||
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add') {
|
||||
if (!empty($_POST['texte']) && isset($_POST['color'])) {
|
||||
$texte = $_POST['texte'];
|
||||
$color = $_POST['color'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($texte);
|
||||
$chapeau->escape($color);
|
||||
$chapeau->query("INSERT INTO $table_infoshead (texte, color) VALUES ('$texte', '$color');");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
$template->assign('id', 'add');
|
||||
$pagea = 'bandeau_add';
|
||||
}
|
||||
elseif (!empty($_GET['i'])) {
|
||||
$id = $_GET['i'];
|
||||
if (!empty($_POST['texte']) && isset($_POST['color'])) {
|
||||
$texte = $_POST['texte'];
|
||||
$color = $_POST['color'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($texte);
|
||||
$chapeau->escape($color);
|
||||
$chapeau->query("UPDATE $table_infoshead SET texte = '$texte', color = '$color' WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
$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->connexion();
|
||||
$chapeau->query("DELETE FROM $table_infoshead WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$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