Zeile 40 | Zeile 40 |
---|
if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1) { error_no_permission();
|
if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1) { error_no_permission();
|
| }
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20; }
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1) { $mybb->settings['postsperpage'] = 20;
|
}
$errors = '';
| }
$errors = '';
|
Zeile 68 | Zeile 78 |
---|
else { $flist = $tflist = '';
|
else { $flist = $tflist = '';
|
}
| }
|
// Retrieve a list of unviewable forums $unviewableforums = get_unviewable_forums();
| // Retrieve a list of unviewable forums $unviewableforums = get_unviewable_forums();
|
Zeile 95 | Zeile 105 |
---|
add_breadcrumb($lang->nav_modcp, "modcp.php");
if($mybb->input['action'] == "do_reports")
|
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']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
Zeile 112 | Zeile 122 |
---|
$rids = "'0','{$rids}'";
$sql = "rid IN ({$rids})";
|
$rids = "'0','{$rids}'";
$sql = "rid IN ({$rids})";
|
}
| }
|
$plugins->run_hooks("modcp_do_reports");
$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}");
| $plugins->run_hooks("modcp_do_reports");
$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}");
|
Zeile 131 | Zeile 141 |
---|
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'];
| // Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
|
Zeile 144 | Zeile 154 |
---|
$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']."'"); $result = $db->fetch_field($query, "count");
| 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;
| if(($result % $perpage) == 0) { $page = $result / $perpage;
|
Zeile 168 | Zeile 178 |
---|
}
if($page > $pages || $page <= 0)
|
}
if($page > $pages || $page <= 0)
|
{
| {
|
$page = 1; }
if($page && $page > 0) { $start = ($page-1) * $perpage;
|
$page = 1; }
if($page && $page > 0) { $start = ($page-1) * $perpage;
|
}
| }
|
else { $start = 0; $page = 1; } $upper = $start+$perpage;
|
else { $start = 0; $page = 1; } $upper = $start+$perpage;
|
|
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports"); if($postcount > $perpage) { eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports"); if($postcount > $perpage) { eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");
|
}
| }
|
$query = $db->simple_select("forums", "fid, name"); while($forum = $db->fetch_array($query)) {
| $query = $db->simple_select("forums", "fid, name"); while($forum = $db->fetch_array($query)) {
|
Zeile 198 | Zeile 208 |
---|
$plugins->run_hooks("modcp_reports_start");
$reports = '';
|
$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 FROM ".TABLE_PREFIX."reportedposts r LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)
| $query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject FROM ".TABLE_PREFIX."reportedposts r LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid) LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)
| LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid) LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)
|
Zeile 215 | Zeile 225 |
---|
eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";"); } else
|
eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";"); } else
|
{
| {
|
while($report = $db->fetch_array($query)) { $trow = alt_trow();
| while($report = $db->fetch_array($query)) { $trow = alt_trow();
|
Zeile 226 | Zeile 236 |
---|
$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['posterlink'] = get_profile_link($report['postuid']);
|
| if(!$report['postuid']) { $report['posterlink'] = $report['postlink']; $report['postusername'] = $lang->guest; }
|
$report['reporterlink'] = get_profile_link($report['uid']);
|
$report['reporterlink'] = get_profile_link($report['uid']);
|
| if($report['uid'] > 0 && !$report['username']) { $report['reporterlink'] = $report['postlink']; $report['username'] = $lang->na_deleted; }
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']); $report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";"); }
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']); $report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";"); }
|
}
| }
|
$plugins->run_hooks("modcp_reports_end");
eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";"); output_page($reportedposts); }
|
$plugins->run_hooks("modcp_reports_end");
eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";"); output_page($reportedposts); }
|
|
|
if($mybb->input['action'] == "allreports") { add_breadcrumb($lang->mcp_nav_all_reported_posts, "modcp.php?action=allreports");
| if($mybb->input['action'] == "allreports") { add_breadcrumb($lang->mcp_nav_all_reported_posts, "modcp.php?action=allreports");
|
Zeile 253 | Zeile 276 |
---|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
|
if($mybb->input['page'] != "last") {
| if($mybb->input['page'] != "last") {
|
$page = intval($mybb->input['page']); }
| $page = intval($mybb->input['page']); }
|
Zeile 278 | Zeile 301 |
---|
$postcount = intval($warnings); $pages = $postcount / $perpage; $pages = ceil($pages);
|
$postcount = intval($warnings); $pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->input['page'] == "last") { $page = $pages;
| if($mybb->input['page'] == "last") { $page = $pages;
|
Zeile 297 | Zeile 320 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
$upper = $start+$perpage;
|
$upper = $start+$perpage;
|
|
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=allreports"); if($postcount > $perpage) { eval("\$allreportspages = \"".$templates->get("modcp_reports_multipage")."\";");
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=allreports"); if($postcount > $perpage) { eval("\$allreportspages = \"".$templates->get("modcp_reports_multipage")."\";");
|
}
$plugins->run_hooks("modcp_allreports_start");
| }
$plugins->run_hooks("modcp_allreports_start");
|
$query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject FROM ".TABLE_PREFIX."reportedposts r
| $query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject FROM ".TABLE_PREFIX."reportedposts r
|
Zeile 321 | Zeile 344 |
---|
$allreports = ''; if(!$db->num_rows($query))
|
$allreports = ''; if(!$db->num_rows($query))
|
{
| {
|
eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";"); } else
| eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";"); } else
|
Zeile 335 | Zeile 358 |
---|
$report['posterlink'] = get_profile_link($report['postuid']); $report['postlink'] = get_post_link($report['pid'], $report['tid']); $report['postusername'] = build_profile_link($report['postusername'], $report['postuid']);
|
$report['posterlink'] = get_profile_link($report['postuid']); $report['postlink'] = get_post_link($report['pid'], $report['tid']); $report['postusername'] = build_profile_link($report['postusername'], $report['postuid']);
|
|
|
$report['reporterlink'] = get_profile_link($report['uid']);
|
$report['reporterlink'] = get_profile_link($report['uid']);
|
| if($report['uid'] > 0 && !$report['username']) { $report['reporterlink'] = $report['postlink']; $report['username'] = $lang->na_deleted; }
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
if($report['reportstatus'] == 0)
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
if($report['reportstatus'] == 0)
|
{
| {
|
$trow = "trow_shaded"; }
// No subject? Set it to N/A if($report['threadsubject'] == '')
|
$trow = "trow_shaded"; }
// No subject? Set it to N/A if($report['threadsubject'] == '')
|
{
| {
|
$report['threadsubject'] = $lang->na; } else
| $report['threadsubject'] = $lang->na; } else
|
Zeile 360 | Zeile 389 |
---|
eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";"); }
|
eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";"); }
|
}
| }
|
$plugins->run_hooks("modcp_allreports_end");
| $plugins->run_hooks("modcp_allreports_end");
|
Zeile 460 | Zeile 489 |
---|
eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";"); } $query = $db->query("
|
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
| SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname
|
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) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)
|
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) 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}
|
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)) {
| "); while($logitem = $db->fetch_array($query)) {
|
Zeile 481 | Zeile 509 |
---|
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']); if($logitem['tsubject']) {
|
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']); if($logitem['tsubject']) {
|
$information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";
| $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>";
| |
}
|
}
|
// Edited a user? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
| // Edited a user or managed announcement? if(!$logitem['tsubject'] || !$logitem['fname'])
|
{ $data = unserialize($logitem['data']); if($data['uid'])
|
{ $data = unserialize($logitem['data']); if($data['uid'])
|
{
| {
|
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid'])); }
|
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid'])); }
|
}
| if($data['aid']) { $information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>"; } }
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
|
}
| }
|
if(!$results) { eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");
| if(!$results) { eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");
|
Zeile 527 | Zeile 555 |
---|
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 535 | Zeile 563 |
---|
$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, true, '', "fid");
| $forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");
|
Zeile 544 | Zeile 572 |
---|
}
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); }
| { 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();
| if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission();
|
Zeile 563 | Zeile 591 |
---|
$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}'");
|
| log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
|
$cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
| $cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
|
Zeile 608 | Zeile 637 |
---|
}
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]);
| $startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]);
|
Zeile 635 | Zeile 664 |
---|
{ $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24)
|
{ $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24)
|
{
| {
|
$enddate[0] = "00"; } }
| $enddate[0] = "00"; } }
|
Zeile 688 | Zeile 717 |
---|
'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']), );
|
| |
$aid = $db->insert_query("announcements", $insert_announcement);
|
$aid = $db->insert_query("announcements", $insert_announcement);
|
| log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);
|
$plugins->run_hooks("modcp_do_new_announcement_end");
| $plugins->run_hooks("modcp_do_new_announcement_end");
|
Zeile 969 | Zeile 999 |
---|
);
$db->update_query("announcements", $update_announcement, "aid='{$aid}'");
|
);
$db->update_query("announcements", $update_announcement, "aid='{$aid}'");
|
| log_moderator_action(array("aid" => $announcement['aid'], "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_edited);
|
$plugins->run_hooks("modcp_do_edit_announcement_end");
| $plugins->run_hooks("modcp_do_edit_announcement_end");
|
Zeile 1653 | Zeile 1685 |
---|
$user = get_user($mybb->input['uid']); if(!$user['uid']) {
|
$user = get_user($mybb->input['uid']); if(!$user['uid']) {
|
error($lang->invalid_user);
| error($lang->error_nomember);
|
}
// Check if the current user has permission to edit this user
| }
// Check if the current user has permission to edit this user
|
Zeile 1845 | Zeile 1877 |
---|
$user = get_user($mybb->input['uid']); if(!$user['uid']) {
|
$user = get_user($mybb->input['uid']); if(!$user['uid']) {
|
error($lang->invalid_user);
| error($lang->error_nomember);
|
}
// Check if the current user has permission to edit this user
| }
// Check if the current user has permission to edit this user
|
Zeile 2170 | Zeile 2202 |
---|
"weeks" => $lang->expire_weeks, "months" => $lang->expire_months, "never" => $lang->expire_permanent
|
"weeks" => $lang->expire_weeks, "months" => $lang->expire_months, "never" => $lang->expire_permanent
|
);
| );
|
foreach($moderator_options as $option) { $mybb->input[$option['time']] = intval($mybb->input[$option['time']]);
| foreach($moderator_options as $option) { $mybb->input[$option['time']] = intval($mybb->input[$option['time']]);
|
Zeile 2583 | Zeile 2615 |
---|
$query = $db->query(" SELECT COUNT(pid) AS count FROM ".TABLE_PREFIX."posts
|
$query = $db->query(" SELECT COUNT(pid) AS count FROM ".TABLE_PREFIX."posts
|
WHERE {$post_ip_sql}
| WHERE {$post_ip_sql} AND visible >= 0
|
");
$post_results = $db->fetch_field($query, "count");
| ");
$post_results = $db->fetch_field($query, "count");
|
Zeile 2734 | Zeile 2766 |
---|
$query = $db->query(" SELECT username AS postusername, uid, subject, pid, tid, ipaddress FROM ".TABLE_PREFIX."posts
|
$query = $db->query(" SELECT username AS postusername, uid, subject, pid, tid, ipaddress FROM ".TABLE_PREFIX."posts
|
WHERE {$post_ip_sql}
| WHERE {$post_ip_sql} AND visible >= 0
|
ORDER BY dateline DESC LIMIT {$post_start}, {$post_limit} ");
| ORDER BY dateline DESC LIMIT {$post_start}, {$post_limit} ");
|
Zeile 3021 | Zeile 3053 |
---|
$cache->update_banned(); $cache->update_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
$cache->update_banned(); $cache->update_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
|
|
$plugins->run_hooks("modcp_liftban_end");
redirect("modcp.php?action=banning", $lang->redirect_banlifted);
| $plugins->run_hooks("modcp_liftban_end");
redirect("modcp.php?action=banning", $lang->redirect_banlifted);
|
Zeile 3120 | Zeile 3152 |
---|
$username_select = $db->simple_select('users', 'username', "uid='" . (int)$mybb->input['uid'] . "'"); $user['username'] = $db->fetch_field($username_select, 'username'); $update_array = array(
|
$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']), 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->input['liftafter']), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($mybb->input['banreason']) );
| 'gid' => intval($mybb->input['usergroup']), 'admin' => intval($mybb->user['uid']), 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->input['liftafter']), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($mybb->input['banreason']) );
|
$db->update_query('banned', $update_array, "uid='{$user['uid']}'"); } else
| $db->update_query('banned', $update_array, "uid='{$user['uid']}'"); } else
|
Zeile 3146 | Zeile 3178 |
---|
);
$db->insert_query('banned', $insert_array);
|
);
$db->insert_query('banned', $insert_array);
|
}
| }
|
// Move the user to the banned group $update_array = array( 'usergroup' => intval($mybb->input['usergroup']),
| // Move the user to the banned group $update_array = array( 'usergroup' => intval($mybb->input['usergroup']),
|
Zeile 3166 | Zeile 3198 |
---|
else { log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
|
else { log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
|
}
| }
|
$plugins->run_hooks("modcp_do_banuser_end");
if($mybb->input['uid'])
| $plugins->run_hooks("modcp_do_banuser_end");
if($mybb->input['uid'])
|
Zeile 3180 | Zeile 3212 |
---|
} } // Otherwise has errors, throw back to ban page
|
} } // Otherwise has errors, throw back to ban page
|
else
| else
|
{ $mybb->input['action'] = "banuser"; }
| { $mybb->input['action'] = "banuser"; }
|
Zeile 3233 | Zeile 3265 |
---|
else { $username = htmlspecialchars_uni($mybb->input['username']);
|
else { $username = htmlspecialchars_uni($mybb->input['username']);
|
}
| }
|
eval("\$banuser_username = \"".$templates->get("modcp_banuser_addusername")."\";"); }
| eval("\$banuser_username = \"".$templates->get("modcp_banuser_addusername")."\";"); }
|
Zeile 3247 | Zeile 3279 |
---|
"gid" => $mybb->input['gid'] ); $banreason = htmlspecialchars_uni($mybb->input['banreason']);
|
"gid" => $mybb->input['gid'] ); $banreason = htmlspecialchars_uni($mybb->input['banreason']);
|
}
| }
|
// Generate the banned times dropdown foreach($bantimes as $time => $title)
| // Generate the banned times dropdown foreach($bantimes as $time => $title)
|
Zeile 3265 | Zeile 3297 |
---|
else { $liftlist .= ">{$title} ({$thatime})</option>\n";
|
else { $liftlist .= ">{$title} ({$thatime})</option>\n";
|
} }
| } }
|
$bangroups = ''; $query = $db->simple_select("usergroups", "gid, title", "isbannedgroup=1"); while($item = $db->fetch_array($query))
| $bangroups = ''; $query = $db->simple_select("usergroups", "gid, title", "isbannedgroup=1"); while($item = $db->fetch_array($query))
|
Zeile 3286 | Zeile 3318 |
---|
eval("\$banuser = \"".$templates->get("modcp_banuser")."\";"); output_page($banuser);
|
eval("\$banuser = \"".$templates->get("modcp_banuser")."\";"); output_page($banuser);
|
}
| }
|
if($mybb->input['action'] == "do_modnotes") {
| if($mybb->input['action'] == "do_modnotes") {
|
Zeile 3413 | Zeile 3445 |
---|
}
$query = $db->query("
|
}
$query = $db->query("
|
SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
| SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname
|
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) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)
|
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) 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
| {$where} ORDER BY l.dateline DESC LIMIT 5
|
Zeile 3435 | Zeile 3466 |
---|
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']); if($logitem['tsubject']) {
|
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']); if($logitem['tsubject']) {
|
$information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";
| $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\">".htmlspecialchars_uni($logitem['fname'])."</a><br />";
|
} if($logitem['fname']) { $information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">".htmlspecialchars_uni($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>";
| |
}
|
}
|
// Edited a user? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
| // Edited a user or managed announcement? if(!$logitem['tsubject'] || !$logitem['fname'])
|
{ $data = unserialize($logitem['data']); if($data['uid'])
|
{ $data = unserialize($logitem['data']); if($data['uid'])
|
{
| {
|
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));
|
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));
|
| } if($data['aid']) { $information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";
|
} }
| } }
|