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 4184 2008-09-10 04:40:17Z Tikitiki $
| * $Id: modcp.php 4530 2009-11-22 22:02:58Z RyanGordon $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 20 | 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 50 | 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 112 | Zeile 118 |
---|
$report_count = $db->fetch_field($query, "count");
$mybb->input['rid'] = intval($mybb->input['rid']);
|
$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']."'");
| 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) {
| $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0) {
|
Zeile 130 | Zeile 136 |
---|
$pages = $postcount / $perpage; $pages = ceil($pages);
|
$pages = $postcount / $perpage; $pages = ceil($pages);
|
|
|
if($mybb->input['page'] == "last") { $page = $pages;
| if($mybb->input['page'] == "last") { $page = $pages;
|
Zeile 140 | Zeile 145 |
---|
if($page > $pages || $page <= 0) {
|
if($page > $pages || $page <= 0) {
|
$page = 1; }
if($page && $page > 0) { $start = ($page-1) * $perpage; } else { $start = 0;
| $page = 1; }
if($page && $page > 0) { $start = ($page-1) * $perpage; } else { $start = 0;
|
$page = 1; } $upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports"); if($postcount > $perpage)
|
$page = 1; } $upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports"); if($postcount > $perpage)
|
{
| {
|
eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";"); }
| eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";"); }
|
Zeile 184 | Zeile 189 |
---|
if(is_moderator($report['fid'])) { $trow = 'trow_shaded';
|
if(is_moderator($report['fid'])) { $trow = 'trow_shaded';
|
} $report['postlink'] = get_post_link($report['pid'], $report['tid']);
| } $report['postlink'] = get_post_link($report['pid'], $report['tid']);
|
$report['threadlink'] = get_thread_link($report['tid']); $report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']);
| $report['threadlink'] = get_thread_link($report['tid']); $report['posterlink'] = get_profile_link($report['postuid']); $report['reporterlink'] = get_profile_link($report['uid']);
|
Zeile 197 | Zeile 202 |
---|
if(!$reports) { eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");
|
if(!$reports) { eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");
|
}
| }
|
$plugins->run_hooks("modcp_reports");
eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";");
| $plugins->run_hooks("modcp_reports");
eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";");
|
Zeile 219 | Zeile 224 |
---|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
if($mybb->input['page'] != "last") { $page = intval($mybb->input['page']);
|
}
| }
|
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count"); $warnings = $db->fetch_field($query, "count");
| $query = $db->simple_select("reportedposts", "COUNT(rid) AS count"); $warnings = $db->fetch_field($query, "count");
|
Zeile 323 | Zeile 328 |
---|
if(!$allreports) { eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");
|
if(!$allreports) { eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");
|
}
$plugins->run_hooks("modcp_reports");
| }
$plugins->run_hooks("modcp_reports");
|
eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";"); output_page($allreportedposts); }
| eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";"); output_page($allreportedposts); }
|
Zeile 336 | 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 || $pagepage <= 0)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 387 | Zeile 392 |
---|
// 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']);
|
}
| }
|
$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)
|
{
| {
|
$start = ($page-1) * $perpage; } else
|
$start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 419 | Zeile 424 |
---|
if($postcount > $perpage) { eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
|
if($postcount > $perpage) { eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
|
}
| }
|
$query = $db->query(" SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject FROM ".TABLE_PREFIX."moderatorlog l
| $query = $db->query(" SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject FROM ".TABLE_PREFIX."moderatorlog l
|
Zeile 442 | Zeile 447 |
---|
if($logitem['tsubject']) { $information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";
|
if($logitem['tsubject']) { $information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";
|
}
| }
|
if($logitem['fname']) { $information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";
|
if($logitem['fname']) { $information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";
|
}
| }
|
if($logitem['psubject']) { $information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
|
if($logitem['psubject']) { $information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
|
}
| }
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
| eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
|
Zeile 475 | Zeile 480 |
---|
if(!$user['username']) { $user['username'] = $lang->na_deleted;
|
if(!$user['username']) { $user['username'] = $lang->na_deleted;
|
}
| }
|
$selected = ''; if($mybb->input['uid'] == $user['uid'])
| $selected = ''; if($mybb->input['uid'] == $user['uid'])
|
Zeile 483 | Zeile 488 |
---|
$selected = " selected=\"selected\""; } $user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";
|
$selected = " selected=\"selected\""; } $user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";
|
}
| }
|
|
|
$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, '', "fid");
| $forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs);
| eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs);
|
Zeile 548 | 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_forum;
|
$errors[] = $lang->error_missing_message; }
if(!trim($mybb->input['fid'])) { $errors[] = $lang->error_missing_forum;
|
}
| }
|
$startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']);
| $startdate = @explode(" ", $mybb->input['starttime_time']); $startdate = @explode(":", $startdate[0]); $enddate = @explode(" ", $mybb->input['endtime_time']);
|
Zeile 568 | Zeile 573 |
---|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
}
| }
|
}
if(stristr($mybb->input['endtime_time'], "pm"))
|
}
if(stristr($mybb->input['endtime_time'], "pm"))
|
{
| {
|
$enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) {
| $enddate[0] = 12+$enddate[0]; if($enddate[0] >= 24) {
|
Zeile 580 | Zeile 585 |
---|
} }
|
} }
|
$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; }
$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") { $enddate = '0'; } else { if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; } $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])); if($enddate < 0 || $enddate == false) {
| $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; }
$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") { $enddate = '0'; } else { if(!in_array($mybb->input['endtime_month'], $months)) { $mybb->input['endtime_month'] = 1; } $enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])); if($enddate < 0 || $enddate == false) {
|
$errors[] = $lang->error_invalid_end_date; } elseif($enddate < $startdate)
| $errors[] = $lang->error_invalid_end_date; } elseif($enddate < $startdate)
|
Zeile 683 | Zeile 688 |
---|
} else {
|
} else {
|
// Note: dates are not in user's timezone
| // Note: dates are in GMT timezone
|
$starttime_time = gmdate("g:i a", TIME_NOW); $endtime_time = gmdate("g:i a", TIME_NOW); $startday = $endday = gmdate("j", TIME_NOW);
| $starttime_time = gmdate("g:i a", TIME_NOW); $endtime_time = gmdate("g:i a", TIME_NOW); $startday = $endday = gmdate("j", TIME_NOW);
|
Zeile 710 | Zeile 715 |
---|
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else
|
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else
|
{
| {
|
$enddateday .= "<option value=\"$i\">$i</option>\n"; } }
| $enddateday .= "<option value=\"$i\">$i</option>\n"; } }
|
Zeile 778 | Zeile 783 |
---|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type'])) { $end_type_sel['infinite'] = ' checked="checked"';
|
} else
| } else
|
{ $end_type_sel['finite'] = ' checked="checked"'; }
| { $end_type_sel['finite'] = ' checked="checked"'; }
|
Zeile 882 | Zeile 887 |
---|
elseif($enddate < $startdate) { $errors[] = $lang->error_end_before_start;
|
elseif($enddate < $startdate) { $errors[] = $lang->error_end_before_start;
|
}
| }
|
}
// Proceed to update if no errors
| }
// Proceed to update if no errors
|
Zeile 965 | Zeile 970 |
---|
} else {
|
} else {
|
// Note: dates are in user's timezone $starttime_time = my_date('g:i a', $announcement['startdate']); $endtime_time = my_date('g:i a', $announcement['enddate']);
| // Note: dates are in GMT timezone $starttime_time = gmdate('g:i a', $announcement['startdate']); $endtime_time = gmdate('g:i a', $announcement['enddate']);
|
|
|
$startday = my_date('j', $announcement['startdate']); $endday = my_date('j', $announcement['enddate']);
| $startday = gmdate('j', $announcement['startdate']); $endday = gmdate('j', $announcement['enddate']);
|
|
|
$startmonth = my_date('m', $announcement['startdate']); $endmonth = my_date('m', $announcement['enddate']);
| $startmonth = gmdate('m', $announcement['startdate']); $endmonth = gmdate('m', $announcement['enddate']);
|
|
|
$startdateyear = my_date('Y', $announcement['startdate']); $enddateyear = my_date('Y', $announcement['enddate']);
| $startdateyear = gmdate('Y', $announcement['startdate']); $enddateyear = gmdate('Y', $announcement['enddate']);
|
$errored = false; }
| $errored = false; }
|
Zeile 1170 | Zeile 1175 |
---|
{ $moderation->approve_threads($threads_to_approve); }
|
{ $moderation->approve_threads($threads_to_approve); }
|
| log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);
|
redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated); } else if(is_array($mybb->input['posts']))
| redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated); } else if(is_array($mybb->input['posts']))
|
Zeile 1192 | Zeile 1198 |
---|
{ $moderation->approve_posts($posts_to_approve); }
|
{ $moderation->approve_posts($posts_to_approve); }
|
| log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);
|
redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else if(is_array($mybb->input['attachments']))
| redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else if(is_array($mybb->input['attachments']))
|
Zeile 1199 | Zeile 1206 |
---|
$query = $db->query(" SELECT a.pid, a.aid FROM ".TABLE_PREFIX."attachments a
|
$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)
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$flist}
| WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$tflist}
|
"); while($attachment = $db->fetch_array($query)) {
| "); while($attachment = $db->fetch_array($query)) {
|
Zeile 1402 | Zeile 1410 |
---|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_attachments / $perpage; $pages = ceil($pages);
|
$perpage = $mybb->settings['postsperpage']; $pages = $unapproved_attachments / $perpage; $pages = ceil($pages);
|
| |
if($mybb->input['page'] == "last") {
| if($mybb->input['page'] == "last") {
|
Zeile 1800 | Zeile 1807 |
---|
else { $value = htmlspecialchars_uni($userfield);
|
else { $value = htmlspecialchars_uni($userfield);
|
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
| $maxlength = ""; if($profilefield['maxlength'] > 0) { $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; } $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
|
} if($profilefield['required'] == 1) {
| } if($profilefield['required'] == 1) {
|
Zeile 1835 | Zeile 1847 |
---|
if($mybb->input['action'] == "finduser") { $perpage = intval($mybb->input['perpage']);
|
if($mybb->input['action'] == "finduser") { $perpage = intval($mybb->input['perpage']);
|
if(!$perpage || $pagepage <= 0)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 1921 | Zeile 1933 |
---|
$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 2186 | Zeile 2198 |
---|
// 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 || $pagepage <= 0)
| if(!$perpage || $perpage <= 0)
|
{ $perpage = $mybb->settings['threadsperpage']; }
| { $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 2220 | Zeile 2232 |
---|
$page = 1; }
|
$page = 1; }
|
$page_url = "modcp.php?action=ipsearch&perpage={$perpage}&ipaddress={$mybb->input['ipaddress']}";
| $page_url = "modcp.php?action=ipsearch&perpage={$perpage}";
|
foreach(array('ipaddress', 'search_users', 'search_posts') as $input) { if(!$mybb->input[$input]) continue;
| foreach(array('ipaddress', 'search_users', 'search_posts') as $input) { if(!$mybb->input[$input]) continue;
|
Zeile 2271 | Zeile 2283 |
---|
if($total_results > $user_results && $post_limit) { $post_start = $start-$user_results;
|
if($total_results > $user_results && $post_limit) { $post_start = $start-$user_results;
|
if($post_start < 0) $post_start = 0;
| if($post_start < 0) { $post_start = 0; }
|
} if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0))) {
|
} if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0))) {
|
| $ipaddresses = $tids = $uids = array();
|
$query = $db->query("
|
$query = $db->query("
|
SELECT p.username AS postusername, p.uid, u.username, p.subject, p.pid, p.tid, p.ipaddress, t.subject AS threadsubject FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON(p.uid=u.uid)
| SELECT username AS postusername, uid, subject, pid, tid, ipaddress FROM ".TABLE_PREFIX."posts
|
WHERE {$post_ip_sql}
|
WHERE {$post_ip_sql}
|
ORDER BY p.dateline DESC
| ORDER BY dateline DESC
|
LIMIT {$post_start}, {$post_limit} "); while($ipaddress = $db->fetch_array($query)) {
|
LIMIT {$post_start}, {$post_limit} "); while($ipaddress = $db->fetch_array($query)) {
|
$ip = $ipaddress['ipaddress']; if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support $trow = alt_trow(); if(!$ipaddress['subject'])
| $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)).")"); while($thread = $db->fetch_array($query))
|
{
|
{
|
$ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}";
| $ipaddresses[$tids[$thread['tid']]]['threadsubject'] = $thread['subject']; } unset($tids); $query = $db->simple_select("users", "username, uid", "uid IN(".implode(',', array_keys($uids)).")"); while($user = $db->fetch_array($query)) { $ipaddresses[$uids[$user['uid']]]['username'] = $user['username']; } unset($uids); foreach($ipaddresses as $ipaddress) { $ip = $ipaddress['ipaddress']; if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support $trow = alt_trow(); if(!$ipaddress['subject']) { $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> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']); eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
|
}
|
}
|
$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")."\";");
| |
} }
| } }
|
Zeile 2654 | Zeile 2692 |
---|
if($mybb->input['uid']) { $query = $db->query("
|
if($mybb->input['uid']) { $query = $db->query("
|
SELECT b.*, u.username
| SELECT b.*, u.username, u.uid
|
FROM ".TABLE_PREFIX."banned b LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid) WHERE b.uid='{$mybb->input['uid']}'
| FROM ".TABLE_PREFIX."banned b LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid) WHERE b.uid='{$mybb->input['uid']}'
|
Zeile 2665 | Zeile 2703 |
---|
$username = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']); $uid = $mybb->input['uid'];
|
$username = htmlspecialchars_uni($banned['username']); $banreason = htmlspecialchars_uni($banned['reason']); $uid = $mybb->input['uid'];
|
| $user = get_user($banned['uid']);
|
$lang->ban_user = $lang->edit_ban; // Swap over lang variables eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); }
| $lang->ban_user = $lang->edit_ban; // Swap over lang variables eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";"); }
|