コード例 #1
0
ファイル: _skin.funcs.php プロジェクト: Ariflaw/b2evolution
/**
 * Get file path to template file
 *
 * @param string Template name
 * @return string|FALSE File path OR FALSE if fallback file doesn't exist
 */
function skin_template_path($template_name)
{
    global $Skin, $ads_current_skin_path;
    if (!empty($Skin) && file_exists($ads_current_skin_path . $template_name)) {
        // Template file exists for the current skin
        return $ads_current_skin_path . $template_name;
    } elseif ($fallback_path = skin_fallback_path($template_name)) {
        // Falback file exists
        return $fallback_path;
    }
    return false;
}
コード例 #2
0
 * Include page header (also displays Messages):
 */
$page_title = T_('Log in to your account');
$wrap_width = '380px';
/*
 fp> The login page is small. Let's use it as a preloader for the backoffice (which is awfully slow to initialize)
 fp> TODO: find a javascript way to preload more stuff (like icons) WITHOUT delaying the browser autocomplete of the login & password fields
	dh>
	// include jquery JS:
	require_js( '#jquery#' );

	jQuery(function(){
	 alert("Document is ready");
	});
	See also http://www.texotela.co.uk/code/jquery/preload/ - might be a good opportunity to take a look at jQuery for you.. :)
*/
require_js('functions.js');
$transmit_hashed_password = (bool) $Settings->get('js_passwd_hashing') && !(bool) $Plugins->trigger_event_first_true('LoginAttemptNeedsRawPassword');
if ($transmit_hashed_password) {
    // Include JS for client-side password hashing:
    require_js('build/sha1_md5.bmin.js');
}
// Use the links in the form title
$use_form_links = true;
// Header
require dirname(__FILE__) . '/_html_header.inc.php';
// Login form
$params = array('skin_form_before' => $login_form_params['formstart'], 'skin_form_after' => $login_form_params['formend'], 'form_title_login' => $page_title, 'login_page_class' => 'evo_panel__login', 'login_page_before' => '', 'login_page_after' => '', 'login_form_action' => $secure_htsrv_url . 'login.php', 'login_form_name' => 'login_form', 'login_form_title' => '', 'login_form_layout' => 'fieldset', 'form_class_login' => 'form-horizontal evo_form__login', 'login_form_source' => param('source', 'string', 'std login form'), 'login_form_inskin' => false, 'login_form_inskin_urls' => false, 'login_form_required' => $login_required, 'login_validate_required' => $validate_required, 'login_form_redirect_to' => $redirect_to, 'login_form_return_to' => $return_to, 'login_form_login' => utf8_strtolower($login), 'login_action_value' => $action, 'login_form_reqID' => isset($reqID) ? $reqID : NULL, 'login_form_sessID' => isset($sessID) ? $sessID : NULL, 'transmit_hashed_password' => $transmit_hashed_password, 'display_abort_link' => true, 'abort_link_position' => 'form_title', 'abort_link_text' => '<button type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>', 'display_reg_link' => true, 'login_form_footer' => false);
require skin_fallback_path('_login.disp.php', 6);
// Footer
require dirname(__FILE__) . '/_html_footer.inc.php';
コード例 #3
0
ファイル: login.php プロジェクト: Ariflaw/b2evolution
/**
 * Display standard login screen:
 */
switch ($action) {
    case 'lostpassword':
        // Lost password:
        $page_title = T_('Lost your password?');
        $hidden_params = array('redirect_to' => url_rel_to_same_host($redirect_to, $secure_htsrv_url));
        $wrap_width = '480px';
        // Use the links in the form title
        $use_form_links = true;
        // Include page header:
        require $adminskins_path . 'login/_html_header.inc.php';
        // Lost password form
        $params = array('form_title_lostpass' => $page_title, 'login_form_inskin' => false, 'login_page_class' => 'evo_panel__login', 'login_page_before' => '<div class="evo_panel__lostpass">', 'login_page_after' => '</div>', 'form_class_login' => 'evo_form__login evo_form__lostpass', 'lostpass_form_params' => $login_form_params, 'lostpass_form_footer' => false, 'abort_link_text' => '<button type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>');
        require skin_fallback_path('_lostpassword.disp.php', 6);
        // Include page footer:
        require $adminskins_path . 'login/_html_footer.inc.php';
        break;
    case 'req_validatemail':
        // Send activation link by email (initial form and action)
        // Display validation form:
        require $adminskins_path . 'login/_validate_form.main.php';
        break;
    case 'changepwd':
        // Display form to change password:
        require $adminskins_path . 'login/_reset_pwd_form.main.php';
        break;
    default:
        // Display login form:
        require $adminskins_path . 'login/_login_form.main.php';
コード例 #4
0
/**
 * This is the account validation form. It gets included if the user needs to validate his account.
 *
 * This file is part of the evoCore framework - {@link http://evocore.net/}
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package htsrv
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// 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);
/**
 * Include page header:
 */
$page_title = T_('Account activation');
$wrap_width = '530px';
// Header
require dirname(__FILE__) . '/_html_header.inc.php';
// Activate form
$params = array('skin_form_before' => $login_form_params['formstart'], 'skin_form_after' => $login_form_params['formend'], 'activate_form_title' => $page_title, 'login_page_class' => 'evo_panel__login', 'activate_form_params' => $login_form_params, 'use_form_wrapper' => false);
require skin_fallback_path('_activateinfo.disp.php', 6);
// Footer
require dirname(__FILE__) . '/_html_footer.inc.php';
コード例 #5
0
?>
" />
	<?php 
include_headlines();
?>
	<?php 
$Blog->disp('blog_css', 'raw');
$Blog->disp('user_css', 'raw');
$Blog->disp_setting('head_includes', 'raw');
?>
</head>

<body<?php 
skin_body_attrs(array('class' => $params['body_class']));
?>
>

<?php 
// ---------------------------- TOOLBAR INCLUDED HERE ----------------------------
require skin_fallback_path('_toolbar.inc.php');
// ------------------------------- END OF TOOLBAR --------------------------------
echo "\n";
if (show_toolbar()) {
    echo '<div id="skin_wrapper" class="skin_wrapper_loggedin">';
} else {
    echo '<div id="skin_wrapper" class="skin_wrapper_anonymous">';
}
echo "\n";
?>
<!-- Start of skin_wrapper -->
コード例 #6
0
 /**
  * Dsiplay the top of the HTML <body>...
  *
  * Typically includes title, menu, messages, etc.
  *
  * @param boolean Whether or not to display messages.
  */
 function disp_body_top($display_messages = true)
 {
     if (is_ajax_content()) {
         // Don't display this content on AJAX request
         return;
     }
     load_funcs('skins/_skin.funcs.php');
     global $mode;
     /**
      * @var Hit
      */
     global $Hit;
     // #body_win and .body_firefox (for example) can be used to customize CSS per plaform/browser
     echo '<body id="body_' . $Hit->get_agent_platform() . '" class="body_' . $Hit->get_agent_name() . '">' . "\n";
     if (!empty($mode)) {
         global $Messages;
         $mode = preg_replace('~[^a-z]~', '', $mode);
         // sanitize
         echo '<div id="' . $mode . '_wrapper">';
         if ($display_messages) {
             // Display info & error messages
             $Messages->display();
             // Clear the messages to avoid double displaying
             $Messages->clear();
         }
         return;
     }
     $skin_wrapper_class = 'skin_wrapper';
     if (is_logged_in()) {
         // user is logged in
         if ($this->get_show_evobar()) {
             // show evobar options is enabled for this admin skin
             require skin_fallback_path('_toolbar.inc.php');
             $skin_wrapper_class = $skin_wrapper_class . '_loggedin';
         }
     } else {
         // user is not logged in
         require skin_fallback_path('_toolbar.inc.php');
         $skin_wrapper_class = $skin_wrapper_class . '_anonymous';
     }
     echo "\n";
     echo '<div id="skin_wrapper" class="' . $skin_wrapper_class . '">';
     echo "\n<!-- Start of skin_wrapper -->\n";
     echo $this->get_body_top();
 }
コード例 #7
0
<?php

/**
 * This is the form to change a password
 *
 * This file is part of the evoCore framework - {@link http://evocore.net/}
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package htsrv
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// Header
$page_title = T_('Change password');
$wrap_width = '650px';
require dirname(__FILE__) . '/_html_header.inc.php';
// Change password form
$params = array('display_profile_tabs' => false, 'display_abandon_link' => false, 'button_class' => ' btn-lg', 'skin_form_params' => $login_form_params, 'form_action' => get_secure_htsrv_url() . 'login.php', 'form_button_action' => 'updatepwd', 'form_hidden_crumb' => 'regform', 'check_User_from_Session' => false);
$disp = 'pwdchange';
// Select a form to change a password
$Session->set('core.unsaved_User', $forgetful_User);
require skin_fallback_path('_profile.disp.php', 6);
// Footer
require dirname(__FILE__) . '/_html_footer.inc.php';
コード例 #8
0
<?php

/**
 * This is the registration form
 *
 * This file is part of the evoCore framework - {@link http://evocore.net/}
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package htsrv
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
load_class('regional/model/_country.class.php', 'Country');
if (empty($params)) {
    $params = array();
}
$params = array_merge(array('wrap_width' => '580px', 'register_form_title' => T_('New account creation')), $params);
// Header
$page_title = $params['register_form_title'];
$wrap_width = $params['wrap_width'];
require dirname(__FILE__) . '/_html_header.inc.php';
// Register form
$params = array_merge(array('register_page_before' => '<div class="evo_panel__register">', 'register_page_after' => '</div>', 'form_class_register' => 'evo_form__register', 'register_links_attrs' => '', 'register_use_placeholders' => true, 'register_field_width' => 252, 'register_form_params' => $login_form_params, 'register_form_footer' => false, 'register_disp_home_button' => true, 'register_disabled_page_before' => $login_form_params['formstart'], 'register_disabled_page_after' => $login_form_params['formend']), $params);
require skin_fallback_path('_register.disp.php', 6);
// Footer
require dirname(__FILE__) . '/_html_footer.inc.php';