コード例 #1
0
ファイル: Theme.class.php プロジェクト: vvcumt/zk
 public function getBannerProtocol($rows, $nType = 0)
 {
     $arrBanner = array();
     $coolxius = array();
     $strBannerId = '';
     foreach ($rows as $row) {
         $strBannerId = $row['bannerid'];
         if (!array_key_exists($row['bannerid'], $arrBanner)) {
             $banner = new BannerProtocol();
             $banner->setBanner($row['bannerurl'], $row['bannername']);
             $arrBanner = $arrBanner + array($strBannerId => $banner);
         }
         $strThemeId = $row['identity'];
         if (!array_key_exists($row['identity'], $arrBanner[$strBannerId]->bannerRes)) {
             $theme = new ThemesProtocol();
             $theme->setVercode($this->_nVercode);
             $theme->setKernelCode($this->_nKernel);
             $theme->setProtocol($row, $this->_nChannel);
             $arrBanner[$strBannerId]->setBannerRes($strThemeId, $theme);
         }
         $prev = new PrevProtocol();
         if ((int) $row['prev_type'] == 1) {
             $arrBanner[$strBannerId]->bannerRes[$strThemeId]->setMainPrev($row);
         }
         $prev->setPrev($row);
         $arrBanner[$strBannerId]->bannerRes[$strThemeId]->pushPrevImg($prev);
     }
     $arr_coolxius = array();
     foreach ($arrBanner as $key => $temBanner) {
         $temBanner = $temBanner->getProtocol($this->strType);
         array_push($arr_coolxius, $temBanner);
     }
     return $arr_coolxius;
 }
コード例 #2
0
ファイル: Font.class.php プロジェクト: vvcumt/zk
 public function getBannerProtocol($rows, $nType = 0)
 {
     $arrBanner = array();
     foreach ($rows as $row) {
         $strBannerId = $row['bannerid'];
         if (!array_key_exists($strBannerId, $arrBanner)) {
             $banner = new BannerProtocol();
             $banner->setBanner($row['bannerurl'], $row['bannername']);
             $arrBanner = $arrBanner + array($strBannerId => $banner);
         }
         $font = new FontProtocol();
         $font->setVercode($this->_nVercode);
         $font->setKernelCode($this->_nKernel);
         $font->setProtocol($row, $this->_nChannel);
         $arrBanner[$strBannerId]->setBannerRes($row['id'], $font);
     }
     $arrProtocol = array();
     foreach ($arrBanner as $key => $temBanner) {
         $temBanner = $temBanner->getProtocol($this->strType);
         array_push($arrProtocol, $temBanner);
     }
     return $arrProtocol;
 }
コード例 #3
0
ファイル: Alarm.class.php プロジェクト: vvcumt/zk
 public function getBannerProtocol($rows, $nType = 0)
 {
     $arrBanner = array();
     $strBannerId = '';
     foreach ($rows as $row) {
         $strBannerId = $row['bannerid'];
         if (!array_key_exists($row['bannerid'], $arrBanner)) {
             $banner = new BannerProtocol();
             $banner->setBanner($row['bannerurl'], $row['bannername']);
             $arrBanner = $arrBanner + array($strBannerId => $banner);
         }
         $alarm = new AlarmProtocol();
         $alarm->setProtocol($row, $this->_nChannel);
         $arrBanner[$strBannerId]->setBannerRes($row['identity'], $alarm);
     }
     $arrProtocol = array();
     foreach ($arrBanner as $key => $temBanner) {
         $temBanner = $temBanner->getProtocol('alarm');
         array_push($arrProtocol, $temBanner);
     }
     return $arrProtocol;
 }
コード例 #4
0
ファイル: Wallpaper.class.php プロジェクト: vvcumt/zk
 public function getBannerProtocol($rows, $nType = 0)
 {
     $arrBanner = array();
     $coolxius = array();
     foreach ($rows as $row) {
         $strBannerId = $row['bannerid'];
         if (!array_key_exists($strBannerId, $arrBanner)) {
             $banner = new BannerProtocol();
             $banner->setBanner($row['bannerurl'], $row['bannername']);
             $arrBanner = $arrBanner + array($strBannerId => $banner);
         }
         if (!array_key_exists($row['cpid'], $arrBanner[$strBannerId]->bannerRes)) {
             $strWpId = $row['cpid'];
             $wp = new WallpaperProtocol();
             $wp->setVercode($this->_nVercode);
             $wp->setWallpaper($row, $this->_nChannel);
             $arrBanner[$strBannerId]->setBannerRes($strWpId, $wp);
         }
     }
     $arr_coolxius = array();
     foreach ($arrBanner as $key => $temBanner) {
         $temBanner = $temBanner->getProtocol($this->strType);
         array_push($arr_coolxius, $temBanner);
     }
     return $arr_coolxius;
 }