class CommonClass { var $set; var $tplPath; var $siteTitle; var $input = array(); //获取全局变量的$_GET变量 var $sess = array(); //获得全局变量的$_SESSION变量 function showCheck() { //数据输入简单格式化 if (!$this->input['userName'] || !$this->input['passWord']){ $err="所有资料必须填写,请不要留空。"; $this->wrongPage($err,$url="main.php?mod=login"); } if($this->form_loginCheck($this->input['userName'],$this->input['passWord'])){ $this->setSessionPara('sess_adminlogin',$this->input['userName']); $this->setSessionPara('sess_adminpass',$this->input['passWord']); $userName = $this->input['userName']; $err="$userName:您已经成功登陆,2秒钟后程式自动转移到正确页面。"; $this->wrongPage($err,$url="index.php"); } else { $err="$userName:您输入的用户名或者密码错误。"; $this->wrongPage($err,$url="main.php?mod=login"); } } // end func //+---------------------------------------------------------------------------- //注册session变量 function setSessionPara($sessName,$sessValue) { global $HTTP_SESSION_VARS; session_register($sessName); $HTTP_SESSION_VARS[$sessName] = $sessValue; } //+4--------------------------------------------------------------------------- function wrongPage($err,$url="index.php",$turn=1) { global $set; //信息提示函数 echo " 操作提示 "; if ($turn==1) { echo ""; } echo "

 

 

 

 提示信息

$err


若您不能解决,请联系:Torune  
"; exit; } //end func }// end class ?>