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
38
game/jeu/bugs.php
Normal file
38
game/jeu/bugs.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$page = 'bugs';
|
||||
$titre = 'Rapports de bugs';
|
||||
|
||||
if (!empty($_POST['page']) && !empty($_POST['description'])) {
|
||||
$pages = $_POST['page'];
|
||||
$description = $_POST['description'];
|
||||
$pseudo = $queryUser['pseudo'];
|
||||
$time = time();
|
||||
|
||||
$bdd->connexion();
|
||||
$bdd->escape($pages);
|
||||
$bdd->escape($description);
|
||||
$bdd->query("INSERT INTO $table_bug (pseudo, temps, page, description) VALUES('$pseudo', '$time', '$pages', '$description');");
|
||||
$bdd->deconnexion();
|
||||
header('Location: ?p=bugs');
|
||||
exit;
|
||||
}
|
||||
elseif (isset($_GET['a']) && $_GET['a'] == 'del' && isset($_GET['i']) && $sess->values['auth_level'] > 2) {
|
||||
$i = $_GET['i'];
|
||||
$bdd->connexion();
|
||||
$bdd->escape($i);
|
||||
$bdd->query("DELETE FROM $table_bug WHERE id = $i;");
|
||||
$bdd->deconnexion();
|
||||
header('Location: ?p=bugs');
|
||||
exit;
|
||||
}
|
||||
|
||||
$bdd->connexion();
|
||||
$bugs = $bdd->query("SELECT id, pseudo, temps, page, description FROM $table_bug ORDER BY id DESC");
|
||||
$bdd->deconnexion();
|
||||
$TEMP_bugs = array();
|
||||
for ($i = 0; $i < $bdd->num_rows; $i++) {
|
||||
$TEMP_bugs[] = array('<a href="?p=envoyer&d='.$bugs[$i]['pseudo'].'">'.$bugs[$i]['pseudo'].'</a>', date("d/m/y h:m:s", $bugs[$i]['temps']), $bugs[$i]['page'], nl2br(htmlspecialchars(str_replace('\\\'', '\'', $bugs[$i]['description']))), $bugs[$i]['id']);
|
||||
}
|
||||
$template->assign('bugs', $TEMP_bugs);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue