forked from halo-battle/game
Version 1.7b
This commit is contained in:
parent
58928889ed
commit
8a8280758b
716 changed files with 4361 additions and 33524 deletions
50
onyx/hb_game/jeu/admin/bandeau.php
Normal file
50
onyx/hb_game/jeu/admin/bandeau.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?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'];
|
||||
$chapeau->escape($texte);
|
||||
$color = $_POST['color'];
|
||||
$chapeau->escape($color);
|
||||
$chapeau->query("INSERT INTO `infoshead` VALUES (NULL, '$texte', '$color');");
|
||||
|
||||
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'];
|
||||
$chapeau->escape($texte);
|
||||
$color = $_POST['color'];
|
||||
$chapeau->escape($color);
|
||||
$chapeau->query("UPDATE `infoshead` SET `texte` = '$texte', `color` = '$color' WHERE `id` = '$id';");
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
$req = $chapeau->unique_query("SELECT * FROM `infoshead` WHERE `id` = '$id';");
|
||||
$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';");
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$req = $chapeau->query("SELECT * FROM `infoshead`;");
|
||||
$template->assign('tableau', $req);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue