<? function std_title_form(&$fdata,$modlist) { ?>
<tr class="forumentry"><td width=10%><?
if ($new=is_forum_new($fdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?> </h4>
<div class="descr" style="text-align: left"><?=$modlist;?></div></td>
<td align=center><?=intval($fdata['tf_tcount']);?></td>
<td align=center><?=intval($fdata['tf_pcount']);?></td>
<td align=center><? if ($fdata['tf_lasttime']) { ?>
<?=user_out($fdata['p_uname'],$fdata['p_uid']);?><br><?=long_date_out($fdata['tf_lasttime']);?>
<? } else { ?><?=MSG_none;?><? }
if ($new && $GLOBALS['inuserid']>3 && $fdata['tf_pcount']) { ?><br><a class="descr" href="index.php?m=newpost&fs=<?=$fdata['f_id'];?>"><?=MSG_shownewposts;?></a><? }
if ($fdata['f_premoderate'] && check_premod($fdata['f_id'])) { ?><br><a class="descr" href="index.php?m=moderate&a=premod&f=<?=$fdata['f_id'];?>"<?=MSG_f_premoderate;?></a><? }
?></td></tr><?
}

function contnr_title_form(&$fdata,&$resdata) {
  $f=($resdata['tf_pcount'] || $resdata['tf_tcount']);
  if (!$f) $colspan="colspan=4";
?>
<tr class="forumentry"><td width=10%><?
if ($new=is_subforum_new($fdata,$resdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td <?=$colspan;?>><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?></h4><div class="descr" style="text-align: left"><?=$resdata['sublinks'];?></div>
<? if ($f) { ?>
</td><td align=center><?=intval($resdata['tf_tcount']);?></td>
<td align=center><?=intval($resdata['tf_pcount']);?></td>
<td align=center><? if ($resdata['tf_lasttime']) { ?>
<?=user_out($resdata['p_uname'],$resdata['p_uid']);?><br><?=long_date_out($resdata['tf_lasttime']);?>
<? } else { ?><?=MSG_none;?><? }
if ($new && $GLOBALS['inuserid']>3 && $resdata['p_count']) { ?><br><a class="descr" href="index.php?m=newpost&fs=<?=$fdata['f_id'];?>"><?=MSG_shownewposts;?></a><? }
}?>
</td></tr>
<? }


function irc_title_form(&$fdata,$userlist,$guestcount) { ?>
<tr class="forumentry"><td width=10%><?
if ($userlist || $guestcount) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?></h4></td>
<td colspan=3>
<? if (!$guestcount && !$userlist) { ?><?=MSG_f_nochatpresent;?><? }
else { ?>
<div class="descr" style="text-align: left"><?=MSG_f_chatpresent;?>: <?=$userlist;?>
<? if ($guestcount) {
  if ($userlist) { ?> <?=MSG_and;?><? } ?> <?=format_word($guestcount,MSG_ug1,MSG_ug2,MSG_ug3);?>
<? } ?></div>
</td></tr>
<? }
}

function link_title(&$fdata) { ?>
<tr class="forumentry"><td width=10%><?
if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td colspan=4><h3><a href="<?=$fdata['f_url'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?></h4></td>
</td></tr>
<? }

function article_title_form(&$fdata,$modlist) { ?>
<tr class="forumentry"><td width=10%><?
if ($new=is_forum_new($fdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?> </h4>
<div class="descr" style="text-align: left"><?=$modlist;?></div></td>
<td align=center colspan=2><?=format_word($fdata['tf_tcount'],MSG_a1,MSG_a2,MSG_a3);?></td>
<td align=center><? if ($fdata['tf_laststart']) { ?>
<?=MSG_a_lastpublish;?><br>
<?=long_date_out($fdata['tf_laststart']);?>
<? } else { ?><?=MSG_none;?><? }
if ($fdata['f_premoderate'] && check_premod($fdata['f_id'])) { ?><br><a class="descr" href="index.php?m=moderate&a=premod&f=<?=$fdata['f_id'];?>"<?=MSG_f_premoderate;?></a><? }
?></td></tr><?
}

function download_title_form(&$fdata,$modlist) { ?>
<tr class="forumentry"><td width=10%><?
if ($new=is_forum_new($fdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?> </h4>
<div class="descr" style="text-align: left"><?=$modlist;?></div></td>
<td align=center colspan=2><?=format_word($fdata['tf_tcount'],MSG_dl1,MSG_dl2,MSG_dl3);?></td>
<td align=center><? if ($fdata['tf_laststart']) { ?>
<?=MSG_dl_lastadded;?><br>
<?=long_date_out($fdata['tf_laststart']);?>
<? } else { ?><?=MSG_none;?><? }
if ($fdata['f_premoderate'] && check_premod($fdata['f_id'])) { ?><br><a class="descr" href="index.php?m=moderate&a=premod&f=<?=$fdata['f_id'];?>"<?=MSG_f_premoderate;?></a><? }
?></td></tr><?
}

function news_start(&$fdata) { ?>
<tr class="forumentry"><td width=10%><?
if ($new=is_forum_new($fdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td colspan=4 style="text-align:left"><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<ul>
<? }

function news_entry(&$ndata) { ?>
<li><?=short_date_out($ndata['time']);?> - <a href="index.php?t=<?=$ndata['t_id'];?>"><?=$ndata['t_title'];?></a><br>
<div class="descr"><?=textout($ndata['t_descr'],1,$ndata['p__bcode'],$ndata['p__smiles']);?>&nbsp;</div>
<? }

function news_noentries() { ?>
<div class="descr"><?=MSG_n_nonews;?></div>
<? }

function news_end(&$fdata) { ?>
</ul>
<? if ($fdata['f_premoderate'] && check_premod($fdata['f_id'])) { ?><br><a class="descr" href="index.php?m=moderate&a=premod&f=<?=$fdata['f_id'];?>"<?=MSG_f_premoderate;?></a><? }
if ($fdata['f_ltopic']<=$GLOBALS['inuserbasic']) { ?><a href="index.php?a=add_news&f=<?=$fdata['f_id'];?>"><?=MSG_n_add;?></a><? } ?>
</td></tr>
<? }

function epedia_title_form(&$fdata,$modlist) { ?>
<tr class="forumentry"><td width=10%><?
if ($new=is_forum_new($fdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?> </h4>
<div class="descr" style="text-align: left"><?=$modlist;?></div></td>
<td align=center colspan=2><?=format_word($fdata['tf_tcount'],MSG_en1,MSG_en2,MSG_en3);?></td>
<td align=center><? if ($fdata['tf_laststart']) { ?>
<?=MSG_en_lastpublish;?><br>
<?=long_date_out($fdata['tf_laststart']);?>
<? } else { ?><?=MSG_none;?><? }
?></td></tr><?
}

function photos_title_form(&$fdata,$modlist) { ?>
<tr class="forumentry"><td width=10%><?
if ($new=is_forum_new($fdata)) {
  if ($fdata['f_newpic']) $pic="images/".$fdata['f_newpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forumnew.png";
  $alt="NEW!";
}
else {
  if ($fdata['f_nonewpic']) $pic="images/".$fdata['f_nonewpic'];
  else $pic="styles/".$GLOBALS['inuser']['st_file']."/forum.png";
  $alt="";
} ?><img src="<?=$pic;?>" alt="<?=$alt;?>"></td>
<td><h3><a href="index.php?f=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a></h3>
<h4><?=textout($fdata['f_descr'],1,1,0);?> </h4>
<div class="descr" style="text-align: left"><?=$modlist;?></div></td>
<td align=center colspan=2><?=format_word($fdata['tf_tcount'],MSG_ph1,MSG_ph2,MSG_ph3);?></td>
<td align=center><? if ($fdata['tf_laststart']) { ?>
<?=MSG_ph_lastpublish;?>
<br>
<?=long_date_out($fdata['tf_laststart']);?>
<? if ($new && $GLOBALS['inuserid']>3 && $fdata['tf_pcount']) { ?><br><a class="descr" href="index.php?m=newpost&fs=<?=$fdata['f_id'];?>"><?=MSG_shownewposts;?></a><? } ?>
<? } else { ?><?=MSG_none;?><? }
if ($fdata['f_premoderate'] && check_premod($fdata['f_id'])) { ?><br><a class="descr" href="index.php?m=moderate&a=premod&f=<?=$fdata['f_id'];?>"<?=MSG_f_premoderate;?></a><? }
?></td></tr><?
}
