HB/pages/rapport_bug.php

55 lines
2.0 KiB
PHP

<?php
session_start();
?>
<HTML>
<HEAD>
<TITLE>Halo battle</TITLE>
<link rel=stylesheet media=screen type=text/css title=design href=descriptions/diz/base.css >
<meta http-equiv=pragma content=no-cache >
<meta http-equiv=content-type content=text/html;charset=iso-8869-1 >
<link rel=shortcut icon type=image/x-icon href=favicon.ico >
<?php
require('../connectBDD.php');
function convert_ts_fr($tstamp) {
echo date ('d/m/Y H:i:s' , $tstamp );
}
?>
</head>
<body>
<?php
$retour = mysql_query("SELECT COUNT(*) AS nbre_entrees FROM bug");
$donnees = mysql_fetch_array($retour);
$bug = $donnees['nbre_entrees'];
if (isset($_GET['ok']) == 1) { echo "<br><table align=center><tr><td><font color=lime>Bug envoyé</font></td></tr></table>"; }
if ($bug > 0) {
echo "<table align=center width=560>";
$result = mysql_query("SELECT * FROM bug ORDER BY temps DESC");
while ($data = mysql_fetch_array($result)) {
echo "<tr><td>Expéditeur : ".$data['pseudo']."</td></tr><tr><td>Le : "; convert_ts_fr($data['temps']);
echo"</td></tr><tr><td>Page concernée : ".$data['page']."</td></tr><tr><td align=left><u>Description du bug :</u><br>".nl2br($data['description'])."</td></tr><tr><td style=\"height: 5px; border: none; background: inherit;\"></td></tr>";
}
echo "</table>";
}
else echo "<br><br><table align=center><tr><td><font color=red>Aucun bug trouvé</font></td></tr></table>";
echo"<br><br><br><br><br>
<form method=post action=validation_bug.php>
<center>Ajouter un bug<br><br>
<table>
<tr><td colspan=2 align=left><font color=red>Attention : bien lire les bugs deja proposé,<br>l'utilisation abusive ou des bugs ayant non lieus seront sanctionnés.</font></td></tr>
<tr><td>Page concernée : <td><input type=text class=zone_texte size=44 maxlength=50 name=page></td></td></tr>
<tr><td>Description le plus précise possible du bug : <td><textarea cols=30 rows=12 name=description class=zone_texte></textarea></td></td></tr>
<tr><td colspan=2><input type=submit value=Envoyer class=bouton /></td></tr>
</table></center></form>";
?>
</body>
</html>