Location: PHPKode > projects > Twisty Forum > twisty-forum/forum/forum.inc
<div style="text-align:center">
<table class="gen">
<tr style="background-color:white;text-align:center"><td style="width:60%">Rubriques</td><td>Sujets</td><td>Dernier<br />message</td><td>Date</td></tr> 
<?php
$nom=$_SESSION['nom'];
$now=date('YmdHis');

if(!empty($nom)){
$user=mysql_query("select temps from fusers where nom='$nom'");
$user2=mysql_fetch_array($user);
};

$select=mysql_query("select f, ftitre, id from ftitre where temps = '99999999999999' order by f");
while($select2=mysql_fetch_array($select)){
$vu=mysql_query("select vu from fmess where f='$select2[0]' && vu like '%$nom*%'");
$vu2=mysql_num_rows($vu);
$vutest=mysql_query("select vu,id from fmess where f='$select2[0]' && vu!=''");
$vutest2=mysql_num_rows($vutest);
if(($vu2<$vutest2)&&(!empty($nom))){
$new='<img style="vertical-align:baseline" src="'.$racinegif.'new.gif" alt="nouveautés!" />';}
else{
$new='';};

$lastf=mysql_query("select id, auteur, ind,temps2,temps from fmess where f='$select2[0]' order by id desc limit 0,1");
$lastf2=mysql_fetch_array($lastf);
if((!empty($nom))&&($lastf2[4]>$user2[0]+3600*24*15)){
$majnom=$nom.'*';
while($vu3=mysql_fetch_array($vutest)){
mysql_query("update fmess set vu='$vu3[0]$majnom' where f='$select2[0]' &&  vu!=''");
};
};

$nbr=mysql_query("select id from ftitre where f='$select2[0]'");
$nbr2=mysql_num_rows($nbr);
echo '<tr><td class="prem" style="width:50%"><a class="lienforum" href="index.php?f='.$select2[0].'">'.$select2[1].'</a> '.$new.' </td><td class="deux">'.$nbr2.'</td><td class="trois">'.$lastf2[1].'</td><td style="width:25%" class="deux">'.$lastf2[3].' <br /><a href="sujets.php?ind='.$lastf2[2].'&amp;id='.$lastf2[0].'#'.$lastf2[0].'"><img src="'.$racinegif.'flbas.gif" onmouseover="this.src=\''.$racinegif.'flbas2.gif\'" onmouseout="this.src=\''.$racinegif.'flbas.gif\'"alt="dernier message" /></a></td></tr>';
};

if(!empty($nom)){
mysql_query("update fusers set temps='$now' where nom='$nom'");
};

?>
</table>
</div>
Return current item: Twisty Forum