本文整理汇总了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");
}
示例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");
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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'));
}
示例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;
}
}
示例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 = "";
示例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>
示例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);
示例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']);
示例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;
示例15: __construct
function __construct()
{
parent::__construct();
$this->load->model('model_barang');
check_session();
}