Version 1.0a
This commit is contained in:
parent
e391f66774
commit
6a19363758
908 changed files with 22193 additions and 17408 deletions
23
game/bugs.php
Normal file
23
game/bugs.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$page = 'bugs';
|
||||
$titre = 'Rapports de bugs';
|
||||
|
||||
if (!empty($_POST['page']) && !empty($_POST['description'])) {
|
||||
$pages = mysql_real_escape_string($_POST['page']);
|
||||
$description = mysql_real_escape_string($_POST['description']);
|
||||
$chapeau->query("INSERT INTO `bug` VALUES(NULL, '".$queryUser['pseudo']."', '".time()."', '$pages', '$description');");
|
||||
header('Location: ?p=bugs');
|
||||
}
|
||||
elseif (isset($_GET['a']) && $_GET['a'] == 'del' && isset($_GET['i']) && $sess->values['auth_level'] > 2) {
|
||||
$chapeau->query("DELETE FROM `bug` WHERE `id` = '".$_GET['i']."' LIMIT 1");
|
||||
header('Location: ?p=bugs');
|
||||
}
|
||||
|
||||
$result = mysql_query("SELECT * FROM `bug` ORDER BY `id` DESC");
|
||||
$TEMP_bugs = array();
|
||||
while ($data = mysql_fetch_array($result)) {
|
||||
$TEMP_bugs[] = array('<a href="?p=envoyer&d='.$data['pseudo'].'">'.$data['pseudo'].'</a>', date("d/m/y", $data['temps']), $data['page'], nl2br($data['description']),$data['id'] );
|
||||
}
|
||||
$template->assign('bugs', $TEMP_bugs);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue