Zeile 12 | Zeile 12 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'modcp.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'modcp.php');
|
$templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport"; $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban"; $templatelist .= ",modcp_banning_multipage,modcp_banning_nobanned,modcp_banning_auser,modcp_banning_error"; $templatelist .= ",modcp_banning_edit,modcp_banning_banned_user,modcp_nav,modcp_modlogs_noresults,modcp"; $templatelist .= ",modcp_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements"; $templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special"; $templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields"; $templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs"; $templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature_info,modcp_editprofile_signature_options,modcp_editprofile_signature";
| $templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport,modcp_reports_allreports,modcp_modlogs_multipage,modcp_announcements_delete,modcp_announcements_edit"; $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban,modcp_announcements_announcement_global,modcp_no_announcements_forum,modcp_modqueue_threads_thread"; $templatelist .= ",modcp_banning_multipage,modcp_banning_nobanned,modcp_modqueue_threads_empty,modcp_modqueue_masscontrols,modcp_modqueue_threads,modcp_modqueue_posts_post,modcp_modqueue_posts_empty"; $templatelist .= ",modcp_nav,modcp_modlogs_noresults,modcp,modcp_modqueue_posts,modcp_modqueue_attachments_attachment,modcp_modqueue_attachments_empty,modcp_modqueue_attachments,modcp_editprofile_suspensions_info"; $templatelist .= ",modcp_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements,modcp_editprofile_select_option,modcp_editprofile_select,modcp_finduser_noresults"; $templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special,modcp_warninglogs_warning_revoked,modcp_warninglogs_warning,modcp_ipsearch_result"; $templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields,modcp_ipsearch_noresults,modcp_ipsearch_results,modcp_ipsearch_misc_info"; $templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread"; $templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature,forumjump_advanced,smilieinsert_getmore,modcp_announcements_forum_nomod,modcp_announcements_announcement,multipage_prevpage"; $templatelist .= ",multipage_start,multipage_page_current,multipage_page,multipage_end,multipage_nextpage,multipage";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_user.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_user.php";
|
Zeile 50 | Zeile 51 |
---|
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)) {
| $children = get_child_list($forum['fid']); if(!empty($children)) {
|
Zeile 67 | Zeile 68 |
---|
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 79 | Zeile 80 |
---|
$unviewableforums = str_replace("'", '', $unviewableforums); $unviewableforums = explode(',', $unviewableforums);
|
$unviewableforums = str_replace("'", '', $unviewableforums); $unviewableforums = explode(',', $unviewableforums);
|
| } else { $unviewableforums = array();
|
}
// Fetch the Mod CP menu eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
|
}
// Fetch the Mod CP menu eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
|
|
|
$plugins->run_hooks("modcp_start");
// Make navigation
| $plugins->run_hooks("modcp_start");
// Make navigation
|
Zeile 93 | Zeile 98 |
---|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
if(!is_array($mybb->input['reports'])) { error($lang->error_noselected_reports);
|
if(!is_array($mybb->input['reports'])) { error($lang->error_noselected_reports);
|
}
| }
|
$sql = '1=1'; if(!$mybb->input['allbox']) {
| $sql = '1=1'; if(!$mybb->input['allbox']) {
|
Zeile 108 | Zeile 113 |
---|
$sql = "rid IN ({$rids})"; }
|
$sql = "rid IN ({$rids})"; }
|
|
|
$plugins->run_hooks("modcp_do_reports");
$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}"); $cache->update_reportedposts();
|
$plugins->run_hooks("modcp_do_reports");
$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}"); $cache->update_reportedposts();
|
|
|
$page = intval($mybb->input['page']);
|
$page = intval($mybb->input['page']);
|
|
|
redirect("modcp.php?action=reports&page={$page}", $lang->redirect_reportsmarked); }
| redirect("modcp.php?action=reports&page={$page}", $lang->redirect_reportsmarked); }
|
Zeile 179 | Zeile 184 |
---|
$upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports");
|
$upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports");
|
if($postcount > $perpage) {
| if($postcount > $perpage) {
|
eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");
|
eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");
|
}
| }
|
$query = $db->simple_select("forums", "fid, name"); while($forum = $db->fetch_array($query)) { $forums[$forum['fid']] = $forum['name'];
|
$query = $db->simple_select("forums", "fid, name"); while($forum = $db->fetch_array($query)) { $forums[$forum['fid']] = $forum['name'];
|
}
| }
|
$plugins->run_hooks("modcp_reports_start");
$reports = '';
| $plugins->run_hooks("modcp_reports_start");
$reports = '';
|
Zeile 217 | Zeile 222 |
---|
if(is_moderator($report['fid'])) { $trow = 'trow_shaded';
|
if(is_moderator($report['fid'])) { $trow = 'trow_shaded';
|
}
$report['postlink'] = get_post_link($report['pid'], $report['tid']); $report['threadlink'] = get_thread_link($report['tid']); $report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
| }
$report['postlink'] = get_post_link($report['pid'], $report['tid']); $report['threadlink'] = get_thread_link($report['tid']); $report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";");
| $report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";");
|
Zeile 300 | Zeile 305 |
---|
{ eval("\$allreportspages = \"".$templates->get("modcp_reports_multipage")."\";"); }
|
{ eval("\$allreportspages = \"".$templates->get("modcp_reports_multipage")."\";"); }
|
|
|
$plugins->run_hooks("modcp_allreports_start");
$query = $db->query("
| $plugins->run_hooks("modcp_allreports_start");
$query = $db->query("
|
Zeile 324 | Zeile 329 |
---|
while($report = $db->fetch_array($query)) { $trow = alt_trow();
|
while($report = $db->fetch_array($query)) { $trow = alt_trow();
|
$report['threadsubject'] = $lang->na;
|
|
$report['threadlink'] = get_thread_link($report['tid']);
$report['posterlink'] = get_profile_link($report['postuid']); $report['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['threadlink'] = get_thread_link($report['tid']);
$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']);
|
|
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
| $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
Zeile 339 | Zeile 344 |
---|
{ $trow = "trow_shaded"; }
|
{ $trow = "trow_shaded"; }
|
if($report['threadsubject'])
| // No subject? Set it to N/A if($report['threadsubject'] == '') { $report['threadsubject'] = $lang->na; } else
|
{
|
{
|
| // Only parse bad words and sanitize subject if there is one...
|
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
|
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
|
$report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";
| |
}
|
}
|
| $report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";
|
eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";"); }
| eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";"); }
|
Zeile 400 | Zeile 412 |
---|
{ $order = "desc"; }
|
{ $order = "desc"; }
|
|
|
$plugins->run_hooks("modcp_modlogs_start");
$query = $db->query("
| $plugins->run_hooks("modcp_modlogs_start");
$query = $db->query("
|
Zeile 497 | Zeile 509 |
---|
{ eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";"); }
|
{ eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";"); }
|
|
|
$plugins->run_hooks("modcp_modlogs_filter");
// Fetch filter options
| $plugins->run_hooks("modcp_modlogs_filter");
// Fetch filter options
|
Zeile 515 | Zeile 527 |
---|
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 534 | Zeile 546 |
---|
if($mybb->input['action'] == "do_delete_announcement") { verify_post_check($mybb->input['my_post_key']);
|
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'])
|
$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);
|
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(); }
|
|
|
$plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'");
| $plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'");
|
Zeile 573 | Zeile 585 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
|
|
$plugins->run_hooks("modcp_delete_announcement");
|
$plugins->run_hooks("modcp_delete_announcement");
|
|
|
eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";"); output_page($announcements); }
|
eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";"); output_page($announcements); }
|
|
|
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)) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title; }
if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message; }
| { 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)) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { 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'])) {
| if(!trim($mybb->input['fid'])) {
|
Zeile 611 | Zeile 623 |
---|
$enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm"))
|
$enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm"))
|
{
| {
|
$startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00";
|
$startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00";
|
} }
| } }
|
if(stristr($mybb->input['endtime_time'], "pm")) {
| if(stristr($mybb->input['endtime_time'], "pm")) {
|
Zeile 627 | Zeile 639 |
---|
$enddate[0] = "00"; } }
|
$enddate[0] = "00"; } }
|
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
| $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(!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)
| if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
|
{ $errors[] = $lang->error_invalid_start_date; }
| { $errors[] = $lang->error_invalid_start_date; }
|
Zeile 644 | Zeile 655 |
---|
if($mybb->input['endtime_type'] == "2") { $enddate = '0';
|
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)
| } 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(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
|
{ $errors[] = $lang->error_invalid_end_date; }
|
{ $errors[] = $lang->error_invalid_end_date; }
|
elseif($enddate < $startdate)
| if($enddate <= $startdate)
|
{ $errors[] = $lang->error_end_before_start; } }
|
{ $errors[] = $lang->error_end_before_start; } }
|
|
|
$plugins->run_hooks("modcp_do_new_announcement_start");
if(!$errors) {
|
$plugins->run_hooks("modcp_do_new_announcement_start");
if(!$errors) {
|
| $mybb->input['title'] = utf8_handle_4byte_string($mybb->input['title']); $mybb->input['message'] = utf8_handle_4byte_string($mybb->input['message']);
|
$insert_announcement = array( 'fid' => $announcement_fid, 'uid' => $mybb->user['uid'],
| $insert_announcement = array( 'fid' => $announcement_fid, 'uid' => $mybb->user['uid'],
|
Zeile 679 | Zeile 692 |
---|
);
$aid = $db->insert_query("announcements", $insert_announcement);
|
);
$aid = $db->insert_query("announcements", $insert_announcement);
|
|
|
$plugins->run_hooks("modcp_do_new_announcement_end");
|
$plugins->run_hooks("modcp_do_new_announcement_end");
|
|
|
$cache->update_forumsdisplay(); redirect("modcp.php?action=announcements", $lang->redirect_add_announcement); }
| $cache->update_forumsdisplay(); redirect("modcp.php?action=announcements", $lang->redirect_add_announcement); }
|
Zeile 707 | Zeile 720 |
---|
if(is_array($errors)) { $errors = inline_error($errors);
|
if(is_array($errors)) { $errors = inline_error($errors);
|
|
|
// Set $announcement to input stuff $announcement['subject'] = $mybb->input['title']; $announcement['message'] = $mybb->input['message']; $announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies'];
|
// Set $announcement to input stuff $announcement['subject'] = $mybb->input['title']; $announcement['message'] = $mybb->input['message']; $announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies'];
|
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
| $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; }
|
if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = 1; }
|
|
|
if(!in_array($mybb->input['endtime_month'], $months))
|
if(!in_array($mybb->input['endtime_month'], $months))
|
{
| {
|
$mybb->input['endtime_month'] = 1; }
|
$mybb->input['endtime_month'] = 1; }
|
|
|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$starttime_time = htmlspecialchars($mybb->input['starttime_time']);
| $starttime_time = htmlspecialchars_uni($mybb->input['starttime_time']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endtime_time = htmlspecialchars($mybb->input['endtime_time']);
| $endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);
|
} else {
| } else {
|
Zeile 743 | Zeile 756 |
---|
$startday = $endday = gmdate("j", TIME_NOW); $startmonth = $endmonth = gmdate("m", TIME_NOW); $startdateyear = gmdate("Y", TIME_NOW);
|
$startday = $endday = gmdate("j", TIME_NOW); $startmonth = $endmonth = gmdate("m", TIME_NOW); $startdateyear = gmdate("Y", TIME_NOW);
|
|
|
$enddateyear = $startdateyear+1; }
| $enddateyear = $startdateyear+1; }
|
Zeile 760 | Zeile 773 |
---|
}
if($endday == $i)
|
}
if($endday == $i)
|
{
| {
|
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
}
| }
|
else { $enddateday .= "<option value=\"$i\">$i</option>\n"; }
|
else { $enddateday .= "<option value=\"$i\">$i</option>\n"; }
|
}
| }
|
$startmonthsel = $endmonthsel = array(); $startmonthsel[$startmonth] = "selected=\"selected\"";
| $startmonthsel = $endmonthsel = array(); $startmonthsel[$startmonth] = "selected=\"selected\"";
|
Zeile 797 | Zeile 810 |
---|
$enddatemonth .= "<option value=\"11\" {$endmonthsel['11']}>{$lang->november}</option>\n"; $startdatemonth .= "<option value=\"12\" {$startmonthsel['12']}>{$lang->december}</option>\n"; $enddatemonth .= "<option value=\"12\" {$endmonthsel['12']}>{$lang->december}</option>\n";
|
$enddatemonth .= "<option value=\"11\" {$endmonthsel['11']}>{$lang->november}</option>\n"; $startdatemonth .= "<option value=\"12\" {$startmonthsel['12']}>{$lang->december}</option>\n"; $enddatemonth .= "<option value=\"12\" {$endmonthsel['12']}>{$lang->december}</option>\n";
|
|
|
$title = htmlspecialchars_uni($announcement['subject']); $message = htmlspecialchars_uni($announcement['message']);
$html_sel = $mycode_sel = $smilies_sel = array(); if($mybb->input['allowhtml'] || !isset($mybb->input['allowhtml']))
|
$title = htmlspecialchars_uni($announcement['subject']); $message = htmlspecialchars_uni($announcement['message']);
$html_sel = $mycode_sel = $smilies_sel = array(); if($mybb->input['allowhtml'] || !isset($mybb->input['allowhtml']))
|
{
| {
|
$html_sel['yes'] = ' checked="checked"'; } else { $html_sel['no'] = ' checked="checked"';
|
$html_sel['yes'] = ' checked="checked"'; } else { $html_sel['no'] = ' checked="checked"';
|
}
| }
|
if($mybb->input['allowmycode'] || !isset($mybb->input['allowmycode']))
|
if($mybb->input['allowmycode'] || !isset($mybb->input['allowmycode']))
|
{
| {
|
$mycode_sel['yes'] = ' checked="checked"';
|
$mycode_sel['yes'] = ' checked="checked"';
|
} else {
| } else {
|
$mycode_sel['no'] = ' checked="checked"'; }
| $mycode_sel['no'] = ' checked="checked"'; }
|
Zeile 827 | Zeile 840 |
---|
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"';
| if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
Zeile 841 | Zeile 854 |
---|
// MyCode editor $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
// MyCode editor $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
|
|
$plugins->run_hooks("modcp_new_announcement");
eval("\$announcements = \"".$templates->get("modcp_announcements_new")."\";"); output_page($announcements); }
|
$plugins->run_hooks("modcp_new_announcement");
eval("\$announcements = \"".$templates->get("modcp_announcements_new")."\";"); output_page($announcements); }
|
|
|
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']);
|
Zeile 859 | Zeile 872 |
---|
// Check that it exists if(!$announcement['aid'])
|
// Check that it exists if(!$announcement['aid'])
|
{
| {
|
error($lang->error_invalid_announcement); }
| error($lang->error_invalid_announcement); }
|
Zeile 891 | Zeile 904 |
---|
$enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm"))
|
$enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm"))
|
{
| {
|
$startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00";
|
$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(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($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(!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) {
| if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false) {
|
$errors[] = $lang->error_invalid_start_date; }
| $errors[] = $lang->error_invalid_start_date; }
|
Zeile 925 | Zeile 938 |
---|
$enddate = '0'; } else
|
$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(!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)
| if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
|
{ $errors[] = $lang->error_invalid_end_date; }
|
{ $errors[] = $lang->error_invalid_end_date; }
|
elseif($enddate < $startdate)
| elseif($enddate <= $startdate)
|
{ $errors[] = $lang->error_end_before_start; } }
|
{ $errors[] = $lang->error_end_before_start; } }
|
|
|
$plugins->run_hooks("modcp_do_edit_announcement_start");
// Proceed to update if no errors if(!$errors) {
|
$plugins->run_hooks("modcp_do_edit_announcement_start");
// Proceed to update if no errors if(!$errors) {
|
| $mybb->input['title'] = utf8_handle_4byte_string($mybb->input['title']); $mybb->input['message'] = utf8_handle_4byte_string($mybb->input['message']);
|
$update_announcement = array( 'uid' => $mybb->user['uid'], 'subject' => $db->escape_string($mybb->input['title']),
| $update_announcement = array( 'uid' => $mybb->user['uid'], 'subject' => $db->escape_string($mybb->input['title']),
|
Zeile 958 | Zeile 973 |
---|
);
$db->update_query("announcements", $update_announcement, "aid='{$aid}'");
|
);
$db->update_query("announcements", $update_announcement, "aid='{$aid}'");
|
|
|
$plugins->run_hooks("modcp_do_edit_announcement_end");
|
$plugins->run_hooks("modcp_do_edit_announcement_end");
|
|
|
$cache->update_forumsdisplay(); redirect("modcp.php?action=announcements", $lang->redirect_edit_announcement); } else { $mybb->input['action'] = 'edit_announcement';
|
$cache->update_forumsdisplay(); redirect("modcp.php?action=announcements", $lang->redirect_edit_announcement); } else { $mybb->input['action'] = 'edit_announcement';
|
}
| }
|
}
if($mybb->input['action'] == "edit_announcement")
| }
if($mybb->input['action'] == "edit_announcement")
|
Zeile 1022 | Zeile 1037 |
---|
$announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies'];
|
$announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies'];
|
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
| $months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
|
if(!in_array($mybb->input['starttime_month'], $months))
|
if(!in_array($mybb->input['starttime_month'], $months))
|
{
| {
|
$mybb->input['starttime_month'] = 1;
|
$mybb->input['starttime_month'] = 1;
|
}
| }
|
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']); $startday = intval($mybb->input['starttime_day']);
|
$startmonth = $mybb->input['starttime_month']; $startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']);
|
$starttime_time = htmlspecialchars($mybb->input['starttime_time']);
| $starttime_time = htmlspecialchars_uni($mybb->input['starttime_time']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endmonth = $mybb->input['endtime_month']; $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']);
|
$endtime_time = htmlspecialchars($mybb->input['endtime_time']);
| $endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);
|
$errored = true; }
| $errored = true; }
|
Zeile 1128 | Zeile 1143 |
---|
}
if($announcement['allowmycode'])
|
}
if($announcement['allowmycode'])
|
{
| {
|
$mycode_sel['yes'] = ' checked="checked"';
|
$mycode_sel['yes'] = ' checked="checked"';
|
}
| }
|
else { $mycode_sel['no'] = ' checked="checked"';
|
else { $mycode_sel['no'] = ' checked="checked"';
|
}
| }
|
if($announcement['allowsmilies'])
|
if($announcement['allowsmilies'])
|
{
| {
|
$smilies_sel['yes'] = ' checked="checked"';
|
$smilies_sel['yes'] = ' checked="checked"';
|
} else {
| } else {
|
$smilies_sel['no'] = ' checked="checked"'; }
if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0) || $makeshift_end == true) { $end_type_sel['infinite'] = ' checked="checked"';
|
$smilies_sel['no'] = ' checked="checked"'; }
if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0) || $makeshift_end == true) { $end_type_sel['infinite'] = ' checked="checked"';
|
}
| }
|
else { $end_type_sel['finite'] = ' checked="checked"';
| else { $end_type_sel['finite'] = ' checked="checked"';
|
Zeile 1157 | Zeile 1172 |
---|
// MyCode editor $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
// MyCode editor $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
|
|
$plugins->run_hooks("modcp_edit_announcement");
eval("\$announcements = \"".$templates->get("modcp_announcements_edit")."\";");
| $plugins->run_hooks("modcp_edit_announcement");
eval("\$announcements = \"".$templates->get("modcp_announcements_edit")."\";");
|
Zeile 1181 | Zeile 1196 |
---|
}
if($mybb->usergroup['issupermod'] == 1)
|
}
if($mybb->usergroup['issupermod'] == 1)
|
{
| {
|
if($global_announcements && $mybb->usergroup['issupermod'] == 1) { // Get the global announcements
| if($global_announcements && $mybb->usergroup['issupermod'] == 1) { // Get the global announcements
|
Zeile 1201 | Zeile 1216 |
---|
eval("\$announcements_global .= \"".$templates->get("modcp_announcements_announcement_global")."\";"); }
|
eval("\$announcements_global .= \"".$templates->get("modcp_announcements_announcement_global")."\";"); }
|
}
| }
|
else { // No global announcements
| else { // No global announcements
|
Zeile 1213 | Zeile 1228 |
---|
{ // Moderator is not super, so don't show global annnouncemnets $announcements_global = '';
|
{ // Moderator is not super, so don't show global annnouncemnets $announcements_global = '';
|
}
| }
|
fetch_forum_announcements();
| fetch_forum_announcements();
|
Zeile 1221 | Zeile 1236 |
---|
{ eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";"); }
|
{ eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";"); }
|
|
|
$plugins->run_hooks("modcp_announcements");
|
$plugins->run_hooks("modcp_announcements");
|
|
|
eval("\$announcements = \"".$templates->get("modcp_announcements")."\";"); output_page($announcements); }
| eval("\$announcements = \"".$templates->get("modcp_announcements")."\";"); output_page($announcements); }
|
Zeile 1235 | Zeile 1250 |
---|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
$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']))
|
Zeile 1267 | Zeile 1282 |
---|
} log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads); }
|
} log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads); }
|
|
|
$plugins->run_hooks("modcp_do_modqueue_end");
|
$plugins->run_hooks("modcp_do_modqueue_end");
|
|
|
redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated); } else if(is_array($mybb->input['posts']))
| redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated); } else if(is_array($mybb->input['posts']))
|
Zeile 1293 | Zeile 1308 |
---|
$moderation->approve_posts($posts_to_approve); } log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);
|
$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");
|
$plugins->run_hooks("modcp_do_modqueue_end");
|
|
|
redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else if(is_array($mybb->input['attachments']))
| redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else if(is_array($mybb->input['attachments']))
|
Zeile 1313 | Zeile 1328 |
---|
if($action == "approve") { $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
|
if($action == "approve") { $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
|
}
| }
|
else if($action == "delete") { remove_attachment($attachment['pid'], '', $attachment['aid']); } }
|
else if($action == "delete") { remove_attachment($attachment['pid'], '', $attachment['aid']); } }
|
|
|
$plugins->run_hooks("modcp_do_modqueue_end");
|
$plugins->run_hooks("modcp_do_modqueue_end");
|
|
|
redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated); } }
| redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated); } }
|
Zeile 1343 | Zeile 1358 |
---|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
| $pages = ceil($pages);
if($mybb->input['page'] == "last")
|
{ $page = $pages; }
| { $page = $pages; }
|
Zeile 1365 | Zeile 1380 |
---|
$page = 1; }
|
$page = 1; }
|
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=threads");
| $multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");
|
$query = $db->query(" SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid
| $query = $db->query(" SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid
|
Zeile 1399 | Zeile 1414 |
---|
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");
|
|
|
$plugins->run_hooks("modcp_modqueue_threads_end");
|
$plugins->run_hooks("modcp_modqueue_threads_end");
|
|
|
eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";"); output_page($threadqueue);
| eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";"); output_page($threadqueue);
|
Zeile 1412 | Zeile 1427 |
---|
if($mybb->input['type'] == "posts" || (!$mybb->input['type'] && !$threadqueue)) { $forum_cache = $cache->read("forums");
|
if($mybb->input['type'] == "posts" || (!$mybb->input['type'] && !$threadqueue)) { $forum_cache = $cache->read("forums");
|
$query = $db->query("
| $query = $db->query("
|
SELECT COUNT(pid) AS unapprovedposts FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
| SELECT COUNT(pid) AS unapprovedposts FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
Zeile 1425 | Zeile 1440 |
---|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
if($mybb->input['page'] != "last") { $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; }
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=posts");
$query = $db->query("
| $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
$multipage = multipage($unapproved_posts, $perpage, $page, "modcp.php?action=modqueue&type=posts");
$query = $db->query("
|
SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
| SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
Zeile 1487 | Zeile 1502 |
---|
if($posts) { add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts");
|
if($posts) { add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts");
|
|
|
$plugins->run_hooks("modcp_modqueue_posts_end");
|
$plugins->run_hooks("modcp_modqueue_posts_end");
|
|
|
eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";"); output_page($postqueue);
| eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";"); output_page($postqueue);
|
Zeile 1506 | Zeile 1521 |
---|
WHERE a.visible='0' {$tflist} "); $unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");
|
WHERE a.visible='0' {$tflist} "); $unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");
|
|
|
// 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") {
|
Zeile 1523 | Zeile 1538 |
---|
}
if($page > $pages || $page <= 0)
|
}
if($page > $pages || $page <= 0)
|
{ $page = 1; }
| { $page = 1; }
|
if($page) { $start = ($page-1) * $perpage; } else
|
if($page) { $start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1; }
|
$start = 0; $page = 1; }
|
$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
| $multipage = multipage($unapproved_attachments, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
|
$query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
| $query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
|
Zeile 1557 | Zeile 1572 |
---|
{ $attachment['dateuploaded'] = $attachment['dateline']; }
|
{ $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']);
|
|
|
$attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']); $attachment['filename'] = htmlspecialchars_uni($attachment['filename']); $attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);
| $attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']); $attachment['filename'] = htmlspecialchars_uni($attachment['filename']); $attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);
|
Zeile 1571 | Zeile 1586 |
---|
$profile_link = build_profile_link($attachment['username'], $attachment['uid']);
eval("\$attachments .= \"".$templates->get("modcp_modqueue_attachments_attachment")."\";");
|
$profile_link = build_profile_link($attachment['username'], $attachment['uid']);
eval("\$attachments .= \"".$templates->get("modcp_modqueue_attachments_attachment")."\";");
|
}
| }
|
if(!$attachments && $mybb->input['type'] == "attachments") { eval("\$attachments = \"".$templates->get("modcp_modqueue_attachments_empty")."\";");
|
if(!$attachments && $mybb->input['type'] == "attachments") { eval("\$attachments = \"".$templates->get("modcp_modqueue_attachments_empty")."\";");
|
}
| }
|
if($attachments) { add_breadcrumb($lang->mcp_nav_modqueue_attachments, "modcp.php?action=modqueue&type=attachments");
|
if($attachments) { add_breadcrumb($lang->mcp_nav_modqueue_attachments, "modcp.php?action=modqueue&type=attachments");
|
|
|
$plugins->run_hooks("modcp_modqueue_attachments_end");
|
$plugins->run_hooks("modcp_modqueue_attachments_end");
|
|
|
eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$attachmentqueue = \"".$templates->get("modcp_modqueue_attachments")."\";"); output_page($attachmentqueue);
| eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$attachmentqueue = \"".$templates->get("modcp_modqueue_attachments")."\";"); output_page($attachmentqueue);
|
Zeile 1594 | Zeile 1609 |
---|
if(!$threadqueue && !$postqueue && !$attachmentqueue) { add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue");
|
if(!$threadqueue && !$postqueue && !$attachmentqueue) { add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue");
|
|
|
$plugins->run_hooks("modcp_modqueue_end");
|
$plugins->run_hooks("modcp_modqueue_end");
|
|
|
eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";"); output_page($queue); }
| eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";"); output_page($queue); }
|
Zeile 1618 | Zeile 1633 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
|
|
$plugins->run_hooks("modcp_do_editprofile_start");
// Set up user handler.
| $plugins->run_hooks("modcp_do_editprofile_start");
// Set up user handler.
|
Zeile 1710 | Zeile 1725 |
---|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option) {
|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option) {
|
| $mybb->input[$option['time']] = intval($mybb->input[$option['time']]);
|
if(!$mybb->input[$option['action']]) { if($user[$option['update_field']] == 1)
| if(!$mybb->input[$option['action']]) { if($user[$option['update_field']] == 1)
|
Zeile 1725 | Zeile 1741 |
---|
if($mybb->input[$option['action']]) {
|
if($mybb->input[$option['action']]) {
|
if(intval($mybb->input[$option['time']]) == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)
| if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)
|
{ // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error";
| { // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error";
|
Zeile 1753 | Zeile 1769 |
---|
elseif(!$user[$option['update_field']]) { // New suspension for this user... bad user!
|
elseif(!$user[$option['update_field']]) { // New suspension for this user... bad user!
|
$extra_user_updates[$option['update_field']] = 1;
| $extra_user_updates[$option['update_field']] = 1;
|
if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
| if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
|
Zeile 1772 | Zeile 1788 |
---|
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting']) { $errors[] = $lang->suspendmoderate_error;
|
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting']) { $errors[] = $lang->suspendmoderate_error;
|
}
| }
|
if(is_array($errors)) { $mybb->input['action'] = "editprofile";
| if(is_array($errors)) { $mybb->input['action'] = "editprofile";
|
Zeile 1781 | Zeile 1797 |
---|
else { $plugins->run_hooks("modcp_do_editprofile_update");
|
else { $plugins->run_hooks("modcp_do_editprofile_update");
|
|
|
// Continue with the update if there is no errors $user_info = $userhandler->update_user(); $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'"); log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
|
// Continue with the update if there is no errors $user_info = $userhandler->update_user(); $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'"); log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
|
|
|
$plugins->run_hooks("modcp_do_editprofile_end");
|
$plugins->run_hooks("modcp_do_editprofile_end");
|
|
|
redirect("modcp.php?action=finduser", $lang->redirect_user_updated); } }
| redirect("modcp.php?action=finduser", $lang->redirect_user_updated); } }
|
Zeile 1802 | Zeile 1818 |
---|
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://") { $user['website'] = "http://";
| if($user['website'] == "" || $user['website'] == "http://") { $user['website'] = "http://";
|
Zeile 1828 | Zeile 1844 |
---|
{ $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 { $errors = inline_error($errors);
|
else { $errors = inline_error($errors);
|
}
| }
|
// Sanitize all input foreach(array('usertitle', 'website', 'icq', 'aim', 'yahoo', 'msn', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field) { $mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]);
|
// Sanitize all input foreach(array('usertitle', 'website', 'icq', 'aim', 'yahoo', 'msn', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field) { $mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]);
|
}
if($user['usertitle'] == "") { $query = $db->simple_select("usertitles", "*", "posts <='".$user['postnum']."'", array('order_by' => 'posts', 'order_dir' => 'DESC', 'limit' => 1)); $utitle = $db->fetch_array($query); $defaulttitle = $utitle['title']; } else { if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
| }
// Custom user title, check to see if we have a default group title if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
$displaygroupfields = array('usertitle'); $display_group = usergroup_displaygroup($user['displaygroup']);
|
|
|
$displaygroupfields = array( "usertitle" ); $display_group = usergroup_displaygroup($user['displaygroup']);
| if(!empty($display_group['usertitle'])) {
|
$defaulttitle = $display_group['usertitle']; }
|
$defaulttitle = $display_group['usertitle']; }
|
| else { // Go for post count title if a group default isn't set $usertitles = $cache->read('usertitles');
foreach($usertitles as $title) { if($title['posts'] <= $mybb->user['postnum']) { $defaulttitle = $title['title']; } } }
|
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
| if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
|
Zeile 1877 | Zeile 1901 |
---|
} } $bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';
|
} } $bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';
|
|
|
$plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
| $plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
|
Zeile 1941 | Zeile 1965 |
---|
$profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
$profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
}
| }
|
} elseif($type == "select")
|
} elseif($type == "select")
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions)) {
| { $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
if($val == $userfield)
| if($val == $userfield)
|
{ $sel = " selected=\"selected\""; }
| { $sel = " selected=\"selected\""; }
|
Zeile 1964 | Zeile 1988 |
---|
$profilefield['length'] = 1; } $code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";
|
$profilefield['length'] = 1; } $code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";
|
} }
| } }
|
elseif($type == "radio") { $expoptions = explode("\n", $options);
| elseif($type == "radio") { $expoptions = explode("\n", $options);
|
Zeile 1991 | Zeile 2015 |
---|
else { $useropts = explode("\n", $userfield);
|
else { $useropts = explode("\n", $userfield);
|
} if(is_array($useropts)) {
| } if(is_array($useropts)) {
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
| foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
Zeile 2092 | Zeile 2116 |
---|
1 => array( "action" => "suspendsignature", // The input action for this option "option" => "suspendsignature", // The field in the database that this option relates to
|
1 => array( "action" => "suspendsignature", // The input action for this option "option" => "suspendsignature", // The field in the database that this option relates to
|
| "time" => "action_time", // The time we've entered
|
"length" => "suspendsigtime", // The length of suspension field in the database "select_option" => "action" // The name of the select box of this option ), 2 => array( "action" => "moderateposting", "option" => "moderateposts",
|
"length" => "suspendsigtime", // The length of suspension field in the database "select_option" => "action" // The name of the select box of this option ), 2 => array( "action" => "moderateposting", "option" => "moderateposts",
|
| "time" => "modpost_time",
|
"length" => "moderationtime", "select_option" => "modpost" ), 3 => array( "action" => "suspendposting", "option" => "suspendposting",
|
"length" => "moderationtime", "select_option" => "modpost" ), 3 => array( "action" => "suspendposting", "option" => "suspendposting",
|
| "time" => "suspost_time",
|
"length" => "suspensiontime", "select_option" => "suspost" )
| "length" => "suspensiontime", "select_option" => "suspost" )
|
Zeile 2119 | Zeile 2146 |
---|
foreach($moderator_options as $option) {
|
foreach($moderator_options as $option) {
|
| $mybb->input[$option['time']] = intval($mybb->input[$option['time']]);
|
// Display the suspension info, if this user has this option suspended if($user[$option['option']]) {
| // Display the suspension info, if this user has this option suspended if($user[$option['option']]) {
|
Zeile 2148 | Zeile 2176 |
---|
case "suspendposting": eval("\$suspendposting_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";"); break;
|
case "suspendposting": eval("\$suspendposting_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";"); break;
|
}
| }
|
}
// Generate the boxes for this option
| }
// Generate the boxes for this option
|
Zeile 2184 | Zeile 2212 |
---|
}
eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");
|
}
eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");
|
|
|
$plugins->run_hooks("modcp_editprofile_end");
eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");
| $plugins->run_hooks("modcp_editprofile_end");
eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");
|
Zeile 2194 | Zeile 2222 |
---|
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 = $mybb->settings['threadsperpage'];
|
$perpage = intval($mybb->input['perpage']); if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
} $where = '';
| } $where = '';
|
if($mybb->input['username']) { $where = " AND LOWER(username) LIKE '%".my_strtolower($db->escape_string_like($mybb->input['username']))."%'";
| if($mybb->input['username']) { $where = " AND LOWER(username) LIKE '%".my_strtolower($db->escape_string_like($mybb->input['username']))."%'";
|
Zeile 2221 | Zeile 2249 |
---|
break; default: $sortby = "regdate";
|
break; default: $sortby = "regdate";
|
}
| }
|
$order = $mybb->input['order']; if($order != "asc") { $order = "desc";
|
$order = $mybb->input['order']; if($order != "asc") { $order = "desc";
|
}
| }
|
$query = $db->simple_select("users", "COUNT(uid) AS count", "1=1 {$where}"); $user_count = $db->fetch_field($query, "count");
| $query = $db->simple_select("users", "COUNT(uid) AS count", "1=1 {$where}"); $user_count = $db->fetch_field($query, "count");
|
Zeile 2252 | Zeile 2280 |
---|
if($page) { $start = ($page-1) * $perpage;
|
if($page) { $start = ($page-1) * $perpage;
|
} else
| } else
|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
$page_url = 'modcp.php?action=finduser'; foreach(array('username', 'sortby', 'order') as $field) {
| $page_url = 'modcp.php?action=finduser'; foreach(array('username', 'sortby', 'order') as $field) {
|
Zeile 2267 | Zeile 2295 |
---|
$page_url .= "&{$field}=".htmlspecialchars_uni($mybb->input[$field]); $mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]); }
|
$page_url .= "&{$field}=".htmlspecialchars_uni($mybb->input[$field]); $mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]); }
|
}
| }
|
$multipage = multipage($user_count, $perpage, $page, $page_url);
|
$multipage = multipage($user_count, $perpage, $page, $page_url);
|
|
|
$usergroups_cache = $cache->read("usergroups");
|
$usergroups_cache = $cache->read("usergroups");
|
$plugins->run_hooks("modcp_finduser_start");
| $plugins->run_hooks("modcp_finduser_start");
|
// Fetch out results $query = $db->simple_select("users", "*", "1=1 {$where}", array("order_by" => $sortby, "order_dir" => $order, "limit" => $perpage, "limit_start" => $start));
| // Fetch out results $query = $db->simple_select("users", "*", "1=1 {$where}", array("order_by" => $sortby, "order_dir" => $order, "limit" => $perpage, "limit_start" => $start));
|
Zeile 2288 | Zeile 2316 |
---|
$lasttime = my_date($mybb->settings['timeformat'], $user['lastvisit']); $usergroup = $usergroups_cache[$user['usergroup']]['title']; eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
|
$lasttime = my_date($mybb->settings['timeformat'], $user['lastvisit']); $usergroup = $usergroups_cache[$user['usergroup']]['title']; eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
|
}
| }
|
// No results? if(!$users) { eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";"); }
|
// No results? if(!$users) { eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";"); }
|
|
|
$plugins->run_hooks("modcp_finduser_end");
eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
| $plugins->run_hooks("modcp_finduser_end");
eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
|
Zeile 2344 | Zeile 2372 |
---|
} if($mybb->input['filter']['reason']) {
|
} if($mybb->input['filter']['reason']) {
|
$search['reason'] = $db->escape_string($mybb->input['filter']['reason']);
| $search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
|
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')"; $mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']); }
| $where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')"; $mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']); }
|
Zeile 2378 | Zeile 2406 |
---|
{ $ordersel['asc'] = ' selected="selected"'; }
|
{ $ordersel['asc'] = ' selected="selected"'; }
|
|
|
$plugins->run_hooks("modcp_warninglogs_start");
// Pagination stuff
| $plugins->run_hooks("modcp_warninglogs_start");
// Pagination stuff
|
Zeile 2394 | Zeile 2422 |
---|
$total_warnings = $db->fetch_field($query, 'count'); $page = 1; if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
|
$total_warnings = $db->fetch_field($query, 'count'); $page = 1; if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
|
{
| {
|
$page = intval($mybb->input['page']); } $per_page = 20;
| $page = intval($mybb->input['page']); } $per_page = 20;
|
Zeile 2411 | Zeile 2439 |
---|
{ $value = urlencode($value); $url .= "&filter[{$field}]={$value}";
|
{ $value = urlencode($value); $url .= "&filter[{$field}]={$value}";
|
} }
| } }
|
$multipage = multipage($total_warnings, $per_page, $page, $url);
// The actual query
| $multipage = multipage($total_warnings, $per_page, $page, $url);
// The actual query
|
Zeile 2433 | Zeile 2461 |
---|
"; $query = $db->query($sql);
|
"; $query = $db->query($sql);
|
|
|
$warning_list = ''; while($row = $db->fetch_array($query)) {
| $warning_list = ''; while($row = $db->fetch_array($query)) {
|
Zeile 2445 | Zeile 2473 |
---|
$issued_date = my_date($mybb->settings['dateformat'], $row['dateline']).' '.my_date($mybb->settings['timeformat'], $row['dateline']); $revoked_text = ''; if($row['daterevoked'] > 0)
|
$issued_date = my_date($mybb->settings['dateformat'], $row['dateline']).' '.my_date($mybb->settings['timeformat'], $row['dateline']); $revoked_text = ''; if($row['daterevoked'] > 0)
|
{
| {
|
$revoked_date = my_date($mybb->settings['dateformat'], $row['daterevoked']).' '.my_date($mybb->settings['timeformat'], $row['daterevoked']); eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";"); }
| $revoked_date = my_date($mybb->settings['dateformat'], $row['daterevoked']).' '.my_date($mybb->settings['timeformat'], $row['daterevoked']); eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";"); }
|
Zeile 2464 | Zeile 2492 |
---|
} $title = htmlspecialchars_uni($title); if($row['points'] >= 0)
|
} $title = htmlspecialchars_uni($title); if($row['points'] >= 0)
|
{
| {
|
$points = '+'.$row['points']; }
| $points = '+'.$row['points']; }
|
Zeile 2475 | Zeile 2503 |
---|
{ eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";"); }
|
{ eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";"); }
|
|
|
$plugins->run_hooks("modcp_warninglogs_end");
eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";");
| $plugins->run_hooks("modcp_warninglogs_end");
eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";");
|
Zeile 2485 | Zeile 2513 |
---|
if($mybb->input['action'] == "ipsearch") { add_breadcrumb($lang->mcp_nav_ipsearch, "modcp.php?action=ipsearch");
|
if($mybb->input['action'] == "ipsearch") { add_breadcrumb($lang->mcp_nav_ipsearch, "modcp.php?action=ipsearch");
|
|
|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
| if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
Zeile 2506 | Zeile 2534 |
---|
else { $ip_range = fetch_longipv4_range($mybb->input['ipaddress']);
|
else { $ip_range = fetch_longipv4_range($mybb->input['ipaddress']);
|
|
|
if($ip_range) { if(!is_array($ip_range))
| if($ip_range) { if(!is_array($ip_range))
|
Zeile 2516 | Zeile 2544 |
---|
else { $post_ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'";
|
else { $post_ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'";
|
} } }
| } } }
|
$plugins->run_hooks("modcp_ipsearch_posts_start");
| $plugins->run_hooks("modcp_ipsearch_posts_start");
|
Zeile 2621 | Zeile 2649 |
---|
{ if(!$mybb->input[$input]) continue; $page_url .= "&{$input}=".htmlspecialchars_uni($mybb->input[$input]);
|
{ if(!$mybb->input[$input]) continue; $page_url .= "&{$input}=".htmlspecialchars_uni($mybb->input[$input]);
|
}
| }
|
$multipage = multipage($total_results, $perpage, $page, $page_url);
$post_limit = $perpage;
| $multipage = multipage($total_results, $perpage, $page, $page_url);
$post_limit = $perpage;
|
Zeile 2688 | Zeile 2716 |
---|
$uids[$ipaddress['uid']] = $ipaddress['pid']; $ipaddresses[$ipaddress['pid']] = $ipaddress; }
|
$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))
|
if(!empty($ipaddresses)) { $query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")"); while($thread = $db->fetch_array($query))
|
{
| {
|
$ipaddresses[$tids[$thread['tid']]]['threadsubject'] = $thread['subject']; } unset($tids);
|
$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);
|
$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'];
| foreach($ipaddresses as $ipaddress) { $ip = $ipaddress['ipaddress'];
|
Zeile 2726 | Zeile 2754 |
---|
}
if($ipaddressvalue)
|
}
if($ipaddressvalue)
|
{
| {
|
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue); } else
|
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue); } else
|
{
| {
|
$lang->ipsearch_results = $lang->ipsearch; }
|
$lang->ipsearch_results = $lang->ipsearch; }
|
|
|
if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], ":")) { $misc_info_link = "<div class=\"float_right\">(<a href=\"modcp.php?action=iplookup&ipaddress=".htmlspecialchars_uni($mybb->input['ipaddress'])."\" onclick=\"MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress=".urlencode($mybb->input['ipaddress'])."', 'iplookup', 500, 250); return false;\">{$lang->info_on_ip}</a>)</div>"; }
|
if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], ":")) { $misc_info_link = "<div class=\"float_right\">(<a href=\"modcp.php?action=iplookup&ipaddress=".htmlspecialchars_uni($mybb->input['ipaddress'])."\" onclick=\"MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress=".urlencode($mybb->input['ipaddress'])."', 'iplookup', 500, 250); return false;\">{$lang->info_on_ip}</a>)</div>"; }
|
|
|
eval("\$ipsearch_results = \"".$templates->get("modcp_ipsearch_results")."\";");
|
eval("\$ipsearch_results = \"".$templates->get("modcp_ipsearch_results")."\";");
|
}
| }
|
// Fetch filter options if(!$mybb->input['ipaddress']) {
| // Fetch filter options if(!$mybb->input['ipaddress']) {
|
Zeile 2756 | Zeile 2784 |
---|
{ $usersearchselect = "checked=\"checked\""; }
|
{ $usersearchselect = "checked=\"checked\""; }
|
|
|
$plugins->run_hooks("modcp_ipsearch_end");
eval("\$ipsearch = \"".$templates->get("modcp_ipsearch")."\";");
| $plugins->run_hooks("modcp_ipsearch_end");
eval("\$ipsearch = \"".$templates->get("modcp_ipsearch")."\";");
|
Zeile 2777 | Zeile 2805 |
---|
$ip_record = @geoip_record_by_name($mybb->input['ipaddress']); if($ip_record) {
|
$ip_record = @geoip_record_by_name($mybb->input['ipaddress']); if($ip_record) {
|
$ipaddress_location = htmlspecialchars_uni($ip_record['country_name']);
| $ipaddress_location = htmlspecialchars_uni(utf8_encode($ip_record['country_name']));
|
if($ip_record['city']) {
|
if($ip_record['city']) {
|
$ipaddress_location .= $lang->comma.htmlspecialchars_uni($ip_record['city']);
| $ipaddress_location .= $lang->comma.htmlspecialchars_uni(utf8_encode($ip_record['city']));
|
} } }
|
} } }
|
|
|
$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));
|
$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));
|
|
|
// gethostbyaddr returns the same ip on failure if($ipaddress_host_name == $mybb->input['ipaddress']) { $ipaddress_host_name = $lang->na; }
|
// gethostbyaddr returns the same ip on failure if($ipaddress_host_name == $mybb->input['ipaddress']) { $ipaddress_host_name = $lang->na; }
|
}
| }
|
$plugins->run_hooks("modcp_iplookup_end");
|
$plugins->run_hooks("modcp_iplookup_end");
|
|
|
eval("\$iplookup = \"".$templates->get('modcp_ipsearch_misc_info')."\";"); output_page($iplookup); }
| eval("\$iplookup = \"".$templates->get('modcp_ipsearch_misc_info')."\";"); output_page($iplookup); }
|
Zeile 2812 | Zeile 2840 |
---|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last")
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last")
|
{
| {
|
$page = intval($mybb->input['page']); }
$query = $db->simple_select("banned", "COUNT(uid) AS count"); $banned_count = $db->fetch_field($query, "count");
|
$page = intval($mybb->input['page']); }
$query = $db->simple_select("banned", "COUNT(uid) AS count"); $banned_count = $db->fetch_field($query, "count");
|
|
|
$postcount = intval($banned_count); $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last")
|
$postcount = intval($banned_count); $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last")
|
{
| {
|
$page = $pages; }
| $page = $pages; }
|
Zeile 2836 | Zeile 2864 |
---|
if($page) { $start = ($page-1) * $perpage;
|
if($page) { $start = ($page-1) * $perpage;
|
}
| }
|
else
|
else
|
{
| {
|
$start = 0; $page = 1;
|
$start = 0; $page = 1;
|
}
| }
|
$upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=banning");
| $upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=banning");
|
Zeile 2849 | Zeile 2877 |
---|
{ eval("\$allbannedpages = \"".$templates->get("modcp_banning_multipage")."\";"); }
|
{ eval("\$allbannedpages = \"".$templates->get("modcp_banning_multipage")."\";"); }
|
|
|
$plugins->run_hooks("modcp_banning_start");
$query = $db->query("
| $plugins->run_hooks("modcp_banning_start");
$query = $db->query("
|
Zeile 2939 | Zeile 2967 |
---|
$ban = $db->fetch_array($query);
if(!$ban['uid'])
|
$ban = $db->fetch_array($query);
if(!$ban['uid'])
|
{
| {
|
error($lang->error_invalidban);
|
error($lang->error_invalidban);
|
}
| }
|
// Permission to edit this ban? if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission(); }
|
// Permission to edit this ban? if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission(); }
|
|
|
$plugins->run_hooks("modcp_liftban_start");
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
| $plugins->run_hooks("modcp_liftban_start");
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
|
Zeile 2961 | Zeile 2989 |
---|
); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
|
|
$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 3043 | Zeile 3071 |
---|
$errors[] = $lang->error_useralreadybanned; } }
|
$errors[] = $lang->error_useralreadybanned; } }
|
|
|
$plugins->run_hooks("modcp_do_banuser_start");
// Still no errors? Ban the user
| $plugins->run_hooks("modcp_do_banuser_start");
// Still no errors? Ban the user
|
Zeile 3061 | Zeile 3089 |
---|
if($mybb->input['uid']) {
|
if($mybb->input['uid']) {
|
| $username_select = $db->simple_select('users', 'username', "uid='" . (int)$mybb->input['uid'] . "'"); $user['username'] = $db->fetch_field($username_select, 'username');
|
$update_array = array( 'gid' => intval($mybb->input['usergroup']), 'admin' => intval($mybb->user['uid']),
| $update_array = array( 'gid' => intval($mybb->input['usergroup']), 'admin' => intval($mybb->user['uid']),
|
Zeile 3099 | Zeile 3129 |
---|
$db->update_query('users', $update_array, "uid = {$user['uid']}");
$cache->update_banned();
|
$db->update_query('users', $update_array, "uid = {$user['uid']}");
$cache->update_banned();
|
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
| // Log edit or add ban if($mybb->input['uid']) { log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user_ban); } else { log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user); }
|
$plugins->run_hooks("modcp_do_banuser_end");
if($mybb->input['uid'])
|
$plugins->run_hooks("modcp_do_banuser_end");
if($mybb->input['uid'])
|
{
| {
|
redirect("modcp.php?action=banning", $lang->redirect_banuser_updated); } else
| redirect("modcp.php?action=banning", $lang->redirect_banuser_updated); } else
|
Zeile 3131 | Zeile 3170 |
---|
{ add_breadcrumb($lang->mcp_nav_editing_ban); }
|
{ add_breadcrumb($lang->mcp_nav_editing_ban); }
|
|
|
$plugins->run_hooks("modcp_banuser_start");
// If incoming user ID, we are editing a ban
| $plugins->run_hooks("modcp_banuser_start");
// If incoming user ID, we are editing a ban
|
Zeile 3154 | Zeile 3193 |
---|
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); } }
|
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); } }
|
|
|
// New ban! if(!$banuser_username) {
| // New ban! if(!$banuser_username) {
|
Zeile 3200 | Zeile 3239 |
---|
$liftlist .= ">{$title} ({$thatime})</option>\n"; } }
|
$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 3212 | Zeile 3251 |
---|
} $bangroups .= "<option value=\"{$item['gid']}\"{$selected}>".htmlspecialchars_uni($item['title'])."</option>\n"; }
|
} $bangroups .= "<option value=\"{$item['gid']}\"{$selected}>".htmlspecialchars_uni($item['title'])."</option>\n"; }
|
|
|
$lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&uid={$user['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";
|
$lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&uid={$user['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";
|
|
|
$plugins->run_hooks("modcp_banuser_end");
|
$plugins->run_hooks("modcp_banuser_end");
|
|
|
eval("\$banuser = \"".$templates->get("modcp_banuser")."\";"); output_page($banuser); }
| eval("\$banuser = \"".$templates->get("modcp_banuser")."\";"); output_page($banuser); }
|
Zeile 3225 | Zeile 3264 |
---|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
$plugins->run_hooks("modcp_do_modnotes_start");
|
$plugins->run_hooks("modcp_do_modnotes_start");
|
|
|
// Update Moderator Notes cache $update_cache = array( "modmessage" => $mybb->input['modnotes'] ); $cache->update("modnotes", $update_cache);
|
// Update Moderator Notes cache $update_cache = array( "modmessage" => $mybb->input['modnotes'] ); $cache->update("modnotes", $update_cache);
|
|
|
$plugins->run_hooks("modcp_do_modnotes_end");
|
$plugins->run_hooks("modcp_do_modnotes_end");
|
|
|
redirect("modcp.php", $lang->redirect_modnotes); }
| redirect("modcp.php", $lang->redirect_modnotes); }
|
Zeile 3247 | Zeile 3286 |
---|
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE a.visible='0' {$tflist}
|
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE a.visible='0' {$tflist}
|
");
| ");
|
$unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");
if($unapproved_attachments > 0)
| $unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");
if($unapproved_attachments > 0)
|
Zeile 3337 | Zeile 3376 |
---|
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)"; }
|
$where = ''; if($tflist) { $where = "WHERE (t.fid <> 0 {$tflist}) OR (!l.fid)"; }
|
|
|
$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 3367 | Zeile 3406 |
---|
$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']); $logitem['profilelink'] = build_profile_link($username, $logitem['uid']); if($logitem['tsubject'])
|
$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']); $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 />"; } if($logitem['fname'])
| $information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />"; } if($logitem['fname'])
|
Zeile 3378 | Zeile 3417 |
---|
{ $information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>"; }
|
{ $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']) { $data = unserialize($logitem['data']); if($data['uid'])
|
// Edited a user? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject']) { $data = unserialize($logitem['data']); if($data['uid'])
|
{
| {
|
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid'])); } }
eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";");
|
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid'])); } }
eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";");
|
}
| }
|
if(!$modlogresults) { eval("\$modlogresults = \"".$templates->get("modcp_modlogs_noresults")."\";"); }
|
if(!$modlogresults) { eval("\$modlogresults = \"".$templates->get("modcp_modlogs_noresults")."\";"); }
|
|
|
$query = $db->query(" SELECT b.*, a.username AS adminuser, u.username, (b.lifted-".TIME_NOW.") AS remaining FROM ".TABLE_PREFIX."banned b
| $query = $db->query(" SELECT b.*, a.username AS adminuser, u.username, (b.lifted-".TIME_NOW.") AS remaining FROM ".TABLE_PREFIX."banned b
|
Zeile 3430 | Zeile 3469 |
---|
else { $banned['reason'] = $lang->na;
|
else { $banned['reason'] = $lang->na;
|
}
| }
|
if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---') { $banlength = $lang->permanent; $timeremaining = $lang->na;
|
if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---') { $banlength = $lang->permanent; $timeremaining = $lang->na;
|
}
| }
|
else { $banlength = $bantimes[$banned['bantime']];
| else { $banlength = $bantimes[$banned['bantime']];
|
Zeile 3447 | Zeile 3486 |
---|
if($remaining <= 0) { $timeremaining = "<span style=\"color: red;\">({$lang->ban_ending_imminently})</span>";
|
if($remaining <= 0) { $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)
|
else if($remaining < 3600) { $timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>"; } else if($remaining < 86400)
|
{
| {
|
$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>"; } else if($remaining < 604800) { $timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
|
$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>"; } else if($remaining < 604800) { $timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
|
}
| }
|
else { $timeremaining = "({$timeremaining} {$lang->ban_remaining})";
| else { $timeremaining = "({$timeremaining} {$lang->ban_remaining})";
|
Zeile 3476 | Zeile 3515 |
---|
$modnotes = $cache->read("modnotes"); $modnotes = htmlspecialchars_uni($modnotes['modmessage']);
|
$modnotes = $cache->read("modnotes"); $modnotes = htmlspecialchars_uni($modnotes['modmessage']);
|
|
|
$plugins->run_hooks("modcp_end");
eval("\$modcp = \"".$templates->get("modcp")."\";");
| $plugins->run_hooks("modcp_end");
eval("\$modcp = \"".$templates->get("modcp")."\";");
|