query($sql); $users = $_SGLOBAL['db']->fetch_array($query); //获取所有的参数 $gid=$_SGET['id']?$_SGET['id']:""; $catid=$_SGET['catid']?$_SGET['catid']:""; $disuid=$_SGET['disuid']?$_SGET['disuid']:""; // var_dump($_SCOOKIE["openids"]); //不存在的用户 if (empty($_SCOOKIE["openids"])) { if($users['openid']==''){ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false and $ac!='wcauthorize') { if(!empty($disuid)){ header("Location:".$_SCONFIG['webroot']."index-wcauthorize-op-getcode-gid-".$gid."-catid-".$catid."-disuid-".$disuid.".html"); }else{ header("Location:".$_SCONFIG['webroot']."index-wcauthorize-op-getcode.html"); die; } } } # code... }*/ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false and $ac!='wcauthorize') { if (empty($_SGLOBAL["tq_uid"]) and $ac!='wxlogin') { header("Location:".$_SCONFIG['webroot']."index-wxlogin-op-getcode-page-".$ac."-id-".$_SGET['id']."-catid-".$_SGET['catid']."-rid-".$_SGET['rid'].".html"); }/*else{ $sql="select openid from ".$_SC['tablepre']."user where openid='".$_SCOOKIE["openids"]."'"; $query = $_SGLOBAL['db']->query($sql); $users = $_SGLOBAL['db']->fetch_array($query); if($users){ header("Location:".$_SCONFIG['webroot']."index-wxlogin.html"); } }*/ } if(isset($_SGET['ac']) && $_SGET['ac']=='exit'){ SC_User::user_loginout(); showmessage('安全退出成功', $_SCONFIG['webroot'].'index.html',3); } if(isset($_SGET['ac']) && $_SGET['ac']=='shopexit'){ SC_User::user_loginout(); showmessage('安全退出成功', $_SCONFIG['webroot'].'do-shoplogin.html',3); } user_log(); include S_ROOT."controller/".$_SCLIENT['type']."/".$ac.".php"; ?>