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 5418 2011-03-24 14:03:12Z jammerx2 $
| * $Id: modcp.php 5761 2012-03-22 15:22:01Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 67 | Zeile 67 |
---|
else { $flist = $tflist = '';
|
else { $flist = $tflist = '';
|
| }
// Retrieve a list of unviewable forums $unviewableforums = get_unviewable_forums();
if($unviewableforums && !is_super_admin($mybb->user['uid'])) { $flist .= " AND fid NOT IN ({$unviewableforums})"; $tflist .= " AND t.fid NOT IN ({$unviewableforums})";
|
}
// Fetch the Mod CP menu eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
|
}
// Fetch the Mod CP menu eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
|
$plugins->run_hooks("modcp_start");
| $plugins->run_hooks("modcp_start");
|
// Make navigation add_breadcrumb($lang->nav_modcp, "modcp.php");
| // Make navigation add_breadcrumb($lang->nav_modcp, "modcp.php");
|
Zeile 87 | Zeile 96 |
---|
error($lang->error_noselected_reports); }
|
error($lang->error_noselected_reports); }
|
$mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode($mybb->input['reports'], "','"); $rids = "'0','{$rids}'";
| $sql = '1=1'; if(!$mybb->input['allbox']) { $mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode($mybb->input['reports'], "','"); $rids = "'0','{$rids}'";
$sql = "rid IN ({$rids})"; }
|
$plugins->run_hooks("modcp_do_reports");
|
$plugins->run_hooks("modcp_do_reports");
|
$db->update_query("reportedposts", array('reportstatus' => 1), "rid IN ({$rids}){$flist}");
| $db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}");
|
$cache->update_reportedposts(); $page = intval($mybb->input['page']);
| $cache->update_reportedposts(); $page = intval($mybb->input['page']);
|
Zeile 393 | Zeile 408 |
---|
FROM ".TABLE_PREFIX."moderatorlog l LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
|
FROM ".TABLE_PREFIX."moderatorlog l LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
|
WHERE 1=1 {$where}
| WHERE 1=1 {$where}{$tflist}
|
"); $rescount = $db->fetch_field($query, "count");
| "); $rescount = $db->fetch_field($query, "count");
|
Zeile 439 | Zeile 454 |
---|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid) 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}
| WHERE 1=1 {$where}{$tflist}
|
ORDER BY {$sortby} {$order} LIMIT {$start}, {$perpage} "); while($logitem = $db->fetch_array($query)) { $information = '';
|
ORDER BY {$sortby} {$order} LIMIT {$start}, {$perpage} "); while($logitem = $db->fetch_array($query)) { $information = '';
|
$logitem['action'] = $logitem['action'];
| $logitem['action'] = htmlspecialchars_uni($logitem['action']);
|
$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']); $log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']); $trow = alt_trow();
| $log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']); $log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']); $trow = alt_trow();
|
Zeile 545 | Zeile 560 |
---|
{ $aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
|
{ $aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
|
|
|
$announcement = $db->fetch_array($query);
|
$announcement = $db->fetch_array($query);
|
| $announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
|
if(!$announcement['aid']) { error($lang->error_invalid_announcement); }
|
if(!$announcement['aid']) { error($lang->error_invalid_announcement); }
|
|
|
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))
|
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))
|
{ error_no_permission();
| { error_no_permission();
|
} $plugins->run_hooks("modcp_delete_announcement");
| } $plugins->run_hooks("modcp_delete_announcement");
|
Zeile 563 | Zeile 581 |
---|
}
if($mybb->input['action'] == "do_new_announcement")
|
}
if($mybb->input['action'] == "do_new_announcement")
|
{ verify_post_check($mybb->input['my_post_key']);
$announcement_fid = intval($mybb->input['fid']); if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid))) { error_no_permission(); }
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title; }
if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message; }
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]);
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00"; } }
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; 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; }
$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) { $errors[] = $lang->error_invalid_start_date; }
if($mybb->input['endtime_type'] == "2") { $enddate = '0'; } else { if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; }
| { verify_post_check($mybb->input['my_post_key']);
$announcement_fid = intval($mybb->input['fid']); if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid))) { error_no_permission(); }
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title; }
if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message; }
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]);
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00"; } }
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; 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; }
$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) { $errors[] = $lang->error_invalid_start_date; }
if($mybb->input['endtime_type'] == "2") { $enddate = '0'; } else { if(!in_array($mybb->input['endtime_month'], $months)) { $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) {
| $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) {
|
Zeile 676 | Zeile 694 |
---|
if($mybb->input['action'] == "new_announcement") { add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
|
if($mybb->input['action'] == "new_announcement") { add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
|
add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");
| add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");
|
$announcement_fid = intval($mybb->input['fid']);
| $announcement_fid = intval($mybb->input['fid']);
|
Zeile 809 | Zeile 827 |
---|
else { $smilies_sel['no'] = ' checked="checked"';
|
else { $smilies_sel['no'] = ' checked="checked"';
|
}
| }
|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"'; } else
|
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['finite'] = ' checked="checked"'; }
|
Zeile 833 | Zeile 851 |
---|
if($mybb->input['action'] == "do_edit_announcement") { verify_post_check($mybb->input['my_post_key']);
|
if($mybb->input['action'] == "do_edit_announcement") { verify_post_check($mybb->input['my_post_key']);
|
|
|
// Get the announcement $aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
| // Get the announcement $aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
|
Zeile 843 | Zeile 861 |
---|
if(!$announcement['aid']) { error($lang->error_invalid_announcement);
|
if(!$announcement['aid']) { error($lang->error_invalid_announcement);
|
}
| }
|
// Mod has permissions to edit this announcement if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid']))) {
| // Mod has permissions to edit this announcement if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid']))) {
|
Zeile 855 | Zeile 873 |
---|
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']);
| $startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']);
|
Zeile 888 | Zeile 906 |
---|
{ $enddate[0] = "00"; }
|
{ $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'])); if($startdate < 0 || $startdate == false)
|
$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)
|
{
| {
|
$errors[] = $lang->error_invalid_start_date;
|
$errors[] = $lang->error_invalid_start_date;
|
}
if($mybb->input['endtime_type'] == "2") { $enddate = '0'; } else {
| }
if($mybb->input['endtime_type'] == "2") { $enddate = '0'; } else {
|
if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1;
| if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1;
|
Zeile 938 | Zeile 956 |
---|
'allowmycode' => $db->escape_string($mybb->input['allowmycode']), 'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']), );
|
'allowmycode' => $db->escape_string($mybb->input['allowmycode']), 'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']), );
|
|
|
$db->update_query("announcements", $update_announcement, "aid='{$aid}'"); $plugins->run_hooks("modcp_do_edit_announcement_end");
| $db->update_query("announcements", $update_announcement, "aid='{$aid}'"); $plugins->run_hooks("modcp_do_edit_announcement_end");
|
Zeile 949 | Zeile 967 |
---|
else { $mybb->input['action'] = 'edit_announcement';
|
else { $mybb->input['action'] = 'edit_announcement';
|
} }
| } }
|
if($mybb->input['action'] == "edit_announcement") { $announcement_fid = intval($mybb->input['fid']);
| if($mybb->input['action'] == "edit_announcement") { $announcement_fid = intval($mybb->input['fid']);
|
Zeile 965 | Zeile 983 |
---|
$announcement = $db->fetch_array($query);
if(!$announcement['fid'])
|
$announcement = $db->fetch_array($query);
if(!$announcement['fid'])
|
{
| {
|
error($lang->error_invalid_announcement);
|
error($lang->error_invalid_announcement);
|
}
| }
|
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))
|
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
| }
if(!$announcement['startdate']) { // No start date? Make it now. $announcement['startdate'] = TIME_NOW; }
$makeshift_end = false; if(!$announcement['enddate']) { $makeshift_end = true; $makeshift_time = TIME_NOW; if($announcement['startdate']) { $makeshift_time = $announcement['startdate']; }
// No end date? Make it a year from now. $announcement['enddate'] = $makeshift_time + (60 * 60 * 24 * 366);
|
}
// Deal with inline errors
| }
// Deal with inline errors
|
Zeile 994 | Zeile 1032 |
---|
if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1;
|
if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1;
|
}
| }
|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']);
| $startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']);
|
Zeile 1006 | Zeile 1044 |
---|
$endtime_time = htmlspecialchars($mybb->input['endtime_time']);
$errored = true;
|
$endtime_time = htmlspecialchars($mybb->input['endtime_time']);
$errored = true;
|
}
| }
|
else { // Note: dates are in GMT timezone $starttime_time = gmdate('g:i a', $announcement['startdate']); $endtime_time = gmdate('g:i a', $announcement['enddate']);
|
else { // Note: dates are in GMT timezone $starttime_time = gmdate('g:i a', $announcement['startdate']); $endtime_time = gmdate('g:i a', $announcement['enddate']);
|
|
|
$startday = gmdate('j', $announcement['startdate']); $endday = gmdate('j', $announcement['enddate']);
$startmonth = gmdate('m', $announcement['startdate']); $endmonth = gmdate('m', $announcement['enddate']);
|
$startday = gmdate('j', $announcement['startdate']); $endday = gmdate('j', $announcement['enddate']);
$startmonth = gmdate('m', $announcement['startdate']); $endmonth = gmdate('m', $announcement['enddate']);
|
|
|
$startdateyear = gmdate('Y', $announcement['startdate']); $enddateyear = gmdate('Y', $announcement['enddate']);
| $startdateyear = gmdate('Y', $announcement['startdate']); $enddateyear = gmdate('Y', $announcement['enddate']);
|
Zeile 1031 | Zeile 1069 |
---|
if($startday == $i) { $startdateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
if($startday == $i) { $startdateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
}
| }
|
else { $startdateday .= "<option value=\"$i\">$i</option>\n";
| else { $startdateday .= "<option value=\"$i\">$i</option>\n";
|
Zeile 1044 | Zeile 1082 |
---|
else { $enddateday .= "<option value=\"$i\">$i</option>\n";
|
else { $enddateday .= "<option value=\"$i\">$i</option>\n";
|
} }
| } }
|
$startmonthsel = $endmonthsel = array(); $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
|
$startmonthsel = $endmonthsel = array(); $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
|
|
|
$startdatemonth .= "<option value=\"01\" {$startmonthsel['01']}>{$lang->january}</option>\n"; $enddatemonth .= "<option value=\"01\" {$endmonthsel['01']}>{$lang->january}</option>\n"; $startdatemonth .= "<option value=\"02\" {$startmonthsel['02']}>{$lang->february}</option>\n";
| $startdatemonth .= "<option value=\"01\" {$startmonthsel['01']}>{$lang->january}</option>\n"; $enddatemonth .= "<option value=\"01\" {$endmonthsel['01']}>{$lang->january}</option>\n"; $startdatemonth .= "<option value=\"02\" {$startmonthsel['02']}>{$lang->february}</option>\n";
|
Zeile 1096 | Zeile 1134 |
---|
else { $mycode_sel['no'] = ' checked="checked"';
|
else { $mycode_sel['no'] = ' checked="checked"';
|
}
| }
|
if($announcement['allowsmilies']) { $smilies_sel['yes'] = ' checked="checked"';
| if($announcement['allowsmilies']) { $smilies_sel['yes'] = ' checked="checked"';
|
Zeile 1107 | Zeile 1145 |
---|
$smilies_sel['no'] = ' checked="checked"'; }
|
$smilies_sel['no'] = ' checked="checked"'; }
|
if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))
| if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0) || $makeshift_end == true)
|
{ $end_type_sel['infinite'] = ' checked="checked"'; }
| { $end_type_sel['infinite'] = ' checked="checked"'; }
|
Zeile 1201 | Zeile 1239 |
---|
$plugins->run_hooks("modcp_do_modqueue_start");
if(is_array($mybb->input['threads']))
|
$plugins->run_hooks("modcp_do_modqueue_start");
if(is_array($mybb->input['threads']))
|
{
| {
|
// Fetch threads $query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads'])))."){$flist}"); while($thread = $db->fetch_array($query)) { $action = $mybb->input['threads'][$thread['tid']];
|
// Fetch threads $query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads'])))."){$flist}"); while($thread = $db->fetch_array($query)) { $action = $mybb->input['threads'][$thread['tid']];
|
if($action == "approve")
| if($action == "approve")
|
{ $threads_to_approve[] = $thread['tid']; }
| { $threads_to_approve[] = $thread['tid']; }
|
Zeile 1244 | Zeile 1282 |
---|
if($action == "approve") { $posts_to_approve[] = $post['pid'];
|
if($action == "approve") { $posts_to_approve[] = $post['pid'];
|
}
| }
|
else if($action == "delete") { $moderation->delete_post($post['pid']); }
|
else if($action == "delete") { $moderation->delete_post($post['pid']); }
|
}
| }
|
if(is_array($posts_to_approve))
|
if(is_array($posts_to_approve))
|
{ $moderation->approve_posts($posts_to_approve); }
| { $moderation->approve_posts($posts_to_approve); }
|
log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts); $plugins->run_hooks("modcp_do_modqueue_end");
| log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts); $plugins->run_hooks("modcp_do_modqueue_end");
|
Zeile 1273 | Zeile 1311 |
---|
{ $action = $mybb->input['attachments'][$attachment['aid']]; if($action == "approve")
|
{ $action = $mybb->input['attachments'][$attachment['aid']]; if($action == "approve")
|
{
| {
|
$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'"); } else if($action == "delete")
| $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'"); } else if($action == "delete")
|
Zeile 1305 | Zeile 1343 |
---|
$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) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1;
| $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=threads");
| }
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=threads");
|
Zeile 1480 | Zeile 1518 |
---|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
|
{
| {
|
$page = $pages; }
| $page = $pages; }
|
Zeile 1688 | Zeile 1726 |
---|
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['action']]) { if(intval($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"; $errors[] = $lang->$string;
| // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error"; $errors[] = $lang->$string;
|
Zeile 1707 | Zeile 1745 |
---|
$extra_user_updates[$option['update_length']] = 0; } elseif($suspend_length && $suspend_length != "-1")
|
$extra_user_updates[$option['update_length']] = 0; } elseif($suspend_length && $suspend_length != "-1")
|
{
| {
|
// Temporary ban on action $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length; }
| // Temporary ban on action $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length; }
|
Zeile 1719 | Zeile 1757 |
---|
if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
|
if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
|
}
| }
|
else { $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
| else { $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
|
Zeile 1732 | Zeile 1770 |
---|
// Those with javascript turned off will be able to select both - cheeky! // Check to make sure we're not moderating AND suspending posting if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
|
// Those with javascript turned off will be able to select both - cheeky! // Check to make sure we're not moderating AND suspending posting if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
|
{
| {
|
$errors[] = $lang->suspendmoderate_error;
|
$errors[] = $lang->suspendmoderate_error;
|
}
| }
|
if(is_array($errors)) { $mybb->input['action'] = "editprofile";
|
if(is_array($errors)) { $mybb->input['action'] = "editprofile";
|
} else
| } else
|
{ $plugins->run_hooks("modcp_do_editprofile_update");
| { $plugins->run_hooks("modcp_do_editprofile_update");
|
Zeile 1764 | Zeile 1802 |
---|
if(!$user['uid']) { error($lang->invalid_user);
|
if(!$user['uid']) { error($lang->invalid_user);
|
}
| }
|
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid'])) { error_no_permission();
|
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid'])) { error_no_permission();
|
}
| }
|
if($user['website'] == "" || $user['website'] == "http://") {
| if($user['website'] == "" || $user['website'] == "http://") {
|
Zeile 1790 | Zeile 1828 |
---|
{ $mybb->input = array_merge($user, $mybb->input); list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = explode("-", $user['birthday']);
|
{ $mybb->input = array_merge($user, $mybb->input); list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = explode("-", $user['birthday']);
|
} else {
| } else {
|
$errors = inline_error($errors); }
| $errors = inline_error($errors); }
|
Zeile 2156 | Zeile 2194 |
---|
if($mybb->input['action'] == "finduser") { add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");
|
if($mybb->input['action'] == "finduser") { add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");
|
|
|
$perpage = intval($mybb->input['perpage']); if(!$perpage || $perpage <= 0) {
| $perpage = intval($mybb->input['perpage']); if(!$perpage || $perpage <= 0) {
|
Zeile 2259 | Zeile 2297 |
---|
} $plugins->run_hooks("modcp_finduser_end");
|
} $plugins->run_hooks("modcp_finduser_end");
|
|
|
eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
| eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
|
Zeile 2414 | Zeile 2452 |
---|
if($row['expires'] > 0) { $expire_date = my_date($mybb->settings['dateformat'], $row['expires']).' '.my_date($mybb->settings['timeformat'], $row['expires']);
|
if($row['expires'] > 0) { $expire_date = my_date($mybb->settings['dateformat'], $row['expires']).' '.my_date($mybb->settings['timeformat'], $row['expires']);
|
}
| }
|
else { $expire_date = $lang->never;
| else { $expire_date = $lang->never;
|
Zeile 2426 | Zeile 2464 |
---|
} $title = htmlspecialchars_uni($title); if($row['points'] >= 0)
|
} $title = htmlspecialchars_uni($title); if($row['points'] >= 0)
|
{
| {
|
$points = '+'.$row['points']; }
|
$points = '+'.$row['points']; }
|
|
|
eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");
|
eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");
|
}
| }
|
if(!$warning_list) { eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");
| if(!$warning_list) { eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");
|
Zeile 2451 | Zeile 2489 |
---|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
{
| {
|
$groupscache = $cache->read("usergroups"); }
| $groupscache = $cache->read("usergroups"); }
|
Zeile 2464 | Zeile 2502 |
---|
if(strpos($mybb->input['ipaddress'], ":") !== false) { $post_ip_sql = "ipaddress LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";
|
if(strpos($mybb->input['ipaddress'], ":") !== false) { $post_ip_sql = "ipaddress LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";
|
} else {
| } else {
|
$ip_range = fetch_longipv4_range($mybb->input['ipaddress']); if(!is_array($ip_range)) {
| $ip_range = fetch_longipv4_range($mybb->input['ipaddress']); if(!is_array($ip_range)) {
|
Zeile 2570 | Zeile 2608 |
---|
WHERE {$user_ip_sql} ORDER BY regdate DESC LIMIT {$start}, {$perpage}
|
WHERE {$user_ip_sql} ORDER BY regdate DESC LIMIT {$start}, {$perpage}
|
"); while($ipaddress = $db->fetch_array($query)) {
| "); while($ipaddress = $db->fetch_array($query)) {
|
$result = false; $profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']); $trow = alt_trow();
| $result = false; $profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']); $trow = alt_trow();
|
Zeile 2690 | Zeile 2728 |
---|
$postsearchselect = "checked=\"checked\""; } if($mybb->input['search_users'])
|
$postsearchselect = "checked=\"checked\""; } if($mybb->input['search_users'])
|
{
| {
|
$usersearchselect = "checked=\"checked\""; }
| $usersearchselect = "checked=\"checked\""; }
|
Zeile 2728 | Zeile 2766 |
---|
if($ipaddress_host_name == $mybb->input['ipaddress']) { $ipaddress_host_name = $lang->na;
|
if($ipaddress_host_name == $mybb->input['ipaddress']) { $ipaddress_host_name = $lang->na;
|
} }
| } }
|
$plugins->run_hooks("modcp_iplookup_end");
| $plugins->run_hooks("modcp_iplookup_end");
|
Zeile 2742 | Zeile 2780 |
---|
add_breadcrumb($lang->mcp_nav_banning, "modcp.php?action=banning");
if(!$mybb->settings['threadsperpage'])
|
add_breadcrumb($lang->mcp_nav_banning, "modcp.php?action=banning");
if(!$mybb->settings['threadsperpage'])
|
{
| {
|
$mybb->settings['threadsperpage'] = 20; }
| $mybb->settings['threadsperpage'] = 20; }
|
Zeile 2751 | Zeile 2789 |
---|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$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");
|
Zeile 2761 | Zeile 2799 |
---|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
|
{
| {
|
$page = $pages; }
|
$page = $pages; }
|
if($page > $pages || $page <= 0) { $page = 1; }
| if($page > $pages || $page <= 0) { $page = 1; }
|
if($page) { $start = ($page-1) * $perpage;
| if($page) { $start = ($page-1) * $perpage;
|
Zeile 2808 | Zeile 2846 |
---|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1) { $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1) { $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
|
}
| }
|
$admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);
| $admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);
|
Zeile 2887 | Zeile 2925 |
---|
} $plugins->run_hooks("modcp_liftban_start");
|
} $plugins->run_hooks("modcp_liftban_start");
|
| $query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'"); $username = $db->fetch_field($query, "username");
|
$updated_group = array( 'usergroup' => $ban['oldgroup'],
| $updated_group = array( 'usergroup' => $ban['oldgroup'],
|
Zeile 2898 | Zeile 2939 |
---|
$cache->update_banned(); $cache->update_moderators();
|
$cache->update_banned(); $cache->update_moderators();
|
| log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
$plugins->run_hooks("modcp_liftban_end");
| $plugins->run_hooks("modcp_liftban_end");
|
Zeile 2935 | Zeile 2977 |
---|
else { // Get the users info from their Username
|
else { // Get the users info from their Username
|
$query = $db->simple_select("users", "uid, usergroup, additionalgroups, displaygroup", "username = '".$db->escape_string($mybb->input['username'])."'", array('limit' => 1));
| $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']) {
| $user = $db->fetch_array($query); if(!$user['uid']) {
|
Zeile 3032 | Zeile 3074 |
---|
$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);
|
$plugins->run_hooks("modcp_do_banuser_end");
| $plugins->run_hooks("modcp_do_banuser_end");
|
Zeile 3269 | Zeile 3312 |
---|
else { $latest_thread = "<span style=\"text-align: center;\">{$lang->lastpost_never}</span>";
|
else { $latest_thread = "<span style=\"text-align: center;\">{$lang->lastpost_never}</span>";
|
| }
$where = ''; if($tflist) { $where = "WHERE (t.fid <> 0 {$tflist}) OR (!l.fid)";
|
}
$query = $db->query("
| }
$query = $db->query("
|
Zeile 3278 | Zeile 3327 |
---|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)
|
| {$where}
|
ORDER BY l.dateline DESC LIMIT 5 ");
|
ORDER BY l.dateline DESC LIMIT 5 ");
|
|
|
while($logitem = $db->fetch_array($query)) { $information = '';
|
while($logitem = $db->fetch_array($query)) { $information = '';
|
$logitem['action'] = $logitem['action'];
| $logitem['action'] = htmlspecialchars_uni($logitem['action']);
|
$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']); $log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']); $trow = alt_trow();
| $log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']); $log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']); $trow = alt_trow();
|
Zeile 3305 | Zeile 3356 |
---|
// Edited a user? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
|
// Edited a user? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
|
{
| {
|
$data = unserialize($logitem['data']); if($data['uid']) {
| $data = unserialize($logitem['data']); if($data['uid']) {
|
Zeile 3339 | Zeile 3390 |
---|
// 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)
|
{
| {
|
$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>"; }
| $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>"; }
|
Zeile 3373 | Zeile 3424 |
---|
$timeremaining = "<span style=\"color: red;\">({$lang->ban_ending_imminently})</span>"; } else if($remaining < 3600)
|
$timeremaining = "<span style=\"color: red;\">({$lang->ban_ending_imminently})</span>"; } else if($remaining < 3600)
|
{
| {
|
$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>"; } else if($remaining < 86400)
| $timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>"; } else if($remaining < 86400)
|
Zeile 3406 | Zeile 3457 |
---|
eval("\$modcp = \"".$templates->get("modcp")."\";"); output_page($modcp); }
|
eval("\$modcp = \"".$templates->get("modcp")."\";"); output_page($modcp); }
|
| |
?>
| ?>
|