• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_logged函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: index

 public function index()
 {
     if (is_logged(false)) {
         set_theme('title', 'Dashboard');
         set_theme('content', '<h1>Painel Principal</h1>');
         set_theme('pluginsJS', load_javascript(array('initialize')), false);
         load_template();
     } else {
         redirect('login');
     }
 }
开发者ID:ricardoambdev,项目名称:vortex,代码行数:11,代码来源:dashboard.php


示例17: getbonus

 function getbonus()
 {
     if (!is_logged()) {
         redirect(base_url());
     }
     include APPPATH . "config/evote.php";
     $this->data['title'] = lang('off_vote');
     $text = icon('64x64/chart_up.png') . '<h2>Голосование на TOP EMUDEV</h2><p>После голосования нажмите получить бонус.</p>';
     $char = (int) office_secure($this->input->post('char'));
     if ($char <= 0) {
         redirect('evote');
     }
     $query = $this->MSSQL->query("SELECT Name FROM " . get_world() . ".dbo.tbl_base WHERE Serial='{$char}'");
     if ($query->num_rows() > 0) {
         foreach ($query->result() as $row) {
             $char = preg_name($row->Name);
         }
         //for
     } else {
         redirect('evote');
     }
     # Генерация полной ссылки текущего года/месяца
     $FullLink = $config['logfile'] . md5(date("Ym")) . '.txt';
     # Получение данных статистики
     $data = file_get_contents($FullLink);
     # Разбитие данных в строки массива
     $rows = explode("\r\n", $data);
     $find = 0;
     for ($i = 0; $i < count($rows) - 1; $i++) {
         $row = explode("\t", $rows[$i]);
         if ($row[3] == '') {
             continue;
         }
         if ($row[3] == $char) {
             if (!$this->_id_exits($row[0])) {
                 $find++;
                 $text .= br(1) . icon('32x32/accept.png') . 'Бонус выдан';
                 if ($row[4] == 0) {
                     $summ = $config['normal'];
                 } else {
                     $summ = $config['sms'];
                 }
                 bonus_add(Get_AccountSerial(), $summ);
                 $this->_accepted($row);
             }
         }
     }
     //for
     if ($find == 0) {
         $text .= br(1) . icon('32x32/delete.png') . 'Голос не найден';
     }
     $this->data['content'] = $text;
     compile();
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:54,代码来源:evote.php


示例18: get_user

function get_user()
{
    if (!is_logged()) {
        return false;
    }
    $ci =& get_instance();
    $user_id = $ci->session->userdata('user_id');
    //REMOVE IF AUTOLOADED
    $ci->load->model('user');
    $ci->user->set_id($user_id);
    return $ci->user->get();
}
开发者ID:centaurustech,项目名称:gapura,代码行数:12,代码来源:user_helper.php


示例19: main

 function main()
 {
     parent::Controller();
     $this->load->helper(array('fdcore_framework', 'office_framework', 'rf_framework', 'email', 'prototype'));
     $this->load->helper(array('language', 'url', 'file', 'security', 'date', 'form', 'html', 'pay'));
     $this->load->library(array('session', 'parser', 'table', 'ajax'));
     $this->lang->load('office', get_lang());
     RunFunc('connectdb|connectmydb|allow_ip|check_offline|check_sql_inject');
     $this->login = get_login();
     $this->output->enable_profiler(config('profiler', 'core'));
     if (!is_logged()) {
         redirect(base_url() . '#auth error');
     }
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:14,代码来源:main.php


示例20: topsms

 function topsms()
 {
     parent::Controller();
     $this->load->helper(array('fdcore_framework', 'office_framework', 'rf_framework_helper'));
     $this->load->helper(array('language', 'url', 'security', 'form', 'html', 'pay', 'date'));
     $this->load->library(array('session', 'parser', 'table', 'ajax'));
     $this->lang->load('office', get_lang());
     $this->login = xss_clean($this->session->userdata('login'));
     RunFunc('connectdb|connectmydb|check_offline|check_sql_inject');
     $this->output->enable_profiler(config('profiler', 'core'));
     if (!is_logged()) {
         redirect(base_url());
     }
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:14,代码来源:topsms.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_logged_in函数代码示例发布时间:2022-05-15
下一篇:
PHP is_local_attachment函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap