<?php
if(isset($_GET['cid']))
require'f_categorie_forum.php';
elseif(isset($_GET['fid']))
require'f_forum_forum.php';
elseif(isset($_GET['tid']))
require'f_topic_forum.php';
else
require'f_forumm.php';
require'f_conectare.php';
conectare('forum','forum');
$head[1]='forumul site-ului '.$adresasite[1];
$titlu='Forum';
if($de==0)
$head[3]='<link rel="alternate" title="Sitemap forum XML'.$titlul.'" type="application/xml" href="/sitemap-forum.xml" />';
require'f_sus.php';
if($de>0)
require'f_nou.php';
$lp=$conn->query('SELECT`tid`,`de`,`id`FROM`forum_postari`ORDER BY`data`DESC LIMIT 1')->fetch_row();
$tnuma=$conn->query('SELECT`nume`FROM`forum_topicuri`WHERE`id`="'.$lp[0].'"')->fetch_row();
require'f_profil.php';
$conectati=$conn->query('SELECT COUNT(*)FROM`membrii`,`forum_conectati`WHERE`membrii`.`id`=`forum_conectati`.`de`&&`membrii`.`vizibil`="0"')->fetch_row();
echo$div[4].img('forum.png',2).'Forum'.$div[5].$div[10].img('world.png',2).'Ultima postare în <a href="/forum/topic/'.$lp[0].'-'.seo($tnuma[0]).'/tip/'.$lp[2].'">'.htmlspecialchars($tnuma[0]).'</a> scrisa de '.profil($lp[1]).'<br /><a href="/conectati/categorie/forum">'.img('group.gif',1).'Conectați forum</a> <strong>'.number_format($conectati[0]).'</strong><br /><a href="/ultimele-topicuri/tip/active">'.img('world.png',2).'Ultimele topicuri active</a><strong> - </strong><a href="/ultimele-topicuri/tip/create">'.img('world.png',2).'Ultimele topicuri create</a><br /><a href="/top-postari">'.img('topuri.gif',2).'Top postări</a>'.$div[0];
$categorii=$conn->query('SELECT`id`,`nume`FROM`forum_categorii`ORDER BY`pozitie`,`id`');
while($categorie=$categorii->fetch_row())
{
echo$div[4].'<a href="/forum/categorie/'.$categorie[0].'-'.seo($categorie[1]).'">'.img('categorie.gif',1).htmlspecialchars($categorie[1]).'</a>'.$div[5];
$forumuri=$conn->query('SELECT`id`,`nume`FROM`forum_forumuri`WHERE`cid`="'.$categorie[0].'"&&`clid`="0"ORDER BY`pozitie`,`id`');
while($forumm=$forumuri->fetch_row())
{
echo$div[1].'<a href="/forum/forum/'.$forumm[0].'-'.seo($forumm[1]).'">'.img('forum.png',2).htmlspecialchars($forumm[1]).'</a>'.$div[0];
}
}
echo$div[1].'<a href="/cauta-in-forum">'.img('search.png',2).'Caută în forum</a>'.$div[0];
require'f_jos.php';