<? function ad_ct_list_start() { ?>
<div class="descr"><?=MSG_f_move;?>.<br>
<?=MSG_f_move2;?>.<br>
<?=MSG_f_move3;?>.</div>
<form action="index.php" method=GET>
<table class="innertable" cellspacing=1 width=100%><tr><td class="tablehead" colspan=6>
<?=MSG_ct_list;?>
</td></tr>
<? }

function ad_ct_entry($cdata,$max,$min) { ?>
<tr><td class="basictable" width=50%>
<b><a href="index.php?m=forum&a=ct_edit&ctid=<?=$cdata['ct_id'];?>"><?=$cdata['ct_name'];?></a></b>
</td><td class="basictable" width=10%>&nbsp;
<? if ($cdata['ct_sortfield']>$min) { ?>
<a href="index.php?m=forum&a=ct_up&ctid=<?=$cdata['ct_id'];?>"><?=MSG_up;?></a>
<? } ?>
</td><td class="basictable" width=10%>&nbsp;
<? if ($cdata['ct_sortfield']<$max) { ?>
<a href="index.php?m=forum&a=ct_down&ctid=<?=$cdata['ct_id'];?>"><?=MSG_down;?></a>
<? } ?>
</td><td class="basictable" width=20%>
<a href="index.php?m=forum&a=f_new_type&ctid=<?=$cdata['ct_id'];?>"><?=MSG_ct_newf;?></a>
</td><td class="basictable" width=10% colspan=2>
<a href="index.php?m=forum&a=ct_confirm&ctid=<?=$cdata['ct_id'];?>"><?=MSG_delete;?>
</td></tr>
<? }

function ad_f_entry($fdata,$fmax,$fmin,$deep=1) { ?>
<tr><td class="basictable">
<? for ($i=0; $i<$deep; $i++) echo "&raquo;&nbsp;"; ?>
<a href="index.php?m=forum&a=f_edit&fid=<?=$fdata['f_id'];?>"><?=$fdata['f_title'];?></a>
</td><td class="basictable">
<? if ($fdata['f_sortfield']>$fmin) { ?>
<a href="index.php?m=forum&a=f_up&fid=<?=$fdata['f_id'];?>"><?=MSG_up;?></a>
<? } ?>
</td><td class="basictable">
<? if ($fdata['f_sortfield']<$fmax) { ?>
<a href="index.php?m=forum&a=f_down&fid=<?=$fdata['f_id'];?>"><?=MSG_down;?></a>
<? } ?>
</td><td class="basictable">
<a href="index.php?m=forum&a=f_confirm&fid=<?=$fdata['f_id'];?>"><?=MSG_delete;?></a>
</td>
</td><td class="basictable">
<input type=radio name=forum1 value="<?=$fdata['f_id'];?>">
</td><td class="basictable">
<input type=radio name=forum2 value="<?=$fdata['f_id'];?>">
</td></tr>
<? }

function ad_ct_list_end() { ?>
<tr><td class="tablehead" colspan=6>
<input type=hidden name=m value="forum"><input type=hidden name=a value="f_exchange">
<input type=submit name=exchange    value="<?=MSG_f_exchange;?>"> &nbsp;
<input type=submit name=move_before value="<?=MSG_f_movebefore;?>"> &nbsp;
<input type=submit name=move_after  value="<?=MSG_f_moveafter;?>">
</table></form><br>
<form action="index.php" method=POST>
<table class="innertable" cellspacing=1 width=100%><tr><td class="tablehead" colspan=2>
<?=MSG_ct_create;?>
</td></tr>
<tr><td class="basictable">
<?=MSG_ct_newtitle;?>
</td><td class="basictable">
<input type=text name=ct_name size=30 maxlength=60>
</td></tr><tr><td class="tablehead" colspan=2>
<input type=hidden name=a value=ct_new>
<input type=hidden name=m value=forum>
<input type=submit value="<?=MSG_create;?>">
</td></tr></table>
</form>
<? }

function ad_ct_editform($name) { ?>
<form action="index.php" method=POST>
<table class="innertable" cellspacing=1 width=100%><tr><td class="tablehead" colspan=2>
<?=MSG_ct_edit;?>
</td></tr>
<tr><td class="basictable">
<?=MSG_ct_title;?>
</td><td class="basictable">
<input type=text name=ct_name size=30 maxlength=60 value="<?=$name;?>">
</td></tr><tr><td class="tablehead" colspan=2 align=center>
<input type=hidden name=a value=ct_save>
<input type=hidden name=m value=forum>
<input type=hidden name=ctid value=<?=getvar("ctid");?>>
<input type=submit value="<?=MSG_save;?>">
</td></tr></table>
</form>
<? }

function ad_f_new_type($typeselect) { ?>
<form action="index.php" method=POST>
<table class="innertable" cellspacing=1 width=100%><tr><td class="tablehead" colspan=2>
<?=MSG_ct_createf;?>
</td></tr><tr><td class="basictable" width=50%>
<?=MSG_ct_newtype;?>
</td><td class="basictable">
<?=$typeselect;?>
</td></tr>
</td></tr><tr><td class="tablehead" colspan=2>
<input type=hidden name=m value=forum>
<input type=hidden name=a value=f_new>
<input type=hidden name=ctid value=<?=getvar('ctid');?>>
<input type=submit value="<?=MSG_create;?>">
</td></tr></table></form>
<? }

function ad_f_group($forumlist,$catselect,$fcontainer,$levelselect,$langselect,$count) { ?>
<script><!--
function SetAll(status) {
  for (i=1; i<=<?=$count+1;?>; i++) { document.forumparams.elements[i].checked=status; }
}
--></script>
<form action=index.php method=POST name=forumparams>
<table class="innertable" cellspacing=1><tr><td class="tablehead" colspan=2><?=MSG_f_gparams;?></td></tr>
<tr class="basictable"><td valign=top width=40%>
<?=MSG_f_forumlist;?>:<br><br>
<input type=button onClick="SetAll(true)" value="<?=MSG_select;?>" style="width: 200 px"><br>
<input type=button onClick="SetAll(false)" value="<?=MSG_unselect;?>" style="width: 200 px">
</td><td><?=$forumlist;?>
</td></tr><tr class="basictable"><td>
<?=MSG_f_cat;?>:
</td><td>
<select name=f_ctid><?=$catselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_show_in;?>:
</td><td>
<select name=f_parent><?=$fcontainer;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_langs;?>?
</td><td>
<select name=f_lnid><?=$langselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_close;?>?
</td><td>
<input type=radio name=f_status value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_status value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_status value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_rate;?>?
</td><td>
<input type=radio name=f_rate value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_rate value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_rate value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_bcode;?>?
</td><td>
<input type=radio name=f_bcode value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_bcode value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_bcode value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_smiles;?>?
</td><td>
<input type=radio name=f_smiles value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_smiles value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_smiles value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_stats;?>?
</td><td>
<input type=radio name=f_nostats value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_nostats value=1><?=MSG_no;?> &nbsp;
<input type=radio name=f_nostats value=0><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_premod;?>?
</td><td>
<input type=radio name=f_premoderate value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_premoderate value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_premoderate value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_selfmod;?>?
</td><td>
<input type=radio name=f_selfmod value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_selfmod value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_selfmod value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr class="basictable"><td>
<?=MSG_f_attachpics;?>?
</td><td>
<input type=radio name=f_attachpics value="" checked><?=MSG_nochanges;?> &nbsp;
<input type=radio name=f_attachpics value=0><?=MSG_no;?> &nbsp;
<input type=radio name=f_attachpics value=1><?=MSG_yes;?> &nbsp;
</td></tr><tr><td class="tablehead" colspan=2><?=MSG_f_levels;?></td></tr>
<tr class="basictable"><td>
<?=MSG_f_lview;?>
</td><td>
<select name=f_lview><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lread;?>
</td><td>
<select name=f_lread><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lpost;?>
</td><td>
<select name=f_lpost><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_ltopic;?>
</td><td>
<select name=f_ltopic><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_ledit;?>
</td><td>
<select name=f_ledit><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lpoll;?>
</td><td>
<select name=f_lpoll><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lvote;?>
</td><td>
<select name=f_lvote><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lsticky;?>
</td><td>
<select name=f_lsticky><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lattach;?>
</td><td>
<select name=f_lattach><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lhtml;?>
</td><td>
<select name=f_lhtml><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lmoderate;?>
</td><td>
<select name=f_lmoderate><?=$levelselect;?></select>
</td></tr><tr class="basictable"><td>
<?=MSG_f_lip;?>
</td><td>
<select name=f_lip><?=$levelselect;?></select>
</td></tr>
<tr><td class="tablehead" colspan=2>
<input type=hidden name=m value="forum">
<input type=hidden name=a value="f_group_process">
<input type=submit value="<?=MSG_save;?>">
</td></tr></table></form>
<? }