[摘要]_COOKIE['Level'] != 4 )#header("Location: ../client_login.phtml");?>调用:<?in...
$_COOKIE['Level'] != 4 )
{
#header("Location: ../client_login.phtml");
}
?>
调用:
<?
include_once("/lib/session1.php");
include_once("/lib/session2.php");
include_once("/lib/session3.php");
include_once("/lib/session4.php");
?>
合并后的权限判断类:
sessionPower.php
<?php
/**
* @功能:根据cookie的值判断用户是否已经登录及用户的权限
* @程序员:xiangli
* @日期:2002-12-20
*/
class sessionPower{
var Username;//用户名
var Level;//用户权力级别
/**
* 判断用户是否已经登录
*/
function sessionPower()
{
$this->UserName = $HTTP_COOKIE_VARS['UserName'];//用户名
$this->Level = $HTTP_COOKIE_VARS['Level'];//权限级别
if ( $this->UserName == "" (北联网教程,专业提供视频软件下载)
……