Example #1
0
 public function doMobileAjaxReg()
 {
     global $_W, $_GPC;
     $weid = $_W['weid'];
     $uniacid = $_W['uniacid'];
     $id = intval($_GPC['id']);
     $openid = Mobile_GetOpenid();
     $rd = Mobile_GetWeivoteVote($this, $uniacid, $id);
     if (!$rd->getState()) {
         return $rd->toJson();
     }
     $weivote_vote = $rd->getData();
     $rd = Mobile_GetMember($this, $uniacid, $id, $openid);
     if (!$rd->getState()) {
         return $rd->toJson();
     }
     $fans = $rd->getData('fans');
     $member = $rd->getData('member');
     $follow = $fans['follow'];
     $rd = new ReturnData(null);
     $rd->addData('member', $member);
     return $rd->toJson();
 }
Example #2
0
function Mobile_GetMember($theThis, $uniacid, $id, $openid)
{
    global $_W, $_GPC;
    $rd = new ReturnData("");
    load()->model('account');
    $account = uni_fetch();
    load()->model('mc');
    $fans = mc_fansinfo($openid, $uniacid);
    $member = mc_fetch($fans['uid'], array('realname', 'mobile', 'qq', 'msn'));
    if (empty($member)) {
        $rd->setMsg("无法识别您的身份,请发送关键字到公众号 “" . $account['name'] . "” 参加活动");
        $rd->setCode(200);
    }
    $rd->addData('fans', $fans);
    $rd->addData('member', $member);
    return $rd;
}
Example #3
0
function Web_ManageLog($theThis, $uniacid, $pindex, $psize, $condition, $vid)
{
    $list = pdo_fetchall("SELECT * FROM " . tablename($theThis->table_log) . " WHERE uniacid = '{$uniacid}' AND vid = '{$vid}' {$condition} ORDER BY id DESC LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
    $total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename($theThis->table_log) . " WHERE uniacid = '{$uniacid}' AND vid = '{$vid}' {$condition}");
    $pager = pagination($total, $pindex, $psize);
    $rd = new ReturnData("");
    $rd->addData('list', $list);
    $rd->addData('total', $total);
    $rd->addData('pager', $pager);
    //$title = var_export($rd, true);
    return $rd;
}