mirror of
https://github.com/e107inc/e107.git
synced 2025-07-12 10:36:20 +02:00
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* e107 website system
|
* e107 website system
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||||
* Released under the terms and conditions of the
|
* Released under the terms and conditions of the
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
*
|
*
|
||||||
@ -26,7 +26,7 @@ $e_sub_cat = 'forum';
|
|||||||
require_once(e_ADMIN.'auth.php');
|
require_once(e_ADMIN.'auth.php');
|
||||||
require_once(e_HANDLER.'userclass_class.php');
|
require_once(e_HANDLER.'userclass_class.php');
|
||||||
require_once(e_HANDLER.'form_handler.php');
|
require_once(e_HANDLER.'form_handler.php');
|
||||||
require_once(e_HANDLER.'ren_help.php');
|
require_once(e_HANDLER.'ren_help.php'); // FIXME
|
||||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||||
require_once(e_PLUGIN.'forum/forum_admin_class.php');
|
require_once(e_PLUGIN.'forum/forum_admin_class.php');
|
||||||
//$emessage = eMessage::getInstance();
|
//$emessage = eMessage::getInstance();
|
||||||
@ -191,14 +191,18 @@ if(isset($_POST['submit_parent']))
|
|||||||
$tmp['forum_threadclass'] = (int)$_POST['forum_threadclass'];
|
$tmp['forum_threadclass'] = (int)$_POST['forum_threadclass'];
|
||||||
if($sql->db_Insert('forum',$tmp))
|
if($sql->db_Insert('forum',$tmp))
|
||||||
{
|
{
|
||||||
$forum->show_message(FORLAN_22.' - '.LAN_CREATED);
|
//$forum->show_message(FORLAN_22.' - '.LAN_CREATED);
|
||||||
|
$mes->addSuccess(LAN_CREATED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$forum->show_message(FORLAN_22.' - '.LAN_CREATED_FAILED);
|
//$forum->show_message(FORLAN_22.' - '.LAN_CREATED_FAILED);
|
||||||
|
$mes->addError(LAN_CREATED_FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if(isset($_POST['update_parent']))
|
if(isset($_POST['update_parent']))
|
||||||
{
|
{
|
||||||
$tmp = $_POST;
|
$tmp = $_POST;
|
||||||
@ -214,10 +218,13 @@ if(isset($_POST['update_parent']))
|
|||||||
$tmp['data']['forum_postclass'] = $_POST['forum_postclass'];
|
$tmp['data']['forum_postclass'] = $_POST['forum_postclass'];
|
||||||
$tmp['data']['forum_threadclass'] = $_POST['forum_threadclass'];
|
$tmp['data']['forum_threadclass'] = $_POST['forum_threadclass'];
|
||||||
$sql->db_Update('forum', $tmp);
|
$sql->db_Update('forum', $tmp);
|
||||||
$forum->show_message(FORLAN_14);
|
//$forum->show_message(FORLAN_14);
|
||||||
|
$mes->addSucces(LAN_UPDATED);
|
||||||
$action = 'main';
|
$action = 'main';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if(isset($_POST['submit_forum']))
|
if(isset($_POST['submit_forum']))
|
||||||
{
|
{
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
@ -231,14 +238,18 @@ if(isset($_POST['submit_forum']))
|
|||||||
$tmp['forum_parent'] = (int)$_POST['forum_parent'];
|
$tmp['forum_parent'] = (int)$_POST['forum_parent'];
|
||||||
if($sql->db_Insert('forum', $tmp))
|
if($sql->db_Insert('forum', $tmp))
|
||||||
{
|
{
|
||||||
$forum->show_message(FORLAN_36.' - '.LAN_CREATED);
|
//$forum->show_message(FORLAN_36.' - '.LAN_CREATED);
|
||||||
|
$mes->addSuccess(LAN_CREATED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$forum->show_message(FORLAN_36.' - '.LAN_CREATED_FAILED);
|
//$forum->show_message(FORLAN_36.' - '.LAN_CREATED_FAILED);
|
||||||
|
$mes->addError(LAN_CREATED_FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if(isset($_POST['update_forum']))
|
if(isset($_POST['update_forum']))
|
||||||
{
|
{
|
||||||
unset($_POST['update_forum']);
|
unset($_POST['update_forum']);
|
||||||
@ -254,10 +265,13 @@ if(isset($_POST['update_forum']))
|
|||||||
$sql->db_Update('forum', $tmp);
|
$sql->db_Update('forum', $tmp);
|
||||||
$sql->db_Update('forum', $tmp2);
|
$sql->db_Update('forum', $tmp2);
|
||||||
|
|
||||||
$forum->show_message(FORLAN_12);
|
//$forum->show_message(FORLAN_12);
|
||||||
|
$mes->addSucces(LAN_UPDATED);
|
||||||
$action = 'main';
|
$action = 'main';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if (isset($_POST['update_order']))
|
if (isset($_POST['update_order']))
|
||||||
{
|
{
|
||||||
while (list($key, $id) = each($_POST['forum_order']))
|
while (list($key, $id) = each($_POST['forum_order']))
|
||||||
@ -299,13 +313,18 @@ if (isset($_POST['updateoptions']))
|
|||||||
// $forum->show_message(FORLAN_10);
|
// $forum->show_message(FORLAN_10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if (isset($_POST['do_prune']))
|
if (isset($_POST['do_prune']))
|
||||||
{
|
{
|
||||||
$msg = $for->forumPrune($_POST['prune_type'], $_POST['prune_days'], $_POST['pruneForum']);
|
$msg = $for->forumPrune($_POST['prune_type'], $_POST['prune_days'], $_POST['pruneForum']);
|
||||||
$forum->show_message($msg);
|
//$forum->show_message($msg);
|
||||||
|
$mes->addSucces($msg);
|
||||||
$action = 'main';
|
$action = 'main';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if (isset($_POST['frsubmit']))
|
if (isset($_POST['frsubmit']))
|
||||||
{
|
{
|
||||||
$guestrules = $e107->tp->toDB($_POST['guestrules']);
|
$guestrules = $e107->tp->toDB($_POST['guestrules']);
|
||||||
@ -325,13 +344,21 @@ if (isset($_POST['frsubmit']))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if (vartrue($delete) == 'main') {
|
if (vartrue($delete) == 'main') {
|
||||||
if ($sql->db_Delete('forum', "forum_id='$del_id' ")) {
|
if ($sql->db_Delete('forum', "forum_id='$del_id' ")) {
|
||||||
$forum->show_message(FORLAN_96);
|
//$forum->show_message(FORLAN_96);
|
||||||
|
$mes->addSucces(LAN_DELETED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mes->addError(LAN_DELETED_FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
if (vartrue($action) == 'create')
|
if (vartrue($action) == 'create')
|
||||||
{
|
{
|
||||||
if ($sql->db_Select('forum', '*', "forum_parent='0' "))
|
if ($sql->db_Select('forum', '*', "forum_parent='0' "))
|
||||||
@ -350,10 +377,16 @@ if ($delete == 'cat')
|
|||||||
if ($sql->db_Delete('forum', "forum_id='$del_id' "))
|
if ($sql->db_Delete('forum', "forum_id='$del_id' "))
|
||||||
{
|
{
|
||||||
$sql->db_Delete('forum', "forum_parent='$del_id' ");
|
$sql->db_Delete('forum', "forum_parent='$del_id' ");
|
||||||
$forum->show_message(FORLAN_97);
|
$mes->addSucces(LAN_DELETED);
|
||||||
$action = 'main';
|
$action = 'main';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mes->addError(LAN_DELETED_FAILED);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
|
|
||||||
switch($action)
|
switch($action)
|
||||||
{
|
{
|
||||||
@ -402,7 +435,8 @@ switch($action)
|
|||||||
if ($delete == 'reported')
|
if ($delete == 'reported')
|
||||||
{
|
{
|
||||||
$sql->db_Delete("generic", "gen_id='$del_id' ");
|
$sql->db_Delete("generic", "gen_id='$del_id' ");
|
||||||
$forum->show_message(FORLAN_118);
|
//$forum->show_message(FORLAN_118);
|
||||||
|
$mes->addSucces(LAN_DELETED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* e107 website system
|
* e107 website system
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||||
* Released under the terms and conditions of the
|
* Released under the terms and conditions of the
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
*
|
*
|
||||||
@ -90,7 +90,10 @@ class forumAdmin
|
|||||||
function delete_parent($id, $confirm = false)
|
function delete_parent($id, $confirm = false)
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$ret = '';
|
$mes = e107::getMessage();
|
||||||
|
$ns = e107::getRender();
|
||||||
|
|
||||||
|
//$ret = '';
|
||||||
if($sql->db_Select('forum', 'forum_id', "forum_parent = {$id} AND forum_sub = 0"))
|
if($sql->db_Select('forum', 'forum_id', "forum_parent = {$id} AND forum_sub = 0"))
|
||||||
{
|
{
|
||||||
$fList = $sql->db_getList();
|
$fList = $sql->db_getList();
|
||||||
@ -103,18 +106,21 @@ class forumAdmin
|
|||||||
{
|
{
|
||||||
if($sql->db_Delete('forum', "forum_id = {$id}"))
|
if($sql->db_Delete('forum', "forum_id = {$id}"))
|
||||||
{
|
{
|
||||||
$ret .= 'Forum parent successfully deleted'; // TODO LAN
|
//$ret .= 'Forum parent successfully deleted';
|
||||||
|
$mes->addSuccess("Forum parent successfully deleted"); // TODO LAN
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret .= 'Forum parent could not be deleted'; // TODO LAN
|
//$ret .= 'Forum parent could not be deleted'; // TODO LAN
|
||||||
|
$mes->addError("Forum parent could not be deleted"); // TODO LAN
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
return 'The forum parent has the following info: <br />'.$ret; // TODO LAN
|
//return 'The forum parent has the following info: <br />'.$ret; // TODO LAN
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function deleteForum($forumId)
|
function deleteForum($forumId)
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
@ -133,7 +139,7 @@ class forumAdmin
|
|||||||
$f = new e107Forum;
|
$f = new e107Forum;
|
||||||
if($sql->db_Select('forum_thread', 'thread_id','thread_forum_id='.$forumId))
|
if($sql->db_Select('forum_thread', 'thread_id','thread_forum_id='.$forumId))
|
||||||
{
|
{
|
||||||
$list = $e107->sql->db_getList();
|
$list = $sql->db_getList();
|
||||||
foreach($list as $t)
|
foreach($list as $t)
|
||||||
{
|
{
|
||||||
$f->threadDelete($t['thread_id'], false);
|
$f->threadDelete($t['thread_id'], false);
|
||||||
@ -146,7 +152,10 @@ class forumAdmin
|
|||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$ret = '';
|
$ns = e107::getRender();
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
|
//$ret = '';
|
||||||
if($sql->db_Select('forum', 'forum_id', 'forum_sub = '.$id))
|
if($sql->db_Select('forum', 'forum_id', 'forum_sub = '.$id))
|
||||||
{
|
{
|
||||||
$fList = $sql->db_getList();
|
$fList = $sql->db_getList();
|
||||||
@ -159,18 +168,22 @@ class forumAdmin
|
|||||||
{
|
{
|
||||||
if($this->deleteForum($id))
|
if($this->deleteForum($id))
|
||||||
{
|
{
|
||||||
$ret .= "Forum {$id} successfully deleted"; // TODO LAN
|
//$ret .= "Forum {$id} successfully deleted"; // TODO LAN
|
||||||
|
$mes->addSuccess(LAN_DELETED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret .= "Forum {$id} could not be deleted"; // TODO LAN
|
//$ret .= "Forum {$id} could not be deleted"; // TODO LAN
|
||||||
|
$mes->addError(LAN_DELETED_FAILED);
|
||||||
}
|
}
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql->db_Select('forum', 'forum_name, forum_threads, forum_replies', 'forum_id = '.$id);
|
$sql->db_Select('forum', 'forum_name, forum_threads, forum_replies', 'forum_id = '.$id);
|
||||||
$row = $sql->db_Fetch();
|
$row = $sql->db_Fetch();
|
||||||
return "Forum {$id} [".$tp->toHTML($row['forum_name'])."] has {$row['forum_threads']} threads, {$row['forum_replies']} replies. <br />".$ret;
|
//return "Forum {$id} [".$tp->toHTML($row['forum_name'])."] has {$row['forum_threads']} threads, {$row['forum_replies']} replies. <br />".$ret;
|
||||||
|
$mes->addInfo("Forum {$id} [".$tp->toHTML($row['forum_name'])."] has {$row['forum_threads']} threads and {$row['forum_replies']} replies."); //FIXME combine multiple info's into one message
|
||||||
|
|
||||||
|
$ns->tablerender($caption, $mes->render() . $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_sub($id, $confirm = FALSE)
|
function delete_sub($id, $confirm = FALSE)
|
||||||
@ -290,6 +303,8 @@ class forumAdmin
|
|||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
$ns = e107::getRender();
|
||||||
|
|
||||||
$subList = $for->forumGetSubs();
|
$subList = $for->forumGetSubs();
|
||||||
|
|
||||||
@ -301,19 +316,20 @@ class forumAdmin
|
|||||||
{
|
{
|
||||||
$text = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
$text = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||||
}
|
}
|
||||||
$text .= "
|
|
||||||
<table class='table adminlist'>
|
|
||||||
<tr>
|
|
||||||
<td colspan='2' text-align:center'>".FORLAN_28."</td>
|
|
||||||
<td text-align:center'>".FORLAN_80."</td>
|
|
||||||
</tr>";
|
|
||||||
|
|
||||||
if (!$parent_amount = $sql->db_Select('forum', '*', "forum_parent='0' ORDER BY forum_order ASC"))
|
if (!$parent_amount = $sql->db_Select('forum', '*', "forum_parent='0' ORDER BY forum_order ASC"))
|
||||||
{
|
{
|
||||||
$text .= "<tr><td style='text-align:center' colspan='3'>".FORLAN_29."</td></tr>";
|
//$text .= "<tr><td style='text-align:center' colspan='3'>".FORLAN_29."</td></tr>";
|
||||||
|
$mes->addInfo(FORLAN_29);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$text .= "
|
||||||
|
<table class='table adminlist'>
|
||||||
|
<tr>
|
||||||
|
<td colspan='2'>".FORLAN_28."</td>
|
||||||
|
<td>".LAN_OPTIONS."</td>
|
||||||
|
</tr>";
|
||||||
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
|
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||||
{
|
{
|
||||||
$parentList[] = $row;
|
$parentList[] = $row;
|
||||||
@ -405,16 +421,17 @@ class forumAdmin
|
|||||||
if (!$mode)
|
if (!$mode)
|
||||||
{
|
{
|
||||||
$text .= "</table></div>";
|
$text .= "</table></div>";
|
||||||
$e107->ns->tablerender(FORLAN_30, $text);
|
$ns->tablerender(FORLAN_30, $mes->render() . $text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text .= "<tr>\n<td colspan='4' style='text-align:center'>\n".$frm->admin_button('update_order', LAN_UPDATE, 'update')."\n</td>\n</tr>\n</table>\n</form>";
|
$text .= "<tr><td colspan='4' style='text-align:center'>\n".$frm->admin_button('update_order', LAN_UPDATE, 'update')."\n</td>\n</tr>\n</table>\n</form>";
|
||||||
$e107->ns->tablerender(FORLAN_37, $text);
|
$ns->tablerender(FORLAN_37, $mes->render() . $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function create_parents($sub_action, $id)
|
function create_parents($sub_action, $id)
|
||||||
{
|
{
|
||||||
global $e107;
|
global $e107;
|
||||||
@ -443,32 +460,28 @@ class forumAdmin
|
|||||||
$text = "
|
$text = "
|
||||||
<form method='post' action='".e_SELF.'?'.e_QUERY."'>
|
<form method='post' action='".e_SELF.'?'.e_QUERY."'>
|
||||||
<table class='table adminform'>
|
<table class='table adminform'>
|
||||||
|
<colgroup span='2'>
|
||||||
|
<col class='col-label' />
|
||||||
|
<col class='col-control' />
|
||||||
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".LAN_NAME.":</td>
|
<td>".LAN_NAME.":</td>
|
||||||
<td>
|
<td><input class='tbox' type='text' name='forum_name' size='60' value='".$tp->toForm($row['forum_name'])."' maxlength='250' /></td>
|
||||||
<input class='tbox' type='text' name='forum_name' size='60' value='".$tp->toForm($row['forum_name'])."' maxlength='250' />
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>".FORLAN_23.":</td>
|
<td>".FORLAN_23.":</td>
|
||||||
<td>".$e107->user_class->uc_dropdown('forum_class', $row['forum_class'], 'nobody,public,member,admin,classes')."<span class='field-help'>".FORLAN_24."</span></td>
|
<td>".$e107->user_class->uc_dropdown('forum_class', $row['forum_class'], 'nobody,public,member,admin,classes')."<span class='field-help'>".FORLAN_24."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>".FORLAN_142.":</td>
|
<td>".FORLAN_142.":</td>
|
||||||
<td>".$e107->user_class->uc_dropdown("forum_postclass", $row['forum_postclass'], 'nobody,public,member,admin,classes')."<span class='field-help'>".FORLAN_143."</span></td>
|
<td>".$e107->user_class->uc_dropdown("forum_postclass", $row['forum_postclass'], 'nobody,public,member,admin,classes')."<span class='field-help'>".FORLAN_143."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>".FORLAN_184.":</td>
|
<td>".FORLAN_184.":</td>
|
||||||
<td>".$e107->user_class->uc_dropdown('forum_threadclass', $row['forum_threadclass'], 'nobody,public,member,admin,classes')."<span class='field-help'>".FORLAN_185."</span></td>
|
<td>".$e107->user_class->uc_dropdown('forum_threadclass', $row['forum_threadclass'], 'nobody,public,member,admin,classes')."<span class='field-help'>".FORLAN_185."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
<tr style='vertical-align:top'>
|
<div class='buttons-bar center'>";
|
||||||
<td colspan='2' style='text-align:center'>";
|
|
||||||
|
|
||||||
if ($sub_action == 'edit')
|
if ($sub_action == 'edit')
|
||||||
{
|
{
|
||||||
$text .= $frm->admin_button('update_parent', LAN_UPDATE, 'update');
|
$text .= $frm->admin_button('update_parent', LAN_UPDATE, 'update');
|
||||||
@ -477,10 +490,8 @@ class forumAdmin
|
|||||||
{
|
{
|
||||||
$text .= $frm->admin_button('submit_parent', LAN_CREATE, 'submit');
|
$text .= $frm->admin_button('submit_parent', LAN_CREATE, 'submit');
|
||||||
}
|
}
|
||||||
|
$text .= "
|
||||||
$text .= "</td>
|
</div>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>";
|
</form>";
|
||||||
|
|
||||||
$ns->tablerender(FORLAN_75, $text);
|
$ns->tablerender(FORLAN_75, $text);
|
||||||
@ -499,7 +510,7 @@ class forumAdmin
|
|||||||
{
|
{
|
||||||
if ($sql->db_Select('forum', '*', "forum_id=$id"))
|
if ($sql->db_Select('forum', '*', "forum_id=$id"))
|
||||||
{
|
{
|
||||||
$fInfo = $e107->sql->db_Fetch(MYSQL_ASSOC);
|
$fInfo = $sql->db_Fetch(MYSQL_ASSOC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -580,12 +591,14 @@ class forumAdmin
|
|||||||
$ns->tablerender(FORLAN_28, $text);
|
$ns->tablerender(FORLAN_28, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_message($message)
|
|
||||||
|
function show_message($message) // FIX
|
||||||
{
|
{
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
$ns->tablerender('', "<div style='text-align:center'><b>".$message."</b></div>"); //FIX: v2 style = render?
|
$ns->tablerender('', "<div style='text-align:center'><b>".$message."</b></div>"); //FIX: v2 style = render?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function show_tools()
|
function show_tools()
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
@ -596,7 +609,11 @@ class forumAdmin
|
|||||||
$txt = "
|
$txt = "
|
||||||
<form method='post' action='".e_SELF."?".e_QUERY."'>
|
<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||||
<table class='table adminlist'>
|
<table class='table adminlist'>
|
||||||
<tr style='width:100%'>
|
<colgroup span='2'>
|
||||||
|
<col class='col-label' />
|
||||||
|
<col class='col-control' />
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
<td>".FORLAN_156."</td>
|
<td>".FORLAN_156."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -636,16 +653,12 @@ class forumAdmin
|
|||||||
<td>".FORLAN_163."</td>
|
<td>".FORLAN_163."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><input type='checkbox' name='userpostcounts' value='1' /> ".FORLAN_164."<br /></td>
|
||||||
<input type='checkbox' name='userpostcounts' value='1' /> ".FORLAN_164."<br />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style='text-align:center'>
|
|
||||||
".$frm->admin_button('tools', LAN_EXECUTE, 'submit')."
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<div class='buttons-bar center'>
|
||||||
|
".$frm->admin_button('tools', LAN_EXECUTE, 'submit')."
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
";
|
";
|
||||||
$ns->tablerender(FORLAN_166, $txt);
|
$ns->tablerender(FORLAN_166, $txt);
|
||||||
@ -657,8 +670,9 @@ class forumAdmin
|
|||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$e107 = e107::getInstance();
|
$e107 = e107::getInstance();
|
||||||
$emessage = eMessage::getInstance();
|
//$emessage = eMessage::getInstance();
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
$poll_installed = plugInstalled('poll');
|
$poll_installed = plugInstalled('poll');
|
||||||
|
|
||||||
@ -675,43 +689,46 @@ class forumAdmin
|
|||||||
$text = "
|
$text = "
|
||||||
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
|
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
|
||||||
<table class='table adminform'>
|
<table class='table adminform'>
|
||||||
|
<colgroup span='2'>
|
||||||
|
<col class='col-label' />
|
||||||
|
<col class='col-control' />
|
||||||
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_44.":</td>
|
<td>".FORLAN_44.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('enclose') ? "<input type='checkbox' name='forum_enclose' value='1' checked='checked' />" : "<input type='checkbox' name='forum_enclose' value='1' />")."<span class='field-help'>".FORLAN_45."</div></td>
|
<td>".($fPref->get('enclose') ? "<input type='checkbox' name='forum_enclose' value='1' checked='checked' />" : "<input type='checkbox' name='forum_enclose' value='1' />")."<span class='field-help'>".FORLAN_45."</div></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_65.":</td>
|
<td>".FORLAN_65.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' name='forum_title' size='15' value='".$fPref->get('title')."' maxlength='100' /></td>
|
<td><input class='tbox' type='text' name='forum_title' size='15' value='".$fPref->get('title')."' maxlength='100' /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_47.":</td>
|
<td>".FORLAN_47.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('notify') ? "<input type='checkbox' name='email_notify' value='1' checked='checked' />" : "<input type='checkbox' name='email_notify' value='1' />")."<span class='field-help'>".FORLAN_48."</span></td>
|
<td>".($fPref->get('notify') ? "<input type='checkbox' name='email_notify' value='1' checked='checked' />" : "<input type='checkbox' name='email_notify' value='1' />")."<span class='field-help'>".FORLAN_48."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_177.":</td>
|
<td>".FORLAN_177.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('notify_on') ? "<input type='checkbox' name='email_notify_on' value='1' checked='checked' />" : "<input type='checkbox' name='email_notify_on' value='1' />")."<span class='field-help'>".FORLAN_178."</span></td>
|
<td>".($fPref->get('notify_on') ? "<input type='checkbox' name='email_notify_on' value='1' checked='checked' />" : "<input type='checkbox' name='email_notify_on' value='1' />")."<span class='field-help'>".FORLAN_178."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_49.":</td>";
|
<td>".FORLAN_49.":</td>";
|
||||||
if($poll_installed)
|
if($poll_installed)
|
||||||
{
|
{
|
||||||
//<td>".$e107->user_class->uc_dropdown("mods[{$f['forum_id']}]", $f['forum_moderators'], 'admin,classes')."</td>
|
//<td>".$e107->user_class->uc_dropdown("mods[{$f['forum_id']}]", $f['forum_moderators'], 'admin,classes')."</td>
|
||||||
$text .= "<td style='width:25%'>".$e107->user_class->uc_dropdown('forum_poll', $fPref->get('poll'), 'admin,classes').'<span class="field-help">'.FORLAN_50.'</span></td>';
|
$text .= "<td>".$e107->user_class->uc_dropdown('forum_poll', $fPref->get('poll'), 'admin,classes').'<span class="field-help">'.FORLAN_50.'</span></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text .= "<td style='width:25%'>".FORLAN_66."</td>";
|
$text .= "<td>".FORLAN_66."</td>";
|
||||||
}
|
}
|
||||||
$text .= "
|
$text .= "
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_70.":";
|
<td>".FORLAN_70.":";
|
||||||
|
|
||||||
if(!$pref['image_post'])
|
if(!$pref['image_post'])
|
||||||
{
|
{
|
||||||
@ -723,87 +740,87 @@ class forumAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text .= "</td>
|
$text .= "</td>
|
||||||
<td style='width:25%'>".($fPref->get('attach') ? "<input type='checkbox' name='forum_attach' value='1' checked='checked' />" : "<input type='checkbox' name='forum_attach' value='1' />")."<span class='field-help'>".FORLAN_71." <a href='".e_ADMIN."upload.php'>".FORLAN_130."</a> ". FORLAN_131."</span></td>
|
<td>".($fPref->get('attach') ? "<input type='checkbox' name='forum_attach' value='1' checked='checked' />" : "<input type='checkbox' name='forum_attach' value='1' />")."<span class='field-help'>".FORLAN_71." <a href='".e_ADMIN."upload.php'>".FORLAN_130."</a> ". FORLAN_131."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_134.":</td>
|
<td>".FORLAN_134.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' size='3' maxlength='5' name='forum_maxwidth' value='".$fPref->get('maxwidth')."' /><span class='field-help'>".FORLAN_135."</span></td>
|
<td><input class='tbox' type='text' size='3' maxlength='5' name='forum_maxwidth' value='".$fPref->get('maxwidth')."' /><span class='field-help'>".FORLAN_135."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_136.":</td>
|
<td>".FORLAN_136.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('linkimg') ? "<input type='checkbox' name='forum_linkimg' value='1' checked='checked' />" : "<input type='checkbox' name='forum_linkimg' value='1' />")."<span class='field-help'>".FORLAN_137."</span></td>
|
<td>".($fPref->get('linkimg') ? "<input type='checkbox' name='forum_linkimg' value='1' checked='checked' />" : "<input type='checkbox' name='forum_linkimg' value='1' />")."<span class='field-help'>".FORLAN_137."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_51.":</td>
|
<td>".FORLAN_51.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('track') ? "<input type='checkbox' name='forum_track' value='1' checked='checked' />" : "<input type='checkbox' name='forum_track' value='1' />")."<span class='field-help'>".FORLAN_52."</span></td>
|
<td>".($fPref->get('track') ? "<input type='checkbox' name='forum_track' value='1' checked='checked' />" : "<input type='checkbox' name='forum_track' value='1' />")."<span class='field-help'>".FORLAN_52."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_112.":</td>
|
<td>".FORLAN_112.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('redirect') ? "<input type='checkbox' name='forum_redirect' value='1' checked='checked' />" : "<input type='checkbox' name='forum_redirect' value='1' />")."<span class='field-help'>".FORLAN_113."</span></td>
|
<td>".($fPref->get('redirect') ? "<input type='checkbox' name='forum_redirect' value='1' checked='checked' />" : "<input type='checkbox' name='forum_redirect' value='1' />")."<span class='field-help'>".FORLAN_113."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_116.":</td>
|
<td>".FORLAN_116.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('reported_post_email') ? "<input type='checkbox' name='reported_post_email' value='1' checked='checked' />" : "<input type='checkbox' name='reported_post_email' value='1' />")."<span class='field-help'>".FORLAN_122."</span></td>
|
<td>".($fPref->get('reported_post_email') ? "<input type='checkbox' name='reported_post_email' value='1' checked='checked' />" : "<input type='checkbox' name='reported_post_email' value='1' />")."<span class='field-help'>".FORLAN_122."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_126.":</td>
|
<td>".FORLAN_126.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('forum_tooltip') ? "<input type='checkbox' name='forum_tooltip' value='1' checked='checked' />" : "<input type='checkbox' name='forum_tooltip' value='1' />")."<span class='field-help'>".FORLAN_127."</span></td>
|
<td>".($fPref->get('forum_tooltip') ? "<input type='checkbox' name='forum_tooltip' value='1' checked='checked' />" : "<input type='checkbox' name='forum_tooltip' value='1' />")."<span class='field-help'>".FORLAN_127."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_128.":</td>
|
<td>".FORLAN_128.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' name='forum_tiplength' size='15' value='".$fPref->get('tiplength')."' maxlength='20' /><span class='field-help'>".FORLAN_129."</span></td>
|
<td><input class='tbox' type='text' name='forum_tiplength' size='15' value='".$fPref->get('tiplength')."' maxlength='20' /><span class='field-help'>".FORLAN_129."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_53.":</td>
|
<td>".FORLAN_53.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' name='forum_eprefix' size='15' value='".$fPref->get('eprefix')."' maxlength='20' /><span class='field-help'>".FORLAN_54."</span></td>
|
<td><input class='tbox' type='text' name='forum_eprefix' size='15' value='".$fPref->get('eprefix')."' maxlength='20' /><span class='field-help'>".FORLAN_54."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_55.":</td>
|
<td>".FORLAN_55.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' name='forum_popular' size='3' value='".$fPref->get('popular')."' maxlength='3' /><span class='field-help'>".FORLAN_56."</span></td>
|
<td><input class='tbox' type='text' name='forum_popular' size='3' value='".$fPref->get('popular')."' maxlength='3' /><span class='field-help'>".FORLAN_56."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_57.":</td>
|
<td>".FORLAN_57.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' name='forum_postspage' size='3' value='".$fPref->get('postspage')."' maxlength='3' /><span class='field-help'>".FORLAN_58."</span></td>
|
<td><input class='tbox' type='text' name='forum_postspage' size='3' value='".$fPref->get('postspage')."' maxlength='3' /><span class='field-help'>".FORLAN_58."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_186.":</td>
|
<td>".FORLAN_186.":</td>
|
||||||
<td style='width:25%'><input class='tbox' type='text' name='forum_threadspage' size='3' value='".$fPref->get('threadspage')."' maxlength='3' /><span class='field-help'>".FORLAN_187."</span></td>
|
<td><input class='tbox' type='text' name='forum_threadspage' size='3' value='".$fPref->get('threadspage')."' maxlength='3' /><span class='field-help'>".FORLAN_187."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%'>".FORLAN_132.":</td>
|
<td>".FORLAN_132.":</td>
|
||||||
<td style='width:25%'>".($fPref->get('hilightsticky') ? "<input type='checkbox' name='forum_hilightsticky' value='1' checked='checked' />" : "<input type='checkbox' name='forum_hilightsticky' value='1' />")."<span class='field-help'>".FORLAN_133."</span></td>
|
<td>".($fPref->get('hilightsticky') ? "<input type='checkbox' name='forum_hilightsticky' value='1' checked='checked' />" : "<input type='checkbox' name='forum_hilightsticky' value='1' />")."<span class='field-help'>".FORLAN_133."</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<div class='buttons-bar center'>
|
<div class='buttons-bar center'>
|
||||||
".$frm->admin_button('updateoptions', LAN_UPDATE, 'update')."
|
".$frm->admin_button('updateoptions', LAN_UPDATE, 'update')."
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
";
|
";
|
||||||
$ns->tablerender(FORLAN_62, $emessage->render().$text);
|
$ns->tablerender(FORLAN_62, $mes->render() . $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_reported ($sub_action, $id)
|
function show_reported ($sub_action, $id)
|
||||||
{
|
{
|
||||||
global $rs; // FIX replace by $frm?
|
global $rs; // FIX replace by $frm
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
if ($sub_action) {
|
if ($sub_action) {
|
||||||
$sql -> db_Select("generic", "*", "gen_id='".$sub_action."'");
|
$sql -> db_Select("generic", "*", "gen_id='".$sub_action."'");
|
||||||
@ -813,45 +830,30 @@ class forumAdmin
|
|||||||
$con = new convert;
|
$con = new convert;
|
||||||
$text = "
|
$text = "
|
||||||
<table class='table adminlist'>
|
<table class='table adminlist'>
|
||||||
|
<colgroup span='2'>
|
||||||
|
<col class='col-label' />
|
||||||
|
<col class='col-control' />
|
||||||
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>".FORLAN_171.":</td>
|
||||||
".FORLAN_171.":
|
<td><a href='".e_PLUGIN."forum/forum_viewtopic.php?".$row['gen_intdata'].".post' rel='external'>#".$row['gen_intdata']."</a></td>
|
||||||
</td>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<a href='".e_PLUGIN."forum/forum_viewtopic.php?".$row['gen_intdata'].".post' rel='external'>#".$row['gen_intdata']."</a>
|
<td>".FORLAN_173.":</td>
|
||||||
|
<td>".$row['gen_ip']."</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>".FORLAN_174.":</td>
|
||||||
|
<td><a href='".e_BASE."user.php?id.".$user['user_id']."'>".$user['user_name']."</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>".FORLAN_175.":</td>
|
||||||
".FORLAN_173.":
|
<td>".$con -> convert_date($row['gen_datestamp'], "long")."</td>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
".$row['gen_ip']."
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>".FORLAN_176.":</td>
|
||||||
".FORLAN_174.":
|
<td>".$row['gen_chardata']."</td>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href='".e_BASE."user.php?id.".$user['user_id']."'>".$user['user_name']."</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
".FORLAN_175.":
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
".$con -> convert_date($row['gen_datestamp'], "long")."
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
".FORLAN_176.":
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
".$row['gen_chardata']."
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style='text-align:center' colspan='2'>
|
<td style='text-align:center' colspan='2'>
|
||||||
@ -859,23 +861,27 @@ class forumAdmin
|
|||||||
".$rs->form_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172)."
|
".$rs->form_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172)."
|
||||||
".$rs->form_close()."
|
".$rs->form_close()."
|
||||||
</td>
|
</td>
|
||||||
</tr>\n";
|
</tr>
|
||||||
$text .= "</table>";
|
</table>";
|
||||||
$text .= "</div>";
|
|
||||||
$ns -> tablerender(FORLAN_116, $text);
|
$ns -> tablerender(FORLAN_116, $text);
|
||||||
} else {
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if ($reported_total = $sql->db_Select("generic", "*", "gen_type='reported_post' OR gen_type='Reported Forum Post'"))
|
if ($reported_total = $sql->db_Select("generic", "*", "gen_type='reported_post' OR gen_type='Reported Forum Post'"))
|
||||||
{
|
{
|
||||||
$text .= "<table class='table adminlist'>
|
$text .= "
|
||||||
|
<table class='table adminlist'>
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:80%' >".FORLAN_170."</td>
|
<td>".FORLAN_170."</td>
|
||||||
<td style='width:20%; text-align:center'>".FORLAN_80."</td>
|
<td>".LAN_OPTIONS."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
while ($row = $sql->db_Fetch())
|
while ($row = $sql->db_Fetch())
|
||||||
{
|
{
|
||||||
$text .= "<tr>
|
$text .= "<tr>
|
||||||
<td style='width:80%'><a href='".e_SELF."?sr.".$row['gen_id']."'>".FORLAN_171." #".$row['gen_intdata']."</a></td>
|
<td<a href='".e_SELF."?sr.".$row['gen_id']."'>".FORLAN_171." #".$row['gen_intdata']."</a></td>
|
||||||
<td style='width:20%; text-align:center; vertical-align:top; white-space: nowrap'>
|
<td text-align:center; vertical-align:top; white-space: nowrap'>
|
||||||
".$rs->form_open("post", e_SELF."?sr", "", "", "", " onsubmit=\"return confirm_('sr',".$row['gen_datestamp'].")\"")."
|
".$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_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172)."
|
||||||
".$rs->form_close()."
|
".$rs->form_close()."
|
||||||
@ -886,9 +892,10 @@ class forumAdmin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text = "<div style='text-align:center'>".FORLAN_121."</div>";
|
//$text = "<div style='text-align:center'>".FORLAN_121."</div>";
|
||||||
|
$mes->addInfo(FORLAN_121);
|
||||||
}
|
}
|
||||||
$ns->tablerender(FORLAN_116, $text);
|
$ns->tablerender(FORLAN_116, $mes->render() . $text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -916,11 +923,9 @@ class forumAdmin
|
|||||||
<tr>
|
<tr>
|
||||||
<td>".FORLAN_60."</td>
|
<td>".FORLAN_60."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
|
|
||||||
<td>".FORLAN_87."
|
<tr>
|
||||||
<input class='tbox' type='text' name='prune_days' size='6' value='' maxlength='3' />
|
<td>".FORLAN_87." <input class='tbox' type='text' name='prune_days' size='6' value='' maxlength='3' /></td>
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -942,12 +947,11 @@ class forumAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$text .= "<tr>
|
$text .= "
|
||||||
<td colspan='2' style='text-align:center'>
|
|
||||||
".$frm->admin_button('do_prune', LAN_PRUNE, 'submit')."
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
<div class='buttons-bar center'>
|
||||||
|
".$frm->admin_button('do_prune', LAN_PRUNE, 'submit')."
|
||||||
|
</div>
|
||||||
</form>";
|
</form>";
|
||||||
$ns->tablerender(LAN_PRUNE, $text);
|
$ns->tablerender(LAN_PRUNE, $text);
|
||||||
}
|
}
|
||||||
@ -958,14 +962,19 @@ class forumAdmin
|
|||||||
global $for;
|
global $for;
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
$sql = e107::getDB();
|
$sql = e107::getDB();
|
||||||
$e107 = e107::getInstance(); // FIX: needed?
|
$e107 = e107::getInstance(); // FIX needed?
|
||||||
$forumList = $for->forum_getforums('all');
|
$forumList = $for->forum_getforums('all');
|
||||||
$parentList = $for->forum_getparents('list');
|
$parentList = $for->forum_getparents('list');
|
||||||
$subList = $for->forumGetSubs('bysub');
|
$subList = $for->forumGetSubs('bysub');
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'><table class='table adminlist'>";
|
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||||
|
<table class='table adminlist'>
|
||||||
|
<colgroup span='2'>
|
||||||
|
<col class='col-label' />
|
||||||
|
<col class='col-control' />
|
||||||
|
</colgroup>";
|
||||||
|
|
||||||
foreach($parentList as $p)
|
foreach($parentList as $p)
|
||||||
{
|
{
|
||||||
@ -995,13 +1004,11 @@ class forumAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$txt .= "
|
$txt .= "
|
||||||
<tr>
|
</table>
|
||||||
<td colspan='2' style='text-align:center'>
|
<div class='buttons-bar center'>
|
||||||
".$frm->admin_button('setMods', LAN_UPDATE, 'update')."
|
".$frm->admin_button('setMods', LAN_UPDATE, 'update')."
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</form>";
|
||||||
|
|
||||||
</table></form>";
|
|
||||||
$ns->tablerender(FORLAN_33, $txt); // FIX: LAN button update was WMGLAN_4." ".FORLAN_33)
|
$ns->tablerender(FORLAN_33, $txt); // FIX: LAN button update was WMGLAN_4." ".FORLAN_33)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1041,11 +1048,12 @@ class forumAdmin
|
|||||||
$text = "
|
$text = "
|
||||||
<form method='post' action='".e_SELF."?rules' id='wmform'>
|
<form method='post' action='".e_SELF."?rules' id='wmform'>
|
||||||
<table class='table adminform'>
|
<table class='table adminform'>
|
||||||
<tr>";
|
<colgroup span='2'>
|
||||||
|
<col class='col-label' />
|
||||||
$text .= "
|
<col class='col-control' />
|
||||||
|
</colgroup>
|
||||||
<td style='width:20%'>".WMGLAN_1.": <br />
|
<tr>
|
||||||
|
<td>".WMGLAN_1.": <br />
|
||||||
".WMGLAN_6.":";
|
".WMGLAN_6.":";
|
||||||
if (vartrue($guest_rules['gen_intdata']))
|
if (vartrue($guest_rules['gen_intdata']))
|
||||||
{
|
{
|
||||||
@ -1056,6 +1064,7 @@ class forumAdmin
|
|||||||
$text .= "<input type='checkbox' name='guest_active' value='1' />";
|
$text .= "<input type='checkbox' name='guest_active' value='1' />";
|
||||||
}
|
}
|
||||||
$text .= "</td>
|
$text .= "</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<textarea class='tbox' name='guestrules' cols='70' rows='10'>$guesttext</textarea>
|
<textarea class='tbox' name='guestrules' cols='70' rows='10'>$guesttext</textarea>
|
||||||
<br />
|
<br />
|
||||||
@ -1066,7 +1075,7 @@ class forumAdmin
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:20%'>".WMGLAN_2.": <br />
|
<td>".WMGLAN_2.": <br />
|
||||||
".WMGLAN_6.":";
|
".WMGLAN_6.":";
|
||||||
if (vartrue($member_rules['gen_intdata']))
|
if (vartrue($member_rules['gen_intdata']))
|
||||||
{
|
{
|
||||||
@ -1077,6 +1086,7 @@ class forumAdmin
|
|||||||
$text .= "<input type='checkbox' name='member_active' value='1' />";
|
$text .= "<input type='checkbox' name='member_active' value='1' />";
|
||||||
}
|
}
|
||||||
$text .= "</td>
|
$text .= "</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<textarea class='tbox' name='memberrules' cols='70' rows='10'>$membertext</textarea>
|
<textarea class='tbox' name='memberrules' cols='70' rows='10'>$membertext</textarea>
|
||||||
<br />
|
<br />
|
||||||
@ -1087,7 +1097,7 @@ class forumAdmin
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:20%'>".WMGLAN_3.": <br />
|
<td>".WMGLAN_3.": <br />
|
||||||
".WMGLAN_6.": ";
|
".WMGLAN_6.": ";
|
||||||
|
|
||||||
if (vartrue($admin_rules['gen_intdata']))
|
if (vartrue($admin_rules['gen_intdata']))
|
||||||
@ -1108,14 +1118,10 @@ class forumAdmin
|
|||||||
".display_help('helpb', 1, 'addtext3', 'help3')."
|
".display_help('helpb', 1, 'addtext3', 'help3')."
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style='vertical-align:top'>
|
|
||||||
<td> </td>
|
|
||||||
<td>
|
|
||||||
".$frm->admin_button('frsubmit', WMGLAN_4, 'submit')."
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
<div class='buttons-bar center'>
|
||||||
|
".$frm->admin_button('frsubmit', LAN_UPDATE, 'submit')."
|
||||||
|
</div>
|
||||||
</form>";
|
</form>";
|
||||||
|
|
||||||
$ns->tablerender(WMGLAN_5, $text);
|
$ns->tablerender(WMGLAN_5, $text);
|
||||||
|
@ -19,13 +19,13 @@ define("FORLAN_7", "Forum Options");
|
|||||||
define("FORLAN_8", "Forums pruned.");
|
define("FORLAN_8", "Forums pruned.");
|
||||||
define("FORLAN_9", "Prune not required.");
|
define("FORLAN_9", "Prune not required.");
|
||||||
//define("FORLAN_10", "Options Saved");
|
//define("FORLAN_10", "Options Saved");
|
||||||
define("FORLAN_11", "Forum created");
|
//define("FORLAN_11", "Forum created");
|
||||||
define("FORLAN_12", "Forum updated");
|
//define("FORLAN_12", "Forum updated");
|
||||||
define("FORLAN_13", "Parent created");
|
//define("FORLAN_13", "Parent created");
|
||||||
define("FORLAN_14", "Forum parent updated");
|
//define("FORLAN_14", "Forum parent updated");
|
||||||
define("FORLAN_15", "Please tick the confirm box to delete the forum");
|
define("FORLAN_15", "Please tick the confirm box to delete the forum");
|
||||||
define("FORLAN_16", "Forums");
|
define("FORLAN_16", "Forums");
|
||||||
define("FORLAN_17", "No parents yet");
|
define("FORLAN_17", "No parents yet.");
|
||||||
define("FORLAN_18", "Existing Parents");
|
define("FORLAN_18", "Existing Parents");
|
||||||
define("FORLAN_19", "Edit");
|
define("FORLAN_19", "Edit");
|
||||||
define("FORLAN_20", "Delete");
|
define("FORLAN_20", "Delete");
|
||||||
@ -86,7 +86,7 @@ define("FORLAN_76", "Forums Front Page");
|
|||||||
define("FORLAN_77", "Create Forums");
|
define("FORLAN_77", "Create Forums");
|
||||||
define("FORLAN_78", "Forum Order");
|
define("FORLAN_78", "Forum Order");
|
||||||
define("FORLAN_79", "Preferences");
|
define("FORLAN_79", "Preferences");
|
||||||
define("FORLAN_80", "Options");
|
//define("FORLAN_80", "Options");
|
||||||
define("FORLAN_81", "Are you sure you want to delete this parent? - forums of this parent will also be deleted");
|
define("FORLAN_81", "Are you sure you want to delete this parent? - forums of this parent will also be deleted");
|
||||||
define("FORLAN_82", "Are you sure you want to delete this forum?");
|
define("FORLAN_82", "Are you sure you want to delete this forum?");
|
||||||
define("FORLAN_83", "Create Parents");
|
define("FORLAN_83", "Create Parents");
|
||||||
@ -106,8 +106,8 @@ define("FORLAN_93", "reply (replies) deleted");
|
|||||||
|
|
||||||
define("FORLAN_94", "Set Ranks");
|
define("FORLAN_94", "Set Ranks");
|
||||||
define("FORLAN_95", "Ranks saved");
|
define("FORLAN_95", "Ranks saved");
|
||||||
define("FORLAN_96", "Forum deleted");
|
//define("FORLAN_96", "Forum deleted");
|
||||||
define("FORLAN_97", "Parent deleted");
|
//define("FORLAN_97", "Parent deleted");
|
||||||
|
|
||||||
define("FORLAN_98", "Rank Name");
|
define("FORLAN_98", "Rank Name");
|
||||||
define("FORLAN_99", "number of points before level change");
|
define("FORLAN_99", "number of points before level change");
|
||||||
@ -132,7 +132,7 @@ define("FORLAN_113", "Tick this to make browser redirect to forum page after rep
|
|||||||
//define("FORLAN_115", "Tick this to allow users to change their Custom Title");
|
//define("FORLAN_115", "Tick this to allow users to change their Custom Title");
|
||||||
define("FORLAN_116", "Reported Posts");
|
define("FORLAN_116", "Reported Posts");
|
||||||
define("FORLAN_117", "This will delete the record of the reported post. Not the post itself.");
|
define("FORLAN_117", "This will delete the record of the reported post. Not the post itself.");
|
||||||
define("FORLAN_118", "Reported post deleted");
|
// define("FORLAN_118", "Reported post deleted");
|
||||||
// define("FORLAN_119", "Clicking links will open forum in a new window.");
|
// define("FORLAN_119", "Clicking links will open forum in a new window.");
|
||||||
define("FORLAN_120", "Tick this to allow users to change their Custom Title");
|
define("FORLAN_120", "Tick this to allow users to change their Custom Title");
|
||||||
define("FORLAN_121", "No reported posts");
|
define("FORLAN_121", "No reported posts");
|
||||||
|
Reference in New Issue
Block a user