Version 1.7b

This commit is contained in:
nemunaire 2008-11-04 12:00:00 +01:00
commit 8a8280758b
716 changed files with 4361 additions and 33524 deletions

View 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);
}
?>