后台文件夹admin下common文件夹里的动作类函数文件action-class.php,和分页文件page-class.php 1. 动作类函数文件action-class.php <?php class action extends mysql { /** * 用户权限判断($uid, $shell, $m_id) */ public function Get_user_shell($uid, $shell) { $query = $this->select('p_admin', '*', '`uid` = /'' . $uid . '/''); $us = is_array($row = $this->fetch_array($query)); $shell = $us ? $shell == md5($row[username] . $row[password] . "TKBK") : FALSE; return $shell ? $row : NULL; } //end shell public function Get_user_shell_check($uid, $shell, $m_id = 9) { if ($row=$this->Get_user_shell($uid, $shell)) { if ($row[m_id] <= $m_id) { return $row; } else { echo "你无权限操作!"; exit (); } //end m_id } else { $this->Get_admin_msg('index.php','请先登陆'); } } //end shell //======================================== /** * 用户登陆超时时间(秒) */ public function Get_user_ontime($long = '3600') { $new_time = mktime(); $onlinetime = $_SESSION[ontime]; echo $new_time - $onlinetime; if ($new_time - $onlinetime > $long) { echo "登录超时"; session_destroy(); exit (); } else { $_SESSION[ontime] = mktime(); } } /**