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 56 | Zeile 56 |
---|
$flist_queue_attach = $wflist_reports = $tflist_reports = $flist_reports = $tflist_modlog = $flist_modlog = $errors = ''; // SQL for fetching items only related to forums this user moderates $moderated_forums = array();
|
$flist_queue_attach = $wflist_reports = $tflist_reports = $flist_reports = $tflist_modlog = $flist_modlog = $errors = ''; // SQL for fetching items only related to forums this user moderates $moderated_forums = array();
|
| $numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;
|
if($mybb->usergroup['issupermod'] != 1) {
|
if($mybb->usergroup['issupermod'] != 1) {
|
$query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id='{$mybb->user['usergroup']}' AND isgroup = '1')");
$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;
| $query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id IN ({$mybb->usergroup['all_usergroups']}) AND isgroup = '1')");
|
while($forum = $db->fetch_array($query)) {
|
while($forum = $db->fetch_array($query)) {
|
// For Announcements if($forum['canmanageannouncements'] == 1) { ++$numannouncements; }
| $moderated_forums[] = $forum['fid']; $children = get_child_list($forum['fid']); if(is_array($children)) { $moderated_forums = array_merge($moderated_forums, $children); } } $moderated_forums = array_unique($moderated_forums);
$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0; foreach($moderated_forums as $moderated_forum) { // For Announcements if(is_moderator($moderated_forum, 'canmanageannouncements')) { ++$numannouncements; }
|
// For the Mod Queues
|
// For the Mod Queues
|
if($forum['canapproveunapprovethreads'] == 1)
| if(is_moderator($moderated_forum, 'canapproveunapprovethreads'))
|
{
|
{
|
$flist_queue_threads .= ",'{$forum['fid']}'";
$children = get_child_list($forum['fid']); if(!empty($children)) { $flist_queue_threads .= ",'".implode("','", $children)."'"; }
| $flist_queue_threads .= ",'{$moderated_forum}'";
|
++$nummodqueuethreads; }
|
++$nummodqueuethreads; }
|
if($forum['canapproveunapproveposts'] == 1) { $flist_queue_posts .= ",'{$forum['fid']}'";
$children = get_child_list($forum['fid']); if(!empty($children)) { $flist_queue_posts .= ",'".implode("','", $children)."'"; } ++$nummodqueueposts; }
if($forum['canapproveunapproveattachs'] == 1)
| if(is_moderator($moderated_forum, 'canapproveunapproveposts')) { $flist_queue_posts .= ",'{$moderated_forum}'"; ++$nummodqueueposts; }
if(is_moderator($moderated_forum, 'canapproveunapproveattachs'))
|
{
|
{
|
$flist_queue_attach .= ",'{$forum['fid']}'";
$children = get_child_list($forum['fid']); if(!empty($children)) { $flist_queue_attach .= ",'".implode("','", $children)."'"; }
| $flist_queue_attach .= ",'{$moderated_forum}'";
|
++$nummodqueueattach; }
// For Reported posts
|
++$nummodqueueattach; }
// For Reported posts
|
if($forum['canmanagereportedposts'] == 1)
| if(is_moderator($moderated_forum, 'canmanagereportedposts'))
|
{
|
{
|
$flist_reports .= ",'{$forum['fid']}'";
$children = get_child_list($forum['fid']); if(!empty($children)) { $flist_reports .= ",'".implode("','", $children)."'"; }
| $flist_reports .= ",'{$moderated_forum}'";
|
++$numreportedposts; }
// For the Mod Log
|
++$numreportedposts; }
// For the Mod Log
|
if($forum['canviewmodlog'] == 1)
| if(is_moderator($moderated_forum, 'canviewmodlog'))
|
{
|
{
|
$flist_modlog .= ",'{$forum['fid']}'";
$children = get_child_list($forum['fid']); if(!empty($children)) { $flist_modlog .= ",'".implode("','", $children)."'"; }
| $flist_modlog .= ",'{$moderated_forum}'";
|
++$nummodlogs;
|
++$nummodlogs;
|
}
$flist .= ",'{$forum['fid']}'";
| }
|
|
|
$children = get_child_list($forum['fid']); if(!empty($children)) { $flist .= ",'".implode("','", $children)."'"; } $moderated_forums[] = $forum['fid'];
| $flist .= ",'{$moderated_forum}'";
|
} if($flist_queue_threads) {
| } if($flist_queue_threads) {
|
Zeile 232 | Zeile 206 |
---|
if(($numreportedposts > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canmanagereportedcontent'] == 1) { eval("\$nav_reportcenter = \"".$templates->get("modcp_nav_reportcenter")."\";");
|
if(($numreportedposts > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canmanagereportedcontent'] == 1) { eval("\$nav_reportcenter = \"".$templates->get("modcp_nav_reportcenter")."\";");
|
}
| }
|
if(($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1)
|
if(($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1)
|
{
| {
|
eval("\$nav_modlogs = \"".$templates->get("modcp_nav_modlogs")."\";"); }
if($mybb->usergroup['caneditprofiles'] == 1) { eval("\$nav_editprofile = \"".$templates->get("modcp_nav_editprofile")."\";");
|
eval("\$nav_modlogs = \"".$templates->get("modcp_nav_modlogs")."\";"); }
if($mybb->usergroup['caneditprofiles'] == 1) { eval("\$nav_editprofile = \"".$templates->get("modcp_nav_editprofile")."\";");
|
}
| }
|
if($mybb->usergroup['canbanusers'] == 1)
|
if($mybb->usergroup['canbanusers'] == 1)
|
{
| {
|
eval("\$nav_banning = \"".$templates->get("modcp_nav_banning")."\";"); }
if($mybb->usergroup['canviewwarnlogs'] == 1) { eval("\$nav_warninglogs = \"".$templates->get("modcp_nav_warninglogs")."\";");
|
eval("\$nav_banning = \"".$templates->get("modcp_nav_banning")."\";"); }
if($mybb->usergroup['canviewwarnlogs'] == 1) { eval("\$nav_warninglogs = \"".$templates->get("modcp_nav_warninglogs")."\";");
|
}
| }
|
if($mybb->usergroup['canuseipsearch'] == 1) {
| if($mybb->usergroup['canuseipsearch'] == 1) {
|
Zeile 263 | Zeile 237 |
---|
if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs)) {
|
if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs)) {
|
| $expaltext = (in_array("modcpforums", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;
|
eval("\$modcp_nav_forums_posts = \"".$templates->get("modcp_nav_forums_posts")."\";"); }
if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch)) {
|
eval("\$modcp_nav_forums_posts = \"".$templates->get("modcp_nav_forums_posts")."\";"); }
if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch)) {
|
| $expaltext = (in_array("modcpusers", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;
|
eval("\$modcp_nav_users = \"".$templates->get("modcp_nav_users")."\";");
|
eval("\$modcp_nav_users = \"".$templates->get("modcp_nav_users")."\";");
|
}
| }
|
eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
$plugins->run_hooks("modcp_start");
| eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
$plugins->run_hooks("modcp_start");
|
Zeile 285 | Zeile 261 |
---|
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']);
|
|
|
$sql = "rid IN ('0','{$rids}')"; }
$plugins->run_hooks("modcp_do_reports");
|
$sql = "rid IN ('0','{$rids}')"; }
$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")
|
{
| {
|
if($mybb->usergroup['canmanagereportedcontent'] == 0)
|
if($mybb->usergroup['canmanagereportedcontent'] == 0)
|
{
| {
|
error_no_permission(); }
if($numreportedposts == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_view_reported_posts);
|
error_no_permission(); }
if($numreportedposts == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_view_reported_posts);
|
}
| }
|
$lang->load('report'); add_breadcrumb($lang->mcp_nav_report_center, "modcp.php?action=reports");
| $lang->load('report'); add_breadcrumb($lang->mcp_nav_report_center, "modcp.php?action=reports");
|
Zeile 328 | Zeile 336 |
---|
if(!$perpage) { $perpage = 20;
|
if(!$perpage) { $perpage = 20;
|
}
| }
|
// Multipage if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])
|
// Multipage if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])
|
{
| {
|
$query = $db->simple_select("reportedcontent", "COUNT(rid) AS count", "reportstatus ='0'"); $report_count = $db->fetch_field($query, "count");
|
$query = $db->simple_select("reportedcontent", "COUNT(rid) AS count", "reportstatus ='0'"); $report_count = $db->fetch_field($query, "count");
|
} else {
| } else {
|
$query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");
$report_count = 0;
| $query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");
$report_count = 0;
|
Zeile 382 | Zeile 390 |
---|
$plugins->run_hooks("modcp_reports_start");
// Reports
|
$plugins->run_hooks("modcp_reports_start");
// Reports
|
$reports = '';
| $reports = $selectall = ''; $inlinecount = 0;
|
$query = $db->query(" SELECT r.*, u.username, rr.title FROM ".TABLE_PREFIX."reportedcontent r
| $query = $db->query(" SELECT r.*, u.username, rr.title FROM ".TABLE_PREFIX."reportedcontent r
|
Zeile 490 | Zeile 500 |
---|
$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');
|
Zeile 567 | Zeile 582 |
---|
} 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 676 | Zeile 698 |
---|
}
$plugins->run_hooks("modcp_allreports_start");
|
}
$plugins->run_hooks("modcp_allreports_start");
|
$query = $db->query("
| $query = $db->query("
|
SELECT r.*, u.username, p.username AS postusername, up.uid AS postuid, t.subject AS threadsubject, prrep.username AS repusername, pr.username AS profileusername, rr.title FROM ".TABLE_PREFIX."reportedcontent r LEFT JOIN ".TABLE_PREFIX."posts p ON (r.id=p.pid)
| SELECT r.*, u.username, p.username AS postusername, up.uid AS postuid, t.subject AS threadsubject, prrep.username AS repusername, pr.username AS profileusername, rr.title FROM ".TABLE_PREFIX."reportedcontent r LEFT JOIN ".TABLE_PREFIX."posts p ON (r.id=p.pid)
|
Zeile 714 | Zeile 736 |
---|
$report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject); } else if($report['type'] == 'profile')
|
$report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject); } else if($report['type'] == 'profile')
|
{
| {
|
$user = build_profile_link(htmlspecialchars_uni($report['profileusername']), $report['id']); $report_data['content'] = $lang->sprintf($lang->report_info_profile, $user); }
| $user = build_profile_link(htmlspecialchars_uni($report['profileusername']), $report['id']); $report_data['content'] = $lang->sprintf($lang->report_info_profile, $user); }
|
Zeile 723 | Zeile 745 |
---|
$user = build_profile_link(htmlspecialchars_uni($report['repusername']), $report['id2']); $reputation_link = "reputation.php?uid={$report['id3']}#rid{$report['id']}"; $report_data['content'] = $lang->sprintf($lang->report_info_reputation, $reputation_link, $user);
|
$user = build_profile_link(htmlspecialchars_uni($report['repusername']), $report['id2']); $reputation_link = "reputation.php?uid={$report['id3']}#rid{$report['id']}"; $report_data['content'] = $lang->sprintf($lang->report_info_reputation, $reputation_link, $user);
|
}
| }
|
// Report reason and comment if($report['reasonid'] > 0)
| // Report reason and comment if($report['reasonid'] > 0)
|
Zeile 741 | Zeile 763 |
---|
} } else
|
} } else
|
{
| {
|
$report_data['comment'] = $lang->na; }
| $report_data['comment'] = $lang->na; }
|
Zeile 750 | Zeile 772 |
---|
{ $report['username'] = $lang->na_deleted; $report['reporterlink'] = $post;
|
{ $report['username'] = $lang->na_deleted; $report['reporterlink'] = $post;
|
}
| }
|
$report['username'] = htmlspecialchars_uni($report['username']);
$report_data['reports'] = my_number_format($report['reports']);
| $report['username'] = htmlspecialchars_uni($report['username']);
$report_data['reports'] = my_number_format($report['reports']);
|
Zeile 785 | Zeile 807 |
---|
if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
}
$where = '';
| }
$where = '';
|
// Searching for entries by a particular user if($mybb->get_input('uid', MyBB::INPUT_INT)) { $where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
|
// Searching for entries by a particular user 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 822 | Zeile 844 |
---|
if($order != "asc") { $order = "desc";
|
if($order != "asc") { $order = "desc";
|
}
| }
|
$plugins->run_hooks("modcp_modlogs_start");
$query = $db->query("
| $plugins->run_hooks("modcp_modlogs_start");
$query = $db->query("
|
Zeile 907 | Zeile 929 |
---|
$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 946 | Zeile 975 |
---|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
| $plugins->run_hooks("modcp_modlogs_result");
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
| eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
|
Zeile 1043 | Zeile 1074 |
---|
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
|
}
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(); }
|
$plugins->run_hooks("modcp_delete_announcement");
| $plugins->run_hooks("modcp_delete_announcement");
|
Zeile 1064 | Zeile 1095 |
---|
$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)))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1100 | Zeile 1131 |
---|
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 1117 | Zeile 1148 |
---|
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;
|
$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;
| $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;
| 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;
|
Zeile 1151 | Zeile 1182 |
---|
} }
|
} }
|
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 1200 | Zeile 1231 |
---|
); $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 1267 | Zeile 1298 |
---|
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time); $startday = $endday = gmdate("j", $localized_time); $startmonth = $endmonth = gmdate("m", $localized_time);
|
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time); $startday = $endday = gmdate("j", $localized_time); $startmonth = $endmonth = gmdate("m", $localized_time);
|
$startdateyear = gmdate("Y", $localized_time);
| $startdateyear = gmdate("Y", $localized_time);
|
$announcement = array( 'subject' => '', 'message' => '',
|
$announcement = array( 'subject' => '', 'message' => '',
|
'allowhtml' => 1,
| 'allowhtml' => 0,
|
'allowmycode' => 1, 'allowsmilies' => 1 );
|
'allowmycode' => 1, 'allowsmilies' => 1 );
|
|
|
$enddateyear = $startdateyear+1; }
|
$enddateyear = $startdateyear+1; }
|
// Generate form elements $startdateday = $enddateday = ''; for($day = 1; $day <= 31; ++$day) { if($startday == $day) { $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else { $selected = ''; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
if($endday == $day) { $selected = " selected=\"selected\""; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else { $selected = ''; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); } }
$startmonthsel = $endmonthsel = array(); foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month) { $startmonthsel[$month] = ''; $endmonthsel[$month] = ''; } $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
$startdatemonth = $enddatemonth = '';
eval("\$startdatemonth .= \"".$templates->get("modcp_announcements_month_start")."\";"); eval("\$enddatemonth .= \"".$templates->get("modcp_announcements_month_end")."\";");
$title = htmlspecialchars_uni($announcement['subject']); $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($announcement['allowmycode']) { $mycode_sel['yes'] = ' checked="checked"'; } else { $mycode_sel['no'] = ' checked="checked"'; }
if($announcement['allowsmilies']) { $smilies_sel['yes'] = ' checked="checked"'; }
| // Generate form elements $startdateday = $enddateday = ''; for($day = 1; $day <= 31; ++$day) { if($startday == $day) { $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else { $selected = ''; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
if($endday == $day) { $selected = " selected=\"selected\""; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else { $selected = ''; eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";"); } }
$startmonthsel = $endmonthsel = array(); foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month) { $startmonthsel[$month] = ''; $endmonthsel[$month] = ''; } $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
$startdatemonth = $enddatemonth = '';
eval("\$startdatemonth .= \"".$templates->get("modcp_announcements_month_start")."\";"); eval("\$enddatemonth .= \"".$templates->get("modcp_announcements_month_end")."\";");
$title = htmlspecialchars_uni($announcement['subject']); $message = htmlspecialchars_uni($announcement['message']);
$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
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"'; } else { $mycode_sel['no'] = ' checked="checked"'; }
if($announcement['allowsmilies']) { $smilies_sel['yes'] = ' checked="checked"'; }
|
else { $smilies_sel['no'] = ' checked="checked"';
| else { $smilies_sel['no'] = ' checked="checked"';
|
Zeile 1354 | Zeile 1395 |
---|
$end_type_sel = array('infinite' => '', 'finite' => ''); if(!isset($mybb->input['endtime_type']) || $mybb->input['endtime_type'] == 2)
|
$end_type_sel = array('infinite' => '', 'finite' => ''); if(!isset($mybb->input['endtime_type']) || $mybb->input['endtime_type'] == 2)
|
{
| {
|
$end_type_sel['infinite'] = ' checked="checked"'; } else
| $end_type_sel['infinite'] = ' checked="checked"'; } else
|
Zeile 1374 | Zeile 1415 |
---|
'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 1416 | Zeile 1457 |
---|
$plugins->run_hooks("modcp_new_announcement");
eval("\$announcements = \"".$templates->get("modcp_announcements_new")."\";");
|
$plugins->run_hooks("modcp_new_announcement");
eval("\$announcements = \"".$templates->get("modcp_announcements_new")."\";");
|
output_page($announcements); }
| output_page($announcements); }
|
if($mybb->input['action'] == "do_edit_announcement") { verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0)
|
if($mybb->input['action'] == "do_edit_announcement") { verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0)
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1487 | Zeile 1528 |
---|
$mybb->input['starttime_month'] = $mybb->get_input('starttime_month'); $months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
|
$mybb->input['starttime_month'] = $mybb->get_input('starttime_month'); $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'] = '01'; }
$localized_time_offset = TIME_NOW + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
| 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)
| $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)
|
Zeile 1523 | Zeile 1564 |
---|
} }
|
} }
|
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 1572 | Zeile 1613 |
---|
); $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 1640 | Zeile 1681 |
---|
if(!empty($errors)) { $errors = inline_error($errors);
|
if(!empty($errors)) { $errors = inline_error($errors);
|
}
| }
|
else { $errors = '';
| else { $errors = '';
|
Zeile 1668 | Zeile 1709 |
---|
{ $localized_time_startdate = $announcement['startdate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600; $localized_time_enddate = $announcement['enddate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
{ $localized_time_startdate = $announcement['startdate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600; $localized_time_enddate = $announcement['enddate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
|
|
$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate); $endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);
|
$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate); $endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);
|
|
|
$startday = gmdate('j', $localized_time_startdate); $endday = gmdate('j', $localized_time_enddate);
$startmonth = gmdate('m', $localized_time_startdate); $endmonth = gmdate('m', $localized_time_enddate);
|
$startday = gmdate('j', $localized_time_startdate); $endday = gmdate('j', $localized_time_enddate);
$startmonth = gmdate('m', $localized_time_startdate); $endmonth = gmdate('m', $localized_time_enddate);
|
|
|
$startdateyear = gmdate('Y', $localized_time_startdate); $enddateyear = gmdate('Y', $localized_time_enddate);
| $startdateyear = gmdate('Y', $localized_time_startdate); $enddateyear = gmdate('Y', $localized_time_enddate);
|
Zeile 1689 | Zeile 1730 |
---|
for($day = 1; $day <= 31; ++$day) { if($startday == $day)
|
for($day = 1; $day <= 31; ++$day) { if($startday == $day)
|
{ $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else { $selected = '';
| { $selected = " selected=\"selected\""; eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); } else { $selected = '';
|
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
| eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";"); }
|
Zeile 1713 | Zeile 1754 |
---|
$startmonthsel = $endmonthsel = array(); foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
|
$startmonthsel = $endmonthsel = array(); foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
|
{
| {
|
$startmonthsel[$month] = ''; $endmonthsel[$month] = ''; }
| $startmonthsel[$month] = ''; $endmonthsel[$month] = ''; }
|
Zeile 1729 | Zeile 1770 |
---|
$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'])
| }
if($announcement['allowmycode'])
|
Zeile 1762 | Zeile 1813 |
---|
$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 1778 | Zeile 1829 |
---|
'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 1789 | Zeile 1840 |
---|
foreach($array as $key => $element) { $announcementarray[$key] = $element;
|
foreach($array as $key => $element) { $announcementarray[$key] = $element;
|
}
| }
|
// Gather usergroup data from the cache // Field => Array Key $data_key = array(
| // Gather usergroup data from the cache // Field => Array Key $data_key = array(
|
Zeile 1815 | Zeile 1866 |
---|
else { $preview = '';
|
else { $preview = '';
|
}
$plugins->run_hooks("modcp_edit_announcement");
| }
$plugins->run_hooks("modcp_edit_announcement");
|
eval("\$announcements = \"".$templates->get("modcp_announcements_edit")."\";"); output_page($announcements);
| eval("\$announcements = \"".$templates->get("modcp_announcements_edit")."\";"); output_page($announcements);
|
Zeile 1826 | Zeile 1877 |
---|
if($mybb->input['action'] == "announcements") { if($mybb->usergroup['canmanageannounce'] == 0)
|
if($mybb->input['action'] == "announcements") { if($mybb->usergroup['canmanageannounce'] == 0)
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
if($numannouncements == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_manage_announcements);
|
if($numannouncements == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_manage_announcements);
|
}
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
| }
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
|
// Fetch announcements into their proper arrays $query = $db->simple_select("announcements", "aid, fid, subject, enddate");
| // Fetch announcements into their proper arrays $query = $db->simple_select("announcements", "aid, fid, subject, enddate");
|
Zeile 1859 | Zeile 1910 |
---|
foreach($global_announcements as $aid => $announcement) { $trow = alt_trow();
|
foreach($global_announcements as $aid => $announcement) { $trow = alt_trow();
|
if($announcement['startdate'] > TIME_NOW || ($announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0))
| if((isset($announcement['startdate']) && $announcement['startdate'] > TIME_NOW) || (isset($announcement['enddate']) && $announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0))
|
{ eval("\$icon = \"".$templates->get("modcp_announcements_announcement_expired")."\";");
|
{ eval("\$icon = \"".$templates->get("modcp_announcements_announcement_expired")."\";");
|
} else
| } else
|
{ eval("\$icon = \"".$templates->get("modcp_announcements_announcement_active")."\";"); }
|
{ eval("\$icon = \"".$templates->get("modcp_announcements_announcement_active")."\";"); }
|
|
|
$subject = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));
eval("\$announcements_global .= \"".$templates->get("modcp_announcements_announcement_global")."\";");
|
$subject = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));
eval("\$announcements_global .= \"".$templates->get("modcp_announcements_announcement_global")."\";");
|
} }
| } }
|
else { // No global announcements
| else { // No global announcements
|
Zeile 1887 | Zeile 1938 |
---|
if(!$announcements_forum) { eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");
|
if(!$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 1907 | Zeile 1958 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
|
|
$plugins->run_hooks("modcp_do_modqueue_start");
$mybb->input['threads'] = $mybb->get_input('threads', MyBB::INPUT_ARRAY);
| $plugins->run_hooks("modcp_do_modqueue_start");
$mybb->input['threads'] = $mybb->get_input('threads', MyBB::INPUT_ARRAY);
|
Zeile 1924 | Zeile 1975 |
---|
if(!isset($mybb->input['threads'][$thread['tid']])) { continue;
|
if(!isset($mybb->input['threads'][$thread['tid']])) { continue;
|
}
| }
|
$action = $mybb->input['threads'][$thread['tid']]; if($action == "approve")
|
$action = $mybb->input['threads'][$thread['tid']]; if($action == "approve")
|
{
| {
|
$threads_to_approve[] = $thread['tid'];
|
$threads_to_approve[] = $thread['tid'];
|
}
| }
|
else if($action == "delete") { $threads_to_delete[] = $thread['tid'];
|
else if($action == "delete") { $threads_to_delete[] = $thread['tid'];
|
} }
| } }
|
if(!empty($threads_to_approve))
|
if(!empty($threads_to_approve))
|
{
| {
|
$moderation->approve_threads($threads_to_approve); log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads); } if(!empty($threads_to_delete))
|
$moderation->approve_threads($threads_to_approve); log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads); } if(!empty($threads_to_delete))
|
{
| {
|
if($mybb->settings['soft_delete'] == 1) { $moderation->soft_delete_threads($threads_to_delete);
| if($mybb->settings['soft_delete'] == 1) { $moderation->soft_delete_threads($threads_to_delete);
|
Zeile 2002 | Zeile 2053 |
---|
else { log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_posts);
|
else { log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_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); }
| redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); }
|
Zeile 2145 | Zeile 2196 |
---|
}
if(!$threads && $mybb->input['type'] == "threads")
|
}
if(!$threads && $mybb->input['type'] == "threads")
|
{ eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";"); }
| { eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";"); }
|
if($threads)
|
if($threads)
|
{ add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=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");
|
Zeile 2199 | Zeile 2250 |
---|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_posts / $perpage;
|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_posts / $perpage;
|
$pages = ceil($pages);
if($mybb->get_input('page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
| $pages = ceil($pages);
if($mybb->get_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("
| $multipage = multipage($unapproved_posts, $perpage, $page, "modcp.php?action=modqueue&type=posts");
$query = $db->query("
|
Zeile 2229 | Zeile 2280 |
---|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.visible='0' {$tflist_queue_posts} AND t.firstpost != p.pid
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.visible='0' {$tflist_queue_posts} AND t.firstpost != p.pid
|
ORDER BY p.dateline DESC
| ORDER BY p.dateline DESC, p.pid DESC
|
LIMIT {$start}, {$perpage} "); $posts = '';
| LIMIT {$start}, {$perpage} "); $posts = '';
|
Zeile 2437 | Zeile 2488 |
---|
}
$user = get_user($mybb->input['uid']);
|
}
$user = get_user($mybb->input['uid']);
|
if(!$user) { error($lang->error_nomember); }
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid'])) { error_no_permission(); }
$plugins->run_hooks("modcp_do_editprofile_start");
| if(!$user) { error($lang->error_nomember); }
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid'])) { error_no_permission(); }
$plugins->run_hooks("modcp_do_editprofile_start");
|
if($mybb->get_input('away', MyBB::INPUT_INT) == 1 && $mybb->settings['allowaway'] != 0) {
| if($mybb->get_input('away', MyBB::INPUT_INT) == 1 && $mybb->settings['allowaway'] != 0) {
|
Zeile 2511 | Zeile 2562 |
---|
"profile_fields_editable" => true, "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'),
|
"profile_fields_editable" => true, "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'),
|
"aim" => $mybb->get_input('aim'), "yahoo" => $mybb->get_input('yahoo'),
| |
"skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
| "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
|
Zeile 2542 | Zeile 2591 |
---|
// Set the data of the user in the datahandler. $userhandler->set_data($updated_user);
|
// Set the data of the user in the datahandler. $userhandler->set_data($updated_user);
|
$errors = '';
| $errors = array();
|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
| // Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
Zeile 2591 | Zeile 2640 |
---|
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']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);
| ${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);
|
$mybb->input[$option['period']] = $mybb->get_input($option['period']); if(empty($mybb->input[$option['action']])) {
| $mybb->input[$option['period']] = $mybb->get_input($option['period']); if(empty($mybb->input[$option['action']])) {
|
Zeile 2614 | Zeile 2663 |
---|
$string = $option['action']."_error"; $errors[] = $lang->$string; }
|
$string = $option['action']."_error"; $errors[] = $lang->$string; }
|
if(!is_array($errors))
| else
|
{ $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) { // We already have a suspension, but entered a new time
|
{ $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) { // We already have a suspension, but entered a new time
|
if($suspend_length == "-1")
| if($suspend_length == "-1")
|
{ // Permanent ban on action $extra_user_updates[$option['update_length']] = 0;
| { // Permanent ban on action $extra_user_updates[$option['update_length']] = 0;
|
Zeile 2652 | Zeile 2700 |
---|
// Those with javascript turned off will be able to select both - cheeky! // Check to make sure we're not moderating AND suspending posting
|
// Those with javascript turned off will be able to select both - cheeky! // Check to make sure we're not moderating AND suspending posting
|
if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
| if(isset($extra_user_updates) && !empty($extra_user_updates['moderateposts']) && !empty($extra_user_updates['suspendposting']))
|
{ $errors[] = $lang->suspendmoderate_error; }
|
{ $errors[] = $lang->suspendmoderate_error; }
|
if(is_array($errors))
| if(is_array($errors) && !empty($errors))
|
{ $mybb->input['action'] = "editprofile"; }
| { $mybb->input['action'] = "editprofile"; }
|
Zeile 2674 | Zeile 2722 |
---|
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
$plugins->run_hooks("modcp_do_editprofile_end");
|
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
$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 2683 | Zeile 2731 |
---|
if($mybb->input['action'] == "editprofile") { if($mybb->usergroup['caneditprofiles'] == 0)
|
if($mybb->input['action'] == "editprofile") { if($mybb->usergroup['caneditprofiles'] == 0)
|
{
| {
|
error_no_permission(); }
|
error_no_permission(); }
|
|
|
add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT)); if(!$user)
|
add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT)); if(!$user)
|
{
| {
|
error($lang->error_nomember); }
| error($lang->error_nomember); }
|
Zeile 2699 | Zeile 2747 |
---|
if(!modcp_can_manage_user($user['uid'])) { error_no_permission();
|
if(!modcp_can_manage_user($user['uid'])) { error_no_permission();
|
}
| }
$userperms = user_permissions($user['uid']);
// Set display group $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
$display_group = usergroup_displaygroup($user['displaygroup']); if(is_array($display_group)) { $userperms = array_merge($userperms, $display_group); }
|
if(!my_validate_url($user['website'])) { $user['website'] = ''; }
if($user['icq'] != "0")
|
if(!my_validate_url($user['website'])) { $user['website'] = ''; }
if($user['icq'] != "0")
|
{
| {
|
$user['icq'] = (int)$user['icq']; }
| $user['icq'] = (int)$user['icq']; }
|
Zeile 2716 | Zeile 2780 |
---|
$mybb->input = array_merge($user, $mybb->input); $birthday = explode('-', $user['birthday']); if(!isset($birthday[1]))
|
$mybb->input = array_merge($user, $mybb->input); $birthday = explode('-', $user['birthday']); if(!isset($birthday[1]))
|
{
| {
|
$birthday[1] = '';
|
$birthday[1] = '';
|
}
| }
|
if(!isset($birthday[2])) { $birthday[2] = ''; } list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
|
if(!isset($birthday[2])) { $birthday[2] = ''; } list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
|
}
| }
|
else { $errors = inline_error($errors); }
// Sanitize all input
|
else { $errors = inline_error($errors); }
// Sanitize all input
|
foreach(array('usertitle', 'website', 'icq', 'aim', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
| foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
|
{ $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field)); }
|
{ $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field)); }
|
// 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']);
if(!empty($display_group['usertitle']))
| // Custom user title if(!empty($userperms['usertitle']))
|
{
|
{
|
$defaulttitle = htmlspecialchars_uni($display_group['usertitle']);
| $defaulttitle = htmlspecialchars_uni($userperms['usertitle']);
|
} else {
| } else {
|
Zeile 2825 | Zeile 2881 |
---|
{ $awaynotice = $lang->away_notice; $awaycheck[0] = "checked=\"checked\"";
|
{ $awaynotice = $lang->away_notice; $awaycheck[0] = "checked=\"checked\"";
|
}
| }
|
$returndate = explode("-", $user['returndate']); } $returndatesel = $selected = '';
| $returndate = explode("-", $user['returndate']); } $returndatesel = $selected = '';
|
Zeile 2841 | Zeile 2897 |
---|
}
eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
| }
|
$returndatemonthsel = array(); foreach(range(1, 12) as $month)
|
$returndatemonthsel = array(); foreach(range(1, 12) as $month)
|
{
| {
|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
}
| }
|
if(!isset($returndate[2])) { $returndate[2] = ''; }
|
if(!isset($returndate[2])) { $returndate[2] = ''; }
|
|
|
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";"); }
|
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";"); }
|
|
|
$plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
|
$plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
|
| $user_fields = array();
|
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
|
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
|
$user_fields = $db->fetch_array($query);
| if($db->num_rows($query) > 0) { $user_fields = $db->fetch_array($query); }
|
$requiredfields = ''; $customfields = '';
| $requiredfields = ''; $customfields = '';
|
Zeile 2877 | Zeile 2937 |
---|
{ foreach($pfcache as $profilefield) {
|
{ foreach($pfcache as $profilefield) {
|
$userfield = $code = $select = $val = $options = $expoptions = $useropts = $seloptions = '';
| $userfield = $code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array();
|
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']); $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
| $profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']); $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
|
Zeile 2895 | Zeile 2956 |
---|
$userfield = $mybb->input['profile_fields'][$field]; } }
|
$userfield = $mybb->input['profile_fields'][$field]; } }
|
else {
| elseif(isset($user_fields[$field])) {
|
$userfield = $user_fields[$field];
|
$userfield = $user_fields[$field];
|
} if($type == "multiselect") {
| } if($type == "multiselect") {
|
if($errors) { $useropts = $userfield;
| if($errors) { $useropts = $userfield;
|
Zeile 3045 | Zeile 3106 |
---|
if($customfields) { eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";");
|
if($customfields) { eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";");
|
}
| }
|
$user['username'] = htmlspecialchars_uni($user['username']); $lang->edit_profile = $lang->sprintf($lang->edit_profile, $user['username']); $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
| $user['username'] = htmlspecialchars_uni($user['username']); $lang->edit_profile = $lang->sprintf($lang->edit_profile, $user['username']); $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
Zeile 3124 | Zeile 3185 |
---|
$suspendsignature_info = $moderateposts_info = $suspendposting_info = ''; $action_options = $modpost_options = $suspost_options = '';
|
$suspendsignature_info = $moderateposts_info = $suspendposting_info = ''; $action_options = $modpost_options = $suspost_options = '';
|
| $modopts = array();
|
foreach($moderator_options as $option) {
|
foreach($moderator_options as $option) {
|
$mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);
| ${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);
|
// 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 3191 | Zeile 3253 |
---|
}
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))
|
{
| {
|
$newtitle = ''; }
|
$newtitle = ''; }
|
| $birthday_year = $mybb->input['birthday_year']; $user_website = $mybb->input['website']; $user_icq = $mybb->input['icq']; $user_skype = $mybb->input['skype']; $user_google = $mybb->input['google'];
|
$plugins->run_hooks("modcp_editprofile_end");
| $plugins->run_hooks("modcp_editprofile_end");
|
Zeile 3239 | Zeile 3309 |
---|
{ case "lastvisit": $sortby = "lastvisit";
|
{ case "lastvisit": $sortby = "lastvisit";
|
break;
| break;
|
case "postnum": $sortby = "postnum";
|
case "postnum": $sortby = "postnum";
|
break;
| break;
|
case "username": $sortby = "username"; break; default: $sortby = "regdate";
|
case "username": $sortby = "username"; break; default: $sortby = "regdate";
|
}
| }
|
$sortbysel = array('lastvisit' => '', 'postnum' => '', 'username' => '', 'regdate' => ''); $sortbysel[$mybb->get_input('sortby')] = " selected=\"selected\""; $order = $mybb->get_input('order');
| $sortbysel = array('lastvisit' => '', 'postnum' => '', 'username' => '', 'regdate' => ''); $sortbysel[$mybb->get_input('sortby')] = " selected=\"selected\""; $order = $mybb->get_input('order');
|
Zeile 3266 | Zeile 3336 |
---|
if($mybb->get_input('page') != "last") { $page = $mybb->get_input('page');
|
if($mybb->get_input('page') != "last") { $page = $mybb->get_input('page');
|
}
| }
|
$pages = $user_count / $perpage; $pages = ceil($pages);
| $pages = $user_count / $perpage; $pages = ceil($pages);
|
Zeile 3285 | Zeile 3355 |
---|
$start = ($page-1) * $perpage; } else
|
$start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 3294 | Zeile 3364 |
---|
foreach(array('username', 'sortby', 'order') as $field) { if(!empty($mybb->input[$field]))
|
foreach(array('username', 'sortby', 'order') as $field) { if(!empty($mybb->input[$field]))
|
{
| {
|
$page_url .= "&{$field}=".$mybb->input[$field]; } }
|
$page_url .= "&{$field}=".$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)); $users = '';
| // Fetch out results $query = $db->simple_select("users", "*", "1=1 {$where}", array("order_by" => $sortby, "order_dir" => $order, "limit" => $perpage, "limit_start" => $start)); $users = '';
|
Zeile 3330 | Zeile 3400 |
---|
{ $lastdate = my_date('relative', $user['lastvisit']); }
|
{ $lastdate = my_date('relative', $user['lastvisit']); }
|
|
|
$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']); eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";"); }
| $usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']); eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";"); }
|
Zeile 3339 | Zeile 3409 |
---|
if(!$users) { eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";");
|
if(!$users) { eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";");
|
}
| }
|
$plugins->run_hooks("modcp_finduser_end");
|
$plugins->run_hooks("modcp_finduser_end");
|
| $username = htmlspecialchars_uni($mybb->get_input('username'));
|
eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
| eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
|
Zeile 3483 | Zeile 3554 |
---|
$per_page = (int)$mybb->input['filter']['per_page']; } $start = ($page-1) * $per_page;
|
$per_page = (int)$mybb->input['filter']['per_page']; } $start = ($page-1) * $per_page;
|
| $pages = ceil($total_warnings / $per_page); if($page > $pages) { $start = 0; $page = 1; }
|
// Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter']))
| // Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter']))
|
Zeile 3524 | 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 3533 | 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 3559 | Zeile 3636 |
---|
}
$plugins->run_hooks("modcp_warninglogs_end");
|
}
$plugins->run_hooks("modcp_warninglogs_end");
|
| $filter_username = $mybb->input['filter']['username']; $filter_modusername = $mybb->input['filter']['mod_username']; $filter_reason = $mybb->input['filter']['reason'];
|
eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";"); output_page($warninglogs);
| eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";"); output_page($warninglogs);
|
Zeile 3573 | Zeile 3654 |
---|
add_breadcrumb($lang->mcp_nav_ipsearch, "modcp.php?action=ipsearch");
|
add_breadcrumb($lang->mcp_nav_ipsearch, "modcp.php?action=ipsearch");
|
| $ipsearch_results = $ipaddressvalue = '';
|
$mybb->input['ipaddress'] = $mybb->get_input('ipaddress'); if($mybb->input['ipaddress']) {
| $mybb->input['ipaddress'] = $mybb->get_input('ipaddress'); if($mybb->input['ipaddress']) {
|
Zeile 3632 | Zeile 3714 |
---|
}
if(!empty($onlyusfids))
|
}
if(!empty($onlyusfids))
|
{
| {
|
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))"; }
| $where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))"; }
|
Zeile 3701 | Zeile 3783 |
---|
if($user_ip_sql) { $query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);
|
if($user_ip_sql) { $query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);
|
|
|
$user_results = $db->fetch_field($query, "count"); } }
| $user_results = $db->fetch_field($query, "count"); } }
|
Zeile 3825 | Zeile 3907 |
---|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = p.tid) WHERE {$post_ip_sql}{$where_sql}{$visible_sql}
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = p.tid) WHERE {$post_ip_sql}{$where_sql}{$visible_sql}
|
ORDER BY p.dateline desc
| ORDER BY p.dateline DESC, p.pid DESC
|
LIMIT {$post_start}, {$post_limit} "); while($ipaddress = $db->fetch_array($query))
| LIMIT {$post_start}, {$post_limit} "); while($ipaddress = $db->fetch_array($query))
|
Zeile 3978 | Zeile 4060 |
---|
if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20;
|
}
| }
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
| // Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
|
Zeile 4047 | Zeile 4129 |
---|
$trow = alt_trow();
if($banned['reason'])
|
$trow = alt_trow();
if($banned['reason'])
|
{
| {
|
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
}
| }
|
else { $banned['reason'] = $lang->na;
|
else { $banned['reason'] = $lang->na;
|
}
| }
|
if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---') { $banlength = $lang->permanent;
| if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---') { $banlength = $lang->permanent;
|
Zeile 4078 | Zeile 4160 |
---|
if($remaining < 3600) { $banned_class = "high_banned";
|
if($remaining < 3600) { $banned_class = "high_banned";
|
}
| }
|
else if($remaining < 86400)
|
else if($remaining < 86400)
|
{
| {
|
$banned_class = "moderate_banned";
|
$banned_class = "moderate_banned";
|
}
| }
|
else if($remaining < 604800) { $banned_class = "low_banned";
|
else if($remaining < 604800) { $banned_class = "low_banned";
|
}
| }
|
else { $banned_class = "normal_banned"; }
|
else { $banned_class = "normal_banned"; }
|
|
|
eval('$timeremaining = "'.$templates->get('modcp_banning_remaining').'";'); }
|
eval('$timeremaining = "'.$templates->get('modcp_banning_remaining').'";'); }
|
|
|
eval("\$bannedusers .= \"".$templates->get("modcp_banning_ban")."\";");
|
eval("\$bannedusers .= \"".$templates->get("modcp_banning_ban")."\";");
|
}
| }
|
if(!$bannedusers) { eval("\$bannedusers = \"".$templates->get("modcp_banning_nobanned")."\";"); }
|
if(!$bannedusers) { eval("\$bannedusers = \"".$templates->get("modcp_banning_nobanned")."\";"); }
|
|
|
$plugins->run_hooks("modcp_banning");
|
$plugins->run_hooks("modcp_banning");
|
|
|
eval("\$bannedpage = \"".$templates->get("modcp_banning")."\";"); output_page($bannedpage); }
|
eval("\$bannedpage = \"".$templates->get("modcp_banning")."\";"); output_page($bannedpage); }
|
|
|
if($mybb->input['action'] == "liftban")
|
if($mybb->input['action'] == "liftban")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canbanusers'] == 0) { error_no_permission(); }
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canbanusers'] == 0) { error_no_permission(); }
|
$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'"); $ban = $db->fetch_array($query);
| $query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'"); $ban = $db->fetch_array($query);
|
Zeile 4125 | Zeile 4207 |
---|
if(!$ban) { error($lang->error_invalidban);
|
if(!$ban) { error($lang->error_invalidban);
|
}
| }
|
// Permission to edit this ban? if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
|
// 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");
| { error_no_permission(); }
$plugins->run_hooks("modcp_liftban_start");
|
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'"); $username = $db->fetch_field($query, "username");
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'"); $username = $db->fetch_field($query, "username");
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
'additionalgroups' => $ban['oldadditionalgroups'],
| 'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),
|
'displaygroup' => $ban['olddisplaygroup'] ); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
'displaygroup' => $ban['olddisplaygroup'] ); $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_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
Zeile 4166 | Zeile 4247 |
---|
}
// Editing an existing ban
|
}
// Editing an existing ban
|
| $existing_ban = false;
|
if($mybb->get_input('uid', MyBB::INPUT_INT)) { // Get the users info from their uid
| if($mybb->get_input('uid', MyBB::INPUT_INT)) { // Get the users info from their uid
|
Zeile 4177 | Zeile 4259 |
---|
"); $user = $db->fetch_array($query);
|
"); $user = $db->fetch_array($query);
|
$existing_ban = false;
| |
if($user['uid']) { $existing_ban = true;
| if($user['uid']) { $existing_ban = true;
|
Zeile 4189 | Zeile 4270 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
| $errors = array();
|
// Creating a new ban if(!$existing_ban)
| // Creating a new ban if(!$existing_ban)
|
Zeile 4226 | Zeile 4309 |
---|
// 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'])) {
|
Zeile 4236 | Zeile 4318 |
---|
// If this is a new ban, we check the user isn't already part of a banned group if(!$existing_ban && $user['uid']) {
|
// If this is a new ban, we check the user isn't already part of a banned group if(!$existing_ban && $user['uid']) {
|
$query = $db->simple_select("banned", "uid", "uid='{$user['uid']}'"); if($db->fetch_field($query, "uid"))
| $query = $db->simple_select("banned", "uid", "uid='{$user['uid']}'", array('limit' => 1)); if($db->num_rows($query) > 0)
|
{ $errors[] = $lang->error_useralreadybanned; }
| { $errors[] = $lang->error_useralreadybanned; }
|
Zeile 4282 | Zeile 4364 |
---|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int)$user['usergroup'],
|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int)$user['usergroup'],
|
'oldadditionalgroups' => (string)$user['additionalgroups'],
| 'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),
|
'olddisplaygroup' => (int)$user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
| 'olddisplaygroup' => (int)$user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
|
Zeile 4301 | Zeile 4383 |
---|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$user['uid']}");
|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$user['uid']}");
|
$cache->update_banned();
| |
// Log edit or add ban if($existing_ban)
| // Log edit or add ban if($existing_ban)
|
Zeile 4319 | Zeile 4399 |
---|
if($existing_ban) { redirect("modcp.php?action=banning", $lang->redirect_banuser_updated);
|
if($existing_ban) { redirect("modcp.php?action=banning", $lang->redirect_banuser_updated);
|
}
| }
|
else { redirect("modcp.php?action=banning", $lang->redirect_banuser); } } // Otherwise has errors, throw back to ban page
|
else { redirect("modcp.php?action=banning", $lang->redirect_banuser); } } // Otherwise has errors, throw back to ban page
|
else {
| else {
|
$mybb->input['action'] = "banuser"; } }
| $mybb->input['action'] = "banuser"; } }
|
Zeile 4342 | Zeile 4422 |
---|
}
$mybb->input['uid'] = $mybb->get_input('uid', MyBB::INPUT_INT);
|
}
$mybb->input['uid'] = $mybb->get_input('uid', MyBB::INPUT_INT);
|
if($mybb->input['uid']) {
| if($mybb->input['uid']) {
|
add_breadcrumb($lang->mcp_nav_editing_ban);
|
add_breadcrumb($lang->mcp_nav_editing_ban);
|
}
| }
|
else { add_breadcrumb($lang->mcp_nav_ban_user); }
|
else { add_breadcrumb($lang->mcp_nav_ban_user); }
|
|
|
$plugins->run_hooks("modcp_banuser_start");
$banuser_username = '';
| $plugins->run_hooks("modcp_banuser_start");
$banuser_username = '';
|
Zeile 4366 | Zeile 4446 |
---|
WHERE b.uid='{$mybb->input['uid']}' "); $banned = $db->fetch_array($query);
|
WHERE b.uid='{$mybb->input['uid']}' "); $banned = $db->fetch_array($query);
|
if($banned['username']) {
| if(!empty($banned['username'])) {
|
$username = $banned['username'] = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']); $uid = $mybb->input['uid'];
| $username = $banned['username'] = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']); $uid = $mybb->input['uid'];
|
Zeile 4378 | Zeile 4458 |
---|
}
// Permission to edit this ban?
|
}
// Permission to edit this ban?
|
if($banned['uid'] && $mybb->user['uid'] != $banned['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
| if(!empty($banned) && $banned['uid'] && $mybb->user['uid'] != $banned['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 4494 | Zeile 4574 |
---|
verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("modcp_do_modnotes_start");
|
verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("modcp_do_modnotes_start");
|
|
|
// Update Moderator Notes cache $update_cache = array( "modmessage" => $mybb->get_input('modnotes')
| // Update Moderator Notes cache $update_cache = array( "modmessage" => $mybb->get_input('modnotes')
|
Zeile 4509 | Zeile 4589 |
---|
if(!$mybb->input['action']) { $awaitingattachments = $awaitingposts = $awaitingthreads = $awaitingmoderation = '';
|
if(!$mybb->input['action']) { $awaitingattachments = $awaitingposts = $awaitingthreads = $awaitingmoderation = '';
|
|
|
if($mybb->usergroup['canmanagemodqueue'] == 1) { if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1))
| if($mybb->usergroup['canmanagemodqueue'] == 1) { if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1))
|
Zeile 4517 | Zeile 4597 |
---|
if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1) { $bgcolor = "trow1";
|
if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1) { $bgcolor = "trow1";
|
}
| }
|
else { $bgcolor = "trow2";
| else { $bgcolor = "trow2";
|
Zeile 4556 | Zeile 4636 |
---|
else { eval("\$latest_attachment = \"".$templates->get("modcp_awaitingmoderation_none")."\";");
|
else { eval("\$latest_attachment = \"".$templates->get("modcp_awaitingmoderation_none")."\";");
|
}
| }
|
eval("\$awaitingattachments = \"".$templates->get("modcp_awaitingattachments")."\";"); }
| eval("\$awaitingattachments = \"".$templates->get("modcp_awaitingattachments")."\";"); }
|
Zeile 4578 | Zeile 4658 |
---|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid
|
ORDER BY p.dateline DESC
| ORDER BY p.dateline DESC, p.pid DESC
|
LIMIT 1 "); $post = $db->fetch_array($query);
| LIMIT 1 "); $post = $db->fetch_array($query);
|
Zeile 4598 | Zeile 4678 |
---|
eval("\$latest_post = \"".$templates->get("modcp_lastpost")."\";"); } else
|
eval("\$latest_post = \"".$templates->get("modcp_lastpost")."\";"); } else
|
{
| {
|
eval("\$latest_post = \"".$templates->get("modcp_awaitingmoderation_none")."\";"); }
| eval("\$latest_post = \"".$templates->get("modcp_awaitingmoderation_none")."\";"); }
|
Zeile 4622 | Zeile 4702 |
---|
if(my_strlen($thread['subject']) > 25) { $post['subject'] = my_substr($thread['subject'], 0, 25)."...";
|
if(my_strlen($thread['subject']) > 25) { $post['subject'] = my_substr($thread['subject'], 0, 25)."...";
|
}
| }
|
$thread['subject'] = htmlspecialchars_uni($thread['subject']); $thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']); $unapproved_threads = my_number_format($unapproved_threads);
| $thread['subject'] = htmlspecialchars_uni($thread['subject']); $thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']); $unapproved_threads = my_number_format($unapproved_threads);
|
Zeile 4630 | Zeile 4710 |
---|
eval("\$latest_thread = \"".$templates->get("modcp_lastthread")."\";"); } else
|
eval("\$latest_thread = \"".$templates->get("modcp_lastthread")."\";"); } else
|
{
| {
|
eval("\$latest_thread = \"".$templates->get("modcp_awaitingmoderation_none")."\";"); }
|
eval("\$latest_thread = \"".$templates->get("modcp_awaitingmoderation_none")."\";"); }
|
|
|
eval("\$awaitingthreads = \"".$templates->get("modcp_awaitingthreads")."\";"); }
if(!empty($awaitingattachments) || !empty($awaitingposts) || !empty($awaitingthreads))
|
eval("\$awaitingthreads = \"".$templates->get("modcp_awaitingthreads")."\";"); }
if(!empty($awaitingattachments) || !empty($awaitingposts) || !empty($awaitingthreads))
|
{
| {
|
eval("\$awaitingmoderation = \"".$templates->get("modcp_awaitingmoderation")."\";"); } }
| eval("\$awaitingmoderation = \"".$templates->get("modcp_awaitingmoderation")."\";"); } }
|
Zeile 4649 | Zeile 4729 |
---|
$where = ''; if($tflist_modlog) {
|
$where = ''; if($tflist_modlog) {
|
$where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (!l.fid)";
| $where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (l.fid <> 0)";
|
}
$query = $db->query("
| }
$query = $db->query("
|
Zeile 4663 | Zeile 4743 |
---|
ORDER BY l.dateline DESC LIMIT 5 ");
|
ORDER BY l.dateline DESC LIMIT 5 ");
|
|
|
$modlogresults = ''; while($logitem = $db->fetch_array($query)) {
| $modlogresults = ''; while($logitem = $db->fetch_array($query)) {
|
Zeile 4686 | Zeile 4766 |
---|
{ $logitem['forum'] = get_forum_link($logitem['fid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_forum")."\";");
|
{ $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']));
| if($logitem['psubject']) { $logitem['psubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['psubject']));
|
Zeile 4698 | Zeile 4778 |
---|
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject']) { $data = my_unserialize($logitem['data']);
|
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject']) { $data = my_unserialize($logitem['data']);
|
if($data['uid'])
| if(isset($data['uid']))
|
{ $information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid'])); }
|
{ $information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid'])); }
|
if($data['aid'])
| if(isset($data['aid']))
|
{ $data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject'])); $data['announcement'] = get_announcement_link($data['aid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
{ $data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject'])); $data['announcement'] = get_announcement_link($data['aid']); eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
| $plugins->run_hooks("modcp_modlogs_result");
|
eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";"); }
| eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";"); }
|
Zeile 4815 | Zeile 4897 |
---|
eval("\$bannedusers = \"".$templates->get("modcp_nobanned")."\";"); }
|
eval("\$bannedusers = \"".$templates->get("modcp_nobanned")."\";"); }
|
$modnotes = $cache->read("modnotes"); $modnotes = htmlspecialchars_uni($modnotes['modmessage']);
| $modnotes = ''; $modnotes_cache = $cache->read("modnotes"); if($modnotes_cache !== false) { $modnotes = htmlspecialchars_uni($modnotes_cache['modmessage']); }
|
$plugins->run_hooks("modcp_end");
| $plugins->run_hooks("modcp_end");
|