getRow ( "SELECT * FROM " . $GLOBALS['ecs']->table('weixin_act') . " WHERE `aid` = $aid and isopen=1" ); if(!$act) exit("活动已经结束"); $actList = (array)$db->getAll ( "SELECT * FROM " . $GLOBALS['ecs']->table('weixin_actlist') . " where aid=$aid and isopen=1" ); if(!$actList) exit("活动未设置奖项"); $sql = "SELECT " . $GLOBALS['ecs']->table('weixin_actlog') . ".*," . $GLOBALS['ecs']->table('weixin_user') . ".nickname FROM " . $GLOBALS['ecs']->table('weixin_actlog') . " left join " . $GLOBALS['ecs']->table('weixin_user') . " on " . $GLOBALS['ecs']->table('weixin_actlog') . ".uid=" . $GLOBALS['ecs']->table('weixin_user') . ".ecuid where code!='' and aid=$aid order by lid desc"; $award = $db->getAll ( $sql ); $uid = intval($_SESSION['user_id']); $api = new weixinapi(); $awardNum = intval($api->getAwardNum($aid)); require("award_{$act['tpl']}.php"); ?>