/** * @var instance of User class */ global $current_User; global $Session; // Default params: $default_params = array('skin_form_params' => array()); if (isset($params)) { // Merge with default params $params = array_merge($default_params, $params); } else { // Use a default params $params = $default_params; } // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('block_start' => '<table class="prevnext_user"><tr>', 'prev_start' => '<td width="33%">', 'prev_end' => '</td>', 'prev_no_user' => '<td width="33%"> </td>', 'back_start' => '<td width="33%" class="back_users_list">', 'back_end' => '</td>', 'next_start' => '<td width="33%" class="right">', 'next_end' => '</td>', 'next_no_user' => '<td width="33%"> </td>', 'block_end' => '</tr></table>', 'user_tab' => 'pwdchange')); // ------------- END OF PREV/NEXT USER LINKS ------------------- // check if reqID exists. If exists it means that this form is displayed because a password change request by email. $reqID = param('reqID', 'string', ''); $Form = new Form($form_action, 'user_checkchanges'); $Form->switch_template_parts($params['skin_form_params']); if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $is_admin = is_admin_page(); if ($is_admin) { $form_title = get_usertab_header($edited_User, 'pwdchange', T_('Change password')); $form_class = 'fform'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; } else { $form_title = '';
global $action; /** * @var user permission, if user is only allowed to edit his profile */ global $user_profile_only; /** * @var the action destination of the form (NULL for pagenow) */ global $form_action; /** * @var instance of User class */ global $current_User; if ($display_mode != 'js') { // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'report')); // ------------- END OF PREV/NEXT USER LINKS ------------------- } $Form = new Form($form_action, 'user_checkchanges'); $form_title = ''; $form_class = 'fform user_report_form'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; if ($display_mode != 'js') { if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $form_text_title = T_('Report User'); // used for js confirmation message on leave the changed form $form_title = get_usertab_header($edited_User, '', $form_text_title); } $Form->begin_form($form_class, $form_title, array('title' => isset($form_text_title) ? $form_text_title : $form_title));
/** * @var the action destination of the form (NULL for pagenow) */ global $form_action; /** * @var instance of User class */ global $current_User; /** * @var File that should be cropped */ global $cropped_File; global $image_width, $image_height; if ($display_mode != 'js') { // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'avatar')); // ------------- END OF PREV/NEXT USER LINKS ------------------- } $Form = new Form($form_action, 'user_checkchanges'); if (is_admin_page()) { $form_class = 'fform'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; $ctrl_param = '?ctrl=user&user_tab=avatar&user_ID=' . $edited_User->ID; $form_title = ''; $form_class = 'fform'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; } else { global $Blog; $form_title = ''; $form_class = 'bComment'; $ctrl_param = url_add_param($Blog->gen_blogurl(), 'disp=' . $disp);
*/ global $Blog; /** * @var GeneralSettings */ global $Settings; /** * @var Current User */ global $current_User; // init is logged in status $is_logged_in = is_logged_in(); // Default params: $params = array_merge(array('profile_avatar_before' => '', 'profile_avatar_after' => '', 'avatar_image_size' => 'crop-top-320x320', 'avatar_image_size_if_anonymous' => 'crop-top-320x320-blur-8', 'avatar_overlay_text_if_anonymous' => '#default#', 'edit_my_profile_link_text' => T_('Edit my profile'), 'edit_user_admin_link_text' => T_('Edit in Back-Office'), 'skin_form_params' => array()), $params); // ------------------- PREV/NEXT USER LINKS (SINGLE USER MODE) ------------------- user_prevnext_links(); // ------------------------- END OF PREV/NEXT USER LINKS ------------------------- // ---- START OF PROFILE CONTENT ---- // echo '<div class="profile_content">'; $user_ID = param('user_ID', 'integer', ''); if (empty($user_ID)) { // Grab the current User $user_ID = $current_User->ID; } $UserCache =& get_UserCache(); /** * @var User */ $User =& $UserCache->get_by_ID($user_ID); $profileForm = new Form(NULL, '', 'post', NULL, '', 'div'); $profileForm->switch_template_parts($params['skin_form_params']);
*/ global $current_User; global $Session; // check if reqID exists. If exists it means that this form is displayed because a password change request by email. $reqID = param('reqID', 'string', ''); // Default params: $default_params = array('skin_form_params' => array(), 'form_class_user_pass' => 'bComment', 'display_abandon_link' => true, 'button_class' => '', 'form_button_action' => 'update', 'form_hidden_crumb' => 'user', 'form_hidden_reqID' => $reqID); if (isset($params)) { // Merge with default params $params = array_merge($default_params, $params); } else { // Use a default params $params = $default_params; } // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'pwdchange')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $Form = new Form($form_action, 'user_checkchanges'); $Form->switch_template_parts($params['skin_form_params']); if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $is_admin = is_admin_page(); if ($is_admin) { $form_text_title = T_('Change password') . get_manual_link('user-password-tab'); // used for js confirmation message on leave the changed form $form_title = get_usertab_header($edited_User, 'pwdchange', $form_text_title); $form_class = 'fform'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; } else { $form_title = '';
* @var DB */ global $DB; global $unread_messsage_reminder_threshold, $unread_message_reminder_delay; global $activate_account_reminder_threshold, $comment_moderation_reminder_threshold, $post_moderation_reminder_threshold; // Default params: $default_params = array('skin_form_params' => array(), 'form_class_user_subs' => 'bComment'); if (isset($params)) { // Merge with default params $params = array_merge($default_params, $params); } else { // Use a default params $params = $default_params; } // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'subs')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $Form = new Form($form_action, 'user_checkchanges'); $Form->switch_template_parts($params['skin_form_params']); if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $is_admin_page = is_admin_page(); if ($is_admin_page) { $form_text_title = T_('Edit notifications') . get_manual_link('user-notifications-tab'); // used for js confirmation message on leave the changed form $form_title = get_usertab_header($edited_User, 'subs', $form_text_title); $form_class = 'fform'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; $checklist_params = array(); } else {
if( val != jQuery( '[name |= current_admin_skin]' ).val() ) { // popup selected value is different then current admin skin => hide skin settings jQuery( '#admin_skin_settings_div' ).hide(); } else { // popup selected value is the same as the current admin skin => show skin settings jQuery( '#admin_skin_settings_div' ).show(); } } </script> <?php // Begin payload block: $this->disp_payload_begin(); // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'advanced')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $Form = new Form(NULL, 'user_checkchanges'); $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $form_text_title = T_('Edit advanced preferences'); // used for js confirmation message on leave the changed form $form_title = get_usertab_header($edited_User, 'advanced', T_('Edit advanced preferences') . get_manual_link('user-advanced-tab')); $Form->begin_form('fform', $form_title, array('title' => isset($form_text_title) ? $form_text_title : $form_title)); $Form->add_crumb('user'); $Form->hidden_ctrl(); $Form->hidden('user_tab', 'advanced'); $Form->hidden('advanced_form', '1'); $Form->hidden('user_ID', $edited_User->ID);
/** * @var url of RSC folder */ global $rsc_url; global $is_admin_page; // Default params: $default_params = array('skin_form_params' => array(), 'form_class_user_identity' => 'bComment'); if (isset($params)) { // Merge with default params $params = array_merge($default_params, $params); } else { // Use a default params $params = $default_params; } // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'profile')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $has_full_access = $current_User->check_perm('users', 'edit'); $edited_user_perms = array('edited-user', 'edited-user-required'); $new_user_creating = $edited_User->ID == 0; $Form = new Form($form_action, 'user_checkchanges'); $Form->switch_template_parts($params['skin_form_params']); if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $is_admin = is_admin_page(); if ($is_admin) { if ($new_user_creating) { $form_title = T_('Edit user profile'); } else { $form_text_title = T_('Edit profile') . get_manual_link('user-profile-tab');
global $AdminUI; /** * @var the action destination of the form (NULL for pagenow) */ global $form_action; // Default params: $default_params = array('skin_form_params' => array(), 'form_class_user_pref' => 'bComment'); if (isset($params)) { // Merge with default params $params = array_merge($default_params, $params); } else { // Use a default params $params = $default_params; } // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'userprefs')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $Form = new Form($form_action, 'user_checkchanges'); $Form->switch_template_parts($params['skin_form_params']); if (!$user_profile_only) { echo_user_actions($Form, $edited_User, $action); } $is_admin = is_admin_page(); if ($is_admin) { $form_text_title = T_('Edit preferences') . get_manual_link('user-preferences-tab'); // used for js confirmation message on leave the changed form $form_title = get_usertab_header($edited_User, 'userprefs', $form_text_title); $form_class = 'fform'; $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; } else { $form_title = '';
$SQL->SELECT('SQL_NO_CACHE sess_ID, user_login, TIMESTAMPDIFF( SECOND, sess_start_ts, sess_lastseen_ts ) as sess_length, sess_lastseen_ts, sess_ipaddress'); $SQL->FROM('T_sessions LEFT JOIN T_users ON sess_user_ID = user_ID'); $Count_SQL = new SQL(); $Count_SQL->SELECT('SQL_NO_CACHE COUNT(sess_ID)'); $Count_SQL->FROM('T_sessions LEFT JOIN T_users ON sess_user_ID = user_ID'); if (empty($user_ID)) { // display only this user sessions in user tab $user_ID = $edited_User->ID; } $SQL->WHERE('user_ID = ' . $user_ID); $Count_SQL->WHERE('user_ID = ' . $user_ID); memorize_param('user_tab', 'string', '', $user_tab); // Begin payload block: $this->disp_payload_begin(); // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'sessions')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $Results = new Results($SQL->get(), 'sess_', 'D', $UserSettings->get('results_per_page'), $Count_SQL->get()); // echo user edit action icons echo_user_actions($Results, $edited_User, 'edit'); echo '<span class="floatright">' . $Results->gen_global_icons() . '</span>'; $Results->global_icons = array(); // echo user tabs echo '<div>' . get_usertab_header($edited_User, $user_tab, T_('Sessions') . get_manual_link('user-sessions-tab')) . '</div>'; $Results->title = T_('Recent sessions') . get_manual_link('user-sessions-tab'); /** * Callback to add filters on top of the result set * * @param Form */ $Results->cols[] = array('th' => T_('ID'), 'order' => 'sess_ID', 'default_dir' => 'D', 'td_class' => 'right', 'td' => '<a href="?ctrl=stats&tab=hits&blog=0&sess_ID=$sess_ID$">$sess_ID$</a>');
*/ global $action; /** * @var user permission, if user is only allowed to edit his profile */ global $user_profile_only; global $user_tab, $user_ID; global $current_User, $UserSettings; if (!$current_User->can_moderate_user($edited_User->ID)) { // Check permission: debug_die(T_('You have no permission to see this tab!')); } memorize_param('user_tab', 'string', '', $user_tab); memorize_param('user_ID', 'integer', 0, $user_ID); // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'activity')); // ------------- END OF PREV/NEXT USER LINKS ------------------- if (!$user_profile_only) { // echo user edit action icons $Widget = new Widget(); echo_user_actions($Widget, $edited_User, 'edit'); echo '<span class="floatright">' . $Widget->gen_global_icons() . '</span>'; } echo '<div>' . get_usertab_header($edited_User, $user_tab, ($current_User->ID == $edited_User->ID ? T_('My Activity') : T_('User Activity')) . get_manual_link('user-activity-tab')) . '</div>'; // Display IP address from where this user was created echo '<div style="margin-top:25px;font-weight:bold;"><span>' . T_('User created from IP') . ': ' . int2ip($UserSettings->get('created_fromIPv4', $edited_User->ID)) . '</span></div>'; /**** Reports from edited user ****/ user_reports_results_block(array('edited_User' => $edited_User)); evo_flush(); /**** Blogs owned by the user ****/ blogs_user_results_block(array('edited_User' => $edited_User));
die('Please, do not access this page directly.'); } /** * @var instance of User class */ global $edited_User, $UserSettings, $Settings, $Plugins; global $current_User; global $servertimenow, $admin_url; if (!$current_User->can_moderate_user($edited_User->ID)) { // Check permission: debug_die(T_('You have no permission to see this tab!')); } // Begin payload block: $this->disp_payload_begin(); // ------------------- PREV/NEXT USER LINKS ------------------- user_prevnext_links(array('user_tab' => 'admin')); // ------------- END OF PREV/NEXT USER LINKS ------------------- $user_status_icons = get_user_status_icons(); $Form = new Form(NULL, 'user_checkchanges'); $Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n"; echo_user_actions($Form, $edited_User, 'edit'); $form_text_title = T_('User admin settings'); // used for js confirmation message on leave the changed form $form_title = get_usertab_header($edited_User, 'admin', T_('User admin settings') . get_manual_link('user-admin-tab')); $Form->begin_form('fform', $form_title, array('title' => isset($form_text_title) ? $form_text_title : $form_title)); $Form->add_crumb('user'); $Form->hidden_ctrl(); $Form->hidden('user_tab', 'admin'); $Form->hidden('admin_form', '1'); $Form->hidden('user_ID', $edited_User->ID); $Form->hidden('edited_user_login', $edited_User->login);