Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: modcp.php 5821 2012-05-02 15:40:38Z Tomm $
| * $Id$
|
*/
define("IN_MYBB", 1); define('THIS_SCRIPT', 'modcp.php');
|
*/
define("IN_MYBB", 1); define('THIS_SCRIPT', 'modcp.php');
|
$templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport"; $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban"; $templatelist .= ",modcp_banning_multipage,modcp_banning_nobanned,modcp_banning_auser,modcp_banning_error"; $templatelist .= ",modcp_banning_edit,modcp_banning_banned_user,modcp_nav,modcp_modlogs_noresults,modcp"; $templatelist .= ",modcp_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements"; $templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special"; $templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields"; $templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs"; $templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature_info,modcp_editprofile_signature_options,modcp_editprofile_signature";
| $templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport,modcp_reports_allreports,modcp_modlogs_multipage,modcp_announcements_delete,modcp_announcements_edit"; $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban,modcp_announcements_announcement_global,modcp_no_announcements_forum,modcp_modqueue_threads_thread"; $templatelist .= ",modcp_banning_multipage,modcp_banning_nobanned,modcp_modqueue_threads_empty,modcp_modqueue_masscontrols,modcp_modqueue_threads,modcp_modqueue_posts_post,modcp_modqueue_posts_empty"; $templatelist .= ",modcp_nav,modcp_modlogs_noresults,modcp,modcp_modqueue_posts,modcp_modqueue_attachments_attachment,modcp_modqueue_attachments_empty,modcp_modqueue_attachments,modcp_editprofile_suspensions_info"; $templatelist .= ",modcp_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements,modcp_editprofile_select_option,modcp_editprofile_select,modcp_finduser_noresults"; $templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special,modcp_warninglogs_warning_revoked,modcp_warninglogs_warning,modcp_ipsearch_result"; $templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields,modcp_ipsearch_noresults,modcp_ipsearch_results,modcp_ipsearch_misc_info"; $templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread"; $templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature,forumjump_advanced,smilieinsert_getmore,modcp_announcements_forum_nomod,modcp_announcements_announcement,multipage_prevpage"; $templatelist .= ",multipage_start,multipage_page_current,multipage_page,multipage_end,multipage_nextpage,multipage";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_user.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_user.php";
|
Zeile 79 | Zeile 80 |
---|
$unviewableforums = str_replace("'", '', $unviewableforums); $unviewableforums = explode(',', $unviewableforums);
|
$unviewableforums = str_replace("'", '', $unviewableforums); $unviewableforums = explode(',', $unviewableforums);
|
| } else { $unviewableforums = array();
|
}
// Fetch the Mod CP menu
| }
// Fetch the Mod CP menu
|
Zeile 88 | Zeile 93 |
---|
// Make navigation add_breadcrumb($lang->nav_modcp, "modcp.php");
|
// Make navigation add_breadcrumb($lang->nav_modcp, "modcp.php");
|
|
|
if($mybb->input['action'] == "do_reports") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if($mybb->input['action'] == "do_reports") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
if(!is_array($mybb->input['reports'])) { error($lang->error_noselected_reports);
| if(!is_array($mybb->input['reports'])) { error($lang->error_noselected_reports);
|
Zeile 105 | Zeile 110 |
---|
$mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode($mybb->input['reports'], "','"); $rids = "'0','{$rids}'";
|
$mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode($mybb->input['reports'], "','"); $rids = "'0','{$rids}'";
|
|
|
$sql = "rid IN ({$rids})"; }
|
$sql = "rid IN ({$rids})"; }
|
|
|
$plugins->run_hooks("modcp_do_reports");
|
$plugins->run_hooks("modcp_do_reports");
|
|
|
$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}"); $cache->update_reportedposts();
| $db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}"); $cache->update_reportedposts();
|
Zeile 123 | Zeile 128 |
---|
{ add_breadcrumb($lang->mcp_nav_reported_posts, "modcp.php?action=reports");
|
{ add_breadcrumb($lang->mcp_nav_reported_posts, "modcp.php?action=reports");
|
if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20; }
| if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20; }
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "reportstatus ='0'"); $report_count = $db->fetch_field($query, "count");
$mybb->input['rid'] = intval($mybb->input['rid']);
|
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "reportstatus ='0'"); $report_count = $db->fetch_field($query, "count");
$mybb->input['rid'] = intval($mybb->input['rid']);
|
|
|
if($mybb->input['rid']) { $query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'"); $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0)
|
if($mybb->input['rid']) { $query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'"); $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0)
|
{
| {
|
$page = $result / $perpage; } else
| $page = $result / $perpage; } else
|
Zeile 156 | Zeile 161 |
---|
$postcount = intval($report_count); $pages = $postcount / $perpage; $pages = ceil($pages);
|
$postcount = intval($report_count); $pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->input['page'] == "last") { $page = $pages;
| if($mybb->input['page'] == "last") { $page = $pages;
|
Zeile 168 | Zeile 173 |
---|
}
if($page && $page > 0)
|
}
if($page && $page > 0)
|
{ $start = ($page-1) * $perpage; } else { $start = 0;
| { $start = ($page-1) * $perpage; } else { $start = 0;
|
$page = 1; } $upper = $start+$perpage;
| $page = 1; } $upper = $start+$perpage;
|
Zeile 191 | Zeile 196 |
---|
} $plugins->run_hooks("modcp_reports_start");
|
} $plugins->run_hooks("modcp_reports_start");
|
|
|
$reports = ''; $query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
| $reports = ''; $query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
|
Zeile 217 | Zeile 222 |
---|
if(is_moderator($report['fid'])) { $trow = 'trow_shaded';
|
if(is_moderator($report['fid'])) { $trow = 'trow_shaded';
|
}
$report['postlink'] = get_post_link($report['pid'], $report['tid']); $report['threadlink'] = get_thread_link($report['tid']);
| }
$report['postlink'] = get_post_link($report['pid'], $report['tid']); $report['threadlink'] = get_thread_link($report['tid']);
|
$report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
| $report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
|
Zeile 324 | Zeile 329 |
---|
while($report = $db->fetch_array($query)) { $trow = alt_trow();
|
while($report = $db->fetch_array($query)) { $trow = alt_trow();
|
$report['threadsubject'] = $lang->na;
|
|
$report['threadlink'] = get_thread_link($report['tid']);
$report['posterlink'] = get_profile_link($report['postuid']);
| $report['threadlink'] = get_thread_link($report['tid']);
$report['posterlink'] = get_profile_link($report['postuid']);
|
Zeile 334 | Zeile 339 |
---|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
|
|
if($report['reportstatus'] == 0) { $trow = "trow_shaded";
|
if($report['reportstatus'] == 0) { $trow = "trow_shaded";
|
} if($report['threadsubject'])
| } // No subject? Set it to N/A if($report['threadsubject'] == '') { $report['threadsubject'] = $lang->na; } else
|
{
|
{
|
| // Only parse bad words and sanitize subject if there is one...
|
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
|
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
|
$report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";
| |
}
|
}
|
| $report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";
|
eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";"); } }
| eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";"); } }
|
Zeile 355 | Zeile 367 |
---|
eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";"); output_page($allreportedposts); }
|
eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";"); output_page($allreportedposts); }
|
|
|
if($mybb->input['action'] == "modlogs") { add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
| if($mybb->input['action'] == "modlogs") { add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
|
Zeile 364 | Zeile 376 |
---|
if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
}
| }
|
$where = '';
// Searching for entries by a particular user if($mybb->input['uid'])
|
$where = '';
// Searching for entries by a particular user if($mybb->input['uid'])
|
{
| {
|
$where .= " AND l.uid='".intval($mybb->input['uid'])."'"; }
// Searching for entries in a specific forum if($mybb->input['fid'])
|
$where .= " AND l.uid='".intval($mybb->input['uid'])."'"; }
// Searching for entries in a specific forum if($mybb->input['fid'])
|
{
| {
|
$where .= " AND t.fid='".intval($mybb->input['fid'])."'"; }
// Order? switch($mybb->input['sortby'])
|
$where .= " AND t.fid='".intval($mybb->input['fid'])."'"; }
// Order? switch($mybb->input['sortby'])
|
{
| {
|
case "username": $sortby = "u.username"; break; case "forum": $sortby = "f.name";
|
case "username": $sortby = "u.username"; break; case "forum": $sortby = "f.name";
|
break;
| break;
|
case "thread": $sortby = "t.subject"; break; default: $sortby = "l.dateline";
|
case "thread": $sortby = "t.subject"; break; default: $sortby = "l.dateline";
|
}
| }
|
$order = $mybb->input['order']; if($order != "asc") {
| $order = $mybb->input['order']; if($order != "asc") {
|
Zeile 411 | Zeile 423 |
---|
WHERE 1=1 {$where}{$tflist} "); $rescount = $db->fetch_field($query, "count");
|
WHERE 1=1 {$where}{$tflist} "); $rescount = $db->fetch_field($query, "count");
|
|
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$postcount = intval($rescount); $pages = $postcount / $perpage; $pages = ceil($pages);
|
$postcount = intval($rescount); $pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->input['page'] == "last") { $page = $pages;
| if($mybb->input['page'] == "last") { $page = $pages;
|
Zeile 455 | Zeile 467 |
---|
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid) WHERE 1=1 {$where}{$tflist}
|
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid) WHERE 1=1 {$where}{$tflist}
|
ORDER BY {$sortby} {$order} LIMIT {$start}, {$perpage} ");
| ORDER BY {$sortby} {$order} LIMIT {$start}, {$perpage} ");
|
while($logitem = $db->fetch_array($query)) { $information = '';
| while($logitem = $db->fetch_array($query)) { $information = '';
|
Zeile 532 | Zeile 544 |
---|
}
if($mybb->input['action'] == "do_delete_announcement")
|
}
if($mybb->input['action'] == "do_delete_announcement")
|
{ verify_post_check($mybb->input['my_post_key']);
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement['aid']) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
| { verify_post_check($mybb->input['my_post_key']);
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement['aid']) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
|
$plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'");
| $plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'");
|
Zeile 565 | Zeile 577 |
---|
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
if(!$announcement['aid'])
|
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
if(!$announcement['aid'])
|
{
| {
|
error($lang->error_invalid_announcement); }
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
error($lang->error_invalid_announcement); }
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 593 | Zeile 605 |
---|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title;
|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title;
|
}
| }
|
if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message;
|
if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message;
|
}
| }
|
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
}
| }
|
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
|
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
|
|
|
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24)
|
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24)
|
{
| {
|
$startdate[0] = "00"; } }
| $startdate[0] = "00"; } }
|
Zeile 635 | Zeile 647 |
---|
}
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));
|
}
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));
|
if($startdate < 0 || $startdate == false)
| if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
|
{ $errors[] = $lang->error_invalid_start_date; }
| { $errors[] = $lang->error_invalid_start_date; }
|
Zeile 652 | Zeile 663 |
---|
$mybb->input['endtime_month'] = 1; } $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
|
$mybb->input['endtime_month'] = 1; } $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
|
if($enddate < 0 || $enddate == false)
| if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
|
{ $errors[] = $lang->error_invalid_end_date; }
|
{ $errors[] = $lang->error_invalid_end_date; }
|
elseif($enddate < $startdate)
| if($enddate <= $startdate)
|
{ $errors[] = $lang->error_end_before_start; }
| { $errors[] = $lang->error_end_before_start; }
|
Zeile 729 | Zeile 740 |
---|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$starttime_time = htmlspecialchars($mybb->input['starttime_time']);
| $starttime_time = htmlspecialchars_uni($mybb->input['starttime_time']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endtime_time = htmlspecialchars($mybb->input['endtime_time']);
| $endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);
|
} else {
| } else {
|
Zeile 830 | Zeile 841 |
---|
}
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))
|
}
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))
|
{ $end_type_sel['infinite'] = ' checked="checked"'; } else { $end_type_sel['finite'] = ' checked="checked"'; }
| { $end_type_sel['infinite'] = ' checked="checked"'; } else { $end_type_sel['finite'] = ' checked="checked"'; }
|
// MyCode editor $codebuttons = build_mycode_inserter();
| // MyCode editor $codebuttons = build_mycode_inserter();
|
Zeile 883 | Zeile 894 |
---|
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
}
| }
|
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
|
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
|
|
|
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0];
| if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0];
|
Zeile 905 | Zeile 916 |
---|
if($enddate[0] >= 24) { $enddate[0] = "00";
|
if($enddate[0] >= 24) { $enddate[0] = "00";
|
} }
| } }
|
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = 1;
|
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = 1;
|
}
| }
|
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));
|
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));
|
if($startdate < 0 || $startdate == false)
| if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
|
{ $errors[] = $lang->error_invalid_start_date; }
| { $errors[] = $lang->error_invalid_start_date; }
|
Zeile 931 | Zeile 942 |
---|
$mybb->input['endtime_month'] = 1; } $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
|
$mybb->input['endtime_month'] = 1; } $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
|
if($enddate < 0 || $enddate == false) {
| if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false) {
|
$errors[] = $lang->error_invalid_end_date; }
|
$errors[] = $lang->error_invalid_end_date; }
|
elseif($enddate < $startdate)
| elseif($enddate <= $startdate)
|
{ $errors[] = $lang->error_end_before_start; }
| { $errors[] = $lang->error_end_before_start; }
|
Zeile 1037 | Zeile 1048 |
---|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$starttime_time = htmlspecialchars($mybb->input['starttime_time']);
| $starttime_time = htmlspecialchars_uni($mybb->input['starttime_time']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endtime_time = htmlspecialchars($mybb->input['endtime_time']);
| $endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);
|
$errored = true; }
| $errored = true; }
|
Zeile 1121 | Zeile 1132 |
---|
if($announcement['allowhtml']) { $html_sel['yes'] = ' checked="checked"';
|
if($announcement['allowhtml']) { $html_sel['yes'] = ' checked="checked"';
|
} else
| } else
|
{ $html_sel['no'] = ' checked="checked"'; }
| { $html_sel['no'] = ' checked="checked"'; }
|
Zeile 1213 | Zeile 1224 |
---|
{ // Moderator is not super, so don't show global annnouncemnets $announcements_global = '';
|
{ // Moderator is not super, so don't show global annnouncemnets $announcements_global = '';
|
}
fetch_forum_announcements();
| }
fetch_forum_announcements();
|
if(!$announcements_forum) { eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";"); }
|
if(!$announcements_forum) { eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";"); }
|
|
|
$plugins->run_hooks("modcp_announcements"); eval("\$announcements = \"".$templates->get("modcp_announcements")."\";"); output_page($announcements); }
|
$plugins->run_hooks("modcp_announcements"); eval("\$announcements = \"".$templates->get("modcp_announcements")."\";"); output_page($announcements); }
|
|
|
if($mybb->input['action'] == "do_modqueue") { require_once MYBB_ROOT."inc/class_moderation.php";
| if($mybb->input['action'] == "do_modqueue") { require_once MYBB_ROOT."inc/class_moderation.php";
|
Zeile 1262 | Zeile 1273 |
---|
if(!empty($threads_to_delete)) { foreach($threads_to_delete as $tid)
|
if(!empty($threads_to_delete)) { foreach($threads_to_delete as $tid)
|
{
| {
|
$moderation->delete_thread($tid); } log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads);
| $moderation->delete_thread($tid); } log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads);
|
Zeile 1343 | Zeile 1354 |
---|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) {
| $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) {
|
$start = ($page-1) * $perpage; } else
| $start = ($page-1) * $perpage; } else
|
Zeile 1365 | Zeile 1376 |
---|
$page = 1; }
|
$page = 1; }
|
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=threads");
| $multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");
|
$query = $db->query(" SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid
| $query = $db->query(" SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid
|
Zeile 1429 | Zeile 1440 |
---|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_posts / $perpage;
|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_posts / $perpage;
|
$pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=posts");
| $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
$multipage = multipage($unapproved_posts, $perpage, $page, "modcp.php?action=modqueue&type=posts");
|
$query = $db->query(" SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline
| $query = $db->query(" SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline
|
Zeile 1463 | Zeile 1474 |
---|
LIMIT {$start}, {$perpage} "); while($post = $db->fetch_array($query))
|
LIMIT {$start}, {$perpage} "); while($post = $db->fetch_array($query))
|
{
| {
|
$altbg = alt_trow(); $post['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($post['threadsubject'])); $post['threadlink'] = get_thread_link($post['tid']);
| $altbg = alt_trow(); $post['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($post['threadsubject'])); $post['threadlink'] = get_thread_link($post['tid']);
|
Zeile 1487 | Zeile 1498 |
---|
if($posts) { add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts");
|
if($posts) { add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts");
|
|
|
$plugins->run_hooks("modcp_modqueue_posts_end"); eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
| $plugins->run_hooks("modcp_modqueue_posts_end"); eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
|
Zeile 1498 | Zeile 1509 |
---|
if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue)) {
|
if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue)) {
|
$query = $db->query("
| $query = $db->query("
|
SELECT COUNT(aid) AS unapprovedattachments FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
| SELECT COUNT(aid) AS unapprovedattachments FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
|
Zeile 1537 | Zeile 1548 |
---|
$page = 1; }
|
$page = 1; }
|
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
| $multipage = multipage($unapproved_attachments, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
|
$query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
| $query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
|
Zeile 1592 | Zeile 1603 |
---|
// Still nothing? All queues are empty! :-D if(!$threadqueue && !$postqueue && !$attachmentqueue)
|
// Still nothing? All queues are empty! :-D if(!$threadqueue && !$postqueue && !$attachmentqueue)
|
{
| {
|
add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue"); $plugins->run_hooks("modcp_modqueue_end");
| add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue"); $plugins->run_hooks("modcp_modqueue_end");
|
Zeile 1710 | Zeile 1721 |
---|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option) {
|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option) {
|
| $mybb->input[$option['time']] = intval($mybb->input[$option['time']]);
|
if(!$mybb->input[$option['action']]) { if($user[$option['update_field']] == 1)
| if(!$mybb->input[$option['action']]) { if($user[$option['update_field']] == 1)
|
Zeile 1725 | Zeile 1737 |
---|
if($mybb->input[$option['action']]) {
|
if($mybb->input[$option['action']]) {
|
if(intval($mybb->input[$option['time']]) == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)
| if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)
|
{ // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error";
| { // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error";
|
Zeile 1840 | Zeile 1852 |
---|
$mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]); }
|
$mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]); }
|
if($user['usertitle'] == "")
| // Custom user title, check to see if we have a default group title if(!$user['displaygroup'])
|
{
|
{
|
$query = $db->simple_select("usertitles", "*", "posts <='".$user['postnum']."'", array('order_by' => 'posts', 'order_dir' => 'DESC', 'limit' => 1)); $utitle = $db->fetch_array($query); $defaulttitle = $utitle['title'];
| $user['displaygroup'] = $user['usergroup'];
|
}
|
}
|
else { if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
$displaygroupfields = array( "usertitle" ); $display_group = usergroup_displaygroup($user['displaygroup']);
| $displaygroupfields = array('usertitle'); $display_group = usergroup_displaygroup($user['displaygroup']);
if(!empty($display_group['usertitle'])) {
|
$defaulttitle = $display_group['usertitle']; }
|
$defaulttitle = $display_group['usertitle']; }
|
| else { // Go for post count title if a group default isn't set $usertitles = $cache->read('usertitles');
foreach($usertitles as $title) { if($title['posts'] <= $mybb->user['postnum']) { $defaulttitle = $title['title']; } } }
|
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = ''; }
|
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = ''; }
|
|
|
$bdaysel = ''; for($i = 1; $i <= 31; ++$i) {
| $bdaysel = ''; for($i = 1; $i <= 31; ++$i) {
|
Zeile 1883 | Zeile 1903 |
---|
// Fetch profile fields $query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'"); $user_fields = $db->fetch_array($query);
|
// Fetch profile fields $query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'"); $user_fields = $db->fetch_array($query);
|
|
|
$requiredfields = ''; $customfields = ''; $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
| $requiredfields = ''; $customfields = ''; $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
Zeile 1975 | Zeile 1995 |
---|
{ $checked = ""; if($val == $userfield)
|
{ $checked = ""; if($val == $userfield)
|
{ $checked = " checked=\"checked\"";
| { $checked = " checked=\"checked\"";
|
} $code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />"; }
| } $code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />"; }
|
Zeile 2012 | Zeile 2032 |
---|
$code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />"; } }
|
$code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />"; } }
|
}
| }
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield);
| elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield);
|
Zeile 2023 | Zeile 2043 |
---|
$value = htmlspecialchars_uni($userfield); $maxlength = ""; if($profilefield['maxlength'] > 0)
|
$value = htmlspecialchars_uni($userfield); $maxlength = ""; if($profilefield['maxlength'] > 0)
|
{
| {
|
$maxlength = " maxlength=\"{$profilefield['maxlength']}\""; } $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
| $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; } $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
|
Zeile 2257 | Zeile 2277 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
$page_url = 'modcp.php?action=finduser'; foreach(array('username', 'sortby', 'order') as $field)
| $page_url = 'modcp.php?action=finduser'; foreach(array('username', 'sortby', 'order') as $field)
|
Zeile 2350 | Zeile 2370 |
---|
} $sortbysel = array(); switch($mybb->input['filter']['sortby'])
|
} $sortbysel = array(); switch($mybb->input['filter']['sortby'])
|
{
| {
|
case "username": $sortby = "u.username"; $sortbysel['username'] = ' selected="selected"';
| case "username": $sortby = "u.username"; $sortbysel['username'] = ' selected="selected"';
|
Zeile 2373 | Zeile 2393 |
---|
{ $order = "desc"; $ordersel['desc'] = ' selected="selected"';
|
{ $order = "desc"; $ordersel['desc'] = ' selected="selected"';
|
}
| }
|
else { $ordersel['asc'] = ' selected="selected"';
| else { $ordersel['asc'] = ' selected="selected"';
|
Zeile 2396 | Zeile 2416 |
---|
if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0) { $page = intval($mybb->input['page']);
|
if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0) { $page = intval($mybb->input['page']);
|
}
| }
|
$per_page = 20; if(isset($mybb->input['filter']['per_page']) && intval($mybb->input['filter']['per_page']) > 0) {
| $per_page = 20; if(isset($mybb->input['filter']['per_page']) && intval($mybb->input['filter']['per_page']) > 0) {
|
Zeile 2489 | Zeile 2509 |
---|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
{
| {
|
$groupscache = $cache->read("usergroups");
|
$groupscache = $cache->read("usergroups");
|
}
$ipaddressvalue = htmlspecialchars_uni($mybb->input['ipaddress']);
| }
$ipaddressvalue = htmlspecialchars_uni($mybb->input['ipaddress']);
|
// Searching post IP addresses if($mybb->input['search_posts']) { // IPv6 IP if(strpos($mybb->input['ipaddress'], ":") !== false)
|
// Searching post IP addresses if($mybb->input['search_posts']) { // IPv6 IP if(strpos($mybb->input['ipaddress'], ":") !== false)
|
{
| {
|
$post_ip_sql = "ipaddress LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'"; } else
| $post_ip_sql = "ipaddress LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'"; } else
|
Zeile 2512 | Zeile 2532 |
---|
if(!is_array($ip_range)) { $post_ip_sql = "longipaddress='{$ip_range}'";
|
if(!is_array($ip_range)) { $post_ip_sql = "longipaddress='{$ip_range}'";
|
}
| }
|
else { $post_ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'"; } }
|
else { $post_ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'"; } }
|
}
| }
|
$plugins->run_hooks("modcp_ipsearch_posts_start");
| $plugins->run_hooks("modcp_ipsearch_posts_start");
|
Zeile 2536 | Zeile 2556 |
---|
// Searching user IP addresses if($mybb->input['search_users'])
|
// Searching user IP addresses if($mybb->input['search_users'])
|
{
| {
|
// IPv6 IP if(strpos($mybb->input['ipaddress'], ":") !== false) { $user_ip_sql = "regip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."' OR lastip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";
|
// IPv6 IP if(strpos($mybb->input['ipaddress'], ":") !== false) { $user_ip_sql = "regip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."' OR lastip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";
|
}
| }
|
else { $ip_range = fetch_longipv4_range($mybb->input['ipaddress']);
| else { $ip_range = fetch_longipv4_range($mybb->input['ipaddress']);
|
Zeile 2557 | Zeile 2577 |
---|
$user_ip_sql = "(longregip > '{$ip_range[0]}' AND longregip < '{$ip_range[1]}') OR (longlastip > '{$ip_range[0]}' AND longlastip < '{$ip_range[1]}')"; } }
|
$user_ip_sql = "(longregip > '{$ip_range[0]}' AND longregip < '{$ip_range[1]}') OR (longlastip > '{$ip_range[0]}' AND longlastip < '{$ip_range[1]}')"; } }
|
}
$plugins->run_hooks("modcp_ipsearch_users_start");
| }
$plugins->run_hooks("modcp_ipsearch_users_start");
|
if($user_ip_sql) {
| if($user_ip_sql) {
|
Zeile 2571 | Zeile 2591 |
---|
$user_results = $db->fetch_field($query, "count"); }
|
$user_results = $db->fetch_field($query, "count"); }
|
}
| }
|
$total_results = $post_results+$user_results;
| $total_results = $post_results+$user_results;
|
Zeile 2583 | Zeile 2603 |
---|
// Now we have the result counts, paginate $perpage = intval($mybb->input['perpage']); if(!$perpage || $perpage <= 0)
|
// Now we have the result counts, paginate $perpage = intval($mybb->input['perpage']); if(!$perpage || $perpage <= 0)
|
{
| {
|
$perpage = $mybb->settings['threadsperpage']; }
| $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 2723 | Zeile 2743 |
---|
if(!$results) { eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";");
|
if(!$results) { eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";");
|
}
| }
|
if($ipaddressvalue) { $lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);
| if($ipaddressvalue) { $lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);
|
Zeile 2818 | Zeile 2838 |
---|
$query = $db->simple_select("banned", "COUNT(uid) AS count"); $banned_count = $db->fetch_field($query, "count");
|
$query = $db->simple_select("banned", "COUNT(uid) AS count"); $banned_count = $db->fetch_field($query, "count");
|
|
|
$postcount = intval($banned_count); $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last")
|
$postcount = intval($banned_count); $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last")
|
{
| {
|
$page = $pages; }
if($page > $pages || $page <= 0)
|
$page = $pages; }
if($page > $pages || $page <= 0)
|
{ $page = 1;
| { $page = 1;
|
}
if($page) { $start = ($page-1) * $perpage;
|
}
if($page) { $start = ($page-1) * $perpage;
|
}
| }
|
else { $start = 0;
| else { $start = 0;
|
Zeile 2865 | Zeile 2885 |
---|
while($banned = $db->fetch_array($query)) { $profile_link = build_profile_link($banned['username'], $banned['uid']);
|
while($banned = $db->fetch_array($query)) { $profile_link = build_profile_link($banned['username'], $banned['uid']);
|
|
|
// Only show the edit & lift links if current user created ban, or is super mod/admin $edit_link = ''; if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
| // Only show the edit & lift links if current user created ban, or is super mod/admin $edit_link = ''; if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
|
Zeile 3005 | Zeile 3025 |
---|
$query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "username = '".$db->escape_string($mybb->input['username'])."'", array('limit' => 1)); $user = $db->fetch_array($query); if(!$user['uid'])
|
$query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "username = '".$db->escape_string($mybb->input['username'])."'", array('limit' => 1)); $user = $db->fetch_array($query); if(!$user['uid'])
|
{
| {
|
$errors[] = $lang->invalid_username; } }
| $errors[] = $lang->invalid_username; } }
|
Zeile 3061 | Zeile 3081 |
---|
if($mybb->input['uid']) {
|
if($mybb->input['uid']) {
|
| $username_select = $db->simple_select('users', 'username', "uid='" . (int)$mybb->input['uid'] . "'"); $user['username'] = $db->fetch_field($username_select, 'username');
|
$update_array = array( 'gid' => intval($mybb->input['usergroup']), 'admin' => intval($mybb->user['uid']),
| $update_array = array( 'gid' => intval($mybb->input['usergroup']), 'admin' => intval($mybb->user['uid']),
|
Zeile 3099 | Zeile 3121 |
---|
$db->update_query('users', $update_array, "uid = {$user['uid']}");
$cache->update_banned();
|
$db->update_query('users', $update_array, "uid = {$user['uid']}");
$cache->update_banned();
|
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
| // Log edit or add ban if($mybb->input['uid']) { log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user_ban); } else { log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user); }
|
$plugins->run_hooks("modcp_do_banuser_end");
| $plugins->run_hooks("modcp_do_banuser_end");
|