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


PHP AUTH::logged_in方法代码示例

本文整理汇总了PHP中AUTH::logged_in方法的典型用法代码示例。如果您正苦于以下问题:PHP AUTH::logged_in方法的具体用法?PHP AUTH::logged_in怎么用?PHP AUTH::logged_in使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AUTH的用法示例。


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

示例1: require_user

 function require_user($auth_type = '')
 {
     if (AUTH::logged_in() == false) {
         if ($auth_type == "toolbar") {
             $_SESSION['toolbar'] = 'true';
         }
         //echo "what";
         die(include_once $_SERVER['DOCUMENT_ROOT'] . '/202-access-denied.php');
     }
     AUTH::set_timezone($_SESSION['user_timezone']);
 }
开发者ID:viasmonster,项目名称:prosper202,代码行数:11,代码来源:functions-auth.php

示例2: require_user

 function require_user()
 {
     if (AUTH::logged_in() == false) {
         die(include_once $_SERVER['DOCUMENT_ROOT'] . '/202-access-denied.php');
     }
 }
开发者ID:samuelpj,项目名称:prosper202,代码行数:6,代码来源:functions-auth.php

示例3: memcache_set_user_key

function memcache_set_user_key($sql)
{
    if (AUTH::logged_in() == true) {
        global $memcache;
        $sql = md5($sql);
        $user_id = $_SESSION['user_id'];
        $getCache = $memcache->get(md5($user_id . systemHash()));
        $queries = explode(",", $getCache);
        if (!in_array($sql, $queries)) {
            $queries[] = $sql;
        }
        $queries = implode(",", $queries);
        $setCache = $memcache->set(md5($user_id, $queries . systemHash()), false);
    }
}
开发者ID:viasmonster,项目名称:prosper202,代码行数:15,代码来源:functions-tracking202.php

示例4: header

<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php';
if (AUTH::logged_in()) {
    header('location: /202-Mobile/mini-stats');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $mysql['user_name'] = $db->real_escape_string($_POST['user_name']);
    $user_pass = salt_user_pass($_POST['user_pass']);
    $mysql['user_pass'] = $db->real_escape_string($user_pass);
    //check to see if this user exists
    $user_sql = "\tSELECT \t* \n\t\t\t\t\tFROM \t\t202_users  \n\t\t\t\t \tWHERE \tuser_name='" . $mysql['user_name'] . "'\n\t\t\t\t\tAND     \t\tuser_pass='" . $mysql['user_pass'] . "'";
    $user_result = _mysqli_query($user_sql);
    $user_row = $user_result->fetch_assoc();
    if (!$user_row) {
        $error['user'] = '<div class="error">Your username or password is incorrect.</div>';
    }
    //check tokens
    /* ($_POST['token'] != $_SESSION['token']) {
    		$error['token'] = '<div class="error">You must use theses forms to submit data.</div'; 
    	}*/
    //RECORD THIS USER LOGIN, into user_logs
    $mysql['login_server'] = $db->real_escape_string(serialize($_SERVER));
    $mysql['login_session'] = $db->real_escape_string(serialize($_SESSION));
    $mysql['login_error'] = $db->real_escape_string(serialize($error));
    $mysql['ip_address'] = $db->real_escape_string($_SERVER['REMOTE_ADDR']);
    $mysql['login_time'] = time();
    if ($error) {
        $mysql['login_success'] = 0;
    } else {
        $mysql['login_success'] = 1;
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:202-login.php


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