if ( query($object->FromUserName) <> ""){
$content[] = array("Title" =>"会员卡",
"Description" =>"点击图片进入会员卡管理",
"PicUrl" =>"http://pic2.ooopic.com/01/38/77/75bOOOPICea.jpg",
"Url" =>"http://yijc168.sinaapp.com/member.php?openid=".$object->FromUserName);
}else{
$content[] = array("Title" =>"办卡服务",
"Description" =>"点击图片开始登记办卡",
"PicUrl" =>"http://pic2.ooopic.com/01/38/77/75bOOOPICea.jpg",
"Url" =>"http://yijc168.sinaapp.com/order.php?openid=".$object->FromUserName);
}
---------------------------------------------------------
private function query($fromID)
{
//$fromID=$object->FromUserName;
$obj=M('member');
$result=$obj->field('cardid')->where('openid='.$fromID)->select();
$cardid='';
foreach($result as $v)
{
if($v['cardid']<>'')
{
$cardid=$v['cardid'];
}
}
return $cardid;
}