Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: modcp.php 4038 2008-07-25 08:50:26Z dennis $
| * $Id: modcp.php 4267 2008-11-10 21:28:36Z Tikitiki $
|
*/
define("IN_MYBB", 1);
|
*/
define("IN_MYBB", 1);
|
| define('THIS_SCRIPT', 'modcp.php');
|
$templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport"; $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban";
| $templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport"; $templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban";
|
Zeile 19 | Zeile 20 |
---|
$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special"; $templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields"; $templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs";
|
$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special"; $templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields"; $templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs";
|
$templatelist .= ",modcp_warninglogs";
| $templatelist .= ",modcp_warninglogs,modcp_modlogs_result";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_user.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_user.php";
|
Zeile 49 | Zeile 50 |
---|
while($forum = $db->fetch_array($query)) { $flist .= ",'{$forum['fid']}'";
|
while($forum = $db->fetch_array($query)) { $flist .= ",'{$forum['fid']}'";
|
| $children = get_child_list($forum['fid']); if(!empty($children)) { $flist .= ",'".implode("','", $children)."'"; }
|
$moderated_forums[] = $forum['fid']; } if($flist)
| $moderated_forums[] = $forum['fid']; } if($flist)
|
Zeile 64 | Zeile 71 |
---|
// Fetch the Mod CP menu eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
|
// Fetch the Mod CP menu eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");
|
|
|
$plugins->run_hooks("modcp_start");
// Make navigation add_breadcrumb($lang->nav_modcp, "modcp.php");
|
$plugins->run_hooks("modcp_start");
// Make navigation add_breadcrumb($lang->nav_modcp, "modcp.php");
|
|
|
if($mybb->input['action'] == "do_reports") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if($mybb->input['action'] == "do_reports") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
if(!is_array($mybb->input['reports'])) { error($lang->error_noselected_reports); }
|
if(!is_array($mybb->input['reports'])) { error($lang->error_noselected_reports); }
|
array_walk($mybb->input['reports'], "intval");
| $mybb->input['reports'] = array_map("intval", $mybb->input['reports']);
|
$rids = implode($mybb->input['reports'], "','"); $rids = "'0','{$rids}'";
| $rids = implode($mybb->input['reports'], "','"); $rids = "'0','{$rids}'";
|
Zeile 89 | Zeile 96 |
---|
$db->update_query("reportedposts", array('reportstatus' => 1), "rid IN ({$rids}){$flist}"); $cache->update_reportedposts(); redirect("modcp.php?action=reports", $lang->redirect_reportsmarked);
|
$db->update_query("reportedposts", array('reportstatus' => 1), "rid IN ({$rids}){$flist}"); $cache->update_reportedposts(); redirect("modcp.php?action=reports", $lang->redirect_reportsmarked);
|
}
| }
|
if($mybb->input['action'] == "reports") { add_breadcrumb($lang->mcp_nav_reported_posts, "modcp.php?action=reports");
|
if($mybb->input['action'] == "reports") { add_breadcrumb($lang->mcp_nav_reported_posts, "modcp.php?action=reports");
|
|
|
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']; if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "reportstatus ='0'"); $report_count = $db->fetch_field($query, "count");
$mybb->input['rid'] = intval($mybb->input['rid']);
|
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "reportstatus ='0'"); $report_count = $db->fetch_field($query, "count");
$mybb->input['rid'] = intval($mybb->input['rid']);
|
if($mybb->input['rid']) { $query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'"); $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0) { $page = $result / $perpage; } else { $page = intval($result / $perpage) + 1; } } $postcount = intval($report_count)+1; $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages;
| if($mybb->input['rid']) { $query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'"); $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0) { $page = $result / $perpage; } else { $page = intval($result / $perpage) + 1; } } $postcount = intval($report_count); $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages;
|
}
if($page > $pages || $page <= 0)
| }
if($page > $pages || $page <= 0)
|
Zeile 212 | Zeile 221 |
---|
// 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'];
|
if($mybb->input['page'] != "last")
| if($mybb->input['page'] != "last")
|
{ $page = intval($mybb->input['page']); }
| { $page = intval($mybb->input['page']); }
|
Zeile 234 | Zeile 243 |
---|
$page = intval($result / $perpage) + 1; } }
|
$page = intval($result / $perpage) + 1; } }
|
$postcount = intval($warnings)+1;
| $postcount = intval($warnings);
|
$pages = $postcount / $perpage; $pages = ceil($pages);
| $pages = $postcount / $perpage; $pages = ceil($pages);
|
Zeile 332 | Zeile 341 |
---|
add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
$perpage = intval($mybb->input['perpage']);
|
add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");
$perpage = intval($mybb->input['perpage']);
|
if(!$perpage)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage'];
|
{ $perpage = $mybb->settings['threadsperpage'];
|
}
| }
|
$where = '';
// Searching for entries by a particular user if($mybb->input['uid']) { $where .= " AND l.uid='".intval($mybb->input['uid'])."'";
|
$where = '';
// Searching for entries by a particular user if($mybb->input['uid']) { $where .= " AND l.uid='".intval($mybb->input['uid'])."'";
|
}
| }
|
// Searching for entries in a specific forum if($mybb->input['fid']) { $where .= " AND t.fid='".intval($mybb->input['fid'])."'";
|
// Searching for entries in a specific forum if($mybb->input['fid']) { $where .= " AND t.fid='".intval($mybb->input['fid'])."'";
|
}
| }
|
// Order? switch($mybb->input['sortby'])
| // Order? switch($mybb->input['sortby'])
|
Zeile 359 | Zeile 368 |
---|
break; case "forum": $sortby = "f.name";
|
break; case "forum": $sortby = "f.name";
|
break;
| break;
|
case "thread": $sortby = "t.subject"; break;
| case "thread": $sortby = "t.subject"; break;
|
Zeile 374 | Zeile 383 |
---|
$query = $db->query(" SELECT COUNT(l.dateline) AS count
|
$query = $db->query(" SELECT COUNT(l.dateline) AS count
|
FROM ".TABLE_PREFIX."moderatorlog l LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
| FROM ".TABLE_PREFIX."moderatorlog l LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
|
WHERE 1=1 {$where} "); $rescount = $db->fetch_field($query, "count");
| WHERE 1=1 {$where} "); $rescount = $db->fetch_field($query, "count");
|
Zeile 385 | Zeile 394 |
---|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$postcount = intval($rescount); $pages = $postcount / $perpage; $pages = ceil($pages);
|
$postcount = intval($rescount); $pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->input['page'] == "last") { $page = $pages;
|
if($mybb->input['page'] == "last") { $page = $pages;
|
}
| }
|
if($page > $pages || $page <= 0)
|
if($page > $pages || $page <= 0)
|
{ $page = 1;
| { $page = 1;
|
}
if($page)
| }
if($page)
|
Zeile 411 | Zeile 420 |
---|
$page = 1; }
|
$page = 1; }
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modlogs&perpage=$perpage&uid={$mybb->input['uid']}&fid={$mybb->input['fid']}&orderby=$mybb->input['sortby']&order={$mybb->input['order']}");
| $multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modlogs&perpage=$perpage&uid={$mybb->input['uid']}&fid={$mybb->input['fid']}&sortby={$mybb->input['sortby']}&order={$mybb->input['order']}");
|
if($postcount > $perpage)
|
if($postcount > $perpage)
|
{
| {
|
eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";"); } $query = $db->query("
| eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";"); } $query = $db->query("
|
Zeile 488 | Zeile 497 |
---|
}
if($mybb->input['action'] == "do_delete_announcement")
|
}
if($mybb->input['action'] == "do_delete_announcement")
|
{ verify_post_check($mybb->input['my_post_key']);
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement['aid']) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid']))) { error_no_permission(); }
| { verify_post_check($mybb->input['my_post_key']);
$aid = intval($mybb->input['aid']); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement['aid']) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid']))) { error_no_permission(); }
|
$db->delete_query("announcements", "aid='{$aid}'");
| $db->delete_query("announcements", "aid='{$aid}'");
|
Zeile 526 | Zeile 535 |
---|
eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";"); output_page($announcements);
|
eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";"); output_page($announcements);
|
}
| }
|
if($mybb->input['action'] == "do_new_announcement") { verify_post_check($mybb->input['my_post_key']);
| if($mybb->input['action'] == "do_new_announcement") { verify_post_check($mybb->input['my_post_key']);
|
Zeile 544 | Zeile 553 |
---|
}
if(!trim($mybb->input['message']))
|
}
if(!trim($mybb->input['message']))
|
{
| {
|
$errors[] = $lang->error_missing_message; }
if(!trim($mybb->input['fid']))
|
$errors[] = $lang->error_missing_message; }
if(!trim($mybb->input['fid']))
|
{
| {
|
$errors[] = $lang->error_missing_forum; }
| $errors[] = $lang->error_missing_forum; }
|
Zeile 564 | Zeile 573 |
---|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
} }
| } }
|
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24)
|
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24)
|
{
| {
|
$enddate[0] = "00"; } }
| $enddate[0] = "00"; } }
|
Zeile 580 | Zeile 589 |
---|
if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = 1;
|
if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = 1;
|
}
| }
|
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])); if($startdate < 0 || $startdate == false)
|
$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])); if($startdate < 0 || $startdate == false)
|
{
| {
|
$errors[] = $lang->error_invalid_start_date; }
if($mybb->input['endtime_type'] == "2")
|
$errors[] = $lang->error_invalid_start_date; }
if($mybb->input['endtime_type'] == "2")
|
{
| {
|
$enddate = '0'; } else
| $enddate = '0'; } else
|
Zeile 599 | Zeile 608 |
---|
{ $mybb->input['endtime_month'] = 1; }
|
{ $mybb->input['endtime_month'] = 1; }
|
$enddate = gmmktime($enddatehour, intval($mybb->input['endtime_time']), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
| $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
|
if($enddate < 0 || $enddate == false) { $errors[] = $lang->error_invalid_end_date; } elseif($enddate < $startdate)
|
if($enddate < 0 || $enddate == false) { $errors[] = $lang->error_invalid_end_date; } elseif($enddate < $startdate)
|
{
| {
|
$errors[] = $lang->error_end_before_start; }
|
$errors[] = $lang->error_end_before_start; }
|
}
| }
|
if(!$errors) { $insert_announcement = array(
| if(!$errors) { $insert_announcement = array(
|
Zeile 623 | Zeile 632 |
---|
'allowmycode' => $db->escape_string($mybb->input['allowmycode']), 'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']), );
|
'allowmycode' => $db->escape_string($mybb->input['allowmycode']), 'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']), );
|
|
|
$aid = $db->insert_query("announcements", $insert_announcement); redirect("modcp.php?action=announcements", $lang->redirect_add_announcement); } else
|
$aid = $db->insert_query("announcements", $insert_announcement); redirect("modcp.php?action=announcements", $lang->redirect_add_announcement); } else
|
{
| {
|
$mybb->input['action'] = 'new_announcement'; } }
| $mybb->input['action'] = 'new_announcement'; } }
|
Zeile 643 | Zeile 652 |
---|
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid))) { error_no_permission();
|
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid))) { error_no_permission();
|
}
| }
|
// Deal with inline errors if(is_array($errors)) { $errors = inline_error($errors);
|
// Deal with inline errors if(is_array($errors)) { $errors = inline_error($errors);
|
|
|
// Set $announcement to input stuff
|
// Set $announcement to input stuff
|
$title = $mybb->input['title']; $message = $mybb->input['message']; $startmonth = intval($mybb->input['starttime_month']);
| $announcement['subject'] = $mybb->input['title']; $announcement['message'] = $mybb->input['message']; $announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies']; $months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); if(!in_array($mybb->input['starttime_month'], $months)) { $mybb->input['starttime_month'] = 1; } if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; } $startmonth = $mybb->input['starttime_month'];
|
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']); $starttime_time = htmlspecialchars($mybb->input['starttime_time']);
|
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']); $starttime_time = htmlspecialchars($mybb->input['starttime_time']);
|
$endmonth = intval($mybb->input['endtime_month']);
| $endmonth = $mybb->input['endtime_month'];
|
$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']); $endtime_time = htmlspecialchars($mybb->input['endtime_time']);
| $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']); $endtime_time = htmlspecialchars($mybb->input['endtime_time']);
|
Zeile 672 | Zeile 696 |
---|
$startdateyear = gmdate("Y", TIME_NOW);
$enddateyear = $startdateyear+1;
|
$startdateyear = gmdate("Y", TIME_NOW);
$enddateyear = $startdateyear+1;
|
}
// Generate form elements for($i = 1; $i <= 31; ++$i) { if($startday == $i) { $startdateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else { $startdateday .= "<option value=\"$i\">$i</option>\n"; }
if($endday == $i) { $enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else { $enddateday .= "<option value=\"$i\">$i</option>\n"; } }
$startmonthsel = $endmonthsel = array(); $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
$startdatemonth .= "<option value=\"01\" {$startmonthsel['01']}>{$lang->january}</option>\n"; $enddatemonth .= "<option value=\"01\" {$endmonthsel['01']}>{$lang->january}</option>\n"; $startdatemonth .= "<option value=\"02\" {$startmonthsel['02']}>{$lang->february}</option>\n"; $enddatemonth .= "<option value=\"02\" {$endmonthsel['02']}>{$lang->february}</option>\n"; $startdatemonth .= "<option value=\"03\" {$startmonthsel['03']}>{$lang->march}</option>\n"; $enddatemonth .= "<option value=\"03\" {$endmonthsel['03']}>{$lang->march}</option>\n";
| }
// Generate form elements for($i = 1; $i <= 31; ++$i) { if($startday == $i) { $startdateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else { $startdateday .= "<option value=\"$i\">$i</option>\n"; }
if($endday == $i) { $enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else { $enddateday .= "<option value=\"$i\">$i</option>\n"; } }
$startmonthsel = $endmonthsel = array(); $startmonthsel[$startmonth] = "selected=\"selected\""; $endmonthsel[$endmonth] = "selected=\"selected\"";
$startdatemonth .= "<option value=\"01\" {$startmonthsel['01']}>{$lang->january}</option>\n"; $enddatemonth .= "<option value=\"01\" {$endmonthsel['01']}>{$lang->january}</option>\n"; $startdatemonth .= "<option value=\"02\" {$startmonthsel['02']}>{$lang->february}</option>\n"; $enddatemonth .= "<option value=\"02\" {$endmonthsel['02']}>{$lang->february}</option>\n"; $startdatemonth .= "<option value=\"03\" {$startmonthsel['03']}>{$lang->march}</option>\n"; $enddatemonth .= "<option value=\"03\" {$endmonthsel['03']}>{$lang->march}</option>\n";
|
$startdatemonth .= "<option value=\"04\" {$startmonthsel['04']}>{$lang->april}</option>\n"; $enddatemonth .= "<option value=\"04\" {$endmonthsel['04']}>{$lang->april}</option>\n"; $startdatemonth .= "<option value=\"05\" {$startmonthsel['05']}>{$lang->may}</option>\n";
| $startdatemonth .= "<option value=\"04\" {$startmonthsel['04']}>{$lang->april}</option>\n"; $enddatemonth .= "<option value=\"04\" {$endmonthsel['04']}>{$lang->april}</option>\n"; $startdatemonth .= "<option value=\"05\" {$startmonthsel['05']}>{$lang->may}</option>\n";
|
Zeile 801 | Zeile 825 |
---|
}
if(!trim($mybb->input['message']))
|
}
if(!trim($mybb->input['message']))
|
{
| {
|
$errors[] = $lang->error_missing_message;
|
$errors[] = $lang->error_missing_message;
|
}
| }
|
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
| }
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']); $enddate = @explode(":", $enddate[0]);
if(stristr($mybb->input['starttime_time'], "pm")) { $startdate[0] = 12+$startdate[0]; if($startdate[0] >= 24) { $startdate[0] = "00"; } }
if(stristr($mybb->input['endtime_time'], "pm")) { $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) { $enddate[0] = "00"; }
|
}
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
| }
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
|
Zeile 825 | Zeile 872 |
---|
if($mybb->input['endtime_type'] == "2") { $enddate = '0';
|
if($mybb->input['endtime_type'] == "2") { $enddate = '0';
|
}
| }
|
else { if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; }
|
else { if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; }
|
$enddate = gmmktime($enddatehour, intval($mybb->input['endtime_time']), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
| $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
|
if($enddate < 0 || $enddate == false) { $errors[] = $lang->error_invalid_end_date;
| if($enddate < 0 || $enddate == false) { $errors[] = $lang->error_invalid_end_date;
|
Zeile 898 | Zeile 945 |
---|
$announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies'];
|
$announcement['allowhtml'] = $mybb->input['allowhtml']; $announcement['allowmycode'] = $mybb->input['allowmycode']; $announcement['allowsmilies'] = $mybb->input['allowsmilies'];
|
$startmonth = intval($mybb->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'] = 1; } if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; } $startmonth = $mybb->input['starttime_month'];
|
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']); $starttime_time = htmlspecialchars($mybb->input['starttime_time']);
|
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']); $startday = intval($mybb->input['starttime_day']); $starttime_time = htmlspecialchars($mybb->input['starttime_time']);
|
$endmonth = intval($mybb->input['endtime_month']);
| $endmonth = $mybb->input['endtime_month'];
|
$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']); $endtime_time = htmlspecialchars($mybb->input['endtime_time']);
| $enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']); $endday = intval($mybb->input['endtime_day']); $endtime_time = htmlspecialchars($mybb->input['endtime_time']);
|
Zeile 1142 | Zeile 1201 |
---|
} else if(is_array($mybb->input['attachments'])) {
|
} else if(is_array($mybb->input['attachments'])) {
|
$query = $db->simple_select("attachments", "aid, pid", "aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$flist}");
| $query = $db->query(" SELECT a.pid, a.aid FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$tflist} ");
|
while($attachment = $db->fetch_array($query)) { $action = $mybb->input['attachments'][$attachment['aid']]; if($action == "approve")
|
while($attachment = $db->fetch_array($query)) { $action = $mybb->input['attachments'][$attachment['aid']]; if($action == "approve")
|
{
| {
|
$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'"); } else if($action == "delete")
| $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'"); } else if($action == "delete")
|
Zeile 1162 | Zeile 1227 |
---|
if($mybb->input['action'] == "modqueue") { if($mybb->input['type'] == "threads" || !$mybb->input['type'])
|
if($mybb->input['action'] == "modqueue") { if($mybb->input['type'] == "threads" || !$mybb->input['type'])
|
{ $forum_cache = $cache->read("forums");
| { $forum_cache = $cache->read("forums");
|
$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible=0 {$flist}"); $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
|
$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible=0 {$flist}"); $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
|
|
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last")
|
// Figure out if we need to display multiple pages. if($mybb->input['page'] != "last")
|
{
| {
|
$page = intval($mybb->input['page']);
|
$page = intval($mybb->input['page']);
|
}
| }
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page)
| $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page)
|
{ $start = ($page-1) * $perpage; }
| { $start = ($page-1) * $perpage; }
|
Zeile 1198 | Zeile 1263 |
---|
$page = 1; }
|
$page = 1; }
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modqueue&type=threads");
| $multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=threads");
|
$query = $db->query(" SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid
| $query = $db->query(" SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid
|
Zeile 1259 | Zeile 1324 |
---|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_posts / $perpage;
|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_posts / $perpage;
|
$pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
| $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
|
if($page > $pages || $page <= 0) {
| if($page > $pages || $page <= 0) {
|
Zeile 1281 | Zeile 1346 |
---|
$page = 1; }
|
$page = 1; }
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modqueue&type=posts");
| $multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=posts");
|
$query = $db->query(" SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline
| $query = $db->query(" SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline
|
Zeile 1315 | Zeile 1380 |
---|
}
if($posts)
|
}
if($posts)
|
{
| {
|
add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts"); eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";"); output_page($postqueue); } }
|
add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts"); eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";"); eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";"); output_page($postqueue); } }
|
|
|
if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue)) { $query = $db->query("
| if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue)) { $query = $db->query("
|
Zeile 1341 | Zeile 1406 |
---|
}
$perpage = $mybb->settings['postsperpage'];
|
}
$perpage = $mybb->settings['postsperpage'];
|
$pages = $unapprovedthreads / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else
| $pages = $unapproved_attachments / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else
|
{ $start = 0; $page = 1; }
|
{ $start = 0; $page = 1; }
|
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
| $multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&type=attachments");
|
$query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
| $query = $db->query(" SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
|
Zeile 1427 | Zeile 1492 |
---|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$user = get_user($mybb->input['uid']); if(!$user['uid']) { error($lang->invalid_user); }
// Check if the current user has permission to edit this user $user_permissions = user_permissions($user['uid']);
// Current user is only a local moderator, cannot edit super mods or admins if($mybb->user['usergroup'] == 6 && ($user_permissions['issupermod'] == 1 || $user_permissions['canadmincp'] == 1)) { error_no_permission(); }
| $user = get_user($mybb->input['uid']); if(!$user['uid']) { error($lang->invalid_user); }
// Check if the current user has permission to edit this user $user_permissions = user_permissions($user['uid']);
// Current user is only a local moderator, cannot edit super mods or admins if($mybb->user['usergroup'] == 6 && ($user_permissions['issupermod'] == 1 || $user_permissions['cancp'] == 1)) { error_no_permission(); }
|
// Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
|
// Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
|
else if($mybb->usergroup['issupermod'] == 1 && $user_permissions['canadmincp'] == 1 || (is_super_admin($user['uid']) && !is_super_admin($user['uid'])))
| else if(!modcp_can_manage_user($user['uid']))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 1527 | Zeile 1592 |
---|
$user_permissions = user_permissions($user['uid']);
// Current user is only a local moderator, cannot edit super mods or admins
|
$user_permissions = user_permissions($user['uid']);
// Current user is only a local moderator, cannot edit super mods or admins
|
if($mybb->user['usergroup'] == 6 && ($user_permissions['issupermod'] == 1 || $user_permissions['canadmincp'] == 1))
| if($mybb->user['usergroup'] == 6 && ($user_permissions['issupermod'] == 1 || $user_permissions['cancp'] == 1))
|
{ error_no_permission(); } // Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
|
{ error_no_permission(); } // Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
|
else if($mybb->usergroup['issupermod'] == 1 && $user_permissions['canadmincp'] == 1 || (is_super_admin($user['uid']) && !is_super_admin($user['uid'])))
| else if(!modcp_can_manage_user($user['uid']))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 1638 | Zeile 1703 |
---|
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) { $val = trim($val); $val = str_replace("\n", "\\n", $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($val == $seloptions[$val])
|
$sel = ""; if($val == $seloptions[$val])
|
{ $sel = " selected=\"selected\"";
| { $sel = " selected=\"selected\"";
|
} $select .= "<option value=\"$val\"$sel>$val</option>\n";
|
} $select .= "<option value=\"$val\"$sel>$val</option>\n";
|
} if(!$profilefield['length']) {
| } if(!$profilefield['length']) {
|
$profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
$profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
} }
| } }
|
elseif($type == "select") { $expoptions = explode("\n", $options);
| elseif($type == "select") { $expoptions = explode("\n", $options);
|
Zeile 1686 | Zeile 1751 |
---|
} } elseif($type == "radio")
|
} } elseif($type == "radio")
|
{
| {
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 1708 | Zeile 1773 |
---|
$useropts = $userfield; } else
|
$useropts = $userfield; } else
|
{
| {
|
$useropts = explode("\n", $userfield); } if(is_array($useropts))
| $useropts = explode("\n", $userfield); } if(is_array($useropts))
|
Zeile 1741 | Zeile 1806 |
---|
{ $value = htmlspecialchars_uni($userfield); $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
|
{ $value = htmlspecialchars_uni($userfield); $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
|
}
| }
|
if($profilefield['required'] == 1) { eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
| if($profilefield['required'] == 1) { eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
|
Zeile 1763 | Zeile 1828 |
---|
{ eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";"); }
|
{ eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";"); }
|
|
|
$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']);
|
$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']);
|
|
|
$codebuttons = build_mycode_inserter("signature"); eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";"); output_page($edituser);
| $codebuttons = build_mycode_inserter("signature"); eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";"); output_page($edituser);
|
Zeile 1774 | Zeile 1839 |
---|
if($mybb->input['action'] == "finduser") {
|
if($mybb->input['action'] == "finduser") {
|
if(!$perpage)
| $perpage = intval($mybb->input['perpage']); if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 1843 | Zeile 1909 |
---|
if($mybb->input[$field]) { $page_url .= "&{$field}=".htmlspecialchars_uni($mybb->input[$field]);
|
if($mybb->input[$field]) { $page_url .= "&{$field}=".htmlspecialchars_uni($mybb->input[$field]);
|
| $mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]);
|
} }
| } }
|
Zeile 1859 | Zeile 1926 |
---|
$user['postnum'] = my_number_format($user['postnum']); $regdate = my_date($mybb->settings['dateformat'], $user['regdate']); $regtime = my_date($mybb->settings['timeformat'], $user['regdate']);
|
$user['postnum'] = my_number_format($user['postnum']); $regdate = my_date($mybb->settings['dateformat'], $user['regdate']); $regtime = my_date($mybb->settings['timeformat'], $user['regdate']);
|
$lastdate = my_date($mybb->settings['dateformat'], $user['lastactive']); $lasttime = my_date($mybb->settings['timeformat'], $user['lastactive']);
| $lastdate = my_date($mybb->settings['dateformat'], $user['lastvisit']); $lasttime = my_date($mybb->settings['timeformat'], $user['lastvisit']);
|
$usergroup = $usergroups_cache[$user['usergroup']]['title']; eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";"); }
| $usergroup = $usergroups_cache[$user['usergroup']]['title']; eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";"); }
|
Zeile 1886 | Zeile 1953 |
---|
$search['username'] = $db->escape_string($mybb->input['filter']['username']); $query = $db->simple_select("users", "uid", "username='{$search['username']}'"); $mybb->input['filter']['uid'] = $db->fetch_field($query, "uid");
|
$search['username'] = $db->escape_string($mybb->input['filter']['username']); $query = $db->simple_select("users", "uid", "username='{$search['username']}'"); $mybb->input['filter']['uid'] = $db->fetch_field($query, "uid");
|
| $mybb->input['filter']['username'] = htmlspecialchars_uni($mybb->input['filter']['username']);
|
} if($mybb->input['filter']['uid']) {
| } if($mybb->input['filter']['uid']) {
|
Zeile 1894 | Zeile 1962 |
---|
if(!isset($mybb->input['search']['username'])) { $user = get_user($mybb->input['search']['uid']);
|
if(!isset($mybb->input['search']['username'])) { $user = get_user($mybb->input['search']['uid']);
|
$mybb->input['search']['username'] = $user['username'];
| $mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);
|
} } if($mybb->input['filter']['mod_username'])
| } } if($mybb->input['filter']['mod_username'])
|
Zeile 1902 | Zeile 1970 |
---|
$search['mod_username'] = $db->escape_string($mybb->input['filter']['mod_username']); $query = $db->simple_select("users", "uid", "username='{$search['mod_username']}'"); $mybb->input['filter']['mod_uid'] = $db->fetch_field($query, "uid");
|
$search['mod_username'] = $db->escape_string($mybb->input['filter']['mod_username']); $query = $db->simple_select("users", "uid", "username='{$search['mod_username']}'"); $mybb->input['filter']['mod_uid'] = $db->fetch_field($query, "uid");
|
| $mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);
|
} if($mybb->input['filter']['mod_uid']) {
| } if($mybb->input['filter']['mod_uid']) {
|
Zeile 1910 | Zeile 1979 |
---|
if(!isset($mybb->input['search']['mod_username'])) { $mod_user = get_user($mybb->input['search']['uid']);
|
if(!isset($mybb->input['search']['mod_username'])) { $mod_user = get_user($mybb->input['search']['uid']);
|
$mybb->input['search']['mod_username'] = $mod_user['username'];
| $mybb->input['search']['mod_username'] = htmlspecialchars_uni($mod_user['username']);
|
} } if($mybb->input['filter']['reason']) { $search['reason'] = $db->escape_string($mybb->input['filter']['reason']); $where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
|
} } if($mybb->input['filter']['reason']) { $search['reason'] = $db->escape_string($mybb->input['filter']['reason']); $where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
|
| $mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);
|
} $sortbysel = array(); switch($mybb->input['filter']['sortby'])
| } $sortbysel = array(); switch($mybb->input['filter']['sortby'])
|
Zeile 2121 | Zeile 2191 |
---|
// Now we have the result counts, paginate $perpage = intval($mybb->input['perpage']);
|
// Now we have the result counts, paginate $perpage = intval($mybb->input['perpage']);
|
if(!$perpage)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 2228 | Zeile 2298 |
---|
{ $ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}"; }
|
{ $ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}"; }
|
$subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> by ".build_profile_link($ipaddress['username'], $ipaddress['uid']);
| $subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']);
|
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";"); } }
| eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";"); } }
|
Zeile 2288 | Zeile 2358 |
---|
$query = $db->simple_select("banned", "COUNT(uid) AS count"); $banned_count = $db->fetch_field($query, "count");
|
$query = $db->simple_select("banned", "COUNT(uid) AS count"); $banned_count = $db->fetch_field($query, "count");
|
$postcount = intval($banned_count)+1;
| $postcount = intval($banned_count);
|
$pages = $postcount / $perpage; $pages = ceil($pages);
| $pages = $postcount / $perpage; $pages = ceil($pages);
|
Zeile 2335 | Zeile 2405 |
---|
// Only show the edit & lift links if current user created ban, or is super mod/admin $edit_link = '';
|
// Only show the edit & lift links if current user created ban, or is super mod/admin $edit_link = '';
|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['canadmincp'] == 1)
| if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
|
{ $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
|
{ $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
|
}
$admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);
| }
$admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);
|
$trow = alt_trow();
if($banned['reason']) { $banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
$trow = alt_trow();
if($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 2362 | Zeile 2432 |
---|
{ $banlength = $bantimes[$banned['bantime']]; $remaining = $banned['lifted']-TIME_NOW;
|
{ $banlength = $bantimes[$banned['bantime']]; $remaining = $banned['lifted']-TIME_NOW;
|
|
|
$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
if($remaining < 3600)
| $timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
if($remaining < 3600)
|
Zeile 2372 | Zeile 2442 |
---|
else if($remaining < 86400) { $timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
|
else if($remaining < 86400) { $timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
|
}
| }
|
else if($remaining < 604800) { $timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
| else if($remaining < 604800) { $timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
|
Zeile 2381 | Zeile 2451 |
---|
{ $timeremaining = "({$timeremaining} {$lang->ban_remaining})"; }
|
{ $timeremaining = "({$timeremaining} {$lang->ban_remaining})"; }
|
}
| }
|
eval("\$bannedusers .= \"".$templates->get("modcp_banning_ban")."\";"); }
| eval("\$bannedusers .= \"".$templates->get("modcp_banning_ban")."\";"); }
|
Zeile 2407 | Zeile 2477 |
---|
if(!$ban['uid']) {
|
if(!$ban['uid']) {
|
$lang->error_invalidban;
| error($lang->error_invalidban);
|
}
// Permission to edit this ban?
|
}
// Permission to edit this ban?
|
if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canadmincp'] != 1)
| if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 2452 | Zeile 2522 |
---|
}
// Permission to edit this ban?
|
}
// Permission to edit this ban?
|
if($mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canadmincp'] != 1)
| if($mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
$lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&bid={$user['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";
| |
} // Creating a new ban else
| } // Creating a new ban else
|
Zeile 2546 | Zeile 2614 |
---|
);
$db->insert_query('banned', $insert_array);
|
);
$db->insert_query('banned', $insert_array);
|
}
| }
|
// Move the user to the banned group $update_array = array( 'usergroup' => intval($mybb->input['usergroup']),
| // Move the user to the banned group $update_array = array( 'usergroup' => intval($mybb->input['usergroup']),
|
Zeile 2606 | Zeile 2674 |
---|
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); } }
|
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); } }
|
|
|
// New ban!
|
// New ban!
|
if(!$banuer_username)
| if(!$banuser_username)
|
{ if($mybb->input['uid']) {
| { if($mybb->input['uid']) {
|
Zeile 2651 | Zeile 2720 |
---|
$liftlist .= ">{$title} ({$thatime})</option>\n"; } }
|
$liftlist .= ">{$title} ({$thatime})</option>\n"; } }
|
|
|
$bangroups = ''; $query = $db->simple_select("usergroups", "gid, title", "isbannedgroup=1"); while($item = $db->fetch_array($query))
| $bangroups = ''; $query = $db->simple_select("usergroups", "gid, title", "isbannedgroup=1"); while($item = $db->fetch_array($query))
|
Zeile 2663 | Zeile 2732 |
---|
} $bangroups .= "<option value=\"{$item['gid']}\"{$selected}>".htmlspecialchars_uni($item['title'])."</option>\n"; }
|
} $bangroups .= "<option value=\"{$item['gid']}\"{$selected}>".htmlspecialchars_uni($item['title'])."</option>\n"; }
|
| $lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&uid={$user['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";
|
eval("\$banuser = \"".$templates->get("modcp_banuser")."\";"); output_page($banuser);
| eval("\$banuser = \"".$templates->get("modcp_banuser")."\";"); output_page($banuser);
|
Zeile 2670 | Zeile 2741 |
---|
if($mybb->input['action'] == "do_modnotes") {
|
if($mybb->input['action'] == "do_modnotes") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
// Update Moderator Notes cache $update_cache = array( "modmessage" => $mybb->input['modnotes']
| // Update Moderator Notes cache $update_cache = array( "modmessage" => $mybb->input['modnotes']
|
Zeile 2693 | Zeile 2767 |
---|
if($unapproved_attachments > 0) { $query = $db->query("
|
if($unapproved_attachments > 0) { $query = $db->query("
|
SELECT t.tid, p.pid, t.uid, t.username, a.filename, a.dateuploaded
| SELECT t.tid, p.pid, p.uid, t.username, a.filename, a.dateuploaded
|
FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
| FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
Zeile 2726 | Zeile 2800 |
---|
if($unapproved_posts > 0) { $query = $db->query("
|
if($unapproved_posts > 0) { $query = $db->query("
|
SELECT p.pid, p.tid, p.subject, p.uid, p.username
| SELECT p.pid, p.tid, p.subject, p.uid, p.username, p.dateline
|
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
|
Zeile 2741 | Zeile 2815 |
---|
$post['subject'] = $post['fullsubject'] = $parser->parse_badwords($post['subject']); if(my_strlen($post['subject']) > 25) {
|
$post['subject'] = $post['fullsubject'] = $parser->parse_badwords($post['subject']); if(my_strlen($post['subject']) > 25) {
|
$lastpost_subject = my_substr($post['subject'], 0, 25)."...";
| $post['subject'] = my_substr($post['subject'], 0, 25)."...";
|
} $post['subject'] = htmlspecialchars_uni($post['subject']); $post['fullsubject'] = htmlspecialchars_uni($post['fullsubject']);
| } $post['subject'] = htmlspecialchars_uni($post['subject']); $post['fullsubject'] = htmlspecialchars_uni($post['fullsubject']);
|
Zeile 2767 | Zeile 2841 |
---|
$thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']); if(my_strlen($thread['subject']) > 25) {
|
$thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']); if(my_strlen($thread['subject']) > 25) {
|
$lastpost_subject = my_substr($thread['subject'], 0, 25)."...";
| $post['subject'] = my_substr($thread['subject'], 0, 25)."...";
|
} $thread['subject'] = htmlspecialchars_uni($thread['subject']); $thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);
| } $thread['subject'] = htmlspecialchars_uni($thread['subject']); $thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);
|
Zeile 2835 | Zeile 2909 |
---|
// Only show the edit & lift links if current user created ban, or is super mod/admin $edit_link = '';
|
// Only show the edit & lift links if current user created ban, or is super mod/admin $edit_link = '';
|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['canadmincp'] == 1)
| if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
|
{ $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>"; }
| { $edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&uid={$banned['uid']}&my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>"; }
|