echo $cache_user_contacts_groups[$user_ID]; } } $Results->cols[] = array('th' => T_('Groups'), 'th_class' => 'shrinkwrap', 'td_class' => 'left nowrap', 'td' => '%contacts_groups( #mct_to_user_ID# )%'); $Results->display($display_params); if (count($Results->rows) > 0) { // Display actions buttons global $module_contacts_list_params; modules_call_method('get_contacts_list_params'); $Form = new Form(get_dispctrl_url('contacts'), 'add_group_contacts'); echo '<div class="form_send_contacts">'; $multi_action_icon = get_icon('multi_action', 'imgtag', array('style' => 'margin:0 2px 0 14px;position:relative;top:-5px;')); $Form->button_input(array('type' => 'button', 'value' => $module_contacts_list_params['title_selected'], 'onclick' => 'location.href=\'' . $module_contacts_list_params['recipients_link'] . '\'', 'id' => 'send_selected_recipients', 'input_prefix' => $multi_action_icon)); echo '</div>'; $Form->switch_layout('none'); $Form->switch_template_parts(array('formstart' => '<div class="form_add_contacts">', 'labelstart' => '<span class="label">', 'labelend' => '</span> <span class="controls">', 'formend' => '</div>')); $Form->begin_form(); $Form->add_crumb('messaging_contacts'); $Form->hidden('users', ''); if (isset($module_contacts_list_params['form_hiddens']) && !empty($module_contacts_list_params['form_hiddens'])) { // Append the hidden input elements from module foreach ($module_contacts_list_params['form_hiddens'] as $hidden_input) { $Form->hidden($hidden_input['name'], $hidden_input['value']); } } $Form->combo_box('group', param('group_combo', 'string', ''), get_contacts_groups_options(param('group', 'string', '-1'), false), $multi_action_icon . T_('Add all selected contacts to this group'), array('new_field_size' => '8')); $Form->buttons(array(array('submit', 'actionArray[add_group]', T_('Add'), 'SaveButton btn-primary btn-sm'))); echo '</span>'; if (isset($group_filtered)) { // Contacts list is filtered by group echo '<div id="edit_group_contacts" style="white-space:normal">';
$return_to = param('return_to', 'url', ''); if ($register_user = $Session->get('core.register_user')) { // Get an user data from predefined session (after adding of a comment) $login = preg_replace('/[^a-z0-9 ]/i', '', $register_user['name']); $login = str_replace(' ', '_', $login); $login = substr($login, 0, 20); $email = $register_user['email']; $Session->delete('core.register_user'); } // set secure htsrv url with the same domain as the request has $secure_htsrv_url = get_secure_htsrv_url(); echo str_replace('$form_title$', $params['register_form_title'], $params['skin_form_before']); $Form = new Form($secure_htsrv_url . 'register.php', 'register_form', 'post'); if (!is_null($params['register_form_params'])) { // Use another template param from skin $Form->switch_template_parts($params['register_form_params']); } $Form->add_crumb('regform'); $Form->hidden('inskin', true); if (isset($Blog)) { // for in-skin form $Form->hidden('blog', $Blog->ID); } // disp register form $Form->begin_form($params['form_class_register']); $Plugins->trigger_event('DisplayRegisterFormBefore', array('Form' => &$Form, 'inskin' => true)); $Form->hidden('action', 'register'); $Form->hidden('source', $source); $Form->hidden('redirect_to', $redirect_to); if ($display_invitation == 'input') { // Display an input field to enter invitation code manually or to change incorrect code
// 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 = ''; $form_class = 'bComment'; } $has_full_access = $current_User->check_perm('users', 'edit'); $Form->begin_form($form_class, $form_title); $Form->add_crumb('user');
if (!defined('EVO_MAIN_INIT')) { die('Please, do not access this page directly.'); } global $Blog, $edited_Comment, $comment_Item, $comment_content; global $display_params, $admin_url, $samedomain_htsrv_url, $dummy_fields; $form_action = url_add_param($admin_url, 'ctrl=comments'); // Default params: $disp_params = array_merge(array('disp_edit_categories' => true, 'edit_form_params' => array('formstart' => '<table class="bForums" width="100%" cellspacing="1" cellpadding="2" border="0"><tr><th colspan="2">' . T_('Editing reply') . '</th></tr>', 'formend' => '</table>', 'fieldset_begin' => '<tr class="top"><td colspan="2">', 'fieldset_end' => '</td></tr>', 'fieldstart' => '<tr>', 'fieldend' => '</tr>', 'labelstart' => '<td class="left"><strong>', 'labelend' => '</strong></td>', 'inputstart' => '<td class="row2 left">', 'inputend' => '</td>', 'infostart' => '<td class="row2 left">', 'infoend' => '</td>', 'buttonsstart' => '<tr><td colspan="2">', 'buttonsend' => '</td></tr>', 'output' => true), 'categories_name' => T_('Appears in'), 'category_name' => T_('Forum'), 'category_main_title' => T_('Main forum'), 'category_extra_title' => T_('Additional forum'), 'textarea_lines' => 16, 'form_comment_text' => T_('Comment content')), $display_params); // BREADCRUMBS echo '<div class="post_panel">'; $comment_Item =& $edited_Comment->get_Item(); $main_Chapter =& $comment_Item->get_main_Chapter(); $Skin->display_breadcrumbs($main_Chapter->ID); echo '</div><div class="clear"></div>'; $Form = new Form($form_action, 'comment_edit', 'post'); $Form->switch_template_parts($disp_params['edit_form_params']); $Form->begin_form('inskin', '', $display_params); $Form->add_crumb('comment'); $Form->hidden('blog', $Blog->ID); $Form->hidden('mname', 'collections'); $Form->hidden('action_type', 'comment'); $Form->hidden('comment_ID', $edited_Comment->ID); $Form->hidden('redirect_to', url_add_tail($comment_Item->get_permanent_url(), '#c' . $edited_Comment->ID)); $Form->info(T_('In response to'), $comment_Item->get_title()); if ($edited_Comment->get_author_User()) { $Form->info(T_('Author'), $edited_Comment->get_author()); } else { $Form->text_input('newcomment_author', $edited_Comment->author, 20, T_('Author'), '', array('maxlength' => 100, 'style' => 'width: 99%;')); $Form->text_input('newcomment_author_email', $edited_Comment->author_email, 20, T_('Email'), '', array('maxlength' => 100, 'style' => 'width: 99%;')); $Form->text_input('newcomment_author_url', $edited_Comment->author_url, 20, T_('Website URL'), '', array('maxlength' => 100, 'style' => 'width: 99%;')); }
*/ global $UserSettings; global $pagenow; global $trackback_url; global $bozo_start_modified, $creating; global $edited_Item, $item_tags, $item_title, $item_content; global $post_category, $post_extracats; global $admin_url, $redirect_to, $form_action; // Default params: $params = array_merge(array('disp_edit_categories' => true, 'edit_form_params' => array()), $params); // Determine if we are creating or updating... $creating = is_create_action($action); // Used to mark the required fields (in non-standard template) $required_star = '<span class="label_field_required">*</span>'; $Form = new Form($form_action, 'item_checkchanges', 'post'); $Form->switch_template_parts($params['edit_form_params']); // ================================ START OF EDIT FORM ================================ $form_params = array(); $iframe_name = NULL; if (!empty($bozo_start_modified)) { $form_params['bozo_start_modified'] = true; } $Form->begin_form('inskin', '', $form_params); $Form->add_crumb('item'); $Form->hidden('ctrl', 'items'); $Form->hidden('blog', $Blog->ID); if (isset($edited_Item)) { $copy_post_ID = param('cp', 'integer', 0); if ($copy_post_ID > 0) { // Copy post $Form->hidden('post_ID', 0);
$Form->switch_template_parts($booststrap_install_form_params); $Form->begin_form('form-horizontal'); $Form->hidden('action', 'login'); $Form->text('password', '', 16, T_('Password'), T_('Debug password'), 120, '', 'password'); $Form->end_form(array(array('name' => 'submit', 'value' => T_('Log in'), 'class' => 'btn-primary btn-lg'))); block_close(); break; case 'config_form': /* * ----------------------------------------------------------------------------------- * Form to change the debug config * ----------------------------------------------------------------------------------- */ block_open(T_('Debug config')); $Form = new Form($_SERVER['PHP_SELF']); $Form->switch_template_parts($booststrap_install_form_params); $Form->begin_form('form-horizontal'); $Form->hidden('action', 'update_config'); $Form->hidden('password', $password); $Form->textarea_input('content', $file_overrides_content, 20, T_('Config'), array('cols' => 50, 'note' => 'A few possible settings:<br /><br /> $minimum_comment_interval = 1;<br /> $debug = 1;<br /> $debug_jslog = 1;<br /> $allow_po_extraction = 1;<br /> $test_install_all_features = true;<br /> $db_config[\'debug_dump_rows\'] = 20;<br /> $db_config[\'debug_explain_joins\'] = false;<br /> $display_errors_on_production = false;')); $Form->end_form(array(array('name' => 'submit', 'value' => T_('Save Changes!'), 'class' => 'btn-primary btn-lg'))); block_close(); break;
echo $params['form_title_end']; /* echo '<script type="text/javascript"> /* <![CDATA[ * function validateCommentForm(form) { if( form.'.$dummy_fields['content'].'.value.replace(/^\s+|\s+$/g,"").length == 0 ) { alert("'.TS_('Please do not send empty comments.').'"); return false; } } /* ]]> * </script>';*/ $Form = new Form($samedomain_htsrv_url . 'comment_post.php', 'bComment_form_id_' . $Item->ID, 'post', NULL, 'multipart/form-data'); $Form->switch_template_parts($params['form_params']); $Form->begin_form('', '', array('target' => '_self')); // TODO: dh> a plugin hook would be useful here to add something to the top of the Form. // Actually, the best would be, if the $Form object could be changed by a plugin // before display! $Form->add_crumb('comment'); $Form->hidden('comment_item_ID', $Item->ID); if (!empty($comment_reply_ID)) { $Form->hidden('reply_ID', $comment_reply_ID); // Link to scroll back up to replying comment echo '<a href="' . url_add_param($Item->get_permanent_url(), 'reply_ID=' . $comment_reply_ID . '&redir=no') . '#c' . $comment_reply_ID . '" class="comment_reply_current" rel="' . $comment_reply_ID . '">' . T_('You are currently replying to a specific comment') . '</a>'; } $Form->hidden('redirect_to', $Item->get_feedback_url($disp == 'feedback-popup', '&')); if (check_user_status('is_validated')) { // User is logged in and activated: $Form->info_field(T_('User'), '<strong>' . $current_User->get_identity_link(array('link_text' => 'name')) . '</strong>' . ' ' . get_user_profile_link(' [', ']', T_('Edit profile')));
/** * Display user activate info form content * * @param Object activateinfo Form */ function display_activateinfo($params) { global $current_User, $Settings, $UserSettings, $Plugins; global $secure_htsrv_url, $rsc_path, $rsc_url, $dummy_fields; if (!is_logged_in()) { // if this happens, it means the code is not correct somewhere before this debug_die("You must log in to see this page."); } $params = array_merge(array('use_form_wrapper' => true, 'form_before' => '', 'form_after' => '', 'form_action' => $secure_htsrv_url . 'login.php', 'form_name' => 'form_validatemail', 'form_class' => 'fform', 'form_layout' => 'fieldset', 'form_template' => NULL, 'form_title' => '', 'inskin' => false), $params); // init force request new email address param $force_request = param('force_request', 'boolean', false); // get last activation email timestamp from User Settings $last_activation_email_date = $UserSettings->get('last_activation_email', $current_User->ID); if ($force_request || empty($last_activation_email_date)) { // notification email was not sent yet, or user needs another one ( forced request ) echo $params['use_form_wrapper'] ? $params['form_before'] : ''; $Form = new Form($params['form_action'], $params['form_name'], 'post', $params['form_layout']); if (!empty($params['form_template'])) { // Switch layout to template from array $Form->switch_template_parts($params['form_template']); } $Form->begin_form($params['form_class']); $Form->add_crumb('validateform'); $Form->hidden('action', 'req_validatemail'); $Form->hidden('redirect_to', $params['redirect_to']); if ($params['inskin']) { $Form->hidden('inskin', $params['inskin']); $Form->hidden('blog', $params['blog']); } else { // Form title in standard form echo '<h4>' . $params['form_title'] . '</h4>'; } $Form->hidden('req_validatemail_submit', 1); // to know if the form has been submitted $Form->begin_fieldset(); echo '<ol>'; echo '<li>' . T_('Please confirm your email address below:') . '</li>'; echo '</ol>'; // set email text input content only if this is not a forced request. This way the user may have bigger chance to write a correct email address. $user_email = $force_request ? '' : $current_User->email; // fp> note: 45 is the max length for evopress skin. $Form->text_input($dummy_fields['email'], $user_email, 42, T_('Your email'), '', array('maxlength' => 255, 'class' => 'input_text', 'required' => true, 'input_required' => 'required')); $Form->end_fieldset(); // Submit button: $submit_button = array(array('name' => 'submit', 'value' => T_('Send me a new activation email now!'), 'class' => 'btn-primary btn-lg')); $Form->buttons_input($submit_button); if (!$params['inskin']) { $Plugins->trigger_event('DisplayValidateAccountFormFieldset', array('Form' => &$Form)); } $Form->end_form(); echo $params['use_form_wrapper'] ? $params['form_after'] : ''; return; } // get notification email from general Settings $notification_email = $Settings->get('notification_sender_email'); // convert date to timestamp $last_activation_email_ts = mysql2timestamp($last_activation_email_date); // get difference between local time and server time $time_difference = $Settings->get('time_difference'); // get last activation email local date and time $last_email_date = date(locale_datefmt(), $last_activation_email_ts + $time_difference); $last_email_time = date(locale_shorttimefmt(), $last_activation_email_ts + $time_difference); $user_email = $current_User->email; echo $params['form_before']; if (!$params['inskin']) { echo '<div class="' . $params['form_class'] . '">'; } echo '<ol start="1" class="expanded">'; $instruction = sprintf(T_('Open your email account for %s and find a message we sent you on %s at %s with the following title:'), $user_email, $last_email_date, $last_email_time); echo '<li>' . $instruction . '<br /><b>' . sprintf(T_('Activate your account: %s'), $current_User->login) . '</b>'; $request_validation_url = 'href="' . regenerate_url('', 'force_request=1&validate_required=true&redirect_to=' . $params['redirect_to']) . '"'; echo '<p>' . sprintf(T_('NOTE: If you don\'t find it, check your "Junk", "Spam" or "Unsolicited email" folders. If you really can\'t find it, <a %s>request a new activation email</a>.'), $request_validation_url) . '</p></li>'; echo '<li>' . sprintf(T_('Add us (%s) to your contacts to make sure you receive future email notifications, especially when someone sends you a private message.'), '<b><span class="nowrap">' . $notification_email . '</span></b>') . '</li>'; echo '<li><b class="red">' . T_('Click on the activation link in the email.') . '</b>'; echo '<p>' . T_('If this does not work, please copy/paste that link into the address bar of your browser.') . '</p>'; echo '<p>' . sprintf(T_('If you need assistance, please send an email to %s'), '<b><a href="mailto:"' . $notification_email . '"><span class="nowrap">' . $notification_email . '</span></a></b>') . '</p></li>'; echo '</ol>'; if ((strpos($user_email, '@hotmail.') || strpos($user_email, '@live.') || strpos($user_email, '@msn.')) && file_exists($rsc_path . 'img/login_help/hotmail-validation.png')) { // The user is on hotmail and we have a help screen to show him: (needs to be localized and include correct site name) echo '<div class="center" style="margin: 2em auto"><img src="' . $rsc_url . 'img/login_help/hotmail-validation.png" /></div>'; } elseif ((strpos($user_email, '@gmail.com') || strpos($user_email, '@googlemail.com')) && file_exists($rsc_path . 'img/login_help/gmail-validation.png')) { // The user is on hotmail and we have a help screen to show him: (needs to be localized and include correct site name) echo '<div class="center" style="margin: 2em auto"><img src="' . $rsc_url . 'img/login_help/gmail-validation.png" /></div>'; } if (!$params['inskin']) { echo '</div>'; } echo $params['form_after']; if ($current_User->grp_ID == 1) { // allow admin users to validate themselves by a single click: global $Session, $redirect_to; if (empty($redirect_to)) { // Set where to redirect $redirect_to = regenerate_url(); } echo $params['use_form_wrapper'] ? $params['form_before'] : ''; $Form = new Form($secure_htsrv_url . 'login.php', 'form_validatemail', 'post', 'fieldset'); if (!empty($params['form_template'])) { // Switch layout to template from array $Form->switch_template_parts($params['form_template']); } $Form->begin_form('evo_form__login'); $Form->add_crumb('validateform'); $Form->hidden('action', 'validatemail'); $Form->hidden('redirect_to', url_rel_to_same_host($redirect_to, $secure_htsrv_url)); $Form->hidden('reqID', 1); $Form->hidden('sessID', $Session->ID); echo '<p>' . sprintf(T_('Since you are an admin user, you can activate your account (%s) by a single click.'), $current_User->email) . '</p>'; // TODO: the form submit value is too wide (in Konqueror and most probably in IE!) $Form->end_form(array(array('name' => 'form_validatemail_admin_submit', 'value' => T_('Activate my account!'), 'class' => 'ActionButton btn btn-primary'))); // display hidden fields etc echo $params['use_form_wrapper'] ? $params['form_after'] : ''; } echo '<div class="evo_form__login_links floatright">'; user_logout_link(); echo '</div>'; }