<?php

/**
 * This file is the template that displays an access denied for not logged in users
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://b2evolution.net/man/skin-development-primer}
 *
 * @package evoskin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $app_version, $disp, $Blog, $skin_links, $francois_links;
// Use a login form for this page
$template_name = '_login.disp.php';
$template_file_path = skin_template_path($template_name);
if (!empty($template_file_path)) {
    // Load template if it exists
    require $template_file_path;
}
Пример #2
0
             $gender_class = '';
             if (check_setting('gender_colored')) {
                 // Set a gender class if the setting is ON
                 $gender_class = ' nogender';
             }
             $recipient_link = '<span class="user anonymous' . $gender_class . '" rel="bubbletip_comment_' . $comment_id . '">' . $recipient_name . '</span>';
         }
     }
     $blog_skin_ID = $Blog->get_skin_ID();
     if (!empty($blog_skin_ID)) {
         // check if Blog skin has specific concact message form
         $SkinCache =& get_SkinCache();
         $Skin =& $SkinCache->get_by_ID($blog_skin_ID);
         $ads_current_skin_path = $skins_path . $Skin->folder . '/';
     }
     require skin_template_path('_contact_msg.form.php');
     break;
 case 'get_user_bubbletip':
     // Get contents of a user bubbletip
     // Displays avatar & name
     $user_ID = param('userid', 'integer', 0);
     $comment_ID = param('commentid', 'integer', 0);
     if (strpos($_SERVER["HTTP_REFERER"], $admin_url) !== false) {
         // If ajax is requested from admin page we should to set a variable $is_admin_page = true if user has permissions
         // Check global permission:
         if (empty($current_User) || !$current_User->check_perm('admin', 'restricted')) {
             // No permission to access admin...
             require $adminskins_path . '_access_denied.main.php';
         } else {
             // Set this page as admin page
             $is_admin_page = true;
Пример #3
0
 /**
  * Display the widget!
  *
  * @param array MUST contain at least the basic display params
  */
 function display($params)
 {
     global $Blog;
     if (get_param('disp') == 'login') {
         // No display a duplicate form for inskin login mode
         return false;
     }
     $this->init_display($params);
     if (isset($this->BlockCache)) {
         // Do NOT cache some of these links are using a redirect_to param, which makes it page dependent.
         // Note: also beware of the source param.
         // so this will be cached by the PageCache; there is no added benefit to cache it in the BlockCache
         // (which could have been shared between several pages):
         $this->BlockCache->abort_collect();
     }
     echo $this->disp_params['block_start'];
     if (!is_logged_in()) {
         // Login form:
         global $Settings;
         $source = 'user_login_widget';
         $redirect_to = $Settings->get('redirect_to_after_login');
         if (empty($redirect_to)) {
             $redirect_to = regenerate_url('', '', '', '&');
         }
         $this->disp_title();
         echo $this->disp_params['block_body_start'];
         // display widget login form
         require skin_template_path('_widget_login.form.php');
         echo $this->disp_params['block_body_end'];
     } else {
         // Display a greeting text
         global $current_User;
         echo $this->disp_params['block_body_start'];
         if ($this->get_param('profile_picture_size') != '') {
             // Display profile picture
             echo $current_User->get_avatar_imgtag($this->disp_params['profile_picture_size'], 'avatar', 'middle');
         }
         if ($this->get_param('greeting_show')) {
             // Display greeting text
             $user_login = $current_User->get_identity_link(array('link_text' => 'name', 'display_bubbletip' => false));
             echo ' <strong class="greeting">' . str_replace('$login$', $user_login, $this->get_param('greeting_text')) . '</strong>';
         }
         if ($this->get_param('group_show')) {
             // Display user group
             $user_Group = $current_User->get_Group();
             echo '<p class="user_group">' . str_replace('$group$', $user_Group->get('name'), $this->get_param('group_text')) . '</p>';
         }
         if ($this->get_param('level_show')) {
             // Display user group
             echo '<p class="user_level">' . str_replace('$level$', $current_User->get('level'), $this->get_param('level_text')) . '</p>';
         }
         echo $this->disp_params['block_body_end'];
     }
     echo $this->disp_params['block_end'];
     return true;
 }