Zeile 19 | Zeile 19 |
---|
$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_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_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread,modcp_nobanned";
|
$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";
| $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";
|
Zeile 226 | Zeile 226 |
---|
$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']));
| $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']));
|
Zeile 335 | Zeile 348 |
---|
$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']);
|
$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
|
|
if($report['reportstatus'] == 0) { $trow = "trow_shaded";
|
if($report['reportstatus'] == 0) { $trow = "trow_shaded";
|
}
| }
|
// No subject? Set it to N/A if($report['threadsubject'] == '') { $report['threadsubject'] = $lang->na;
|
// 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']));
|
else { // Only parse bad words and sanitize subject if there is one... $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 481 | Zeile 500 |
---|
$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']) {
| } if($logitem['fname']) {
|
Zeile 492 | Zeile 511 |
---|
$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?
| // Edited a user or managed announcement?
|
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']));
|
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']));
|
| } if($data['aid']) { $information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";
|
} }
| } }
|
Zeile 508 | Zeile 531 |
---|
if(!$results) { eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");
|
if(!$results) { eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");
|
}
$plugins->run_hooks("modcp_modlogs_filter");
| }
$plugins->run_hooks("modcp_modlogs_filter");
|
// Fetch filter options $sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";
| // Fetch filter options $sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";
|
Zeile 527 | Zeile 550 |
---|
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 538 | Zeile 561 |
---|
}
$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");
|
}
$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");
|
|
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs); }
if($mybb->input['action'] == "do_delete_announcement")
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs); }
if($mybb->input['action'] == "do_delete_announcement")
|
{ verify_post_check($mybb->input['my_post_key']);
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement['aid']) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission();
| { verify_post_check($mybb->input['my_post_key']);
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement['aid']) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission();
|
}
$plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'");
|
}
$plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'");
|
| 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); }
if($mybb->input['action'] == "delete_announcement")
|
$cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement); }
if($mybb->input['action'] == "delete_announcement")
|
{
| {
|
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
|
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
|
|
|
$announcement = $db->fetch_array($query);
|
$announcement = $db->fetch_array($query);
|
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
| $announcement['subject'] = htmlspecialchars_uni($announcement['subject']);
|
if(!$announcement['aid']) { error($lang->error_invalid_announcement); }
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
if(!$announcement['aid']) { error($lang->error_invalid_announcement); }
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
{ error_no_permission(); }
$plugins->run_hooks("modcp_delete_announcement");
| { error_no_permission(); }
$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; }
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum; }
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00"; } }
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) { $enddate[0] = "00";
| { 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'])) { $errors[] = $lang->error_missing_forum; }
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00"; } }
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) { $enddate[0] = "00";
|
} }
| } }
|
Zeile 688 | Zeile 712 |
---|
'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 843 | Zeile 868 |
---|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
} else
| } else
|
{ $end_type_sel['finite'] = ' checked="checked"'; }
| { $end_type_sel['finite'] = ' checked="checked"'; }
|
Zeile 870 | Zeile 895 |
---|
// 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 884 | Zeile 909 |
---|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title;
|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title;
|
}
| }
|
if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message;
| if(!trim($mybb->input['message'])) { $errors[] = $lang->error_missing_message;
|
Zeile 917 | Zeile 942 |
---|
{ $enddate[0] = "00"; }
|
{ $enddate[0] = "00"; }
|
}
| }
|
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); if(!in_array($mybb->input['starttime_month'], $months))
| $months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); if(!in_array($mybb->input['starttime_month'], $months))
|
Zeile 927 | Zeile 952 |
---|
$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(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
|
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])); if(!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 938 | Zeile 963 |
---|
else { if(!in_array($mybb->input['endtime_month'], $months))
|
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)
|
$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; } elseif($enddate <= $startdate)
| $errors[] = $lang->error_invalid_end_date; } elseif($enddate <= $startdate)
|
Zeile 953 | Zeile 978 |
---|
}
$plugins->run_hooks("modcp_do_edit_announcement_start");
|
}
$plugins->run_hooks("modcp_do_edit_announcement_start");
|
|
|
// Proceed to update if no errors if(!$errors) {
| // Proceed to update if no errors if(!$errors) {
|
Zeile 969 | Zeile 994 |
---|
);
$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 1379 | Zeile 1406 |
---|
$multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");
$query = $db->query("
|
$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
| SELECT t.tid, t.dateline, t.fid, t.subject, t.username AS threadusername, p.message AS postmessage, u.username AS username, t.uid
|
FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=t.firstpost) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
| FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=t.firstpost) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
|
Zeile 1396 | Zeile 1423 |
---|
$forum_name = $forum_cache[$thread['fid']]['name']; $threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']); $threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);
|
$forum_name = $forum_cache[$thread['fid']]['name']; $threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']); $threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);
|
$profile_link = build_profile_link($thread['username'], $thread['uid']);
| if($thread['username'] == "") { if($thread['threadusername'] != "") { $profile_link = $thread['threadusername']; } else { $profile_link = $lang->guest; } } else { $profile_link = build_profile_link($thread['username'], $thread['uid']); }
|
$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage'])); $forum = "<strong>{$lang->meta_forum} <a href=\"{$thread['forumlink']}\">{$forum_name}</a></strong>"; eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
| $thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage'])); $forum = "<strong>{$lang->meta_forum} <a href=\"{$thread['forumlink']}\">{$forum_name}</a></strong>"; eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
|
Zeile 1405 | Zeile 1448 |
---|
if(!$threads && $mybb->input['type'] == "threads") { eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
|
if(!$threads && $mybb->input['type'] == "threads") { eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
|
}
| }
|
if($threads) { add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=threads");
|
if($threads) { add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=threads");
|
|
|
$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); } $type = 'threads'; }
|
eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";"); output_page($threadqueue); } $type = 'threads'; }
|
|
|
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");
|
Zeile 1440 | Zeile 1483 |
---|
$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
| $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");
|
{ $start = 0; $page = 1; }
$multipage = multipage($unapproved_posts, $perpage, $page, "modcp.php?action=modqueue&type=posts");
|
|
|
$query = $db->query("
|
$query = $db->query("
|
SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline
| SELECT p.pid, p.subject, p.message, p.username AS postusername, 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) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
| FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
|
Zeile 1483 | Zeile 1526 |
---|
$forum_name = $forum_cache[$post['fid']]['name']; $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']);
|
$forum_name = $forum_cache[$post['fid']]['name']; $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']);
|
$profile_link = build_profile_link($post['username'], $post['uid']);
| if($post['username'] == "") { if($post['postusername'] != "") { $profile_link = $post['postusername']; } else { $profile_link = $lang->guest; } } else { $profile_link = build_profile_link($post['username'], $post['uid']); }
|
$thread = "<strong>{$lang->meta_thread} <a href=\"{$post['threadlink']}\">{$post['threadsubject']}</a></strong>"; $forum = "<strong>{$lang->meta_forum} <a href=\"{$post['forumlink']}\">{$forum_name}</a></strong><br />"; $post['message'] = nl2br(htmlspecialchars_uni($post['message']));
| $thread = "<strong>{$lang->meta_thread} <a href=\"{$post['threadlink']}\">{$post['threadsubject']}</a></strong>"; $forum = "<strong>{$lang->meta_forum} <a href=\"{$post['forumlink']}\">{$forum_name}</a></strong><br />"; $post['message'] = nl2br(htmlspecialchars_uni($post['message']));
|
Zeile 1561 | Zeile 1620 |
---|
LIMIT {$start}, {$perpage} "); while($attachment = $db->fetch_array($query))
|
LIMIT {$start}, {$perpage} "); while($attachment = $db->fetch_array($query))
|
{
| {
|
$altbg = alt_trow();
if(!$attachment['dateuploaded'])
| $altbg = alt_trow();
if(!$attachment['dateuploaded'])
|
Zeile 1585 | Zeile 1644 |
---|
}
if(!$attachments && $mybb->input['type'] == "attachments")
|
}
if(!$attachments && $mybb->input['type'] == "attachments")
|
{
| {
|
eval("\$attachments = \"".$templates->get("modcp_modqueue_attachments_empty")."\";"); }
| eval("\$attachments = \"".$templates->get("modcp_modqueue_attachments_empty")."\";"); }
|
Zeile 1610 | Zeile 1669 |
---|
eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";"); output_page($queue);
|
eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";"); output_page($queue);
|
} }
| } }
|
if($mybb->input['action'] == "do_editprofile") { // Verify incoming POST request
| if($mybb->input['action'] == "do_editprofile") { // Verify incoming POST request
|
Zeile 1621 | Zeile 1680 |
---|
$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 if(!modcp_can_manage_user($user['uid']))
|
}
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid']))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1663 | Zeile 1722 |
---|
else if($mybb->input['reverttitle']) { $updated_user['usertitle'] = '';
|
else if($mybb->input['reverttitle']) { $updated_user['usertitle'] = '';
|
}
| }
|
if($mybb->input['remove_avatar']) { $updated_user['avatarurl'] = '';
| if($mybb->input['remove_avatar']) { $updated_user['avatarurl'] = '';
|
Zeile 1813 | Zeile 1872 |
---|
$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 if(!modcp_can_manage_user($user['uid']))
|
}
// 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://";
|
error_no_permission(); }
if($user['website'] == "" || $user['website'] == "http://") { $user['website'] = "http://";
|
}
| }
|
if($user['icq'] != "0") {
| if($user['icq'] != "0") {
|
Zeile 1844 | Zeile 1903 |
---|
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]);
|
}
| }
|
// Custom user title, check to see if we have a default group title 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']);
|
Zeile 1869 | Zeile 1928 |
---|
{ // Go for post count title if a group default isn't set $usertitles = $cache->read('usertitles');
|
{ // 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'])
| foreach($usertitles as $title) { if($title['posts'] <= $mybb->user['postnum'])
|
Zeile 1964 | Zeile 2023 |
---|
} } 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);
| foreach($expoptions as $key => $val) { $val = trim($val);
|
Zeile 2262 | Zeile 2321 |
---|
}
$pages = $user_count / $perpage;
|
}
$pages = $user_count / $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 {
| $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; }
| $start = 0; $page = 1; }
|
Zeile 3403 | Zeile 3462 |
---|
$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']) {
| } if($logitem['fname']) {
|
Zeile 3414 | Zeile 3473 |
---|
$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?
| // Edited a user or managed announcement?
|
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']));
|
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']));
|
| } if($data['aid']) { $information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";
|
} }
| } }
|
Zeile 3452 | Zeile 3515 |
---|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1) { $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1) { $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
|
}
| }
|
$admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);
$trow = alt_trow();
| $admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);
$trow = alt_trow();
|
Zeile 3506 | Zeile 3569 |
---|
if(!$bannedusers) {
|
if(!$bannedusers) {
|
eval("\$bannedusers = \"".$templates->get("modcp_banning_nobanned")."\";");
| eval("\$bannedusers = \"".$templates->get("modcp_nobanned")."\";");
|
}
$modnotes = $cache->read("modnotes");
| }
$modnotes = $cache->read("modnotes");
|