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 247 | Zeile 221 |
---|
if($mybb->usergroup['canbanusers'] == 1) { eval("\$nav_banning = \"".$templates->get("modcp_nav_banning")."\";");
|
if($mybb->usergroup['canbanusers'] == 1) { eval("\$nav_banning = \"".$templates->get("modcp_nav_banning")."\";");
|
}
| }
|
if($mybb->usergroup['canviewwarnlogs'] == 1)
|
if($mybb->usergroup['canviewwarnlogs'] == 1)
|
{
| {
|
eval("\$nav_warninglogs = \"".$templates->get("modcp_nav_warninglogs")."\";"); }
if($mybb->usergroup['canuseipsearch'] == 1)
|
eval("\$nav_warninglogs = \"".$templates->get("modcp_nav_warninglogs")."\";"); }
if($mybb->usergroup['canuseipsearch'] == 1)
|
{
| {
|
eval("\$nav_ipsearch = \"".$templates->get("modcp_nav_ipsearch")."\";"); }
|
eval("\$nav_ipsearch = \"".$templates->get("modcp_nav_ipsearch")."\";"); }
|
|
|
$plugins->run_hooks("modcp_nav");
if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs)) {
|
$plugins->run_hooks("modcp_nav");
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")."\";");
|
eval("\$modcp_nav_forums_posts = \"".$templates->get("modcp_nav_forums_posts")."\";");
|
}
| }
|
if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch)) {
|
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")."\";"); }
|
Zeile 291 | Zeile 267 |
---|
}
$message = $lang->redirect_reportsmarked;
|
}
$message = $lang->redirect_reportsmarked;
|
|
|
if(isset($mybb->cookies['inlinereports'])) { if($mybb->cookies['inlinereports'] == '|ALL|') {
| if(isset($mybb->cookies['inlinereports'])) { if($mybb->cookies['inlinereports'] == '|ALL|') {
|
Zeile 309 | Zeile 285 |
---|
{ $inlinereportlist = explode("|", $mybb->cookies['inlinereports']); $reports = array_map("intval", $inlinereportlist);
|
{ $inlinereportlist = explode("|", $mybb->cookies['inlinereports']); $reports = array_map("intval", $inlinereportlist);
|
|
|
if(!count($reports)) { error($lang->error_noselected_reports); }
|
if(!count($reports)) { error($lang->error_noselected_reports); }
|
|
|
$rids = implode("','", $reports);
$sql = "rid IN ('0','{$rids}')";
|
$rids = implode("','", $reports);
$sql = "rid IN ('0','{$rids}')";
|
} } else
| } } else
|
{ $mybb->input['reports'] = array_map("intval", $mybb->input['reports']); $rids = implode("','", $mybb->input['reports']);
$sql = "rid IN ('0','{$rids}')";
|
{ $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");
|
$plugins->run_hooks("modcp_do_reports");
|
|
|
$db->update_query("reportedcontent", array('reportstatus' => 1), "{$sql}{$flist_reports}"); $cache->update_reportedcontent();
my_unsetcookie('inlinereports'); my_unsetcookie('inlinereports_removed');
|
$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}", $message); }
if($mybb->input['action'] == "reports") { if($mybb->usergroup['canmanagereportedcontent'] == 0)
|
redirect("modcp.php?action=reports&page={$page}", $message); }
if($mybb->input['action'] == "reports") { if($mybb->usergroup['canmanagereportedcontent'] == 0)
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 371 | Zeile 347 |
---|
else { $query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");
|
else { $query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");
|
|
|
$report_count = 0; while($fid = $db->fetch_field($query, 'id3')) {
| $report_count = 0; while($fid = $db->fetch_field($query, 'id3')) {
|
Zeile 390 | Zeile 366 |
---|
$pages = ceil($pages);
if($page > $pages || $page <= 0)
|
$pages = ceil($pages);
if($page > $pages || $page <= 0)
|
{ $page = 1; }
| { $page = 1; }
|
if($page && $page > 0) { $start = ($page-1) * $perpage; } else
|
if($page && $page > 0) { $start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 414 | 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 530 | Zeile 508 |
---|
$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 540 | Zeile 517 |
---|
{ // Assume a post $report['type'] = 'post';
|
{ // Assume a post $report['type'] = 'post';
|
}
| }
|
// Report Information $report_data = array();
| // Report Information $report_data = array();
|
Zeile 686 | Zeile 663 |
---|
else { $page = (int)$result / $perpage + 1;
|
else { $page = (int)$result / $perpage + 1;
|
}
| }
|
} $postcount = (int)$report_count; $pages = $postcount / $perpage;
| } $postcount = (int)$report_count; $pages = $postcount / $perpage;
|
Zeile 908 | Zeile 885 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
}
| }
|
$page_url = 'modcp.php?action=modlogs&perpage='.$perpage; foreach(array('uid', 'fid') as $field) {
| $page_url = 'modcp.php?action=modlogs&perpage='.$perpage; foreach(array('uid', 'fid') as $field) {
|
Zeile 1048 | Zeile 1025 |
---|
}
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(); }
| { 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");
|
$plugins->run_hooks("modcp_do_delete_announcement");
|
|
|
$db->delete_query("announcements", "aid='{$aid}'"); log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted); $cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
|
$db->delete_query("announcements", "aid='{$aid}'"); log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted); $cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
|
}
| }
|
if($mybb->input['action'] == "delete_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
| if($mybb->input['action'] == "delete_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
Zeile 1086 | Zeile 1063 |
---|
}
$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']));
|
$announcement = $db->fetch_array($query); $announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));
|
|
|
if(!$announcement) { error($lang->error_invalid_announcement);
|
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();
| 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();
|
Zeile 1112 | Zeile 1089 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0)
|
verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0)
|
{ error_no_permission(); }
| { 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 1132 | Zeile 1109 |
---|
$mybb->input['message'] = $mybb->get_input('message'); if(!trim($mybb->input['message']))
|
$mybb->input['message'] = $mybb->get_input('message'); if(!trim($mybb->input['message']))
|
{
| {
|
$errors[] = $lang->error_missing_message; }
| $errors[] = $lang->error_missing_message; }
|
Zeile 1187 | Zeile 1164 |
---|
$mybb->input['endtime_month'] = '01'; } else
|
$mybb->input['endtime_month'] = '01'; } else
|
{
| {
|
$mybb->input['endtime_month'] = $mybb->get_input('endtime_month'); if(!in_array($mybb->input['endtime_month'], $months)) {
| $mybb->input['endtime_month'] = $mybb->get_input('endtime_month'); if(!in_array($mybb->input['endtime_month'], $months)) {
|
Zeile 1206 | Zeile 1183 |
---|
}
if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)
|
}
if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)
|
{
| {
|
$allowhtml = 1;
|
$allowhtml = 1;
|
}
| }
|
else
|
else
|
{
| {
|
$allowhtml = 0;
|
$allowhtml = 0;
|
}
| }
|
if($mybb->get_input('allowmycode', MyBB::INPUT_INT) == 1) { $allowmycode = 1;
|
if($mybb->get_input('allowmycode', MyBB::INPUT_INT) == 1) { $allowmycode = 1;
|
} else {
| } else {
|
$allowmycode = 0;
|
$allowmycode = 0;
|
}
| }
|
if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1) { $allowsmilies = 1;
|
if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1) { $allowsmilies = 1;
|
} else
| } else
|
{ $allowsmilies = 0; }
| { $allowsmilies = 0; }
|
Zeile 1253 | Zeile 1230 |
---|
'allowsmilies' => $allowsmilies ); $aid = $db->insert_query("announcements", $insert_announcement);
|
'allowsmilies' => $allowsmilies ); $aid = $db->insert_query("announcements", $insert_announcement);
|
|
|
log_moderator_action(array("aid" => $aid, "subject" => $mybb->input['title']), $lang->announcement_added);
$plugins->run_hooks("modcp_do_new_announcement_end");
| log_moderator_action(array("aid" => $aid, "subject" => $mybb->input['title']), $lang->announcement_added);
$plugins->run_hooks("modcp_do_new_announcement_end");
|
Zeile 1271 | Zeile 1248 |
---|
if($mybb->input['action'] == "new_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
if($mybb->input['action'] == "new_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
{ error_no_permission(); }
| { error_no_permission(); }
|
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements"); add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");
|
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements"); add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");
|
|
|
$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(); }
|
// Deal with inline errors if(!empty($errors) || isset($preview))
| // Deal with inline errors if(!empty($errors) || isset($preview))
|
Zeile 1933 | 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")."\";"); }
|
Zeile 2303 | 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 2585 | 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 2616 | 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 2665 | 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 2674 | Zeile 2649 |
---|
// We're revoking the suspension $extra_user_updates[$option['update_field']] = 0; $extra_user_updates[$option['update_length']] = 0;
|
// We're revoking the suspension $extra_user_updates[$option['update_field']] = 0; $extra_user_updates[$option['update_length']] = 0;
|
}
| }
|
// Skip this option if we haven't selected it continue; }
| // Skip this option if we haven't selected it continue; }
|
Zeile 2687 | Zeile 2662 |
---|
// User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error"; $errors[] = $lang->$string;
|
// User has selected a type of ban, but not entered a valid time frame $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 2726 | 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";
|
} else {
| } else {
|
$plugins->run_hooks("modcp_do_editprofile_update");
// Continue with the update if there is no errors
| $plugins->run_hooks("modcp_do_editprofile_update");
// Continue with the update if there is no errors
|
Zeile 2750 | Zeile 2724 |
---|
$plugins->run_hooks("modcp_do_editprofile_end");
redirect("modcp.php?action=finduser", $lang->redirect_user_updated);
|
$plugins->run_hooks("modcp_do_editprofile_end");
redirect("modcp.php?action=finduser", $lang->redirect_user_updated);
|
} }
| } }
|
}
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 2773 | 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'])) {
| if(!my_validate_url($user['website'])) {
|
Zeile 2794 | Zeile 2784 |
---|
$birthday[1] = ''; } if(!isset($birthday[2]))
|
$birthday[1] = ''; } if(!isset($birthday[2]))
|
{
| {
|
$birthday[2] = ''; } list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
|
$birthday[2] = ''; } list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
|
} else
| } else
|
{ $errors = inline_error($errors); }
// Sanitize all input
|
{ $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'])) { $defaulttitle = htmlspecialchars_uni($display_group['usertitle']); }
| }
// Custom user title if(!empty($userperms['usertitle'])) { $defaulttitle = htmlspecialchars_uni($userperms['usertitle']); }
|
else { // Go for post count title if a group default isn't set
| else { // Go for post count title if a group default isn't set
|
Zeile 2835 | Zeile 2817 |
---|
$defaulttitle = $title['title']; break; }
|
$defaulttitle = $title['title']; break; }
|
} }
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
| } }
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
|
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
| if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
|
Zeile 2851 | Zeile 2833 |
---|
if($mybb->input['birthday_day'] == $day) { $selected = "selected=\"selected\"";
|
if($mybb->input['birthday_day'] == $day) { $selected = "selected=\"selected\"";
|
} else { $selected = ''; }
| } else { $selected = ''; }
|
eval("\$bdaydaysel .= \"".$templates->get("usercp_profile_day")."\";"); }
| eval("\$bdaydaysel .= \"".$templates->get("usercp_profile_day")."\";"); }
|
Zeile 2938 | Zeile 2920 |
---|
$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 = ''; $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
$requiredfields = ''; $customfields = ''; $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
|
|
$pfcache = $cache->read('profilefields');
if(is_array($pfcache))
| $pfcache = $cache->read('profilefields');
if(is_array($pfcache))
|
Zeile 2961 | Zeile 2947 |
---|
if(isset($thing[1])) { $options = $thing[1];
|
if(isset($thing[1])) { $options = $thing[1];
|
}
| }
|
$field = "fid{$profilefield['fid']}"; if($errors) {
| $field = "fid{$profilefield['fid']}"; if($errors) {
|
Zeile 2970 | 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($errors)
| if($type == "multiselect") { if($errors)
|
Zeile 2981 | Zeile 2967 |
---|
$useropts = $userfield; } else
|
$useropts = $userfield; } else
|
{
| {
|
$useropts = explode("\n", $userfield); } if(is_array($useropts))
| $useropts = explode("\n", $userfield); } if(is_array($useropts))
|
Zeile 2989 | Zeile 2975 |
---|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
} } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) {
| } } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) {
|
$val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
$val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $sel = " selected=\"selected\"";
| { $sel = " selected=\"selected\"";
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
| }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
Zeile 3010 | Zeile 2996 |
---|
if(!$profilefield['length']) { $profilefield['length'] = 3;
|
if(!$profilefield['length']) { $profilefield['length'] = 3;
|
}
| }
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";"); }
| eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";"); }
|
Zeile 3031 | Zeile 3017 |
---|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
}
| }
|
if(!$profilefield['length']) { $profilefield['length'] = 1;
| if(!$profilefield['length']) { $profilefield['length'] = 1;
|
Zeile 3041 | Zeile 3027 |
---|
} } elseif($type == "radio")
|
} } elseif($type == "radio")
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions)) {
| { $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
foreach($expoptions as $key => $val) { $checked = ""; if($val == $userfield)
|
foreach($expoptions as $key => $val) { $checked = ""; if($val == $userfield)
|
{ $checked = " checked=\"checked\""; }
| { $checked = " checked=\"checked\""; }
|
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";"); }
| eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";"); }
|
Zeile 3070 | Zeile 3056 |
---|
if(is_array($useropts)) { foreach($useropts as $key => $val)
|
if(is_array($useropts)) { foreach($useropts as $key => $val)
|
{ $seloptions[$val] = $val; }
| { $seloptions[$val] = $val; }
|
} $expoptions = explode("\n", $options); if(is_array($expoptions))
| } $expoptions = explode("\n", $options); if(is_array($expoptions))
|
Zeile 3086 | Zeile 3072 |
---|
}
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");
|
}
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");
|
} } }
| } } }
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield);
| elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield);
|
Zeile 3107 | Zeile 3093 |
---|
}
if($profilefield['required'] == 1)
|
}
if($profilefield['required'] == 1)
|
{
| {
|
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";"); } else
| eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";"); } else
|
Zeile 3134 | Zeile 3120 |
---|
{ $checked = 1; $checked_item = "checked=\"checked\"";
|
{ $checked = 1; $checked_item = "checked=\"checked\"";
|
} else
| } else
|
{ $checked = 0; $checked_item = '';
| { $checked = 0; $checked_item = '';
|
Zeile 3163 | Zeile 3149 |
---|
{ $suspost_check = 0; $suspost_checked = '';
|
{ $suspost_check = 0; $suspost_checked = '';
|
}
| }
|
$moderator_options = array( 1 => array(
| $moderator_options = array( 1 => array(
|
Zeile 3199 | 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 3273 | Zeile 3260 |
---|
{ $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 3283 | Zeile 3276 |
---|
if($mybb->input['action'] == "finduser") { if($mybb->usergroup['caneditprofiles'] == 0)
|
if($mybb->input['action'] == "finduser") { if($mybb->usergroup['caneditprofiles'] == 0)
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");
| }
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");
|
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT); if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT); if(!$perpage || $perpage <= 0) { $perpage = $mybb->settings['threadsperpage'];
|
}
| }
|
$where = '';
if(isset($mybb->input['username']))
| $where = '';
if(isset($mybb->input['username']))
|
Zeile 3303 | Zeile 3296 |
---|
case 'mysql': case 'mysqli': $field = 'username';
|
case 'mysql': case 'mysqli': $field = 'username';
|
break;
| break;
|
default: $field = 'LOWER(username)'; break;
| default: $field = 'LOWER(username)'; break;
|
Zeile 3313 | Zeile 3306 |
---|
// Sort order & direction switch($mybb->get_input('sortby'))
|
// Sort order & direction switch($mybb->get_input('sortby'))
|
{
| {
|
case "lastvisit": $sortby = "lastvisit"; break;
| case "lastvisit": $sortby = "lastvisit"; break;
|
Zeile 3420 | Zeile 3413 |
---|
$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 3534 | Zeile 3528 |
---|
else { $ordersel['asc'] = ' selected="selected"';
|
else { $ordersel['asc'] = ' selected="selected"';
|
}
$plugins->run_hooks("modcp_warninglogs_start");
| }
$plugins->run_hooks("modcp_warninglogs_start");
|
// Pagination stuff $sql = " SELECT COUNT(wid) as count FROM ".TABLE_PREFIX."warnings w
|
// Pagination stuff $sql = " SELECT COUNT(wid) as count FROM ".TABLE_PREFIX."warnings w
|
LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (w.tid=t.tid) WHERE 1=1 {$where_sql} ";
| LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (w.tid=t.tid) WHERE 1=1 {$where_sql} ";
|
$query = $db->query($sql); $total_warnings = $db->fetch_field($query, 'count'); $page = $mybb->get_input('page', MyBB::INPUT_INT);
| $query = $db->query($sql); $total_warnings = $db->fetch_field($query, 'count'); $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
Zeile 3555 | Zeile 3549 |
---|
$page = 1; } $per_page = 20;
|
$page = 1; } $per_page = 20;
|
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
| if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
|
{ $per_page = (int)$mybb->input['filter']['per_page'];
|
{ $per_page = (int)$mybb->input['filter']['per_page'];
|
}
| }
|
$start = ($page-1) * $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'])) { foreach($mybb->input['filter'] as $field => $value)
|
// Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter'])) { foreach($mybb->input['filter'] as $field => $value)
|
{
| {
|
$value = urlencode($value); $url .= "&filter[{$field}]={$value}"; }
| $value = urlencode($value); $url .= "&filter[{$field}]={$value}"; }
|
Zeile 3611 | Zeile 3611 |
---|
if($row['expires'] > 0) { $expire_date = nice_time($row['expires']-TIME_NOW);
|
if($row['expires'] > 0) { $expire_date = nice_time($row['expires']-TIME_NOW);
|
}
| }
|
else { $expire_date = $lang->never;
| else { $expire_date = $lang->never;
|
Zeile 3636 | 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 3650 | 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 3685 | Zeile 3690 |
---|
{ $where_sql = '';
|
{ $where_sql = '';
|
$unviewable_forums = get_unviewable_forums(true);
| $unviewable_forums = get_unviewable_forums(true);
|
if($unviewable_forums) { $where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";
| if($unviewable_forums) { $where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";
|
Zeile 3835 | Zeile 3840 |
---|
} } $multipage = multipage($total_results, $perpage, $page, $page_url);
|
} } $multipage = multipage($total_results, $perpage, $page, $page_url);
|
|
|
$post_limit = $perpage; $results = ''; if(isset($mybb->input['search_users']) && $user_results && $start <= $user_results) { $query = $db->simple_select('users', 'username, uid, regip, lastip', $user_ip_sql, array('order_by' => 'regdate', 'order_dir' => 'DESC', 'limit_start' => $start, 'limit' => $perpage));
|
$post_limit = $perpage; $results = ''; if(isset($mybb->input['search_users']) && $user_results && $start <= $user_results) { $query = $db->simple_select('users', 'username, uid, regip, lastip', $user_ip_sql, array('order_by' => 'regdate', 'order_dir' => 'DESC', 'limit_start' => $start, 'limit' => $perpage));
|
while($ipaddress = $db->fetch_array($query)) {
| while($ipaddress = $db->fetch_array($query)) {
|
$result = false; $ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']); $profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']);
| $result = false; $ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']); $profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']);
|
Zeile 3853 | Zeile 3858 |
---|
if(is_array($ip_range)) { if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)
|
if(is_array($ip_range)) { if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)
|
{
| {
|
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";"); $ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
|
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";"); $ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
|
}
| }
|
elseif(strcmp($ip_range[0], $ipaddress['lastip']) <= 0 && strcmp($ip_range[1], $ipaddress['lastip']) >= 0) { eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";"); $ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip'])); }
|
elseif(strcmp($ip_range[0], $ipaddress['lastip']) <= 0 && strcmp($ip_range[1], $ipaddress['lastip']) >= 0) { eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";"); $ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip'])); }
|
}
| }
|
elseif($ipaddress['regip'] == $ip_range) { eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
| elseif($ipaddress['regip'] == $ip_range) { eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
|
Zeile 3902 | 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 3910 | Zeile 3915 |
---|
$tids[$ipaddress['tid']] = $ipaddress['pid']; $uids[$ipaddress['uid']] = $ipaddress['pid']; $ipaddresses[$ipaddress['pid']] = $ipaddress;
|
$tids[$ipaddress['tid']] = $ipaddress['pid']; $uids[$ipaddress['uid']] = $ipaddress['pid']; $ipaddresses[$ipaddress['pid']] = $ipaddress;
|
}
| }
|
if(!empty($ipaddresses)) { $query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")");
| if(!empty($ipaddresses)) { $query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")");
|
Zeile 3958 | Zeile 3963 |
---|
}
if($ipaddressvalue)
|
}
if($ipaddressvalue)
|
{
| {
|
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue); } else
| $lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue); } else
|
Zeile 3985 | Zeile 3990 |
---|
} $usersearchselect = $postsearchselect = ''; if(isset($mybb->input['search_posts']))
|
} $usersearchselect = $postsearchselect = ''; if(isset($mybb->input['search_posts']))
|
{
| {
|
$postsearchselect = "checked=\"checked\""; } if(isset($mybb->input['search_users']))
| $postsearchselect = "checked=\"checked\""; } if(isset($mybb->input['search_users']))
|
Zeile 4002 | Zeile 4007 |
---|
if($mybb->input['action'] == "iplookup") { if($mybb->usergroup['canuseipsearch'] == 0)
|
if($mybb->input['action'] == "iplookup") { if($mybb->usergroup['canuseipsearch'] == 0)
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$mybb->input['ipaddress'] = $mybb->get_input('ipaddress'); $lang->ipaddress_misc_info = $lang->sprintf($lang->ipaddress_misc_info, htmlspecialchars_uni($mybb->input['ipaddress']));
| $mybb->input['ipaddress'] = $mybb->get_input('ipaddress'); $lang->ipaddress_misc_info = $lang->sprintf($lang->ipaddress_misc_info, htmlspecialchars_uni($mybb->input['ipaddress']));
|
Zeile 4042 | Zeile 4047 |
---|
echo($iplookup); exit; }
|
echo($iplookup); exit; }
|
|
|
if($mybb->input['action'] == "banning") { if($mybb->usergroup['canbanusers'] == 0)
| if($mybb->input['action'] == "banning") { if($mybb->usergroup['canbanusers'] == 0)
|
Zeile 4060 | Zeile 4065 |
---|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->get_input('page') != "last")
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->get_input('page') != "last")
|
{
| {
|
$page = $mybb->get_input('page', MyBB::INPUT_INT); }
| $page = $mybb->get_input('page', MyBB::INPUT_INT); }
|
Zeile 4206 | Zeile 4211 |
---|
// 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(); }
| { error_no_permission(); }
|
$plugins->run_hooks("modcp_liftban_start");
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
| $plugins->run_hooks("modcp_liftban_start");
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
|
Zeile 4217 | Zeile 4222 |
---|
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
$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 4243 | 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 4254 | 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;
|
}
| }
|
// Permission to edit this ban? if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission(); } }
|
// Permission to edit this ban? if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission(); } }
|
| $errors = array();
|
// Creating a new ban if(!$existing_ban)
| // Creating a new ban if(!$existing_ban)
|
Zeile 4286 | Zeile 4292 |
---|
if($user['uid'] == $mybb->user['uid']) { $errors[] = $lang->error_cannotbanself;
|
if($user['uid'] == $mybb->user['uid']) { $errors[] = $lang->error_cannotbanself;
|
}
| }
|
// Have permissions to ban this user? if(!modcp_can_manage_user($user['uid']))
| // Have permissions to ban this user? if(!modcp_can_manage_user($user['uid']))
|
Zeile 4312 | 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 4358 | 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 4377 | 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 4442 | 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']);
| { $username = $banned['username'] = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']);
|
Zeile 4454 | 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 4516 | Zeile 4520 |
---|
$bangroup_option = $bangroups = ''; $numgroups = $banned_group = 0; $groupscache = $cache->read("usergroups");
|
$bangroup_option = $bangroups = ''; $numgroups = $banned_group = 0; $groupscache = $cache->read("usergroups");
|
|
|
foreach($groupscache as $key => $group) { if($group['isbannedgroup'])
| foreach($groupscache as $key => $group) { if($group['isbannedgroup'])
|
Zeile 4654 | 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 4666 | Zeile 4670 |
---|
if(my_strlen($post['subject']) > 25) { $post['subject'] = my_substr($post['subject'], 0, 25)."...";
|
if(my_strlen($post['subject']) > 25) { $post['subject'] = my_substr($post['subject'], 0, 25)."...";
|
}
| }
|
$post['subject'] = htmlspecialchars_uni($post['subject']); $post['fullsubject'] = htmlspecialchars_uni($post['fullsubject']); $unapproved_posts = my_number_format($unapproved_posts);
| $post['subject'] = htmlspecialchars_uni($post['subject']); $post['fullsubject'] = htmlspecialchars_uni($post['fullsubject']); $unapproved_posts = my_number_format($unapproved_posts);
|
Zeile 4725 | 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 4774 | 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']);
| { $data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject'])); $data['announcement'] = get_announcement_link($data['aid']);
|
Zeile 4893 | 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");
|