1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
// si un jour je remets un coin arrondit bas cest là je mettrais entre guillemet
$display .= '';
$display .= "\n\t".($cat==NULL?'':' ').'
';
$display .= ''.htmlspecialchars($data['cat_nom']).''."\n\t".'
'.$totalTopicCat->rowCount().' Sujets<br />'.$totalPostCat->rowCount().' Réponses
'.htmlspecialchars($data['cat_nom']).'';
$cat = $data["forum_cat_id"];
}
$data['forum_id'];
$topic = $pdo->query("SELECT topic_id,topic_titre FROM forum_topic WHERE forum_id=".$data['forum_id']);
$topicLine = $topic->fetch();
if($topicLine['topic_id'])
{
$sql2 = "SELECT * FROM forum_post WHERE topic_id=".$topicLine['topic_id']." ORDER BY post_time DESC LIMIT 1";
$sqll = $pdo->prepare($sql2);
$sqll->execute();
$q2 = $sqll->fetch();
}
$display .= "\n\t".' ';
if($topicLine['topic_id'])
{
$fvquery = 'SELECT * FROM forum_forum_view JOIN forum_post ON fv_post_id=post_id WHERE fv_membre_id=? AND fv_topic_id=? AND fv_post_id=?';
$fv = $pdo->prepare($fvquery);
if(isset($_SESSION['id']))
$fv->execute(array($_SESSION['id'],$topicLine['topic_id'],$q2['post_id']));
else
$fv->execute(array(-1,$topicLine['topic_id'],$q2['post_id']));
if(!$fv->rowCount())
$syslu = '<img src="'.DIR_DESIGN.'/'.getDesignName().'/images/forum/non_lu.gif" title="Nouvelles réponses" alt="Nouvelles réponses" height="20"/>';
else
$syslu = '<img src="'.DIR_DESIGN.'/'.getDesignName().'/images/forum/lu.gif" title="Pas de nouvelles réponses" alt="Pas de nouvelles réponses" height="20"/>';
}
$display .= ''.$syslu.'';
$display .= ''."\t\t\t" . '<a href="' . getLienModule($_GET["m"],"voirtopic") .'?fid=' . intval($data["forum_id"]) . '&num=1">' . $data['forum_name'] . '</a>
<br />
'.$data['forum_desc'].'';
$display .= "\n\t\t".'' . $topic->rowCount() . ' Sujets<br />' . $post->rowCount() . ' réponses';
$query2 = 'SELECT topic_id,forum_membre_id FROM forum_post WHERE post_forum_id=? ORDER BY topic_id DESC';
$r = $pdo->prepare($query2);
$r->execute(array($data["forum_id"]));
$data2 = $r->fetch();
//$topici = $pdo->query("SELECT topic_id,topic_titre FROM forum_topic WHERE forum_id=".$data['forum_id']);
//$topicLine2 = $topici->fetch();
if(!$r->rowCount())
$display .= "\n\t\t".' N/A'."\n\t".' '."\n\t".'' . "\n\t";
else
$display .= "\n\t\t" .
''.GetSuperMiniAvatarById( $data2 ["forum_membre_id"] ) .'
';
$max1=100;
$lien = getLienModule('forum', 'voirmessage') . '?fid=' . $data['forum_id'] . '&tid=' . $topicLine['topic_id'];
$titre = substr($topicLine ['topic_titre'], 0, $max1) . '...';
echo '<a href="' . $lien . '">' . $titre . '</a><br />';
echo LastPostedBy($data2['topic_id'], $data2['forum_membre_id']);'
' .
"\n\t" .
' ' .
"\n\t" .
' ' .
"\n\t"
; $j++;
$r->closeCursor();
} |
Partager