<?
$nosql = 1;
include "../config.php";
include "../lib/init.inc";
auth();
$head = str_replace("__TITLE__", $lang['administration'], $design['head']);
echo $head;
include "admin.inc";
include "../themes/".$theme."/header.inc";
if(!isset($HTTP_POST_VARS['f'])){
?>
<form method=post action="<?echo $PHP_SELF?>">
<input type=hidden name=f value=1>
<table border=0 width=80% cellspacing=0 cellpadding=2 bgcolor=black><tr><td>
<table border=0 width=100% cellspacing=1>
<tr><td colspan=2 bgcolor="<?echo $design['headercolor']?>" align=center>
<div style="font-size : 14pt">L-Forum configuration</div>
</td></tr>
<?
$count = count($admin);
for($x=0; $x < $count; $x++){
$bgcolor = $x%2==0?$design['oddcolor']:$design['evencolor'];
echo "<tr><td bgcolor=\"$bgcolor\" align=center>\n";
echo $admin[$x]->desc;
echo "\n</td><td bgcolor=\"$bgcolor\" align=center>\n";
switch($admin[$x]->type){
case 1:
echo "<input type=\"text\" size=20 name=\"n".$admin[$x]->name.
"\" value=\"".${$admin[$x]->name}."\">\n";
break;
case 2:
echo "<select name=\"n".$admin[$x]->name."\">\n";
while(list($k, $v) = each($admin[$x]->arr)){
echo " <option value=\"$k\"";
if($k == ${$admin[$x]->name})
echo " selected";
echo ">$v\n";
}
echo "</select>\n";
break;
case 3:
echo "<input type=\"checkbox\" name=\"n".$admin[$x]->name."\"";
if(${$admin[$x]->name}==true)
echo " checked";
echo ">\n";
break;
}
echo "</td></tr>\n";
}
?>
<tr><td bgcolor="<?echo $design['evencolor']?>" align=center colspan=2>
<input type=submit value="Save">
</td></tr>
</table>
</td></tr></table>
</form>
<?
}
else{
include "../admin/save.inc";
}
include "../themes/".$theme."/footer.inc";
echo $design['footer'];
?>