function getLatestPlug($appid=0) { $clientType = I('request.clientType','','trim'); $plugID = I('request.plugID','','trim'); _log('getLatestPlug,clientType='.$clientType.',plugID='.$plugID.',appid='.$appid); if(!$plugID && !$appid) { $this->out(null,1); } $platform = $this->getPlatformByClientType($clientType); if(!$platform) { $this->out(null, 1); } $data = array(); $data['PlugList'] = array(); $re = getLatestPlug($appid, $platform,$plugID); if(!$re) { $this->out(null,5); } $data['PlugList'] = $re; $this->out($data); }
public function export() { $id = I('get.id',0,'intval'); if(!$id) { $this->error('参数错误'); } $data = array( 'AppServerAPIAddr'=>API_ADDRESS, 'AppInfo'=>array(), 'PlugList'=>array()); $appinfo = getLatestApp($id); if(!$appinfo) { $this->error('APP不存在'); } $data['AppInfo'] = $appinfo; $pluginfo = getLatestPlug($id); if($pluginfo) { $data['PlugList'] = $pluginfo; } $this->out($data,0,'',0,'xml'); }