diff --git a/news.php b/news.php
index a39892b..380f02f 100644
--- a/news.php
+++ b/news.php
@@ -2,7 +2,7 @@
echo "
News ";
if(isset($_SESSION["admin"])&&$_SESSION["admin"])
- echo '';
+ echo '';
echo "
";
$link = mysql_connect(__MYSQL_HOSTNAME__, __MYSQL_USERNAME__, __MYSQL_PASSWORD__)
@@ -14,7 +14,7 @@ if(!mysql_select_db('crep', $link)){
exit;
}
-$requete = "select title, content, users.realname as userName from news, users where news.fk_author=users.pk;";
+$requete = "select news.pk as pk, title, content, users.realname as userName from news, users where news.fk_author=users.pk;";
$resultat = mysql_query($requete);
//Pour debugger
@@ -27,7 +27,10 @@ if (!$resultat) {
while ($row = mysql_fetch_assoc($resultat)) {
echo '';
echo '
';
- echo '
'.$row['title'].'
';
+ echo '
'.$row['title'];
+ if(isset($_SESSION["admin"])&&$_SESSION["admin"])
+ echo '';
+ echo '
';
echo '
';
echo '
';
echo '
'.$row['content'].'
';
--
libgit2 0.21.2