예제 #1
0
	<!-- =================================== END OF BLOG C =================================== -->

	<div class="bSideItem">
		<h3><?php 
    echo T_('Misc');
    ?>
</h3>
		<ul>
			<?php 
    // Administrative links:
    user_login_link('<li>', '</li>');
    user_register_link('<li>', '</li>');
    user_admin_link('<li>', '</li>');
    user_profile_link('<li>', '</li>');
    user_subs_link('<li>', '</li>');
    user_logout_link('<li>', '</li>');
    ?>
		</ul>
	</div>

</div>
<!-- InstanceEndEditable --></div>
<div class="footer">
This is a demo page for <a href="http://b2evolution.net/">b2evolution</a>.
<!-- InstanceBeginEditable name="Baseline" -->
<?php 
    echo '</div>';
    ?>
<!-- Note: don't mess with the template here :/ --><!-- InstanceEndEditable --></div>
</body>
<!-- InstanceEnd --></html>
예제 #2
0
echo T_('Archives');
?>
</a>
		</strong>

		<p>
		<?php 
// Display a link to contact the owner of this blog (if owner accepts messages):
$Blog->contact_link(array('before' => ' [', 'after' => '] ', 'text' => T_('Contact'), 'title' => T_('Send a message to the owner of this blog...')));
?>

		<?php 
user_login_link(' [', '] ', '', '#', 'sidebar login link');
user_register_link(' [', '] ', '', '#', false, 'sidebar register link');
user_admin_link(' [', '] ');
user_logout_link(' [', '] ');
?>
		</p>
	</div>

	<hr>

	<?php 
// Please help us promote b2evolution and leave this logo on your blog:
powered_by(array('block_start' => '<div align="center">', 'block_end' => '</div>', 'img_url' => '$rsc$img/powered-by-b2evolution-120t.gif', 'img_width' => 120, 'img_height' => 32));
?>

	<?php 
// ---------------------------- SITE FOOTER INCLUDED HERE ----------------------------
// If site footers are enabled, they will be included here:
siteskin_include('_site_body_footer.inc.php');
예제 #3
0
echo '<li>' . T_('As soon as you receive the email, click on the link therein to activate your account.') . '</li>';
echo '</ol>';
$Form->text_input('email', $email, 16, T_('Email'), '', array('maxlength' => 255, 'class' => 'input_text', 'required' => true));
$Plugins->trigger_event('DisplayValidateAccountFormFieldset', array('Form' => &$Form));
// TODO: the form submit value is too wide (in Konqueror and most probably in IE!)
$Form->end_form(array(array('name' => 'form_validatemail_submit', 'value' => T_('Send me an email now!'), 'class' => 'ActionButton')));
// display hidden fields etc
if ($current_User->group_ID == 1) {
    // allow admin users to validate themselves by a single click:
    $Form =& new Form($htsrv_url_sensitive . 'login.php', 'form_validatemail', 'post', 'fieldset');
    $Form->begin_form('fform');
    $Form->hidden('action', 'validatemail');
    $Form->hidden('redirect_to', url_rel_to_same_host($redirect_to, $htsrv_url_sensitive));
    $Form->hidden('reqID', 1);
    $Form->hidden('sessID', $Session->ID);
    $Form->begin_fieldset();
    echo '<p>' . sprintf(T_('Since you are an admin user, you can validate your email address (%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')));
    // display hidden fields etc
}
?>

<div style="text-align:right">
	<?php 
user_logout_link();
?>
</div>

<?php 
require dirname(__FILE__) . '/_html_footer.inc.php';
예제 #4
0
/**
 * 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>';
}
예제 #5
0
 /**
  * Display the widget!
  *
  * @param array MUST contain at least the basic display params
  */
 function display($params)
 {
     $this->init_display($params);
     // User tools:
     echo $this->disp_params['block_start'];
     echo $this->disp_params['block_title_start'];
     echo T_('User tools');
     echo $this->disp_params['block_title_end'];
     echo $this->disp_params['list_start'];
     user_login_link($this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params['user_login_link']);
     user_register_link($this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params['user_register_link']);
     user_admin_link($this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params['user_admin_link']);
     user_profile_link($this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params['user_profile_link']);
     user_subs_link($this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params['user_subs_link']);
     user_logout_link($this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params['user_logout_link']);
     echo $this->disp_params['list_end'];
     echo $this->disp_params['block_end'];
 }
예제 #6
0
파일: _toolbar.inc.php 프로젝트: LFSF/oras
echo '<li class="separator"><hr /></li>';
user_logout_link('<li>', '</li>', T_('Logout'));
?>
		</ul>
	</li>
	<li class="time"><?php 
echo date(locale_shorttimefmt(), $localtimenow);
?>
</li>
	<?php 
if ($is_admin_page) {
    blog_home_link('<li>', '</li>', T_('Blog') . ' ' . get_icon('switch-to-blog'), T_('Home') . ' ' . get_icon('switch-to-blog'));
} else {
    user_admin_link('<li>', '</li>', T_('Admin') . ' ' . get_icon('switch-to-admin'));
}
user_logout_link('<li>', '</li>', T_('Logout') . ' ' . get_icon('close'), '#', array('class' => 'rollover'));
?>
	</ul>
</div>

<div class="actions_left">

<ul>
	<li class="menu_close" onmouseover="evo_menu_show(this)" onmouseout="evo_menu_hide(this)">
		<strong><?php 
echo '<a href="' . $home_url . '">b2evolution ' . get_icon('dropdown') . '</a>';
// Note: if <strong></strong> is inside of the link, rollover fails in IE7
?>
</strong>
    <ul>
			<?php