Zeile 2587 | Zeile 2587 |
---|
"profile_fields_editable" => true, "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'),
|
"profile_fields_editable" => true, "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'),
|
"yahoo" => $mybb->get_input('yahoo'),
| |
"skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
| "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
|
Zeile 2689 | Zeile 2688 |
---|
$string = $option['action']."_error"; $errors[] = $lang->$string; }
|
$string = $option['action']."_error"; $errors[] = $lang->$string; }
|
if(!is_array($errors))
| else
|
{ $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
| { $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
|
Zeile 2732 | Zeile 2730 |
---|
$errors[] = $lang->suspendmoderate_error; }
|
$errors[] = $lang->suspendmoderate_error; }
|
if(is_array($errors))
| if(is_array($errors) && !empty($errors))
|
{ $mybb->input['action'] = "editprofile"; }
| { $mybb->input['action'] = "editprofile"; }
|
Zeile 2743 | Zeile 2741 |
---|
// Continue with the update if there is no errors $user_info = $userhandler->update_user(); if(!empty($extra_user_updates))
|
// Continue with the update if there is no errors $user_info = $userhandler->update_user(); if(!empty($extra_user_updates))
|
{
| {
|
$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'"); } log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
| $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'"); } log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
|
Zeile 2795 | Zeile 2793 |
---|
if(!my_validate_url($user['website'])) { $user['website'] = '';
|
if(!my_validate_url($user['website'])) { $user['website'] = '';
|
}
| }
|
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq'];
|
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq'];
|
}
| }
|
if(!$errors)
|
if(!$errors)
|
{
| {
|
$mybb->input = array_merge($user, $mybb->input); $birthday = explode('-', $user['birthday']); if(!isset($birthday[1])) { $birthday[1] = '';
|
$mybb->input = array_merge($user, $mybb->input); $birthday = explode('-', $user['birthday']); if(!isset($birthday[1])) { $birthday[1] = '';
|
}
| }
|
if(!isset($birthday[2])) { $birthday[2] = '';
| if(!isset($birthday[2])) { $birthday[2] = '';
|
Zeile 2822 | Zeile 2820 |
---|
}
// Sanitize all input
|
}
// Sanitize all input
|
foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field) {
| foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field) {
|
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field)); }
| $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field)); }
|
Zeile 2850 | Zeile 2848 |
---|
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
if(empty($user['usertitle']))
|
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
if(empty($user['usertitle']))
|
{
| {
|
$lang->current_custom_usertitle = ''; }
| $lang->current_custom_usertitle = ''; }
|
Zeile 2903 | Zeile 2901 |
---|
$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']); $awaycheck[1] = "checked=\"checked\""; $awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);
|
$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']); $awaycheck[1] = "checked=\"checked\""; $awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);
|
} else {
| } else {
|
$awaynotice = $lang->away_notice; $awaycheck[0] = "checked=\"checked\""; }
| $awaynotice = $lang->away_notice; $awaycheck[0] = "checked=\"checked\""; }
|
Zeile 2922 | Zeile 2920 |
---|
{ $selected = ''; }
|
{ $selected = ''; }
|
|
|
eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";"); }
| eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";"); }
|
Zeile 2932 | Zeile 2930 |
---|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1]))
|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1]))
|
{
| {
|
$returndatemonthsel[$returndate[1]] = " selected=\"selected\""; }
| $returndatemonthsel[$returndate[1]] = " selected=\"selected\""; }
|
Zeile 2977 | Zeile 2975 |
---|
if(isset($mybb->input['profile_fields'][$field])) { $userfield = $mybb->input['profile_fields'][$field];
|
if(isset($mybb->input['profile_fields'][$field])) { $userfield = $mybb->input['profile_fields'][$field];
|
} } else { $userfield = $user_fields[$field]; } if($type == "multiselect") { if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { 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);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
| } } else { $userfield = $user_fields[$field]; } if($type == "multiselect") { if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { 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);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
| eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
|
Zeile 3093 | Zeile 3091 |
---|
{ $checked = " checked=\"checked\""; }
|
{ $checked = " checked=\"checked\""; }
|
|
|
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";"); }
|
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";"); }
|
}
| }
|
} elseif($type == "textarea")
|
} elseif($type == "textarea")
|
{
| {
|
$value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
|
$value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
|
}
| }
|
else { $value = htmlspecialchars_uni($userfield);
| else { $value = htmlspecialchars_uni($userfield);
|
Zeile 3111 | Zeile 3109 |
---|
{ $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; }
|
{ $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; }
|
|
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";"); }
if($profilefield['required'] == 1) { eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";"); }
if($profilefield['required'] == 1) { eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
|
} else
| } else
|
{ eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";"); }
| { eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";"); }
|
Zeile 3289 | Zeile 3287 |
---|
$user_icq = $mybb->input['icq']; $user_skype = $mybb->input['skype']; $user_google = $mybb->input['google'];
|
$user_icq = $mybb->input['icq']; $user_skype = $mybb->input['skype']; $user_google = $mybb->input['google'];
|
$user_yahoo = $mybb->input['yahoo'];
| |
$plugins->run_hooks("modcp_editprofile_end");
| $plugins->run_hooks("modcp_editprofile_end");
|
Zeile 3548 | Zeile 3545 |
---|
{ $order = "desc"; $ordersel['desc'] = ' selected="selected"';
|
{ $order = "desc"; $ordersel['desc'] = ' selected="selected"';
|
}
| }
|
else { $ordersel['asc'] = ' selected="selected"';
|
else { $ordersel['asc'] = ' selected="selected"';
|
}
| }
|
$plugins->run_hooks("modcp_warninglogs_start");
| $plugins->run_hooks("modcp_warninglogs_start");
|
Zeile 3574 | Zeile 3571 |
---|
} $per_page = 20; if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
|
} $per_page = 20; if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
|
{
| {
|
$per_page = (int)$mybb->input['filter']['per_page']; } $start = ($page-1) * $per_page;
| $per_page = (int)$mybb->input['filter']['per_page']; } $start = ($page-1) * $per_page;
|
Zeile 3628 | Zeile 3625 |
---|
$issued_date = my_date('normal', $row['dateline']); $revoked_text = ''; if($row['daterevoked'] > 0)
|
$issued_date = my_date('normal', $row['dateline']); $revoked_text = ''; if($row['daterevoked'] > 0)
|
{
| {
|
$revoked_date = my_date('relative', $row['daterevoked']); eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";"); }
| $revoked_date = my_date('relative', $row['daterevoked']); eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";"); }
|
Zeile 3708 | Zeile 3705 |
---|
}
$plugins->run_hooks("modcp_ipsearch_posts_start");
|
}
$plugins->run_hooks("modcp_ipsearch_posts_start");
|
|
|
if($post_ip_sql) { $where_sql = '';
$unviewable_forums = get_unviewable_forums(true);
|
if($post_ip_sql) { $where_sql = '';
$unviewable_forums = get_unviewable_forums(true);
|
|
|
if($unviewable_forums) { $where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";
| if($unviewable_forums) { $where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";
|
Zeile 3723 | Zeile 3720 |
---|
if($inactiveforums) { $where_sql .= " AND p.fid NOT IN ({$inactiveforums})";
|
if($inactiveforums) { $where_sql .= " AND p.fid NOT IN ({$inactiveforums})";
|
}
| }
|
// Check group permissions if we can't view threads not started by us $onlyusfids = array();
| // Check group permissions if we can't view threads not started by us $onlyusfids = array();
|
Zeile 3733 | Zeile 3730 |
---|
if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1) { $onlyusfids[] = $fid;
|
if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1) { $onlyusfids[] = $fid;
|
} }
| } }
|
if(!empty($onlyusfids)) { $where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";
| if(!empty($onlyusfids)) { $where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";
|
Zeile 3762 | Zeile 3759 |
---|
}
if(!empty($unapprove_forums))
|
}
if(!empty($unapprove_forums))
|
{
| {
|
$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))"; } if(!empty($deleted_forums)) { $visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))"; }
|
$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))"; } if(!empty($deleted_forums)) { $visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))"; }
|
}
| }
|
else { // Super moderators (and admins) $visible_sql = " AND p.visible >= -1"; }
|
else { // Super moderators (and admins) $visible_sql = " AND p.visible >= -1"; }
|
|
|
$query = $db->query(" SELECT COUNT(p.pid) AS count FROM ".TABLE_PREFIX."posts p
| $query = $db->query(" SELECT COUNT(p.pid) AS count FROM ".TABLE_PREFIX."posts p
|
Zeile 3788 | Zeile 3785 |
---|
// Searching user IP addresses if(isset($mybb->input['search_users']))
|
// Searching user IP addresses if(isset($mybb->input['search_users']))
|
{
| {
|
if($ip_range) { if(!is_array($ip_range))
| if($ip_range) { if(!is_array($ip_range))
|
Zeile 3840 | Zeile 3837 |
---|
}
if($page > $pages || $page <= 0)
|
}
if($page > $pages || $page <= 0)
|
{ $page = 1; }
| { $page = 1; }
|
if($page) {
| if($page) {
|
Zeile 3895 | Zeile 3892 |
---|
{ eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";"); $ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
|
{ eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";"); $ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
|
}
| }
|
elseif($ipaddress['lastip'] == $ip_range) { eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
| elseif($ipaddress['lastip'] == $ip_range) { eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
|
Zeile 3976 | Zeile 3973 |
---|
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_post")."\";"); eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
|
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_post")."\";"); eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
|
}
| }
|
} }
| } }
|
Zeile 4245 | Zeile 4242 |
---|
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
'additionalgroups' => $ban['oldadditionalgroups'],
| 'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),
|
'displaygroup' => $ban['olddisplaygroup'] ); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
'displaygroup' => $ban['olddisplaygroup'] ); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
$cache->update_banned();
| |
$cache->update_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
| $cache->update_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
Zeile 4388 | Zeile 4384 |
---|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int)$user['usergroup'],
|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int)$user['usergroup'],
|
'oldadditionalgroups' => (string)$user['additionalgroups'],
| 'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),
|
'olddisplaygroup' => (int)$user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
| 'olddisplaygroup' => (int)$user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
|
Zeile 4407 | Zeile 4403 |
---|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$user['uid']}");
|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$user['uid']}");
|
$cache->update_banned();
| |
// Log edit or add ban if($existing_ban)
| // Log edit or add ban if($existing_ban)
|