本文整理汇总了PHP中session_check函数的典型用法代码示例。如果您正苦于以下问题:PHP session_check函数的具体用法?PHP session_check怎么用?PHP session_check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了session_check函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct(){
if(!array_key_exists('username',$_POST)){
die('The browser failed to send the right data. You may have a bad internet connection.');
}
if(session_check($_POST['username'])){
$this->_filename = basename($_FILES['Filedata']['name']);
if(!preg_match('/^[[:alnum:]]+_*\.*-*[[:alnum:]_\.-]*$/', $this->_filename)){
die('You passed a file with an illegal filename. Try using only acii characters.');
}
$this->getExtension();
$this->getPath();
if(file_exists($this->_path.DS.$this->_filename)){
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], ROOT.DS.$this->_path.DS.$this->_filename.'.temp')){
$path = str_replace(DS,'.',$this->_path);
die('REPLACE/'.$path.'/'.$this->_filename);
}
else{
die('The file '.$this->_filename.' already exists on the server. The server was unable to temporarily save the file to see if you wanted to replace the file. It is possible that you uploaded a file bigger than is allowed.');
}
}
$this->copyFile();
}
else{
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to upload your file.');
}
}
示例2: __construct
function __construct() {
if(session_check()) {
if(array_key_exists('post',$_POST) && array_key_exists('title',$_POST) && array_key_exists('slug',$_POST) && array_key_exists('description',$_POST) && array_key_exists('template',$_POST) && array_key_exists('category',$_POST) && array_key_exists('author',$_POST) && array_key_exists('commentbool',$_POST) && array_key_exists('pingbacks',$_POST) && array_key_exists('publish',$_POST) && array_key_exists('pingbool',$_POST) && array_key_exists('cachepub',$_POST) && array_key_exists('postdate', $_POST) && array_key_exists('comments_date',$_POST)) {
$this->_unlink = false;
$this->_post = $_POST['post'];
$this->_title = $_POST['title'];
$this->_slug = $_POST['slug'] === '' ? '_index_' : $_POST['slug'] ;
$this->_description = $_POST['description'];
$this->_template = $_POST['template'];
$this->_category = $_POST['category'];
$this->_author = $_POST['author'];
$this->_commentbool = $_POST['commentbool'] === 'true' ? true : false;
$this->_pingbacks = $_POST['pingbacks'];
$this->_publish = $_POST['publish'] === 'true' ? true : false;
$this->_pingbool = $_POST['pingbool'] === 'true' ? true : false;
$this->_rewrite = array_key_exists('rewrite',$_POST) ? true : false;
$this->_cachepub = $_POST['cachepub'] === 'true' ? true : false;
$pdate = explode('/',$_POST['postdate']);
reset($pdate);
$this->_postdate = mktime(intval($pdate[3]),intval($pdate[4]),0,intval($pdate[0]),intval($pdate[1]),intval($pdate[2]));
$cdate = explode('/',$_POST['comments_date']);
reset($cdate);
$this->_commentsdate = mktime(intval($cdate[3]),intval($cdate[4]),0,intval($cdate[0]),intval($cdate[1]),intval($cdate[2]));
$this->initialize();
}
else {
die('The program failed to accurately POST data to the server. Error#0001');
}
}
else {
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to submit your post.');
}
}
示例3: __construct
function __construct() {
if(session_check()) {
$this->_loc = str_replace('/',DS,$_POST['media']);
$this->delete();
}
else{
die('Your session has expired, please log back in.');
}
}
示例4: __construct
function __construct() {
if(session_check()) {
if(array_key_exists('uri',$_POST)){
$this->_uri = $_POST['uri'] !== '_index_' ? str_replace('_','/',$_POST['uri']) : '_index_';
$this->_loc = $_POST['uri'] !== '_index_' ? str_replace('_',DS,$_POST['uri']) : '_index_';
$this->unpublish();
}
}
}
示例5: __construct
function __construct($arr){
if(session_check()){
require(ROOT.DS.MAIN.DS.'library'.DS.'cron_jobs.php');
array_push($cronJobs,$arr);
$this->write($cronJobs);
}
else{
die('Your session has expired, please log back in.');
}
}
示例6: __construct
function __construct(){
if(session_check()) {
if(array_key_exists('action',$_POST) && array_key_exists('id',$_POST)){
$this->_action = $_POST['action'];
$this->_id = $_POST['id'];
$this->actionParse();
}
}
else{
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to submit your post.');
}
}
示例7: __construct
function __construct($post, $filter = 'ALL', $sort = 'none', $DESC = true){
if(session_check()) {
$this->_sort = $sort;
$this->_DESC = $DESC;
loadIntClass('sql_query');
$sql = new Sql_query('comments');
$this->_comments = $sql->getComments($post,$filter);
}
else{
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to submit your post.');
}
}
示例8: __construct
function __construct(){
if(session_check()){
if(array_key_exists('author',$_POST)){
$this->_author = $_POST["author"];
}
else{
die('There was an error on the client. Your browser didn\'t send the appropriate information. Try refreshing the page.');
}
}
else{
die('Your session has expired. Please login again in order to add an author.');
}
}
示例9: __construct
function __construct(){
if(session_check()){
if(array_key_exists('category',$_POST)){
$this->_category = $_POST["category"];
}
else{
die('There was an error on the client. Your browser didn\'t send the appropriate information. Try refreshing the page.');
}
}
else{
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to add your category.');
}
}
示例10: user_admin_check
function user_admin_check()
{
$a = session_check(false);
if ($a && isAdminSite()) {
$acp = $_SESSION['SESS_ACCESS_SITES'];
if (in_array(SITENAME, $acp)) {
return true;
}
return false;
} else {
return false;
}
}
示例11: __construct
function __construct() {
if(session_check()) {
if(array_key_exists('uri',$_POST) && array_key_exists('template',$_POST)){
$this->_uri = $_POST['uri'] !== '_index_' ? str_replace('_','/',$_POST['uri']): $_POST['uri'];
$this->_template = $_POST['template'];
$this->template();
}
else{
die('Your browser did not send the right information. If you are working on an older browser please switch to a modern browser.');
}
}
else{
die('Your session has expired, please log back in.');
}
}
示例12: __construct
function __construct(){
if(session_check()){
if(array_key_exists('action',$_POST)){
$this->_dir = ROOT.DS.MAIN.DS.'config'.DS;
$this->_string = '<?php';
$this->$_POST['action']();
}
else{
die('The browser failed to send the right information. It is possible that you have a bad internet connection.');
}
}
else{
die('Your session has expired.');
}
}
示例13: __construct
function __construct(){
if(session_check()){
if(array_key_exists('replace',$_POST) && array_key_exists('template', $_POST)){
$this->_template = $_POST['template'];
$this->_replace = $_POST['replace'] === 'true' ? true : false;
$this->_path = ROOT.DS.MAIN.DS.'reflex'.DS.'templates'.DS;
$this->db_check();
}
else{
die('The browser failed to appropriately communicated with the server. Try reloading the page');
}
}
else{
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to replace your template.');
}
}
示例14: __construct
function __construct(){
if(array_key_exists('post',$_POST) && session_check()) {
$this->_post = $_POST['post'] === 'AP' ? 'ALL' : $_POST['post'];
if($this->_post !== '_index_'){
str_replace('_','/',$this->_post);
}
$filter = $_POST['post'] === 'AP' ? array('pending','spam') : 'ALL';
loadIntClass('get_comments');
$comm = new Get_comments($this->_post, $filter);
$this->_comments = $comm->commentsArr();
echo $this->write();
exit;
}
else{
die('Your session has expired. Please <a href="'.ADMIN_URL.'/logout" target="_self">login</a> again in order to add your category.');
}
}
示例15: getAPIListWhere
function getAPIListWhere($srcType, $authorCol = "creator,author")
{
$whr = "";
if (session_check(false)) {
if (checkUserRoles($srcType, "Allow Moderation Of All " . toTitle($srcType)) || $_SESSION['SESS_PRIVILEGE_ID'] <= 3) {
} else {
$authorCol = explode(",", $authorCol);
foreach ($authorCol as $a => $b) {
$authorCol[$a] = "{$b} LIKE '%[{$_SESSION['SESS_USER_ID']}]'";
}
$whr .= " AND (" . implode(" OR ", $authorCol) . " OR approved='true')";
}
} else {
$whr .= " AND approved='true'";
}
return $whr;
}