Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: modcp.php 4184 2008-09-10 04:40:17Z Tikitiki $
| * $Id: modcp.php 4729 2010-01-23 08:21:16Z Huji $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 20 | Zeile 20 |
---|
$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 .= ",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";
| $templatelist .= ",modcp_warninglogs,modcp_modlogs_result";
|
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 50 | Zeile 50 |
---|
while($forum = $db->fetch_array($query)) { $flist .= ",'{$forum['fid']}'";
|
while($forum = $db->fetch_array($query)) { $flist .= ",'{$forum['fid']}'";
|
| $children = get_child_list($forum['fid']); if(!empty($children)) { $flist .= ",'".implode("','", $children)."'"; }
|
$moderated_forums[] = $forum['fid']; } if($flist)
| $moderated_forums[] = $forum['fid']; } if($flist)
|
Zeile 112 | Zeile 118 |
---|
$report_count = $db->fetch_field($query, "count");
$mybb->input['rid'] = intval($mybb->input['rid']);
|
$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']."'");
| 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) {
| $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0) {
|
Zeile 130 | Zeile 136 |
---|
$pages = $postcount / $perpage; $pages = ceil($pages);
|
$pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->input['page'] == "last") { $page = $pages;
| if($mybb->input['page'] == "last") { $page = $pages;
|
Zeile 140 | Zeile 145 |
---|
if($page > $pages || $page <= 0) {
|
if($page > $pages || $page <= 0) {
|
$page = 1; }
if($page && $page > 0) { $start = ($page-1) * $perpage; } else { $start = 0;
| $page = 1; }
if($page && $page > 0) { $start = ($page-1) * $perpage; } else { $start = 0;
|
$page = 1; } $upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports"); if($postcount > $perpage)
|
$page = 1; } $upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports"); if($postcount > $perpage)
|
{
| {
|
eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";"); }
| eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";"); }
|
Zeile 184 | Zeile 189 |
---|
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['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']);
| $report['threadlink'] = get_thread_link($report['tid']); $report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']);
|
Zeile 197 | Zeile 202 |
---|
if(!$reports) { eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");
|
if(!$reports) { eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");
|
}
| }
|
$plugins->run_hooks("modcp_reports");
eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";");
| $plugins->run_hooks("modcp_reports");
eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";");
|
Zeile 219 | Zeile 224 |
---|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count"); $warnings = $db->fetch_field($query, "count");
| $query = $db->simple_select("reportedposts", "COUNT(rid) AS count"); $warnings = $db->fetch_field($query, "count");
|
Zeile 323 | Zeile 328 |
---|
if(!$allreports) { eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");
|
if(!$allreports) { eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");
|
}
$plugins->run_hooks("modcp_reports");
| }
$plugins->run_hooks("modcp_reports");
|
eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";"); output_page($allreportedposts); }
| eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";"); output_page($allreportedposts); }
|
Zeile 336 | Zeile 341 |
---|
add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
$perpage = intval($mybb->input['perpage']);
|
add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
$perpage = intval($mybb->input['perpage']);
|
if(!$perpage || $pagepage <= 0)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 387 | Zeile 392 |
---|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last")
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last")
|
{
| {
|
$page = intval($mybb->input['page']);
|
$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;
|
}
| }
|
if($page > $pages || $page <= 0)
|
if($page > $pages || $page <= 0)
|
{ $page = 1;
| { $page = 1;
|
}
if($page)
|
}
if($page)
|
{
| {
|
$start = ($page-1) * $perpage; } else
|
$start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 419 | Zeile 424 |
---|
if($postcount > $perpage) { eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
|
if($postcount > $perpage) { eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
|
}
| }
|
$query = $db->query(" SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject FROM ".TABLE_PREFIX."moderatorlog l
| $query = $db->query(" SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject FROM ".TABLE_PREFIX."moderatorlog l
|
Zeile 442 | Zeile 447 |
---|
if($logitem['tsubject']) { $information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";
|
if($logitem['tsubject']) { $information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";
|
}
| }
|
if($logitem['fname']) { $information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";
|
if($logitem['fname']) { $information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";
|
}
| }
|
if($logitem['psubject']) { $information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
|
if($logitem['psubject']) { $information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
|
}
| }
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
| eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
|
Zeile 475 | Zeile 480 |
---|
if(!$user['username']) { $user['username'] = $lang->na_deleted;
|
if(!$user['username']) { $user['username'] = $lang->na_deleted;
|
}
| }
|
$selected = ''; if($mybb->input['uid'] == $user['uid'])
| $selected = ''; if($mybb->input['uid'] == $user['uid'])
|
Zeile 483 | Zeile 488 |
---|
$selected = " selected=\"selected\""; } $user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";
|
$selected = " selected=\"selected\""; } $user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";
|
}
| }
|
|
|
$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, '', "fid");
| $forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs);
| eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs);
|
Zeile 548 | Zeile 553 |
---|
}
if(!trim($mybb->input['message']))
|
}
if(!trim($mybb->input['message']))
|
{
| {
|
$errors[] = $lang->error_missing_message; }
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
$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']);
| $startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']);
|
Zeile 568 | Zeile 573 |
---|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
}
| }
|
}
if(stristr($mybb->input['endtime_time'], "pm"))
|
}
if(stristr($mybb->input['endtime_time'], "pm"))
|
{
| {
|
$enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) {
| $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) {
|
Zeile 580 | Zeile 585 |
---|
} }
|
} }
|
$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)
| $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)
|
{ $errors[] = $lang->error_invalid_end_date; }
| { $errors[] = $lang->error_invalid_end_date; }
|
Zeile 683 | Zeile 688 |
---|
} else {
|
} else {
|
// Note: dates are not in user's timezone
| // Note: dates are in GMT timezone
|
$starttime_time = gmdate("g:i a", TIME_NOW); $endtime_time = gmdate("g:i a", TIME_NOW); $startday = $endday = gmdate("j", TIME_NOW);
| $starttime_time = gmdate("g:i a", TIME_NOW); $endtime_time = gmdate("g:i a", TIME_NOW); $startday = $endday = gmdate("j", TIME_NOW);
|
Zeile 778 | Zeile 783 |
---|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
} else
| } else
|
{ $end_type_sel['finite'] = ' checked="checked"'; }
| { $end_type_sel['finite'] = ' checked="checked"'; }
|
Zeile 882 | Zeile 887 |
---|
elseif($enddate < $startdate) { $errors[] = $lang->error_end_before_start;
|
elseif($enddate < $startdate) { $errors[] = $lang->error_end_before_start;
|
}
| }
|
}
// Proceed to update if no errors
| }
// Proceed to update if no errors
|
Zeile 965 | Zeile 970 |
---|
} else {
|
} else {
|
// Note: dates are in user's timezone $starttime_time = my_date('g:i a', $announcement['startdate']); $endtime_time = my_date('g:i a', $announcement['enddate']);
| // Note: dates are in GMT timezone $starttime_time = gmdate('g:i a', $announcement['startdate']); $endtime_time = gmdate('g:i a', $announcement['enddate']);
|
|
|
$startday = my_date('j', $announcement['startdate']); $endday = my_date('j', $announcement['enddate']);
| $startday = gmdate('j', $announcement['startdate']); $endday = gmdate('j', $announcement['enddate']);
|
|
|
$startmonth = my_date('m', $announcement['startdate']); $endmonth = my_date('m', $announcement['enddate']);
| $startmonth = gmdate('m', $announcement['startdate']); $endmonth = gmdate('m', $announcement['enddate']);
|
|
|
$startdateyear = my_date('Y', $announcement['startdate']); $enddateyear = my_date('Y', $announcement['enddate']);
| $startdateyear = gmdate('Y', $announcement['startdate']); $enddateyear = gmdate('Y', $announcement['enddate']);
|
$errored = false; }
| $errored = false; }
|
Zeile 1064 | Zeile 1069 |
---|
}
if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))
|
}
if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))
|
{
| {
|
$end_type_sel['infinite'] = ' checked="checked"'; } else
| $end_type_sel['infinite'] = ' checked="checked"'; } else
|
Zeile 1167 | Zeile 1172 |
---|
} } if(is_array($threads_to_approve))
|
} } if(is_array($threads_to_approve))
|
{
| {
|
$moderation->approve_threads($threads_to_approve); }
|
$moderation->approve_threads($threads_to_approve); }
|
| log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);
|
redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated);
|
redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated);
|
}
| }
|
else if(is_array($mybb->input['posts'])) { // Fetch posts
| else if(is_array($mybb->input['posts'])) { // Fetch posts
|
Zeile 1182 | Zeile 1188 |
---|
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']);
|
Zeile 1192 | Zeile 1198 |
---|
{ $moderation->approve_posts($posts_to_approve); }
|
{ $moderation->approve_posts($posts_to_approve); }
|
| log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);
|
redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else if(is_array($mybb->input['attachments'])) { $query = $db->query(" SELECT a.pid, a.aid
|
redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else if(is_array($mybb->input['attachments'])) { $query = $db->query(" SELECT a.pid, a.aid
|
FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$flist} "); while($attachment = $db->fetch_array($query))
| FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$tflist} "); while($attachment = $db->fetch_array($query))
|
{ $action = $mybb->input['attachments'][$attachment['aid']]; if($action == "approve")
| { $action = $mybb->input['attachments'][$attachment['aid']]; if($action == "approve")
|
Zeile 1235 | Zeile 1243 |
---|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$pages = ceil($pages);
| $pages = ceil($pages);
|
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0)
|
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0)
|
{
| {
|
$page = 1; }
if($page) { $start = ($page-1) * $perpage;
|
$page = 1; }
if($page) { $start = ($page-1) * $perpage;
|
} else
| } else
|
{ $start = 0; $page = 1; }
|
{ $start = 0; $page = 1; }
|
|
|
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=threads");
$query = $db->query("
| $multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=threads");
$query = $db->query("
|
Zeile 1269 | Zeile 1277 |
---|
LIMIT {$start}, {$perpage} "); while($thread = $db->fetch_array($query))
|
LIMIT {$start}, {$perpage} "); while($thread = $db->fetch_array($query))
|
{ $altbg = alt_trow();
| { $altbg = alt_trow();
|
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject'])); $thread['threadlink'] = get_thread_link($thread['tid']); $thread['forumlink'] = get_forum_link($thread['fid']);
| $thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject'])); $thread['threadlink'] = get_thread_link($thread['tid']); $thread['forumlink'] = get_forum_link($thread['fid']);
|
Zeile 1286 | Zeile 1294 |
---|
if(!$threads && $mybb->input['type'] == "threads") { eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
|
if(!$threads && $mybb->input['type'] == "threads") { eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
|
}
| }
|
if($threads) { add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=threads");
| if($threads) { add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=threads");
|
Zeile 1304 | Zeile 1312 |
---|
$query = $db->query(" SELECT COUNT(pid) AS unapprovedposts
|
$query = $db->query(" SELECT COUNT(pid) AS unapprovedposts
|
FROM ".TABLE_PREFIX."posts p
| FROM ".TABLE_PREFIX."posts p
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid "); $unapproved_posts = $db->fetch_field($query, "unapprovedposts");
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid "); $unapproved_posts = $db->fetch_field($query, "unapprovedposts");
|
|
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last")
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last")
|
{
| {
|
$page = intval($mybb->input['page']);
|
$page = intval($mybb->input['page']);
|
}
| }
|
$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; }
| $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");
$query = $db->query("
| $multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=posts");
$query = $db->query("
|
Zeile 1402 | Zeile 1410 |
---|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_attachments / $perpage; $pages = ceil($pages);
|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_attachments / $perpage; $pages = ceil($pages);
|
| |
if($mybb->input['page'] == "last") { $page = $pages;
|
if($mybb->input['page'] == "last") { $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;
|
}
| }
|
else { $start = 0;
| else { $start = 0;
|
Zeile 1425 | Zeile 1432 |
---|
}
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
|
}
$multipage = multipage($pages, $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 FROM ".TABLE_PREFIX."attachments a
| $query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject FROM ".TABLE_PREFIX."attachments a
|
Zeile 1443 | Zeile 1450 |
---|
if(!$attachment['dateuploaded']) { $attachment['dateuploaded'] = $attachment['dateline'];
|
if(!$attachment['dateuploaded']) { $attachment['dateuploaded'] = $attachment['dateline'];
|
}
| }
|
$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateuploaded']); $attachtime = my_date($mybb->settings['timeformat'], $attachment['dateuploaded']);
| $attachdate = my_date($mybb->settings['dateformat'], $attachment['dateuploaded']); $attachtime = my_date($mybb->settings['timeformat'], $attachment['dateuploaded']);
|
Zeile 1488 | Zeile 1495 |
---|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$user = get_user($mybb->input['uid']); if(!$user['uid']) { error($lang->invalid_user); }
| $user = get_user($mybb->input['uid']); if(!$user['uid']) { error($lang->invalid_user); }
|
// Check if the current user has permission to edit this user $user_permissions = user_permissions($user['uid']);
| // Check if the current user has permission to edit this user $user_permissions = user_permissions($user['uid']);
|
Zeile 1539 | Zeile 1546 |
---|
else if($mybb->input['reverttitle']) { $updated_user['usertitle'] = '';
|
else if($mybb->input['reverttitle']) { $updated_user['usertitle'] = '';
|
}
| }
|
if($mybb->input['remove_avatar']) { $updated_user['avatarurl'] = '';
| if($mybb->input['remove_avatar']) { $updated_user['avatarurl'] = '';
|
Zeile 1588 | Zeile 1595 |
---|
// Current user is only a local moderator, cannot edit super mods or admins if($mybb->user['usergroup'] == 6 && ($user_permissions['issupermod'] == 1 || $user_permissions['cancp'] == 1))
|
// Current user is only a local moderator, cannot edit super mods or admins if($mybb->user['usergroup'] == 6 && ($user_permissions['issupermod'] == 1 || $user_permissions['cancp'] == 1))
|
{
| {
|
error_no_permission(); } // Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
| error_no_permission(); } // Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
|
Zeile 1636 | Zeile 1643 |
---|
} else {
|
} else {
|
| if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
$displaygroupfields = array( "usertitle" );
|
$display_group = usergroup_displaygroup($user['displaygroup']); $defaulttitle = $display_group['usertitle']; }
| $display_group = usergroup_displaygroup($user['displaygroup']); $defaulttitle = $display_group['usertitle']; }
|
Zeile 1656 | Zeile 1671 |
---|
$bdaydaysel .= "<option value=\"$i\">$i</option>\n"; } }
|
$bdaydaysel .= "<option value=\"$i\">$i</option>\n"; } }
|
$bdaymonthsel[$mybb->input['birthday_month']] = "selected";
| $bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';
|
// Fetch profile fields
|
// Fetch profile fields
|
Zeile 1800 | Zeile 1815 |
---|
else { $value = htmlspecialchars_uni($userfield);
|
else { $value = htmlspecialchars_uni($userfield);
|
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
| $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\" />";
|
} if($profilefield['required'] == 1) {
| } if($profilefield['required'] == 1) {
|
Zeile 1835 | Zeile 1855 |
---|
if($mybb->input['action'] == "finduser") { $perpage = intval($mybb->input['perpage']);
|
if($mybb->input['action'] == "finduser") { $perpage = intval($mybb->input['perpage']);
|
if(!$perpage || $pagepage <= 0)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 1904 | Zeile 1924 |
---|
if($mybb->input[$field]) { $page_url .= "&{$field}=".htmlspecialchars_uni($mybb->input[$field]);
|
if($mybb->input[$field]) { $page_url .= "&{$field}=".htmlspecialchars_uni($mybb->input[$field]);
|
| $mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]);
|
} }
| } }
|
Zeile 1920 | Zeile 1941 |
---|
$user['postnum'] = my_number_format($user['postnum']); $regdate = my_date($mybb->settings['dateformat'], $user['regdate']); $regtime = my_date($mybb->settings['timeformat'], $user['regdate']);
|
$user['postnum'] = my_number_format($user['postnum']); $regdate = my_date($mybb->settings['dateformat'], $user['regdate']); $regtime = my_date($mybb->settings['timeformat'], $user['regdate']);
|
$lastdate = my_date($mybb->settings['dateformat'], $user['lastactive']); $lasttime = my_date($mybb->settings['timeformat'], $user['lastactive']);
| $lastdate = my_date($mybb->settings['dateformat'], $user['lastvisit']); $lasttime = my_date($mybb->settings['timeformat'], $user['lastvisit']);
|
$usergroup = $usergroups_cache[$user['usergroup']]['title']; eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";"); }
| $usergroup = $usergroups_cache[$user['usergroup']]['title']; eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";"); }
|
Zeile 2185 | Zeile 2206 |
---|
// Now we have the result counts, paginate $perpage = intval($mybb->input['perpage']);
|
// Now we have the result counts, paginate $perpage = intval($mybb->input['perpage']);
|
if(!$perpage || $pagepage <= 0)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 2219 | Zeile 2240 |
---|
$page = 1; }
|
$page = 1; }
|
$page_url = "modcp.php?action=ipsearch&perpage={$perpage}&ipaddress={$mybb->input['ipaddress']}";
| $page_url = "modcp.php?action=ipsearch&perpage={$perpage}";
|
foreach(array('ipaddress', 'search_users', 'search_posts') as $input) { if(!$mybb->input[$input]) continue;
| foreach(array('ipaddress', 'search_users', 'search_posts') as $input) { if(!$mybb->input[$input]) continue;
|
Zeile 2270 | Zeile 2291 |
---|
if($total_results > $user_results && $post_limit) { $post_start = $start-$user_results;
|
if($total_results > $user_results && $post_limit) { $post_start = $start-$user_results;
|
if($post_start < 0) $post_start = 0;
| if($post_start < 0) { $post_start = 0; }
|
} if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0))) {
|
} if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0))) {
|
| $ipaddresses = $tids = $uids = array();
|
$query = $db->query("
|
$query = $db->query("
|
SELECT p.username AS postusername, p.uid, u.username, p.subject, p.pid, p.tid, p.ipaddress, t.subject AS threadsubject FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON(p.uid=u.uid)
| SELECT username AS postusername, uid, subject, pid, tid, ipaddress FROM ".TABLE_PREFIX."posts
|
WHERE {$post_ip_sql}
|
WHERE {$post_ip_sql}
|
ORDER BY p.dateline DESC
| ORDER BY dateline DESC
|
LIMIT {$post_start}, {$post_limit} "); while($ipaddress = $db->fetch_array($query)) {
|
LIMIT {$post_start}, {$post_limit} "); while($ipaddress = $db->fetch_array($query)) {
|
$ip = $ipaddress['ipaddress']; if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support $trow = alt_trow(); if(!$ipaddress['subject'])
| $tids[$ipaddress['tid']] = $ipaddress['pid']; $uids[$ipaddress['uid']] = $ipaddress['pid']; $ipaddresses[$ipaddress['pid']] = $ipaddress; } if(!empty($ipaddresses)) { $query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")"); while($thread = $db->fetch_array($query))
|
{
|
{
|
$ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}";
| $ipaddresses[$tids[$thread['tid']]]['threadsubject'] = $thread['subject']; } unset($tids); $query = $db->simple_select("users", "username, uid", "uid IN(".implode(',', array_keys($uids)).")"); while($user = $db->fetch_array($query)) { $ipaddresses[$uids[$user['uid']]]['username'] = $user['username']; } unset($uids); foreach($ipaddresses as $ipaddress) { $ip = $ipaddress['ipaddress']; if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support $trow = alt_trow(); if(!$ipaddress['subject']) { $ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}"; } $subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']); eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
|
}
|
}
|
$subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']); eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
| |
} }
| } }
|
Zeile 2653 | Zeile 2700 |
---|
if($mybb->input['uid']) { $query = $db->query("
|
if($mybb->input['uid']) { $query = $db->query("
|
SELECT b.*, u.username
| SELECT b.*, u.username, u.uid
|
FROM ".TABLE_PREFIX."banned b LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid) WHERE b.uid='{$mybb->input['uid']}'
| FROM ".TABLE_PREFIX."banned b LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid) WHERE b.uid='{$mybb->input['uid']}'
|
Zeile 2664 | Zeile 2711 |
---|
$username = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']); $uid = $mybb->input['uid'];
|
$username = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']); $uid = $mybb->input['uid'];
|
| $user = get_user($banned['uid']);
|
$lang->ban_user = $lang->edit_ban; // Swap over lang variables eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); }
| $lang->ban_user = $lang->edit_ban; // Swap over lang variables eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); }
|