调用

     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__);
	}	


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值