Zeile 2617 | Zeile 2617 |
---|
// Set the data of the user in the datahandler. $userhandler->set_data($updated_user);
|
// Set the data of the user in the datahandler. $userhandler->set_data($updated_user);
|
$errors = '';
| $errors = array();
|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
| // Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
Zeile 2780 | Zeile 2780 |
---|
// Set display group $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
|
// Set display group $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
|
| if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
|
$display_group = usergroup_displaygroup($user['displaygroup']); if(is_array($display_group)) {
| $display_group = usergroup_displaygroup($user['displaygroup']); if(is_array($display_group)) {
|
Zeile 2837 | Zeile 2843 |
---|
{ $defaulttitle = $title['title']; break;
|
{ $defaulttitle = $title['title']; break;
|
}
| }
|
} }
| } }
|
Zeile 2861 | Zeile 2867 |
---|
}
eval("\$bdaydaysel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
eval("\$bdaydaysel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
| }
|
$bdaymonthsel = array(); foreach(range(1, 12) as $month)
| $bdaymonthsel = array(); foreach(range(1, 12) as $month)
|
Zeile 2874 | Zeile 2880 |
---|
{ $awaycheck = array('', ''); if($errors)
|
{ $awaycheck = array('', ''); if($errors)
|
{ if($user['away'] == 1) { $awaycheck[1] = "checked=\"checked\""; }
| { if($user['away'] == 1) { $awaycheck[1] = "checked=\"checked\""; }
|
else { $awaycheck[0] = "checked=\"checked\"";
| else { $awaycheck[0] = "checked=\"checked\"";
|
Zeile 2915 | Zeile 2921 |
---|
else { $selected = '';
|
else { $selected = '';
|
}
| }
|
eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
|
eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
| }
|
$returndatemonthsel = array(); foreach(range(1, 12) as $month)
|
$returndatemonthsel = array(); foreach(range(1, 12) as $month)
|
{
| {
|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
}
| }
|
if(!isset($returndate[2])) {
| if(!isset($returndate[2])) {
|
Zeile 2976 | Zeile 2982 |
---|
else { $userfield = $user_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($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\"";
| if(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = " selected=\"selected\"";
|
Zeile 3075 | Zeile 3081 |
---|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
} }
| } }
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 3137 | Zeile 3143 |
---|
{ $checked = 1; $checked_item = "checked=\"checked\"";
|
{ $checked = 1; $checked_item = "checked=\"checked\"";
|
} else {
| } else {
|
$checked = 0; $checked_item = '';
|
$checked = 0; $checked_item = '';
|
}
| }
|
// Do we mark the moderate posts box? if($user['moderateposts'] || ($mybb->get_input('moderateposting', MyBB::INPUT_INT) && !empty($errors))) { $modpost_check = 1; $modpost_checked = "checked=\"checked\"";
|
// Do we mark the moderate posts box? if($user['moderateposts'] || ($mybb->get_input('moderateposting', MyBB::INPUT_INT) && !empty($errors))) { $modpost_check = 1; $modpost_checked = "checked=\"checked\"";
|
} else {
| } else {
|
$modpost_check = 0; $modpost_checked = ''; }
| $modpost_check = 0; $modpost_checked = ''; }
|
Zeile 3175 | Zeile 3181 |
---|
"time" => "action_time", // The time we've entered "length" => "suspendsigtime", // The length of suspension field in the database "select_option" => "action" // The name of the select box of this option
|
"time" => "action_time", // The time we've entered "length" => "suspendsigtime", // The length of suspension field in the database "select_option" => "action" // The name of the select box of this option
|
),
| ),
|
2 => array( "action" => "moderateposting", "option" => "moderateposts",
| 2 => array( "action" => "moderateposting", "option" => "moderateposts",
|
Zeile 3250 | Zeile 3256 |
---|
{ $selected = ''; }
|
{ $selected = ''; }
|
|
|
eval("\$selection_options .= \"".$templates->get("modcp_editprofile_select_option")."\";"); }
| eval("\$selection_options .= \"".$templates->get("modcp_editprofile_select_option")."\";"); }
|
Zeile 3262 | Zeile 3268 |
---|
break; case "moderateposts": eval("\$modpost_options = \"".$templates->get("modcp_editprofile_select")."\";");
|
break; case "moderateposts": eval("\$modpost_options = \"".$templates->get("modcp_editprofile_select")."\";");
|
break;
| break;
|
case "suspendposting": eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";"); break; } }
|
case "suspendposting": eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";"); break; } }
|
eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");
| eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");
|
$user['usernotes'] = htmlspecialchars_uni($user['usernotes']);
if(!isset($newtitle))
|
$user['usernotes'] = htmlspecialchars_uni($user['usernotes']);
if(!isset($newtitle))
|
{
| {
|
$newtitle = ''; }
| $newtitle = ''; }
|
Zeile 3296 | Zeile 3302 |
---|
if($mybb->usergroup['caneditprofiles'] == 0) { error_no_permission();
|
if($mybb->usergroup['caneditprofiles'] == 0) { error_no_permission();
|
}
| }
|
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
| add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
|
Zeile 3320 | Zeile 3326 |
---|
break; } $where = " AND {$field} LIKE '%".my_strtolower($db->escape_string_like($mybb->get_input('username')))."%'";
|
break; } $where = " AND {$field} LIKE '%".my_strtolower($db->escape_string_like($mybb->get_input('username')))."%'";
|
}
| }
|
// Sort order & direction switch($mybb->get_input('sortby')) {
| // Sort order & direction switch($mybb->get_input('sortby')) {
|
Zeile 3369 | Zeile 3375 |
---|
$page = 1; } if($page)
|
$page = 1; } if($page)
|
{ $start = ($page-1) * $perpage; } else {
| { $start = ($page-1) * $perpage; } else {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 3384 | Zeile 3390 |
---|
if(!empty($mybb->input[$field])) { $page_url .= "&{$field}=".$mybb->input[$field];
|
if(!empty($mybb->input[$field])) { $page_url .= "&{$field}=".$mybb->input[$field];
|
} }
| } }
|
$multipage = multipage($user_count, $perpage, $page, $page_url);
$usergroups_cache = $cache->read("usergroups");
| $multipage = multipage($user_count, $perpage, $page, $page_url);
$usergroups_cache = $cache->read("usergroups");
|
Zeile 3431 | Zeile 3437 |
---|
$plugins->run_hooks("modcp_finduser_end");
|
$plugins->run_hooks("modcp_finduser_end");
|
$username = $mybb->get_input('username');
| $username = htmlspecialchars_uni($mybb->get_input('username'));
|
eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
| eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
|
Zeile 3473 | Zeile 3479 |
---|
else { $mybb->input['filter']['uid'] = '';
|
else { $mybb->input['filter']['uid'] = '';
|
}
| }
|
if(!empty($mybb->input['filter']['mod_username']))
|
if(!empty($mybb->input['filter']['mod_username']))
|
{
| {
|
$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);
$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid']; $mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);
|
$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);
$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid']; $mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);
|
}
| }
|
else { $mybb->input['filter']['mod_username'] = ''; } if(!empty($mybb->input['filter']['mod_uid']))
|
else { $mybb->input['filter']['mod_username'] = ''; } if(!empty($mybb->input['filter']['mod_uid']))
|
{
| {
|
$search['mod_uid'] = (int)$mybb->input['filter']['mod_uid']; $where_sql .= " AND w.issuedby='{$search['mod_uid']}'"; if(!isset($mybb->input['search']['mod_username']))
| $search['mod_uid'] = (int)$mybb->input['filter']['mod_uid']; $where_sql .= " AND w.issuedby='{$search['mod_uid']}'"; if(!isset($mybb->input['search']['mod_username']))
|
Zeile 3498 | Zeile 3504 |
---|
else { $mybb->input['filter']['mod_uid'] = '';
|
else { $mybb->input['filter']['mod_uid'] = '';
|
}
| }
|
if(!empty($mybb->input['filter']['reason'])) { $search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
| if(!empty($mybb->input['filter']['reason'])) { $search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
|
Zeile 3535 | Zeile 3541 |
---|
if(!isset($mybb->input['filter']['order'])) { $mybb->input['filter']['order'] = '';
|
if(!isset($mybb->input['filter']['order'])) { $mybb->input['filter']['order'] = '';
|
}
| }
|
$order = $mybb->input['filter']['order']; $ordersel = array('asc' => '', 'desc' => ''); if($order != "asc")
|
$order = $mybb->input['filter']['order']; $ordersel = array('asc' => '', 'desc' => ''); if($order != "asc")
|
{
| {
|
$order = "desc"; $ordersel['desc'] = ' selected="selected"'; } else { $ordersel['asc'] = ' selected="selected"';
|
$order = "desc"; $ordersel['desc'] = ' selected="selected"'; } else { $ordersel['asc'] = ' selected="selected"';
|
}
| }
|
$plugins->run_hooks("modcp_warninglogs_start");
// Pagination stuff
| $plugins->run_hooks("modcp_warninglogs_start");
// Pagination stuff
|
Zeile 3572 | Zeile 3578 |
---|
$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;
|
| $pages = ceil($total_warnings / $per_page); if($page > $pages) { $start = 0; $page = 1; }
|
// Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter']))
| // Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter']))
|