当前位置: 首页>>代码示例>>PHP>>正文


PHP is_logged函数代码示例

本文整理汇总了PHP中is_logged函数的典型用法代码示例。如果您正苦于以下问题:PHP is_logged函数的具体用法?PHP is_logged怎么用?PHP is_logged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了is_logged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logout

function logout()
{
    session_destroy();
    session_start();
    $_SESSION['auth'] = array("logged" => False, "login_utc" => "", "cas_url" => Cas::getUrl());
    return is_logged();
}
开发者ID:hackathonUTC,项目名称:billetterie-utc,代码行数:7,代码来源:Auth.php

示例2: index

function index()
{
    global $timeformat, $home;
    if (is_logged()) {
        $output = '<p><form method="post" action="' . $home . 'shoutbox/escrevepost">
<textarea rows="8" cols="25" name="message"></textarea><br/>
<input type="submit" value="' . t("Enviar") . '">
</form></p><hr size="1">';
    }
    $qry = mysql_query("SELECT s.id AS d, s.text AS t, s.time AS i, a.login AS l FROM shoutbox s LEFT JOIN accounts a ON s.owner=a.id ORDER BY s.id DESC LIMIT 10");
    if (mysql_numrows($qry) != 0) {
        $response = true;
        while ($row = mysql_fetch_array($qry)) {
            $output .= '<p><h3>' . $row['t'] . '</h3><br/><h6>' . t("postado por") . ' ' . url("user/profile/{$row['l']}", $row['l']) . ' ' . t("em") . ' ' . date($timeformat, $row['i']);
            if (is_admin()) {
                $output .= '<br>' . url("shoutbox/del/{$row['d']}", t("[excluir]"));
            }
            $output .= '</p><hr size="1">';
        }
    } else {
        $output .= infobox(t("Não há mensagens na shoutbox."), false);
    }
    if ($response) {
        section(substr($output, 0, -13), t("Shoutbox"));
    } else {
        section($output, t("Shoutbox"));
    }
}
开发者ID:jesobreira,项目名称:soclwap,代码行数:28,代码来源:shoutbox.php

示例3: index

 function index()
 {
     if (is_logged()) {
         $this->load->library('form_validation');
         $this->form_validation->set_rules('creditcard_number', 'Credit Card Number', 'required|max_length[19]');
         $this->form_validation->set_rules('creditcard_month', 'Credit Card Expiration Month', 'required|max_length[2]');
         $this->form_validation->set_rules('creditcard_year', 'Credit Card Expiration Year', 'required|max_length[4]|callback_credit_card_expiration[' . $this->input->post('creditcard_month') . ']');
         if ($this->form_validation->run() !== false) {
             $creditcard_number = $this->input->post('creditcard_number');
             $creditcard_month = $this->input->post('creditcard_month');
             $creditcard_year = $this->input->post('creditcard_year');
             $creditcard_number = str_replace(' ', '', $creditcard_number);
             $this->load->model('order');
             $order = new $this->order();
             $order->customer_id = get_customer_id();
             $order->total = $this->cart->total();
             $order->creditcard_number = $creditcard_number;
             $order->creditcard_month = $creditcard_month;
             $order->creditcard_year = $creditcard_year;
             // save temporary order
             $this->session->set_userdata('order', serialize($order));
             redirect('checkout/review');
         }
         $this->load->view('checkout/payment');
     } else {
         $this->load->view('checkout/index');
     }
 }
开发者ID:harryge00,项目名称:csc309-estore,代码行数:28,代码来源:checkout_ctrl.php

示例4: _authorize

 function _authorize()
 {
     if (is_logged()) {
         redirect('main', 'refresh');
     }
     check_offline();
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:7,代码来源:main_index.php

示例5: index

function index()
{
    if (is_logged()) {
        redir("dashboard");
    } else {
        redir("account/login");
    }
}
开发者ID:jesobreira,项目名称:soclwap,代码行数:8,代码来源:home.php

示例6: login

 public function login()
 {
     if (is_logged()) {
         redirect(logged_url('dashboard'));
     }
     $this->data['title'] = 'Đăng nhập';
     $this->load->view('frontend/user/login', $this->data);
 }
开发者ID:quochoangvp,项目名称:quanlythuctap,代码行数:8,代码来源:User.php

示例7: is_readonly

function is_readonly()
{
    $needAuth = Config::get('password') != '' ? 1 : 0;
    if ($needAuth && !is_logged()) {
        return true;
    }
    return false;
}
开发者ID:nansenat16,项目名称:yourTinyTodo,代码行数:8,代码来源:init.php

示例8: check_property

function check_property($rand_prop, $hash_prop)
{
    if (is_logged()) {
        return $hash_prop == sha1($_SESSION['login_c'] . $rand_prop);
    } else {
        return false;
    }
}
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:8,代码来源:tool.php

示例9: preview

 public function preview()
 {
     if (is_logged()) {
         $view = $this->input->get('view', true);
         $id = $this->input->get('id', true);
         $data['lng'] = $this->input->get('lang', true);
         if ($view && $id && $data['lng']) {
             $data['base_link'] = '?view=' . $view . '&id=' . $id . '';
             switch ($view) {
                 case 'stiri':
                     $data['title'] = 'Stiri';
                     $data['article'] = $this->mysql->get_row('stiri', array('id' => $id));
                     $this->load->view('frontend/preview/stiri_preview_template', $data);
                     break;
                 case 'cetatean':
                     $data['title'] = 'Cetateanul Activ';
                     $data['article'] = $this->mysql->get_row('cetatean', array('id' => $id));
                     $this->load->view('frontend/preview/stiri_preview_template', $data);
                     break;
                 case 'dosare':
                     $data['title'] = 'Dosare de coruptie';
                     $data['article'] = $this->mysql->get_row('dosare', array('id' => $id));
                     $this->load->view('frontend/preview/stiri_preview_template', $data);
                     break;
                 case 'achizitii':
                     $data['title'] = 'Achizitii publice';
                     $data['article'] = $this->mysql->get_row('achizitii', array('id' => $id));
                     $this->load->view('frontend/preview/stiri_preview_template', $data);
                     break;
                 case 'blog':
                     $data['title'] = 'Blog';
                     $data['article'] = $this->mysql->get_row('blog', array('id' => $id));
                     $this->load->view('frontend/preview/stiri_preview_template', $data);
                     break;
                 case 'interviu':
                     $data['title'] = 'Interviuri';
                     $data['article'] = $this->mysql->get_row('interviu', array('id' => $id));
                     $this->load->view('frontend/preview/stiri_preview_template', $data);
                     break;
                 case 'investigatii':
                     $data['title'] = 'Investigatii';
                     $data['article'] = $this->mysql->get_row('investigatii', array('id' => $id));
                     $data['caterg'] = $this->mysql->get_row('categorii', array('id_categorii' => $data['article']['cats']));
                     $data['slider'] = $this->mysql->get_All('slider', array('parent' => $data['article']['id']));
                     $data['vars'] = $this->mysql->get_All('vars');
                     $this->load->view('frontend/preview/investigatii_preview_template', $data);
                     break;
                 default:
                     echo 'Pagina pentru previzualizare este incorecta!';
                     break;
             }
         } else {
             echo 'Linkul pentru previzualizare este incorect sau lipsesc date pentru a putea identifica articolul cerut pentru previzualizare!';
         }
     } else {
         echo 'Trebuie sa fiti logat pentru a vizualiza acest preview!';
     }
 }
开发者ID:radumargina,项目名称:webstyle-antcr,代码行数:58,代码来源:Main_preview.php

示例10: login_required

function login_required()
{
    if (!is_logged()) {
        die('Permission denied');
    }
    $id = $_SESSION['user']['id'];
    $user = new User();
    return $user->get("id = '{$id}'");
}
开发者ID:rfloriano,项目名称:rfloriano-treichel-bookstore,代码行数:9,代码来源:admin.php

示例11: index

 /**
  * Placeholder for default functions to be executed
  */
 public function index()
 {
     if (!is_logged()) {
         redirect('users/login');
     }
     //Get the user id
     //Load a home view
     $user = get_user();
     $this->load->view('users/home', array('user' => $user));
 }
开发者ID:centaurustech,项目名称:gapura,代码行数:13,代码来源:users.php

示例12: have_write_access

function have_write_access()
{
    if (Config::get('password') == '') {
        return true;
    }
    if (is_logged()) {
        return true;
    }
    return false;
}
开发者ID:amneher,项目名称:mytinytodo,代码行数:10,代码来源:export.php

示例13: list_orders

 function list_orders()
 {
     if (!is_logged()) {
         redirect('/');
     }
     $this->load->model('orders');
     $this->load->model('order');
     $data['orders'] = $this->orders->getAllFromCustomer(get_customer_id());
     $this->load->view('orders', $data);
 }
开发者ID:harryge00,项目名称:csc309-estore,代码行数:10,代码来源:receipt_ctrl.php

示例14: index

 public function index()
 {
     if (is_logged(false)) {
         redirect(base_url());
     }
     set_theme('title', 'Login');
     set_theme('content', load_module('login', 'login'));
     set_theme('bodyClass', 'login bg-login printable');
     set_theme('pluginsJS', load_javascript(array('user-pages', 'initialize-login')), false);
     load_template();
 }
开发者ID:ricardoambdev,项目名称:vortex,代码行数:11,代码来源:login.php

示例15: index

 /**
  * Placeholder for default functions to be executed
  */
 public function index()
 {
     if (!is_logged()) {
         redirect('users/login');
     }
     //Get the user id
     //Load a home view
     $user = get_user();
     $this->template->set('menu_title', 'Data Majelis')->set('menu_group', 'active')->set('group_total', $config['total_rows'])->set('group', $group)->set('no', $no)->set('user', $user)->build('users/home');
     //$this->load->view('users/home', array('user'=>$user));
 }
开发者ID:centaurustech,项目名称:gapura,代码行数:14,代码来源:users.php


注:本文中的is_logged函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。