");
define('IMAGE_sub', "
");
define('IMAGE_nosub', "
");
$deltest = array_flip($_POST);
if (e_QUERY)
{
$tmp = explode('.', e_QUERY);
$action = $tmp[0];
$sub_action = $tmp[1];
$id = $tmp[2];
unset($tmp);
}
if(isset($_POST['delete']))
{
$tmp = array_pop(array_flip($_POST['delete']));
list($delete, $del_id) = explode('_', $tmp);
}
if(isset($_POST['setMods']))
{
foreach($_POST['mods'] as $fid => $modid)
{
if($sql->update('forum',"forum_moderators = '{$modid}' WHERE forum_id = {$fid}"))
{
$mes->addSuccess(LAN_UPDATED);
}
else
{
$mes->addError(LAN_UPDATED_FAILED);
}
}
$ns->tablerender($caption, $mes->render().$text);
}
if(isset($_POST['tools']))
{
$msg = '';
if(isset($_POST['forum_all']))
{
$fList[]='all';
}
else
{
foreach(array_keys($_POST['forumlist']) as $k)
{
$fList[] = $k;
}
}
foreach($fList as $fid)
{
if(isset($_POST['counts']))
{
$for->forumUpdateCounts($fid, $_POST['counts_threads']);
$msg .= FORLAN_167.": $fid
";
}
if(isset($_POST['lastpost']))
{
$with_threads = (isset($_POST['lastpost_nothread'])) ? FALSE : TRUE;
$for->forumUpdateLastpost('forum', $fid, $with_threads);
$msg .= FORLAN_168.": $fid
";
}
}
if(isset($_POST['userpostcounts']))
{
require_once(e_HANDLER.'user_extended_class.php');
$ue = new e107_user_extended;
$list = $for->getUserCounts();
foreach($list as $uid => $cnt)
{
$ue->user_extended_setvalue($uid, 'user_plugin_forum_posts', $cnt, 'int');
}
$msg .= FORLAN_169.'
';
}
$mes->addSuccess($msg);
$ns->tablerender($caption, $mes->render().$text);
}
if(isset($_POST['create_sub']))
{
$fid = (int)($sub_action);
$tmp = array();
$tmp['forum_name'] = $tp->toDB($_POST['subname_new']);
$tmp['forum_description'] = $tp->toDB($_POST['subdesc_new']);
$tmp['forum_order'] = (int)$_POST['suborder_new'];
if($tmp['forum_name'] != '' && $sql->select('forum', '*', "forum_id = {$fid}"))
{
$row = $sql->fetch();
$tmp['forum_parent'] = $row['forum_parent'];
$tmp['forum_moderators'] = $row['forum_moderators'];
$tmp['forum_class'] = $row['forum_class'];
$tmp['forum_postclass'] = $row['forum_postclass'];
$tmp['forum_sub'] = $fid;
if($sql->insert('forum', $tmp))
{
$mes->addSuccess(LAN_CREATED);
}
else
{
$mes->addError(LAN_CREATED_FAILED);
}
}
$ns->tablerender($caption, $mes->render().$text);
}
if(isset($_POST['update_subs']))
{
$msg = "";
foreach(array_keys($_POST['subname']) as $id)
{
if($_POST['subname'][$id] == "")
{
if ($sql->delete("forum", "forum_id='$id' "))
{
$msg .= FORLAN_150." ". LAN_ID.":"." ".$id." ".LAN_DELETED."
";
$cnt = $sql->delete("forum_thread", "thread_forum_id = {$id}");
$msg .= $cnt." ".FORLAN_152." ".LAN_DELETED."
";
}
}
else
{
$_name = $tp->toDB($_POST['subname'][$id]);
$_desc = $tp->toDB($_POST['subdesc'][$id]);
$_order = (int)$_POST['suborder'][$id];
if($sql->update('forum', "forum_name='{$_name}', forum_description='{$_desc}', forum_order='{$_order}' WHERE forum_id = {$id}"))
{
$msg .= FORLAN_150 ." ". LAN_ID.":"." ".$id." ".LAN_UPDATED."
";
}
}
}
if($msg)
{
$mes->addSuccess($msg);
$ns->tablerender($caption, $mes->render().$text);
}
}
if(isset($_POST['submit_parent']))
{
unset($insert);
$insert = array(
'forum_name' => $tp->toDB($_POST['forum_name']),
'forum_datestamp' => time(),
'forum_class' => (int)$_POST['forum_class'],
'forum_postclass' => (int)$_POST['forum_postclass'],
'forum_threadclass' => (int)$_POST['forum_threadclass'],
);
if($sql->insert('forum', $insert))
{
$mes->addSuccess(LAN_CREATED);
}
else
{
$mes->addError(LAN_CREATED_FAILED);
}
$ns->tablerender($caption, $mes->render().$text);
}
if(isset($_POST['update_parent']))
{
unset($update);
$update = array(
'forum_name' => $tp->toDb($_POST['forum_name']),
'forum_datestamp' => time(),
'forum_class' => (int)$_POST['forum_class'],
'forum_postclass' => (int)$_POST['forum_postclass'],
'forum_threadclass' => (int)$_POST['forum_threadclass'],
'WHERE' => 'forum_id = '.(int)$id
);
if($sql->update('forum', $update))
{
$mes->addSuccess(LAN_UPDATED);
}
else
{
$mes->addError(LAN_UPDATED_FAILED);
}
$action = 'main';
$ns->tablerender($caption, $mes->render().$text);
}
if(isset($_POST['submit_forum']))
{
$tmp = array();
$tmp['forum_moderators'] = (int)$_POST['forum_moderators'];
$tmp['forum_name'] = $tp->toDB($_POST['forum_name']);
$tmp['forum_description'] = $tp->toDB($_POST['forum_description']);
$tmp['forum_datestamp'] = time();
$tmp['forum_class'] = (int)$_POST['forum_class'];
$tmp['forum_postclass'] = (int)$_POST['forum_postclass'];
$tmp['forum_threadclass'] = (int)$_POST['forum_threadclass'];
$tmp['forum_parent'] = (int)$_POST['forum_parent'];
if($sql->insert('forum', $tmp))
{
$mes->addSuccess(LAN_CREATED);
}
else
{
$mes->addError(LAN_CREATED_FAILED);
}
$ns->tablerender($caption, $mes->render().$text);
}
if(isset($_POST['update_forum']))
{
unset($_POST['update_forum']);
$tmp['data'] = $_POST;
$tmp['WHERE'] = 'forum_id = '.(int)$id;
$tmp2['forum_moderators'] = $tmp['forum_moderators'];
$tmp2['forum_class'] = $tmp['forum_class'];
$tmp2['forum_postclass'] = $tmp['forum_postclass'];
$tmp2['forum_threadclass'] = $tmp['forum_threadclass'];
$tmp2['WHERE'] = 'forum_sub = '.(int)$id;
$sql->update('forum', $tmp);
$sql->update('forum', $tmp2);
$mes->addSuccess(LAN_UPDATED);
$ns->tablerender($caption, $mes->render().$text);
$action = 'main';
}
if (isset($_POST['update_order']))
{
while (list($key, $id) = each($_POST['forum_order']))
{
$tmp = explode('.', $id);
$sql->update('forum', "forum_order=".$tmp[1]." WHERE forum_id=".$tmp[0]);
}
$mes->addSuccess(LAN_UPDATED);
$ns->tablerender($caption, $mes->render().$text);
}
if (isset($_POST['updateoptions']))
{
$fPref->set('notify', $_POST['email_notify']);
$fPref->set('notify_on', $_POST['email_notify_on']);
$fPref->set('poll', $_POST['forum_poll']);
$fPref->set('popular', $_POST['forum_popular']);
$fPref->set('track', $_POST['forum_track']);
$fPref->set('eprefix', $_POST['forum_eprefix']);
$fPref->set('enclose', $_POST['forum_enclose']);
$fPref->set('title', $_POST['forum_title']);
$fPref->set('postspage', $_POST['forum_postspage']);
$fPref->set('threadspage', $_POST['forum_threadspage']);
$fPref->set('html_post', $_POST['html_post']);
$fPref->set('attach', $_POST['forum_attach']);
$fPref->set('redirect', $_POST['forum_redirect']);
$fPref->set('reported_post_email', $_POST['reported_post_email']);
$fPref->set('tooltip', $_POST['forum_tooltip']);
$fPref->set('tiplength', $_POST['forum_tiplength']);
$fPref->set('hilightsticky', $_POST['forum_hilightsticky']);
$fPref->set('maxwidth', $_POST['forum_maxwidth']);
$fPref->set('linkimg', $_POST['forum_linkimg']);
$fPref->save(true, true);
$mes->addSuccess();
$ns->tablerender($caption, $mes->render().$text);
}
if (isset($_POST['do_prune']))
{
$msg = $for->forumPrune($_POST['prune_type'], $_POST['prune_days'], $_POST['pruneForum']);
$mes->addSuccess($msg);
$action = 'main';
$ns->tablerender($caption, $mes->render().$text);
}
if (isset($_POST['frsubmit']))
{
$guestrules = $tp->toDB($_POST['guestrules']);
$memberrules = $tp->toDB($_POST['memberrules']);
$adminrules = $tp->toDB($_POST['adminrules']);
if(!$sql->update("generic", "gen_chardata ='$guestrules', gen_intdata='".$_POST['guest_active']."' WHERE gen_type='forum_rules_guest' "))
{
$sql->insert("generic", "0, 'forum_rules_guest', '".time()."', 0, '', '".$_POST['guest_active']."', '$guestrules' ");
}
if(!$sql->update("generic", "gen_chardata ='$memberrules', gen_intdata='".$_POST['member_active']."' WHERE gen_type='forum_rules_member' "))
{
$sql->insert("generic", "0, 'forum_rules_member', '".time()."', 0, '', '".$_POST['member_active']."', '$memberrules' ");
}
if(!$sql->update("generic", "gen_chardata ='$adminrules', gen_intdata='".$_POST['admin_active']."' WHERE gen_type='forum_rules_admin' "))
{
$sql->insert("generic", "0, 'forum_rules_admin', '".time()."', 0, '', '".$_POST['admin_active']."', '$adminrules' ");
}
$ns->tablerender($caption, $mes->render().$text);
}
if (vartrue($delete) == 'main') {
if ($sql->delete('forum', "forum_id='$del_id' "))
{
$mes->addSuccess(LAN_DELETED);
}
else
{
$mes->addError(LAN_DELETED_FAILED);
}
$ns->tablerender($caption, $mes->render().$text);
}
if (vartrue($action) == 'create')
{
if ($sql->select('forum', '*', "forum_parent='0' "))
{
$forum->create_forums($sub_action, $id);
}
else
{
header('location:'.e_ADMIN.'forum.php');
exit;
}
}
if ($delete == 'cat')
{
if ($sql->delete('forum', "forum_id='$del_id' "))
{
$sql->delete('forum', "forum_parent='$del_id' ");
$mes->addSuccess(LAN_DELETED);
$action = 'main';
}
else
{
$mes->addError(LAN_DELETED_FAILED);
}
$ns->tablerender($caption, $mes->render().$text);
}
switch($action)
{
case 'delete':
$forum->delete_item(intval($sub_action));
break;
case 'cat':
$forum->create_parents($sub_action, $id);
break;
case 'order':
$forum->show_existing_forums($sub_action, $id, true);
break;
case 'opt':
$forum->show_prefs();
break;
case 'mods':
$forum->show_mods();
break;
case 'tools':
$forum->show_tools();
break;
case 'prune':
$forum->show_prune();
break;
case 'rules':
$forum->show_rules();
break;
case 'subs':
$forum->show_subs($sub_action);
break;
case 'sr':
$forum->show_reported($sub_action);
break;
}
if ($delete == 'reported')
{
$sql->delete("generic", "gen_id='$del_id' ");
$mes->addSuccess(LAN_DELETED);
}
if (!e_QUERY || $action == 'main')
{
$forum->show_existing_forums(vartrue($sub_action), vartrue($id));
}
require_once(e_ADMIN.'footer.php');
// function headerjs()
// {
// $e107 = e107::getInstance();
// $tp = e107::getParser();
// // These functions need to be removed and replaced with the generic jsconfirm() function.
// $headerjs = "";
// return $headerjs;
// }
function forum_admin_adminmenu()
{
global $forum;
global $action;
$forum->show_options($action);
}
class forumAdmin
{
function show_options($action)
{
$sql = e107::getDb();
if ($action == '') { $action = 'main'; }
// ##### Display options ---------------------------------------------------------------------------------------------------------
$var['main']['text'] = FORLAN_76;
$var['main']['link'] = e_SELF;
$var['cat']['text'] = FORLAN_83;
$var['cat']['link'] = e_SELF.'?cat';
if ($sql->select('forum', 'forum_id', "forum_parent='0' LIMIT 1"))
{
$var['create']['text'] = FORLAN_77;
$var['create']['link'] = e_SELF.'?create';
}
$var['order']['text'] = FORLAN_78;
$var['order']['link'] = e_SELF.'?order';
$var['opt']['text'] = FORLAN_79;
$var['opt']['link'] = e_SELF.'?opt';
$var['prune']['text'] = LAN_PRUNE;
$var['prune']['link'] = e_SELF.'?prune';
$var['rules']['text'] = FORLAN_123;
$var['rules']['link'] = e_SELF.'?rules';
$var['sr']['text'] = FORLAN_116;
$var['sr']['link'] = e_SELF.'?sr';
$var['mods']['text'] = FORLAN_33;
$var['mods']['link'] = e_SELF.'?mods';
$var['tools']['text'] = FORLAN_153;
$var['tools']['link'] = e_SELF.'?tools';
show_admin_menu(FORLAN_7, $action, $var);
}
// Initial delete function. Determines which delete routine should be applied.
function delete_item($id)
{
// If a delete routine is cancelled, redirect back to forum listing
if($_POST['cancel'])
{
$this->show_existing_forums(vartrue($sub_action), vartrue($id));
return;
}
$sql = e107::getDb();
$id = (int)$id;
$confirm = isset($_POST['confirm']) ? true : false;
if($confirm)
{
e107::getRender()->tablerender('Forums', e107::getMessage()->render().$txt);
}
else
{
$this->delete_show_confirm($txt);
}
if($row = $sql->retrieve('forum', 'forum_parent, forum_sub', "forum_id = {$id}"))
{
$txt = "";
// is parent
if($row['forum_parent'] == 0)
{
$txt .= $this->delete_parent($id, $confirm);
}
// is subforum
elseif($row['forum_sub'] > 0)
{
$txt .= $this->delete_sub($id, $confirm);
}
// is forum
else
{
$txt .= $this->delete_forum($id, $confirm);
}
}
// forum_id not found, should not happen.
else
{
$this->show_existing_forums(vartrue($sub_action), vartrue($id));
return;
}
}
function delete_parent($id, $confirm = false)
{
$sql = e107::getDb();
$mes = e107::getMessage();
$ns = e107::getRender();
// check if parent contains forums and delete them if needed
if($sql->select('forum', 'forum_id', 'forum_parent = '.$id))
{
$fList = $sql->rows();
foreach($fList as $f)
{
$this->delete_forum($f['forum_id'], $confirm);
}
}
if($confirm)
{
if($sql->delete('forum', "forum_id = {$id}"))
{
$mes->addSuccess(LAN_DELETED);
}
else
{
$mes->addError(LAN_DELETED_FAILED);
}
}
}
// function deleteForum($forumId)
// {
// $sql = e107::getDb();
// $forumId = (int)$forumId;
// // Check for any sub forums
// if($sql->select('forum', 'forum_id', "forum_sub = {$forumId}"))
// {
// $list = $sql->rows();
// foreach($list as $f)
// {
// $ret .= $this->deleteForum($f['forum_id']);
// }
// }
// require_once(e_PLUGIN.'forum/forum_class.php');
// $f = new e107Forum;
// if($sql->delete('forum_thread', 'thread_id','thread_forum_id='.$forumId))
// {
// $list = $sql->rows();
// foreach($list as $t)
// {
// $f->threadDelete($t['thread_id'], false);
// }
// }
// return $sql->delete('forum', 'forum_id = '.$forumId);
// }
// delete forum
function delete_forum($id, $confirm = false)
{
$sql = e107::getDb();
$tp = e107::getParser();
$ns = e107::getRender();
$mes = e107::getMessage();
// check if forum contains subforums
if($sql->select('forum', 'forum_id', 'forum_sub = '.$id))
{
$fList = $sql->rows();
foreach($fList as $f)
{
$this->delete_sub($f['forum_id'], $confirm);
}
}
if($confirm)
{
if($this->deleteForum($id))
{
$mes->addSuccess(LAN_DELETED);
}
else
{
$mes->addError(LAN_DELETED_FAILED);
}
}
$sql->select('forum', 'forum_name, forum_threads, forum_replies', 'forum_id = '.$id);
$row = $sql->fetch();
$mes->addInfo("Forum {$id} [".$tp->toHTML($row['forum_name'])."] has {$row['forum_threads']} threads and {$row['forum_replies']} replies.");
}
function delete_sub($id, $confirm = FALSE)
{
$sql = e107::getDb();
$tp = e107::getParser();
$mes = e107::getMessage();
$ns = e107::getRender();
if($confirm)
{
if($this->deleteForum($id))
{
$mes->addSuccess(LAN_DELETED);
}
else
{
$mes->addError(LAN_DELETED);
}
}
$sql->select('forum', '*', 'forum_id = '.$id);
$row = $sql->fetch();
$mes->addInfo("Sub-forum {$id} [".$tp->toHTML($row['forum_name'])."] has {$row['forum_threads']} threads, {$row['forum_replies']} replies.");
}
function delete_show_confirm($message)
{
$mes = e107::getMessage();
$mes->addInfo($message);
$text = "
";
e107::getRender()->tablerender('Forum'.SEP.'Delete forum(s)', $mes->render().$text);
}
function show_subs($id)
{
$sql = e107::getDb();
$tp = e107::getParser();
$ns = e107::getRender();
$frm = e107::getForm();
$txt = "
";
$ns->tablerender(FORLAN_149, $txt); // TODO LAN
}
function show_existing_forums($sub_action, $id, $mode = false)
{
global $for; // $e107
$frm = e107::getForm();
$sql = e107::getDb();
$tp = e107::getParser();
$mes = e107::getMessage();
$ns = e107::getRender();
$subList = $for->forumGetSubs();
if (!$mode)
{
$text = "";
}
else
{
$text = "
";
$ns->tablerender(FORLAN_30, $mes->render() . $text);
}
else
{
$text .= "".$frm->admin_button('update_order', LAN_UPDATE, 'update')."
";
$ns->tablerender(FORLAN_37, $mes->render() . $text);
}
}
function create_parents($sub_action, $id)
{
$frm = e107::getForm();
$sql = e107::getDb();
$tp = e107::getParser();
$ns = e107::getRender();
$id = (int)$id;
if ($sub_action == 'edit' && !$_POST['update_parent'])
{
if ($sql->select('forum', '*', "forum_id=$id"))
{
$row = $sql->fetch(MYSQL_ASSOC);
}
}
else
{
$row = array();
$row['forum_name'] = '';
$row['forum_class'] = e_UC_PUBLIC;
$row['forum_postclass'] = e_UC_MEMBER;
$row['forum_threadclass'] = e_UC_MEMBER;
}
$text = "
";
$ns->tablerender(FORLAN_75, $text);
}
function create_forums($sub_action, $id)
{
//global $e107;
$frm = e107::getForm();
$sql = e107::getDb();
$tp = e107::getParser();
$ns = e107::getRender();
$id = (int)$id;
if ($sub_action == 'edit' && !$_POST['update_forum'])
{
if ($sql->select('forum', '*', "forum_id=$id"))
{
$fInfo = $sql->fetch(MYSQL_ASSOC);
}
}
else
{
$fInfo = array(
'forum_parent' => 0,
'forum_moderators' => e_UC_ADMIN,
'forum_class' => e_UC_PUBLIC,
'forum_postclass' => e_UC_MEMBER,
'forum_threadclass' => e_UC_MEMBER
);
}
$text = "
";
$ns->tablerender(FORLAN_28, $text);
}
// function show_message($message)
// {
// e107::getRender();->tablerender('', $message);
// }
function show_tools()
{
$sql = e107::getDb();
$ns = e107::getRender();
$tp = e107::getParser();
$frm = e107::getForm();
$txt = "
";
$ns->tablerender(FORLAN_166, $txt);
}
function show_prefs()
{
global $fPref;
$ns = e107::getRender();
$sql = e107::getDb();
//$e107 = e107::getInstance();
$frm = e107::getForm();
$mes = e107::getMessage();
$poll_installed = e107::isInstalled('poll');
if(!$poll_installed)
{
if($fPref->get('poll') == 1)
{
$fPref['forum_poll'] = e_UC_NOBODY;
$fPref->save(false, true);
}
}
$text = "
";
$ns->tablerender(FORLAN_62, $mes->render() . $text);
}
function show_reported($sub_action)
{
$rs = new form; // FIXME - update to $frm
$sql = e107::getDb();
$ns = e107::getRender();
$tp = e107::getParser();
$mes = e107::getMessage();
if ($sub_action) {
$sql->select("generic", "*", "gen_id='".$sub_action."'");
$row = $sql->fetch();
$sql->select("user", "*", "user_id='". $row['gen_user_id']."'");
$user = $sql->fetch();
//$con = new convert;
$text = "
".FORLAN_171.": |
#".$row['gen_intdata']." |
".FORLAN_173.": |
".$row['gen_ip']." |
".FORLAN_174.": |
".$user['user_name']."
|
".FORLAN_175.": |
".e107::getDate()->convert_date($row['gen_datestamp'], "long")." |
".FORLAN_176.": |
".$row['gen_chardata']." |
".$rs->form_open("post", e_SELF."?sr", "", "", "", " onsubmit=\"return confirm_('sr',".$row['gen_datestamp'].")\"")."
".$rs->form_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172)."
".$rs->form_close()."
|
";
$ns->tablerender(FORLAN_116, $text);
}
else
{
if ($reported_total = $sql->select("generic", "*", "gen_type='reported_post' OR gen_type='Reported Forum Post'"))
{
$text .= "
".FORLAN_170." |
".LAN_OPTIONS." |
";
while ($row = $sql->fetch())
{
$text .= "
".FORLAN_171." #".$row['gen_intdata']." |
".$rs->form_open("post", e_SELF."?sr", "", "", "", " onsubmit=\"return confirm_('sr',".$row['gen_datestamp'].")\"")."
".$rs->form_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172)."
".$rs->form_close()."
|
";
}
$text .= "
";
}
else
{
//$text = "".FORLAN_121."
";
$mes->addInfo(FORLAN_121);
}
$ns->tablerender(FORLAN_116, $mes->render().$text);
}
}
function show_prune()
{
$ns = e107::getRender();
$sql = e107::getDB();
$frm = e107::getForm();
// $sql->select("forum", "forum_id, forum_name", "forum_parent!=0 ORDER BY forum_order ASC");
$qry = "
SELECT f.forum_id, f.forum_name, sp.forum_name AS sub_parent, fp.forum_name AS forum_parent
FROM #forum AS f
LEFT JOIN #forum AS sp ON sp.forum_id = f.forum_sub
LEFT JOIN #forum AS fp ON fp.forum_id = f.forum_parent
WHERE f.forum_parent != 0
ORDER BY f.forum_parent ASC, f.forum_sub, f.forum_order ASC
";
$sql->gen($qry);
$forums = $sql->db_getList();
$text = "
";
$ns->tablerender(LAN_PRUNE, $text);
}
function show_mods()
{
global $for;
$ns = e107::getRender();
$sql = e107::getDB();
//$e107 = e107::getInstance();
$forumList = $for->forum_getforums('all');
$parentList = $for->forum_getparents('list');
$subList = $for->forumGetSubs('bysub');
$frm = e107::getForm();
$tp = e107::getParser();
$txt = "";
$ns->tablerender(FORLAN_33, $txt); // FIX: LAN button update was WMGLAN_4." ".FORLAN_33)
}
// TODO: check media category on $frm->bbarea()
function show_rules()
{
$pref = e107::getPref();
$ns = e107::getRender();
$sql = e107::getDB();
$tp = e107::getParser();
$frm = e107::getForm();
/*
$sql->select("wmessage");
list($null) = $sql->fetch();
list($null) = $sql->fetch();
list($null) = $sql->fetch();
list($id, $guestrules, $wm_active4) = $sql->fetch();
list($id, $memberrules, $wm_active5) = $sql->fetch();
list($id, $adminrules, $wm_active6) = $sql->fetch();
*/
if($sql->select('generic','*',"gen_type='forum_rules_guest'"))
{
$guest_rules = $sql->fetch();
}
if($sql->select('generic','*',"gen_type='forum_rules_member'"))
{
$member_rules = $sql->fetch();
}
if($sql->select('generic','*',"gen_type='forum_rules_admin'"))
{
$admin_rules = $sql->fetch();
}
$guesttext = $tp->toForm(vartrue($guest_rules['gen_chardata']));
$membertext = $tp->toForm(vartrue($member_rules['gen_chardata']));
$admintext = $tp->toForm(vartrue($admin_rules['gen_chardata']));
$text = "
";
$ns->tablerender(WMGLAN_5, $text);
echo "
";
}
}
?>