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


PHP check_session函数代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model("Myaccount_Model");
 }
开发者ID:shinichi81,项目名称:ams,代码行数:7,代码来源:myaccount.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Dashboard_Model", "Order_Model", "Orderspace_Model", "Receive_Model"));
     $this->_accessPaket = get_access("PAKET");
     $this->_accessSpace = get_access("SPACE");
 }
开发者ID:shinichi81,项目名称:ams,代码行数:9,代码来源:dashboard.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Approve_Manager_Model", "Transaction_Model"));
     $this->_access = get_access("APPROVE_MANAGER");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:approve_manager.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Backdatereceive_Model", "Order_Model", "Transaction_Model"));
     $this->_access = get_access("BACKDATE_RECEIVE");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:backdate_receive.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Orderspace_Model", "Expiredspace_Model", "Order_Model", "Transaction_Model"));
     $this->_access = get_access("SPACE");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:expired_space.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model("Cpm_Model");
     $this->_access = get_access("CPM");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:master_cpm.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("PO_Model", "Transaction_Model"));
     $this->load->helper(array('form', 'url'));
     $this->_access = get_access("PO");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:11,代码来源:po.php

示例8: update_batch

 public function update_batch()
 {
     check_session();
     $post = $this->input->post(NULL, TRUE);
     $Id = $post['id'];
     $where = array('drug_batch_id' => $Id);
     unset($post['id']);
     $basicModel = load_basic_model('drug_batch');
     $result = $basicModel->update($post, $where);
     if (count($result) > 0) {
         $this->session->set_flashdata('success', 'Operation successfully completed.');
     }
     redirect(base_url('batch'));
 }
开发者ID:adnan-afridi,项目名称:clinuvel,代码行数:14,代码来源:asdf.php

示例9: is_session_set

function is_session_set($broj)
{
    if ($broj === 1) {
        $put = '../';
    } else {
        if ($broj === 2) {
            $put = '../../';
        } else {
            if ($broj === 3) {
                $put = '../../../';
            } else {
                $put = '';
            }
        }
    }
    if (isset($_SESSION['id'], $_SESSION['browser'])) {
        check_session($put);
    } else {
        header('Location: ' . $put);
        die;
    }
}
开发者ID:bonetino,项目名称:Basic-CMS,代码行数:22,代码来源:session.php

示例10: putenv

require_once $syslog_mod_path . "/class/syslogDB.class.php";
require_once $syslog_mod_path . "/class/syslogXML.class.php";
# Get language
$locale = $oreon->user->get_lang();
putenv("LANG={$locale}");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", $syslog_mod_path . "locale/");
bind_textdomain_codeset("messages", "UTF-8");
textdomain("messages");
/*
 * Get ACL
 */
$pearDB = new CentreonDB();
$pearDBndo = new CentreonDB("ndo");
$sid = session_id($_GET["sid"]);
$contact_id = check_session($sid, $pearDB);
$is_admin = isUserAdmin($sid);
$access = new CentreonACL($contact_id, $is_admin);
$aclHostString = $access->getHostsString("ID", $pearDBndo);
/*
 * Get selected option in lists
 */
if (isset($_GET['collector_id']) && $_GET['collector_id'] != "") {
    $collector_id = $_GET['collector_id'];
} else {
    $collector_id = "";
}
if (isset($_GET['Ffacility']) && $_GET['Ffacility'] != "" && $_GET['Ffacility'] != "undefined") {
    $Ffacility_selected = $_GET['Ffacility'];
} else {
    $Ffacility_selected = "";
开发者ID:chinaares,项目名称:centreon-syslog-frontend,代码行数:31,代码来源:syslog_xml.php

示例11: check_session

<?php

$in_id = $_GET['id'];
include 'admin/config.php';
include 'admin/sessions/config.php';
$active = check_session();
if ($connect->connect_errno) {
    header('Location: docs.html#setup-problems');
    exit;
}
$content_query = <<<SQL
SELECT *
FROM `content`
SQL;
$post_query = <<<SQL
SELECT *
FROM `posts`
WHERE `id`
= {$in_id}
SQL;
//error checking
if (!($content_result = $connect->query($content_query))) {
    die('There was an error fetching content: ' . $connect->error . '. Oops');
}
if (!($post_result = $connect->query($post_query))) {
    die('There was an error fetching posts: ' . $connect->error . '. Oops');
}
?>
<!DOCTYPE html>
<html>
  <head>
开发者ID:nnorthway,项目名称:streampost,代码行数:31,代码来源:ind.php

示例12: check_session

<?php

require_once '../config.inc';
require_once 'functions.php';
check_session(0);
require_once "{$path_prefix}/api/Theme/Template.php";
require_once "{$path_prefix}/api/Content/Content.php";
require_once "{$path_prefix}/api/User/User.php";
require_once "{$path_prefix}/api/ContentCollection/ContentCollection.php";
require_once '../api/Category/Category.php';
require_once '../api/MessageBoard/MessageBoard.php';
require_once '../ext/Group/Group.php';
require_once 'uihelper.php';
require_once './includes/application_top.php';
require_once './includes/functions/html_generate.php';
$parent_id = (int) $_GET['cid'];
if (empty($parent_id)) {
    $redirect_msg = "Required parameters missing in URL.";
    $back_to_page = $base_url . '/forums.php';
    header("Location: {$base_url}/generic_error.php?msg={$redirect_msg}&back_to_page={$back_to_page}");
    exit;
}
if ($parent_id) {
    $group_id = '';
    $parent_cat_obj = new Category();
    $arr_obj_categories = Category::build_children_list($parent_id);
    $parent_cat_obj = new Category();
    $parent_cat_obj->set_category_id($parent_id);
    try {
        $parent_cat_obj->load();
        $parent_cat_name = stripslashes($parent_cat_obj->name);
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:threads.php

示例13: dirname

$path_extra = dirname(dirname(dirname(__FILE__)));
$path = ini_get('include_path');
$path = $path_extra . PATH_SEPARATOR . $path;
ini_set('include_path', $path);
require_once "Auth/OpenID.php";
/**
 * Data.
 */
$store_types = array("Filesystem" => "Auth_OpenID_FileStore", "MySQL" => "Auth_OpenID_MySQLStore", "PostgreSQL" => "Auth_OpenID_PostgreSQLStore", "SQLite" => "Auth_OpenID_SQLiteStore");
/**
 * Main.
 */
$messages = array();
session_start();
init_session();
if (!check_session() || isset($_GET['add_openid'])) {
    render_form();
} else {
    print generate_config(isset($_GET['download']));
}
/**
 * Functions.
 */
function check_url($url)
{
    return Auth_OpenID::normalizeUrl($url) !== null;
}
function build_url()
{
    $port = $_SERVER['SERVER_PORT'] == 80 ? null : $_SERVER['SERVER_PORT'];
    $parts = explode("/", $_SERVER['SERVER_PROTOCOL']);
开发者ID:Stony-Brook-University,项目名称:doitsbu,代码行数:31,代码来源:setup.php

示例14: setcookie

$lifeTime = 3600;
setcookie(session_name(), session_id(), time() + $lifeTime, "/");
if (!isset($_SESSION['flag'])) {
    $_SESSION['flag'] = 0;
    $_SESSION['user'] = "";
}
function check_session()
{
    if (isset($_SESSION['flag']) && $_SESSION['flag'] == 1 && isset($_SESSION['user']) && $_SESSION['user'] != "") {
        return true;
    } else {
        return false;
    }
}
include "config/config.ini.php";
$smarty->assign("username", $_SESSION['user']);
$smarty->assign("flag", $_SESSION['flag']);
//自动导入class
/*
function __autoload($className) {
    require "kc_classes_php/".$className.'.class.php';
}
*/
if (!isset($_GET['p']) || !check_session()) {
    $p = "login";
    $page = "control/login.php";
} else {
    $p = $_GET['p'];
    $page = "control/" . $p . ".php";
}
include $page;
开发者ID:huangzhichao,项目名称:php_dwz,代码行数:31,代码来源:frame.php

示例15: __construct

 function __construct()
 {
     parent::__construct();
     $this->load->model('model_barang');
     check_session();
 }
开发者ID:azisdzelani,项目名称:point-of-sales,代码行数:6,代码来源:barang.php


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