Zeile 11 | Zeile 11 |
---|
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,modcp_reports_allreports,modcp_modlogs_multipage,modcp_announcements_delete,modcp_announcements_edit,modcp_awaitingmoderation";
| $templatelist = "modcp_reports,modcp_reports_report,modcp_reports_selectall,modcp_reports_multipage,modcp_reports_allreport,modcp_reports_allreports,modcp_modlogs_multipage,modcp_announcements_delete,modcp_announcements_edit,modcp_awaitingmoderation";
|
$templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban,modcp_announcements_announcement_global,modcp_no_announcements_forum,modcp_modqueue_threads_thread,modcp_awaitingthreads,preview"; $templatelist .= ",modcp_banning_nobanned,modcp_modqueue_threads_empty,modcp_modqueue_masscontrols,modcp_modqueue_threads,modcp_modqueue_posts_post,modcp_modqueue_posts_empty,modcp_awaitingposts,modcp_nav_editprofile,modcp_nav_banning"; $templatelist .= ",modcp_nav,modcp_modlogs_noresults,modcp_modlogs_nologs,modcp,modcp_modqueue_posts,modcp_modqueue_attachments_attachment,modcp_modqueue_attachments_empty,modcp_modqueue_attachments,modcp_editprofile_suspensions_info";
| $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban,modcp_announcements_announcement_global,modcp_no_announcements_forum,modcp_modqueue_threads_thread,modcp_awaitingthreads,preview"; $templatelist .= ",modcp_banning_nobanned,modcp_modqueue_threads_empty,modcp_modqueue_masscontrols,modcp_modqueue_threads,modcp_modqueue_posts_post,modcp_modqueue_posts_empty,modcp_awaitingposts,modcp_nav_editprofile,modcp_nav_banning"; $templatelist .= ",modcp_nav,modcp_modlogs_noresults,modcp_modlogs_nologs,modcp,modcp_modqueue_posts,modcp_modqueue_attachments_attachment,modcp_modqueue_attachments_empty,modcp_modqueue_attachments,modcp_editprofile_suspensions_info";
|
Zeile 285 | Zeile 285 |
---|
verify_post_check($mybb->get_input('my_post_key'));
$mybb->input['reports'] = $mybb->get_input('reports', MyBB::INPUT_ARRAY);
|
verify_post_check($mybb->get_input('my_post_key'));
$mybb->input['reports'] = $mybb->get_input('reports', MyBB::INPUT_ARRAY);
|
if(empty($mybb->input['reports']))
| if(empty($mybb->input['reports']) && empty($mybb->cookies['inlinereports']))
|
{ error($lang->error_noselected_reports); }
|
{ error($lang->error_noselected_reports); }
|
$sql = '1=1'; if(empty($mybb->input['allbox']))
| $message = $lang->redirect_reportsmarked;
if(isset($mybb->cookies['inlinereports'])) { if($mybb->cookies['inlinereports'] == '|ALL|') { $message = $lang->redirect_allreportsmarked; $sql = "1=1"; if(isset($mybb->cookies['inlinereports_removed'])) { $inlinereportremovedlist = explode("|", $mybb->cookies['inlinereports_removed']); $reports = array_map("intval", $inlinereportremovedlist); $rids = implode("','", $reports); $sql = "rid NOT IN ('0','{$rids}')"; } } else { $inlinereportlist = explode("|", $mybb->cookies['inlinereports']); $reports = array_map("intval", $inlinereportlist);
if(!count($reports)) { error($lang->error_noselected_reports); }
$rids = implode("','", $reports);
$sql = "rid IN ('0','{$rids}')"; } } else
|
{ $mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode("','", $mybb->input['reports']);
| { $mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode("','", $mybb->input['reports']);
|
Zeile 299 | Zeile 328 |
---|
$sql = "rid IN ('0','{$rids}')"; }
|
$sql = "rid IN ('0','{$rids}')"; }
|
$plugins->run_hooks("modcp_do_reports");
| $plugins->run_hooks("modcp_do_reports");
|
$db->update_query("reportedcontent", array('reportstatus' => 1), "{$sql}{$flist_reports}"); $cache->update_reportedcontent();
|
$db->update_query("reportedcontent", array('reportstatus' => 1), "{$sql}{$flist_reports}"); $cache->update_reportedcontent();
|
| my_unsetcookie('inlinereports'); my_unsetcookie('inlinereports_removed');
|
$page = $mybb->get_input('page', MyBB::INPUT_INT);
|
$page = $mybb->get_input('page', MyBB::INPUT_INT);
|
redirect("modcp.php?action=reports&page={$page}", $lang->redirect_reportsmarked);
| redirect("modcp.php?action=reports&page={$page}", $message);
|
}
if($mybb->input['action'] == "reports")
| }
if($mybb->input['action'] == "reports")
|
Zeile 428 | Zeile 460 |
---|
} } else if(!$report['type'] || $report['type'] == 'post')
|
} } else if(!$report['type'] || $report['type'] == 'post')
|
{
| {
|
// This (should) be a post $postcache[$report['id']] = $report['id']; }
| // This (should) be a post $postcache[$report['id']] = $report['id']; }
|
Zeile 490 | Zeile 522 |
---|
$postcache[$post['pid']] = $post; } }
|
$postcache[$post['pid']] = $post; } }
|
| $lang->page_selected = $lang->sprintf($lang->page_selected, count($reportcache)); $lang->select_all = $lang->sprintf($lang->select_all, (int)$report_count); $lang->all_selected = $lang->sprintf($lang->all_selected, (int)$report_count); eval("\$selectall = \"".$templates->get("modcp_reports_selectall")."\";");
|
$plugins->run_hooks('modcp_reports_intermediate');
|
$plugins->run_hooks('modcp_reports_intermediate');
|
| $inlinecount = 0;
|
// Now that we have all of the information needed, display the reports foreach($reportcache as $report) {
| // Now that we have all of the information needed, display the reports foreach($reportcache as $report) {
|
Zeile 503 | Zeile 541 |
---|
// Assume a post $report['type'] = 'post'; }
|
// Assume a post $report['type'] = 'post'; }
|
|
|
// Report Information $report_data = array();
|
// Report Information $report_data = array();
|
|
|
switch($report['type']) { case 'post': $post = get_post_link($report['id'])."#pid{$report['id']}"; $user = build_profile_link(htmlspecialchars_uni($postcache[$report['id']]['username']), $postcache[$report['id']]['uid']); $report_data['content'] = $lang->sprintf($lang->report_info_post, $post, $user);
|
switch($report['type']) { case 'post': $post = get_post_link($report['id'])."#pid{$report['id']}"; $user = build_profile_link(htmlspecialchars_uni($postcache[$report['id']]['username']), $postcache[$report['id']]['uid']); $report_data['content'] = $lang->sprintf($lang->report_info_post, $post, $user);
|
|
|
$thread_link = get_thread_link($postcache[$report['id']]['tid']); $thread_subject = htmlspecialchars_uni($parser->parse_badwords($postcache[$report['id']]['subject'])); $report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject);
|
$thread_link = get_thread_link($postcache[$report['id']]['tid']); $thread_subject = htmlspecialchars_uni($parser->parse_badwords($postcache[$report['id']]['subject'])); $report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject);
|
break;
| break;
|
case 'profile': $user = build_profile_link(htmlspecialchars_uni($usercache[$report['id']]['username']), $usercache[$report['id']]['uid']); $report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);
| case 'profile': $user = build_profile_link(htmlspecialchars_uni($usercache[$report['id']]['username']), $usercache[$report['id']]['uid']); $report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);
|
Zeile 567 | Zeile 605 |
---|
} elseif($usercache[$report['lastreporter']] > 0) {
|
} elseif($usercache[$report['lastreporter']] > 0) {
|
$lastreport_user = $lang->na_deleted;
| $lastreport_user = htmlspecialchars_uni($lang->na_deleted);
|
}
$lastreport_date = my_date('relative', $report['lastreport']); $report_data['lastreporter'] = $lang->sprintf($lang->report_info_lastreporter, $lastreport_date, $lastreport_user);
|
}
$lastreport_date = my_date('relative', $report['lastreport']); $report_data['lastreporter'] = $lang->sprintf($lang->report_info_lastreporter, $lastreport_date, $lastreport_user);
|
| }
$inlinecheck = ''; if(isset($mybb->cookies['inlinereports']) && my_strpos($mybb->cookies['inlinereports'], "|{$report['rid']}|") !== false) { $inlinecheck = " checked=\"checked\""; ++$inlinecount;
|
}
$plugins->run_hooks("modcp_reports_report");
| }
$plugins->run_hooks("modcp_reports_report");
|
Zeile 644 | Zeile 689 |
---|
} } $postcount = (int)$report_count;
|
} } $postcount = (int)$report_count;
|
$pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->get_input('page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1;
| $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->get_input('page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1;
|
}
if($page)
| }
if($page)
|
Zeile 775 | Zeile 820 |
---|
}
if($nummodlogs == 0 && $mybb->usergroup['issupermod'] != 1)
|
}
if($nummodlogs == 0 && $mybb->usergroup['issupermod'] != 1)
|
{ error($lang->you_cannot_view_mod_logs);
| { error($lang->you_cannot_view_mod_logs);
|
}
add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
| }
add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
|
Zeile 793 | Zeile 838 |
---|
if($mybb->get_input('uid', MyBB::INPUT_INT)) { $where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
|
if($mybb->get_input('uid', MyBB::INPUT_INT)) { $where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
|
}
| }
|
// Searching for entries in a specific forum if($mybb->get_input('fid', MyBB::INPUT_INT))
| // Searching for entries in a specific forum if($mybb->get_input('fid', MyBB::INPUT_INT))
|
Zeile 820 | Zeile 865 |
---|
} $order = $mybb->get_input('order'); if($order != "asc")
|
} $order = $mybb->get_input('order'); if($order != "asc")
|
{
| {
|
$order = "desc"; }
| $order = "desc"; }
|
Zeile 907 | Zeile 952 |
---|
$logitem['action'] = htmlspecialchars_uni($logitem['action']); $log_date = my_date('relative', $logitem['dateline']); $trow = alt_trow();
|
$logitem['action'] = htmlspecialchars_uni($logitem['action']); $log_date = my_date('relative', $logitem['dateline']); $trow = alt_trow();
|
$logitem['username'] = htmlspecialchars_uni($logitem['username']); $username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']); $logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
| if($logitem['username']) { $logitem['username'] = htmlspecialchars_uni($logitem['username']); $username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']); $logitem['profilelink'] = build_profile_link($username, $logitem['uid']); } else { $username = $logitem['profilelink'] = $logitem['username'] = htmlspecialchars_uni($lang->na_deleted); }
|
$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));
if($logitem['tsubject'])
| $logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));
if($logitem['tsubject'])
|
Zeile 919 | Zeile 971 |
---|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_thread")."\";"); } if($logitem['fname'])
|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_thread")."\";"); } if($logitem['fname'])
|
{
| {
|
$logitem['forum'] = get_forum_link($logitem['fid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_forum")."\";"); } if($logitem['psubject'])
|
$logitem['forum'] = get_forum_link($logitem['fid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_forum")."\";"); } if($logitem['psubject'])
|
{
| {
|
$logitem['psubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['psubject'])); $logitem['post'] = get_post_link($logitem['pid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_post")."\";");
|
$logitem['psubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['psubject'])); $logitem['post'] = get_post_link($logitem['pid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_post")."\";");
|
}
| }
|
// Edited a user or managed announcement? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject']) {
| // Edited a user or managed announcement? if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject']) {
|
Zeile 950 | Zeile 1002 |
---|
$plugins->run_hooks("modcp_modlogs_result");
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
|
$plugins->run_hooks("modcp_modlogs_result");
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
|
}
| }
|
if(!$results) { eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");
|
if(!$results) { eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");
|
}
$plugins->run_hooks("modcp_modlogs_filter");
| }
$plugins->run_hooks("modcp_modlogs_filter");
|
// Fetch filter options $sortbysel = array('username' => '', 'forum' => '', 'thread' => '', 'dateline' => '');
| // Fetch filter options $sortbysel = array('username' => '', 'forum' => '', 'thread' => '', 'dateline' => '');
|
Zeile 984 | Zeile 1036 |
---|
{ $selected = " selected=\"selected\""; }
|
{ $selected = " selected=\"selected\""; }
|
|
|
$user['username'] = htmlspecialchars_uni($user['username']); eval("\$user_options .= \"".$templates->get("modcp_modlogs_user")."\";");
|
$user['username'] = htmlspecialchars_uni($user['username']); eval("\$user_options .= \"".$templates->get("modcp_modlogs_user")."\";");
|
}
$forum_select = build_forum_jump("", $mybb->get_input('fid', MyBB::INPUT_INT), 1, '', 0, true, '', "fid");
| }
$forum_select = build_forum_jump("", $mybb->get_input('fid', MyBB::INPUT_INT), 1, '', 0, true, '', "fid");
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs); }
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs); }
|
|
|
if($mybb->input['action'] == "do_delete_announcement")
|
if($mybb->input['action'] == "do_delete_announcement")
|
{ verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
$aid = $mybb->get_input('aid'); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
$plugins->run_hooks("modcp_do_delete_announcement");
| { verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
$aid = $mybb->get_input('aid'); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
$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);
| $db->delete_query("announcements", "aid='{$aid}'"); log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
|
Zeile 1029 | Zeile 1081 |
---|
if($mybb->input['action'] == "delete_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
if($mybb->input['action'] == "delete_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
{
| {
|
error_no_permission(); }
|
error_no_permission(); }
|
|
|
$aid = $mybb->get_input('aid');
|
$aid = $mybb->get_input('aid');
|
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
| $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
|
$announcement = $db->fetch_array($query); $announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));
if(!$announcement)
|
$announcement = $db->fetch_array($query); $announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));
if(!$announcement)
|
{
| {
|
error($lang->error_invalid_announcement); }
| error($lang->error_invalid_announcement); }
|
Zeile 1058 | Zeile 1110 |
---|
if($mybb->input['action'] == "do_new_announcement") { verify_post_check($mybb->get_input('my_post_key'));
|
if($mybb->input['action'] == "do_new_announcement") { verify_post_check($mybb->get_input('my_post_key'));
|
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
| if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
|
$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT); if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums))) {
| $announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT); if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums))) {
|
Zeile 1150 | Zeile 1202 |
---|
if($enddate <= $startdate) { $errors[] = $lang->error_end_before_start;
|
if($enddate <= $startdate) { $errors[] = $lang->error_end_before_start;
|
} }
if($mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1) {
| } }
if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1) {
|
$allowhtml = 1; } else { $allowhtml = 0;
|
$allowhtml = 1; } else { $allowhtml = 0;
|
}
| }
|
if($mybb->get_input('allowmycode', MyBB::INPUT_INT) == 1)
|
if($mybb->get_input('allowmycode', MyBB::INPUT_INT) == 1)
|
{
| {
|
$allowmycode = 1;
|
$allowmycode = 1;
|
} else {
| } else {
|
$allowmycode = 0; } if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)
| $allowmycode = 0; } if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)
|
Zeile 1177 | Zeile 1229 |
---|
{ $allowsmilies = 0; }
|
{ $allowsmilies = 0; }
|
|
|
$plugins->run_hooks("modcp_do_new_announcement_start");
if(!$errors) { if(isset($mybb->input['preview']))
|
$plugins->run_hooks("modcp_do_new_announcement_start");
if(!$errors) { if(isset($mybb->input['preview']))
|
{
| {
|
$preview = array(); $mybb->input['action'] = 'new_announcement'; }
| $preview = array(); $mybb->input['action'] = 'new_announcement'; }
|
Zeile 1199 | Zeile 1251 |
---|
'allowhtml' => $allowhtml, 'allowmycode' => $allowmycode, 'allowsmilies' => $allowsmilies
|
'allowhtml' => $allowhtml, 'allowmycode' => $allowmycode, 'allowsmilies' => $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);
| log_moderator_action(array("aid" => $aid, "subject" => $mybb->input['title']), $lang->announcement_added);
|
$plugins->run_hooks("modcp_do_new_announcement_end");
| $plugins->run_hooks("modcp_do_new_announcement_end");
|
Zeile 1274 | Zeile 1326 |
---|
$announcement = array( 'subject' => '', 'message' => '',
|
$announcement = array( 'subject' => '', 'message' => '',
|
'allowhtml' => 1,
| 'allowhtml' => 0,
|
'allowmycode' => 1, 'allowsmilies' => 1 );
| 'allowmycode' => 1, 'allowsmilies' => 1 );
|
Zeile 1288 | Zeile 1340 |
---|
{ if($startday == $day) {
|
{ if($startday == $day) {
|
$selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else {
| $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else {
|
$selected = ''; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
if($endday == $day)
|
$selected = ''; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
if($endday == $day)
|
{
| {
|
$selected = " selected=\"selected\"";
|
$selected = " selected=\"selected\"";
|
eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else {
| eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else {
|
$selected = ''; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
| $selected = ''; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
|
Zeile 1314 | Zeile 1366 |
---|
{ $startmonthsel[$month] = ''; $endmonthsel[$month] = '';
|
{ $startmonthsel[$month] = ''; $endmonthsel[$month] = '';
|
}
| }
|
$startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
| $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
|
Zeile 1325 | Zeile 1377 |
---|
$title = htmlspecialchars_uni($announcement['subject']); $message = htmlspecialchars_uni($announcement['message']);
|
$title = htmlspecialchars_uni($announcement['subject']); $message = htmlspecialchars_uni($announcement['message']);
|
|
|
$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
|
$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
|
if($announcement['allowhtml'])
| if($mybb->settings['announcementshtml'])
|
{
|
{
|
$html_sel['yes'] = ' checked="checked"';
| if($announcement['allowhtml']) { $html_sel['yes'] = ' checked="checked"'; } else { $html_sel['no'] = ' checked="checked"'; }
eval("\$allow_html = \"".$templates->get("modcp_announcements_allowhtml")."\";");
|
} else {
|
} else {
|
$html_sel['no'] = ' checked="checked"';
| $allow_html = '';
|
}
if($announcement['allowmycode']) { $mycode_sel['yes'] = ' checked="checked"';
|
}
if($announcement['allowmycode']) { $mycode_sel['yes'] = ' checked="checked"';
|
}
| }
|
else { $mycode_sel['no'] = ' checked="checked"';
|
else { $mycode_sel['no'] = ' checked="checked"';
|
}
| }
|
if($announcement['allowsmilies']) {
| if($announcement['allowsmilies']) {
|
Zeile 1360 | Zeile 1422 |
---|
$end_type_sel['infinite'] = ' checked="checked"'; } else
|
$end_type_sel['infinite'] = ' checked="checked"'; } else
|
{
| {
|
$end_type_sel['finite'] = ' checked="checked"'; }
| $end_type_sel['finite'] = ' checked="checked"'; }
|
Zeile 1373 | Zeile 1435 |
---|
$announcementarray = array( 'aid' => 0, 'fid' => $announcement_fid,
|
$announcementarray = array( 'aid' => 0, 'fid' => $announcement_fid,
|
'uid' => $mybb->user['uid'], 'subject' => $mybb->input['title'], 'message' => $mybb->input['message'], 'allowhtml' => $mybb->get_input('allowhtml', MyBB::INPUT_INT), 'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT), 'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT), 'dateline' => TIME_NOW, 'userusername' => $mybb->user['username'], );
$array = $mybb->user; foreach($array as $key => $element) {
| 'uid' => $mybb->user['uid'], 'subject' => $mybb->input['title'], 'message' => $mybb->input['message'], 'allowhtml' => $mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT), 'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT), 'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT), 'dateline' => TIME_NOW, 'userusername' => $mybb->user['username'], );
$array = $mybb->user; foreach($array as $key => $element) {
|
$announcementarray[$key] = $element; }
| $announcementarray[$key] = $element; }
|
Zeile 1475 | Zeile 1537 |
---|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
}
| }
|
}
if(stristr($mybb->input['endtime_time'], "pm"))
| }
if(stristr($mybb->input['endtime_time'], "pm"))
|
Zeile 1492 | Zeile 1554 |
---|
if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = '01';
|
if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = '01';
|
}
| }
|
$localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset; if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
|
$localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset; if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
|
{
| {
|
$errors[] = $lang->error_invalid_start_date; }
| $errors[] = $lang->error_invalid_start_date; }
|
Zeile 1520 | Zeile 1582 |
---|
$errors[] = $lang->error_invalid_end_date; } elseif($enddate <= $startdate)
|
$errors[] = $lang->error_invalid_end_date; } elseif($enddate <= $startdate)
|
{
| {
|
$errors[] = $lang->error_end_before_start; } }
|
$errors[] = $lang->error_end_before_start; } }
|
if($mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)
| if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)
|
{ $allowhtml = 1; }
| { $allowhtml = 1; }
|
Zeile 1574 | Zeile 1636 |
---|
); $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);
| log_moderator_action(array("aid" => $announcement['aid'], "subject" => $mybb->input['title']), $lang->announcement_edited);
|
$plugins->run_hooks("modcp_do_edit_announcement_end");
| $plugins->run_hooks("modcp_do_edit_announcement_end");
|
Zeile 1612 | Zeile 1674 |
---|
error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1694 | Zeile 1756 |
---|
{ $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");
|
{ $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");
|
} else { $selected = ''; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
if($endday == $day) {
| } else { $selected = ''; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
if($endday == $day) {
|
$selected = " selected=\"selected\""; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
| $selected = " selected=\"selected\""; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
|
Zeile 1731 | Zeile 1793 |
---|
$message = htmlspecialchars_uni($announcement['message']);
$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
|
$message = htmlspecialchars_uni($announcement['message']);
$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
|
if($announcement['allowhtml']) { $html_sel['yes'] = ' checked="checked"'; } else { $html_sel['no'] = ' checked="checked"'; }
| if($mybb->settings['announcementshtml']) { if($announcement['allowhtml']) { $html_sel['yes'] = ' checked="checked"'; } else { $html_sel['no'] = ' checked="checked"'; }
eval("\$allow_html = \"".$templates->get("modcp_announcements_allowhtml")."\";"); } else { $allow_html = ''; }
|
if($announcement['allowmycode']) { $mycode_sel['yes'] = ' checked="checked"';
| if($announcement['allowmycode']) { $mycode_sel['yes'] = ' checked="checked"';
|
Zeile 1750 | Zeile 1822 |
---|
}
if($announcement['allowsmilies'])
|
}
if($announcement['allowsmilies'])
|
{
| {
|
$smilies_sel['yes'] = ' checked="checked"'; } else
| $smilies_sel['yes'] = ' checked="checked"'; } else
|
Zeile 1780 | Zeile 1852 |
---|
'uid' => $mybb->user['uid'], 'subject' => $mybb->input['title'], 'message' => $mybb->input['message'],
|
'uid' => $mybb->user['uid'], 'subject' => $mybb->input['title'], 'message' => $mybb->input['message'],
|
'allowhtml' => $mybb->get_input('allowhtml', MyBB::INPUT_INT),
| 'allowhtml' => $mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT),
|
'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT), 'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT), 'dateline' => TIME_NOW,
| 'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT), 'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT), 'dateline' => TIME_NOW,
|
Zeile 1885 | Zeile 1957 |
---|
$announcements_forum = ''; fetch_forum_announcements();
|
$announcements_forum = ''; fetch_forum_announcements();
|
|
|
if(!$announcements_forum) { eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");
| if(!$announcements_forum) { eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");
|
Zeile 2020 | Zeile 2092 |
---|
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE aid IN (".implode(",", $attachments)."){$tflist_queue_attach}
|
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE aid IN (".implode(",", $attachments)."){$tflist_queue_attach}
|
");
| ");
|
while($attachment = $db->fetch_array($query)) { if(!isset($mybb->input['attachments'][$attachment['aid']]))
| while($attachment = $db->fetch_array($query)) { if(!isset($mybb->input['attachments'][$attachment['aid']]))
|
Zeile 2031 | Zeile 2103 |
---|
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");
|
Zeile 2065 | Zeile 2137 |
---|
if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_moderate_threads);
|
if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_moderate_threads);
|
}
| }
|
$forum_cache = $cache->read("forums");
|
$forum_cache = $cache->read("forums");
|
|
|
$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}"); $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
|
$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}"); $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
|
|
|
// Figure out if we need to display multiple pages. if($mybb->get_input('page') != "last") { $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
// Figure out if we need to display multiple pages. if($mybb->get_input('page') != "last") { $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
}
| }
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage; $pages = ceil($pages);
| $perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage; $pages = ceil($pages);
|
Zeile 2088 | Zeile 2160 |
---|
}
if($page > $pages || $page <= 0)
|
}
if($page > $pages || $page <= 0)
|
{
| {
|
$page = 1; }
if($page)
|
$page = 1; }
if($page)
|
{ $start = ($page-1) * $perpage;
| { $start = ($page-1) * $perpage;
|
} else {
| } else {
|
Zeile 2111 | Zeile 2183 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid) WHERE t.visible='0' {$tflist_queue_threads} ORDER BY t.lastpost DESC
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid) WHERE t.visible='0' {$tflist_queue_threads} ORDER BY t.lastpost DESC
|
LIMIT {$start}, {$perpage} ");
| LIMIT {$start}, {$perpage} ");
|
$threads = ''; while($thread = $db->fetch_array($query)) {
| $threads = ''; while($thread = $db->fetch_array($query)) {
|
Zeile 3194 | Zeile 3266 |
---|
}
eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");
|
}
eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");
|
| $user['usernotes'] = htmlspecialchars_uni($user['usernotes']);
|
if(!isset($newtitle)) {
| if(!isset($newtitle)) {
|
Zeile 3527 | Zeile 3601 |
---|
$row['mod_username'] = htmlspecialchars_uni($row['mod_username']); $mod_username = format_name($row['mod_username'], $row['mod_usergroup'], $row['mod_displaygroup']); $mod_username_link = build_profile_link($mod_username, $row['mod_uid']);
|
$row['mod_username'] = htmlspecialchars_uni($row['mod_username']); $mod_username = format_name($row['mod_username'], $row['mod_usergroup'], $row['mod_displaygroup']); $mod_username_link = build_profile_link($mod_username, $row['mod_uid']);
|
$issued_date = my_date($mybb->settings['dateformat'], $row['dateline']).' '.my_date($mybb->settings['timeformat'], $row['dateline']);
| $issued_date = my_date('normal', $row['dateline']);
|
$revoked_text = ''; if($row['daterevoked'] > 0) {
| $revoked_text = ''; if($row['daterevoked'] > 0) {
|
Zeile 3536 | Zeile 3610 |
---|
} if($row['expires'] > 0) {
|
} if($row['expires'] > 0) {
|
$expire_date = my_date('relative', $row['expires'], '', 2);
| $expire_date = nice_time($row['expires']-TIME_NOW);
|
} else {
| } else {
|
Zeile 4229 | Zeile 4303 |
---|
// Check banned group $usergroups_cache = $cache->read('usergroups'); $usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];
|
// Check banned group $usergroups_cache = $cache->read('usergroups'); $usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];
|
$query = $db->simple_select("usergroups", "gid", "isbannedgroup=1 AND gid='".$mybb->get_input('usergroup', MyBB::INPUT_INT)."'");
| |
if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup'])) {
| if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup'])) {
|