/** * 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."); } // 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 ) $params = array_merge(array('form_action' => $secure_htsrv_url . 'login.php', 'form_name' => 'form_validatemail', 'form_class' => 'fform', 'form_layout' => 'fieldset', 'inskin' => false), $params); $Form = new Form($params['form_action'], $params['form_name'], 'post', $params['form_layout']); $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']); } $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, 45, T_('Your email'), '', array('maxlength' => 255, 'class' => 'input_text', 'required' => true)); $Form->end_fieldset(); // Submit button: $submit_button = array(array('name' => 'submit', 'value' => T_('Send me a new activation email now!'), 'class' => 'submit')); $Form->buttons_input($submit_button); if (!$params['inskin']) { $Plugins->trigger_event('DisplayValidateAccountFormFieldset', array('Form' => &$Form)); } $Form->end_form(); 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 '<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>'; } }
} $registration_require_gender = $Settings->get('registration_require_gender'); if ($registration_require_gender != 'hidden') { // Display a gender field if it is not hidden $Form->radio_input('gender', $gender, array(array('value' => 'M', 'label' => T_('A man')), array('value' => 'F', 'label' => T_('A woman'))), T_('I am'), array('required' => $registration_require_gender == 'required')); } if ($Settings->get('registration_ask_locale')) { // ask user language $locale = 'en_US'; $Form->select('locale', $locale, 'locale_options_return', T_('Locale'), T_('Preferred language')); } // Plugin fields $Plugins->trigger_event('DisplayRegisterFormFieldset', array('Form' => &$Form, 'inskin' => true, 'use_placeholders' => $params['register_use_placeholders'])); // Submit button: $submit_button = array(array('name' => 'register', 'value' => T_('Register my account now!'), 'class' => 'search btn-primary btn-lg')); $Form->buttons_input($submit_button); $Form->end_form(); echo $params['skin_form_after']; echo '<div class="evo_form__login_links"' . $params['register_links_attrs'] . '>'; echo '<a href="' . get_login_url($source, $redirect_to) . '">« ' . T_('Already have an account... ?') . '</a>'; echo '</div>'; if ($params['register_form_footer']) { // Display register form footer echo '<div class="evo_login_dialog_standard_link"><a href="' . $secure_htsrv_url . 'register.php?source=' . rawurlencode($source) . '&redirect_to=' . rawurlencode($redirect_to) . '&return_to=' . rawurlencode($return_to) . '">' . T_('Use standard registration form instead') . ' »</a></div>'; echo '<div class="evo_login_dialog_footer text-muted">' . sprintf(T_('Your IP address: %s'), $Hit->IP) . '</div>'; } echo $params['register_page_after']; // Display javascript password strength indicator bar display_password_indicator(array('field-width' => $params['register_field_width'])); // Display javascript login validator display_login_validator();
:</div> <div class="info"> <strong><?php echo $current_User->get_identity_link(array('link_text' => 'text')); ?> </strong> <?php user_profile_link(' [', ']', T_('Edit profile')); ?> </div> </fieldset> <?php $Form->textarea($dummy_fields['content'], '', 12, T_('Comment text'), '', 40, 'bComment'); global $Plugins; $Form->info(T_('Text Renderers'), $Plugins->get_renderer_checkboxes(array('default'), array('Blog' => &$Blog, 'setting_name' => 'coll_apply_comment_rendering'))); $Form->buttons_input(array(array('name' => 'submit', 'value' => T_('Send comment'), 'class' => 'SaveButton'))); ?> <div class="clear"></div> <?php $Form->end_form(); ?> <!-- ========== END of FORM to add a comment ========== --> <?php } // / can comment ?> </div> <?php } // / comments requested
$Form->select_country('country', param('country', 'integer', 0), $CountryCache, T_('Country'), array('allow_none' => true, 'required' => true)); } $registration_require_firstname = (bool) $Settings->get('registration_require_firstname'); if ($registration_require_firstname) { $Form->text_input('firstname', $firstname, 18, T_('First name'), T_('Your real first name.'), array('maxlength' => 50, 'class' => 'input_text', 'required' => true)); } $registration_require_gender = $Settings->get('registration_require_gender'); if ($registration_require_gender != 'hidden') { // Display a gender field if it is not hidden $Form->radio_input('gender', $gender, array(array('value' => 'M', 'label' => T_('A man')), array('value' => 'F', 'label' => T_('A woman'))), T_('I am'), array('required' => $registration_require_gender == 'required')); } if ($Settings->get('registration_ask_locale')) { $Form->select('locale', $locale, 'locale_options_return', T_('Locale'), T_('Preferred language')); } $Plugins->trigger_event('DisplayRegisterFormFieldset', array('Form' => &$Form, 'inskin' => false)); $Form->buttons_input(array(array('name' => 'submit', 'value' => T_('Register my account now!'), 'class' => 'ActionInput', 'style' => 'font-size: 120%'))); $Form->end_fieldset(); $Form->end_form(); // display hidden fields etc // Display javascript password strength indicator bar display_password_indicator(); // Display javascript login validator display_login_validator(); ?> <div style="margin-top: 1em"> <a href="<?php echo $secure_htsrv_url . 'login.php?redirect_to=' . rawurlencode(url_rel_to_same_host($redirect_to, $secure_htsrv_url)); ?> ">« <?php echo T_('Already have an account... ?');