public function __mobile($f_name){
global $_W,$_GPC;
$op = $_GPC['op']?$_GPC['op']:'display';
$weid = $_W['weid'];
$useragent = addslashes($_SERVER['HTTP_USER_AGENT']);
if(strpos($useragent, 'MicroMessenger') === false && strpos($useragent, 'Windows Phone') === false ){
$pcurl='./baby/';
if($_GPC['do']=='photos'){
$vid=$_GPC['id'];
$pcurl='./baby/index.php?i=view&id='.$vid;
}else{
$pcurl='./baby/index.php';
}
header("location: ".$pcurl);
exit;
}
/*
$oauth_openid = "wcvote_openid".$weid;
if (empty($_COOKIE[$oauth_openid])) {
//$this->CheckCookie();
}
*/
/*
$list=pdo_fetchall("select * from ".tablename('adv_vote_user')." where weid=:weid AND coverimg is NULL",array(':weid'=>$_W['weid']));
foreach($list as $k=>$v){
$item=pdo_fetch("select * from ".tablename('adv_vote_photo')." where userid=".$v['id']);
if($item==false){
pdo_delete('adv_vote_user',array('id'=>$v['id']));
}else{
pdo_update('adv_vote_user',array('coverimg'=>$item['picurl']),array('id'=>$v['id']));
}
}
echo count($list);
exit;
pdo_query('delete from'.tablename('adv_vote_photo').' where picurl like \'images%\'');
die('aaa');
*/
/*加载全局量*/
$rule = pdo_fetch("select * from ".tablename('adv_vote_rule')." where weid = ".$weid);
/*
if($rule['starttime']>time()){
message('活动还未开始!');
}
if($rule['endtime']<time()){
message('活动已结束!');
}
*/
//验证是否已经关注
if(empty($_W['fans']['from_user'])){
$issubscribe=false;
}else{
$issubscribe=$this->_subscribe($_W['fans']['from_user']);
}
$theme_path="s/";
include_once 'site/'.strtolower(substr($f_name,8)).'.php';
}
public function doMobileIndex(){
$this->__mobile(__FUNCTION__);
}
调用
最新推荐文章于 2020-12-14 16:38:31 发布