public function showMultiAds() {/*{{{*/ $wapAdsList = WapAdsClient::getInstance()->showMultiWapAds(); $infos = array(); foreach($wapAdsList as $wapAds) { $info['adsId'] = $wapAds->id; $info['description'] = $wapAds->description; $info['imgUrl'] = $wapAds->getImage4Mobile(); $info['targetUrl'] = $wapAds->targetUrl; $info['canSkip'] = $wapAds->canSkip; $infos[] = $info; } $this->content = $infos; }/*}}}*/
public function doEditWapAds($request, $response) { /*{{{*/ $params = array(); $id = $request->getRequest('id'); $params['adsUrl'] = $request->icon; $params['targetUrl'] = $request->targetUrl; $params['startTime'] = $request->startTime; $params['endTime'] = $request->endTime; $params['description'] = $request->description; $params['canSkip'] = $request->canSkip; $params['utime'] = XDateTime::now(); WapAdsClient::getInstance()->updateWapAds($id, $params); $response->setRedirect($response->router->urlfor('wap/editWapAds', array('id' => $id, 'msg' => '修改成功!'))); }