auth.php

来自「一个通用的php网站的会员系统和通行证系统」· PHP 代码 · 共 30 行

PHP
30
字号
<?php
define("CLS_Auth_OK", 0);
define("CLS_Auth_USER_STOPPED", 1);
define("CLS_Auth_USERNAMEORPASSWORD_ERROR", 2);

class Auth {
	var $session = array();
	var $errorCode = 0;

	function Auth() 
	{
		global $SYS_ENV;

		$this->cookie_name_sid = $SYS_ENV['passport']['CookiePre'].'sid';
		$this->cookie_name_userid = $SYS_ENV['passport']['CookiePre'].'userid';
		$this->cookie_name_password = $SYS_ENV['passport']['CookiePre'].'password';

		//鎸夌収GET,POST,COOKIE鐨勯爢搴忚畝鍙杝id
		$this->sId = isset($_GET['sId']) ? $_GET['sId'] : (isset($_POST['sId']) ? $_POST['sId'] : $_COOKIE[$this->cookie_name_sid]); 

 		$this->UserID = kAddslashes($_COOKIE[$this->cookie_name_userid]);
		$this->Password = kAddslashes($_COOKIE[$this->cookie_name_password]);

		$this->OnlineHold = &$SYS_ENV['passport']['OnlineHold'];
		$this->Ip = $GLOBALS['IN']['IP_ADDRESS'];
		$this->cookiepath = &$SYS_ENV['passport']['CookiePath'];
		$this->cookiedomain = &$SYS_ENV['passport']['CookieDomain'];
		$this->CheckIP = &$SYS_ENV['passport']['CheckIP'];
		$this->timestamp = time();
		$this->init(); //modity by easyT,2007.11.29,鍘绘帀鍘熶締鐨勮ɑ閲嬶紝姣忔

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?