<?php
require'fun.php';
require'f_admin.php';
$titlu='Editeaza forumuri';
$back[1]='<a href="/admin-forumuri">'.img('forum.png',2).'Forumuri</a>';
require'f_sus.php';
echo$div[4].'Editeaza forumuri'.$div[5];
if($conn->query('SELECT COUNT(*)FROM`forum_forumuri`')->fetch_row()[0]>0)
{
$form[0]='/admin-editeaza-forum" method="post';
$form[1]=0;
require'f_scris3.php';
$forumurile='';
$forumuri=$conn->query('SELECT`id`,`nume`FROM`forum_forumuri`ORDER BY`pozitie`,`id`');
while($forum=$forumuri->fetch_row())
{
$forumurile.=$forum[0].',,'.$forum[1].'::';
}
$categoriile='';
$categorii=$conn->query('SELECT`id`,`nume`FROM`forum_categorii`ORDER BY`pozitie`,`id`,`nume`');
while($categorie=$categorii->fetch_row())
{
$categoriile.=$categorie[0].',,'.$categorie[1].'::';
}
$form[2]=$div[1].'Forum:<br />'.scris3('fid',$forumurile).$div[0].$div[1].'Nume:<br /><input name="frname" maxlength="33" />'.$div[0].$div[1].'Pozitie:<br /><input name="frpos" maxlength="3" />'.$div[0].$div[1].'Categorie:<br />'.scris3('fcid',$categoriile).$div[0];
$form[3]='fid::frname::frpos::fcid';
$form[4]='Editeaza';
require'f_form.php';
}
else
echo$div[7].'Nu sunt forumuri adaugate!'.$div[0];
require'f_jos.php';