Zeile 2064 | Zeile 2064 |
---|
{ $attachments = array_map("intval", array_keys($mybb->input['attachments'])); $query = $db->query("
|
{ $attachments = array_map("intval", array_keys($mybb->input['attachments'])); $query = $db->query("
|
SELECT a.pid, a.aid
| SELECT a.pid, a.aid, t.tid
|
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)
| 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)
|
Zeile 2080 | Zeile 2080 |
---|
if($action == "approve") { $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
|
if($action == "approve") { $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
|
| if(isset($attachment['tid'])) { update_thread_counters((int)$attachment['tid'], array("attachmentcount" => "+1")); }
|
} else if($action == "delete") { remove_attachment($attachment['pid'], '', $attachment['aid']);
|
} else if($action == "delete") { remove_attachment($attachment['pid'], '', $attachment['aid']);
|
| if(isset($attachment['tid'])) { update_thread_counters((int)$attachment['tid'], array("attachmentcount" => "-1")); }
|
} }
$plugins->run_hooks("modcp_do_modqueue_end");
|
} }
$plugins->run_hooks("modcp_do_modqueue_end");
|
|
|
redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated); } }
| redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated); } }
|
Zeile 2100 | Zeile 2108 |
---|
if($mybb->usergroup['canmanagemodqueue'] == 0) { error_no_permission();
|
if($mybb->usergroup['canmanagemodqueue'] == 0) { error_no_permission();
|
}
| }
|
if($nummodqueuethreads == 0 && $nummodqueueposts == 0 && $nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_use_mod_queue);
| if($nummodqueuethreads == 0 && $nummodqueueposts == 0 && $nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_use_mod_queue);
|
Zeile 2114 | Zeile 2122 |
---|
if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_moderate_threads);
|
if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_moderate_threads);
|
}
| }
|
$forum_cache = $cache->read("forums");
|
$forum_cache = $cache->read("forums");
|
|
|
$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}"); $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
// Figure out if we need to display multiple pages. if($mybb->get_input('page') != "last")
|
$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}"); $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
// Figure out if we need to display multiple pages. if($mybb->get_input('page') != "last")
|
{
| {
|
$page = $mybb->get_input('page', MyBB::INPUT_INT);
|
$page = $mybb->get_input('page', MyBB::INPUT_INT);
|
}
| }
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$perpage = $mybb->settings['threadsperpage']; $pages = $unapproved_threads / $perpage;
|
$pages = ceil($pages);
if($mybb->get_input('page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
| $pages = ceil($pages);
if($mybb->get_input('page') == "last") { $page = $pages; }
if($page > $pages || $page <= 0) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
|
$multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");
| $multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");
|
Zeile 2178 | Zeile 2186 |
---|
{ $thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']); $profile_link = $thread['threadusername'];
|
{ $thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']); $profile_link = $thread['threadusername'];
|
} else { $profile_link = $lang->guest; } }
| } else { $profile_link = $lang->guest; } }
|
else
|
else
|
{
| {
|
$thread['username'] = htmlspecialchars_uni($thread['username']); $profile_link = build_profile_link($thread['username'], $thread['uid']);
|
$thread['username'] = htmlspecialchars_uni($thread['username']); $profile_link = build_profile_link($thread['username'], $thread['uid']);
|
}
| }
|
$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage'])); eval("\$forum = \"".$templates->get("modcp_modqueue_link_forum")."\";"); eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
|
$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage'])); eval("\$forum = \"".$templates->get("modcp_modqueue_link_forum")."\";"); eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
|
}
| }
|
if(!$threads && $mybb->input['type'] == "threads") {
| if(!$threads && $mybb->input['type'] == "threads") {
|
Zeile 2205 | Zeile 2213 |
---|
add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=threads");
$plugins->run_hooks("modcp_modqueue_threads_end");
|
add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&type=threads");
$plugins->run_hooks("modcp_modqueue_threads_end");
|
|
|
if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1) { $navsep = " | ";
|
if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1) { $navsep = " | ";
|
eval("\$post_link = \"".$templates->get("modcp_modqueue_post_link")."\";"); }
if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1)) { $navsep = " | "; eval("\$attachment_link = \"".$templates->get("modcp_modqueue_attachment_link")."\";"); }
eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
| eval("\$post_link = \"".$templates->get("modcp_modqueue_post_link")."\";"); }
if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1)) { $navsep = " | "; eval("\$attachment_link = \"".$templates->get("modcp_modqueue_attachment_link")."\";"); }
eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
|
eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";"); output_page($threadqueue); }
| eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";"); output_page($threadqueue); }
|
Zeile 2230 | Zeile 2238 |
---|
if($nummodqueueposts == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_moderate_posts);
|
if($nummodqueueposts == 0 && $mybb->usergroup['issupermod'] != 1) { error($lang->you_cannot_moderate_posts);
|
}
$forum_cache = $cache->read("forums");
| }
$forum_cache = $cache->read("forums");
|
$query = $db->query(" SELECT COUNT(pid) AS unapprovedposts
| $query = $db->query(" SELECT COUNT(pid) AS unapprovedposts
|
Zeile 2253 | Zeile 2261 |
---|
$pages = ceil($pages);
if($mybb->get_input('page') == "last")
|
$pages = ceil($pages);
if($mybb->get_input('page') == "last")
|
{
| {
|
$page = $pages; }
| $page = $pages; }
|
Zeile 2322 | Zeile 2330 |
---|
if(!$posts && $mybb->input['type'] == "posts") { eval("\$posts = \"".$templates->get("modcp_modqueue_posts_empty")."\";");
|
if(!$posts && $mybb->input['type'] == "posts") { eval("\$posts = \"".$templates->get("modcp_modqueue_posts_empty")."\";");
|
}
| }
|
if($posts) { add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts");
|
if($posts) { add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&type=posts");
|
|
|
$plugins->run_hooks("modcp_modqueue_posts_end");
if($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1)
|
$plugins->run_hooks("modcp_modqueue_posts_end");
if($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1)
|
{
| {
|
$navsep = " | "; eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");
|
$navsep = " | "; eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");
|
}
| }
|
if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1)) { $navsep = " | ";
| if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1)) { $navsep = " | ";
|
Zeile 2356 | Zeile 2364 |
---|
}
if($nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
|
}
if($nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
|
{
| {
|
error($lang->you_cannot_moderate_attachments); }
| error($lang->you_cannot_moderate_attachments); }
|
Zeile 2480 | Zeile 2488 |
---|
if($mybb->input['action'] == "do_editprofile") { // Verify incoming POST request
|
if($mybb->input['action'] == "do_editprofile") { // Verify incoming POST request
|
verify_post_check($mybb->input['my_post_key']);
| verify_post_check($mybb->get_input('my_post_key'));
|
if($mybb->usergroup['caneditprofiles'] == 0) {
| if($mybb->usergroup['caneditprofiles'] == 0) {
|
Zeile 2531 | Zeile 2539 |
---|
$returndate = "{$return_day}-{$return_month}-{$return_year}"; } else
|
$returndate = "{$return_day}-{$return_month}-{$return_year}"; } else
|
{
| {
|
$returndate = ""; } $away = array(
| $returndate = ""; } $away = array(
|
Zeile 2561 | Zeile 2569 |
---|
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY), "profile_fields_editable" => true, "website" => $mybb->get_input('website'),
|
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY), "profile_fields_editable" => true, "website" => $mybb->get_input('website'),
|
"icq" => $mybb->get_input('icq'),
| |
"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 2635 | Zeile 2642 |
---|
"update_field" => "suspendposting", "update_length" => "suspensiontime" )
|
"update_field" => "suspendposting", "update_length" => "suspensiontime" )
|
);
| );
|
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)
|
Zeile 2703 | Zeile 2710 |
---|
if(isset($extra_user_updates) && !empty($extra_user_updates['moderateposts']) && !empty($extra_user_updates['suspendposting'])) { $errors[] = $lang->suspendmoderate_error;
|
if(isset($extra_user_updates) && !empty($extra_user_updates['moderateposts']) && !empty($extra_user_updates['suspendposting'])) { $errors[] = $lang->suspendmoderate_error;
|
}
| }
|
if(is_array($errors) && !empty($errors)) {
| if(is_array($errors) && !empty($errors)) {
|
Zeile 2770 | Zeile 2777 |
---|
$user['website'] = ''; }
|
$user['website'] = ''; }
|
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq']; }
if(!$errors)
| if(!$errors)
|
{ $mybb->input = array_merge($user, $mybb->input); $birthday = explode('-', $user['birthday']);
| { $mybb->input = array_merge($user, $mybb->input); $birthday = explode('-', $user['birthday']);
|
Zeile 2795 | Zeile 2797 |
---|
}
// Sanitize all input
|
}
// Sanitize all input
|
foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
| foreach(array('usertitle', 'website', '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)); }
|
Zeile 2814 | Zeile 2816 |
---|
{ if($title['posts'] <= $user['postnum']) {
|
{ if($title['posts'] <= $user['postnum']) {
|
$defaulttitle = $title['title'];
| $defaulttitle = htmlspecialchars_uni($title['title']);
|
break; } }
| break; } }
|
Zeile 2848 | Zeile 2850 |
---|
$bdaymonthsel[$month] = ''; } $bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';
|
$bdaymonthsel[$month] = ''; } $bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';
|
| $awaysection = '';
|
if($mybb->settings['allowaway'] != 0) {
| if($mybb->settings['allowaway'] != 0) {
|
Zeile 2915 | Zeile 2919 |
---|
}
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";");
|
}
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";");
|
}
| }
|
$plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
| $plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
|
Zeile 3263 | Zeile 3267 |
---|
$birthday_year = $mybb->input['birthday_year']; $user_website = $mybb->input['website'];
|
$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'];
| $user_skype = $mybb->input['skype']; $user_google = $mybb->input['google'];
|
Zeile 3388 | Zeile 3391 |
---|
if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid']) {
|
if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid']) {
|
$lastdate = $lang->lastvisit_never;
if($user['lastvisit']) { // We have had at least some active time, hide it instead $lastdate = $lang->lastvisit_hidden; }
| // We have had at least some active time, hide it instead $lastdate = $lang->lastvisit_hidden; } else if($user['lastvisit']) { $lastdate = my_date('relative', $user['lastvisit']);
|
} else {
|
} else {
|
$lastdate = my_date('relative', $user['lastvisit']);
| $lastdate = $lang->lastvisit_never;
|
}
$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);
| }
$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);
|
Zeile 3672 | Zeile 3674 |
---|
// Searching post IP addresses if(isset($mybb->input['search_posts'])) {
|
// Searching post IP addresses if(isset($mybb->input['search_posts'])) {
|
| $post_ip_sql = '';
|
if($ip_range) { if(!is_array($ip_range))
| if($ip_range) { if(!is_array($ip_range))
|
Zeile 3766 | Zeile 3769 |
---|
// Searching user IP addresses if(isset($mybb->input['search_users'])) {
|
// Searching user IP addresses if(isset($mybb->input['search_users'])) {
|
| $user_ip_sql = '';
|
if($ip_range) { if(!is_array($ip_range))
| if($ip_range) { if(!is_array($ip_range))
|
Zeile 3936 | Zeile 3940 |
---|
foreach($ipaddresses as $ipaddress) { $ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress']));
|
foreach($ipaddresses as $ipaddress) { $ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress']));
|
if(!$ipaddress['username'])
| if(empty($ipaddress['username']))
|
{ $ipaddress['username'] = $ipaddress['postusername']; // Guest username support } $ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']); $trow = alt_trow();
|
{ $ipaddress['username'] = $ipaddress['postusername']; // Guest username support } $ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']); $trow = alt_trow();
|
if(!$ipaddress['subject'])
| if(empty($ipaddress['subject']))
|
{ $ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}"; }
| { $ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}"; }
|
Zeile 4029 | Zeile 4033 |
---|
{ $ipaddress_location .= $lang->comma.htmlspecialchars_uni(utf8_encode($ip_record['city'])); }
|
{ $ipaddress_location .= $lang->comma.htmlspecialchars_uni(utf8_encode($ip_record['city'])); }
|
}
| }
|
}
$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));
| }
$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));
|
Zeile 4098 | Zeile 4102 |
---|
$upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=banning");
|
$upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=banning");
|
|
|
$plugins->run_hooks("modcp_banning_start");
$query = $db->query("
| $plugins->run_hooks("modcp_banning_start");
$query = $db->query("
|
Zeile 4122 | Zeile 4126 |
---|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1) { eval("\$edit_link = \"".$templates->get("modcp_banning_edit")."\";");
|
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1) { eval("\$edit_link = \"".$templates->get("modcp_banning_edit")."\";");
|
}
| }
|
$admin_profile = build_profile_link(htmlspecialchars_uni($banned['adminuser']), $banned['admin']);
| $admin_profile = build_profile_link(htmlspecialchars_uni($banned['adminuser']), $banned['admin']);
|
Zeile 4131 | Zeile 4135 |
---|
if($banned['reason']) { $banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
if($banned['reason']) { $banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
} else {
| } else {
|
$banned['reason'] = $lang->na; }
| $banned['reason'] = $lang->na; }
|
Zeile 4202 | Zeile 4206 |
---|
}
$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
|
}
$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
|
$ban = $db->fetch_array($query);
| $ban = $db->fetch_array($query);
|
if(!$ban) {
| if(!$ban) {
|
Zeile 4259 | Zeile 4263 |
---|
"); $user = $db->fetch_array($query);
|
"); $user = $db->fetch_array($query);
|
if($user['uid'])
| if($user)
|
{ $existing_ban = true; }
| { $existing_ban = true; }
|
Zeile 4268 | Zeile 4272 |
---|
if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission();
|
if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission();
|
} }
$errors = array();
| } }
$errors = array();
|
// Creating a new ban if(!$existing_ban) {
| // Creating a new ban if(!$existing_ban) {
|
Zeile 4283 | Zeile 4287 |
---|
$user = get_user_by_username($mybb->input['username'], $options);
|
$user = get_user_by_username($mybb->input['username'], $options);
|
if(!$user['uid'])
| if(!$user)
|
{ $errors[] = $lang->invalid_username; } }
if($user['uid'] == $mybb->user['uid'])
|
{ $errors[] = $lang->invalid_username; } }
if($user['uid'] == $mybb->user['uid'])
|
{
| {
|
$errors[] = $lang->error_cannotbanself; }
| $errors[] = $lang->error_cannotbanself; }
|
Zeile 4298 | Zeile 4302 |
---|
if(!modcp_can_manage_user($user['uid'])) { $errors[] = $lang->error_cannotbanuser;
|
if(!modcp_can_manage_user($user['uid'])) { $errors[] = $lang->error_cannotbanuser;
|
}
| }
|
// Check for an incoming reason if(empty($mybb->input['banreason'])) {
| // Check for an incoming reason if(empty($mybb->input['banreason'])) {
|
Zeile 4308 | Zeile 4312 |
---|
// Check banned group $usergroups_cache = $cache->read('usergroups');
|
// Check banned group $usergroups_cache = $cache->read('usergroups');
|
$usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];
| if(isset($usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)])) { $usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)]; }
|
|
|
if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup']))
| if(!isset($usergroup) || empty($usergroup['isbannedgroup']))
|
{ $errors[] = $lang->error_nobangroup; }
| { $errors[] = $lang->error_nobangroup; }
|