* @author Martin Staník * @license Mediatel's GPL http://wiki.zs.loc/index.php/Mediatel_license * @link http://www.zs.loc/git/gitweb.cgi?p=EDBM/reservationsystem/.git;a=summary * **/ /** * ReservationSystem - class AorsReservationBanner reservation entity for banners * PHP version 5 * * @category PHP * @package ReservationSystem * @author Dimiter Tsonev * @author Martin Staník * @license Mediatel's GPL http://wiki.zs.loc/index.php/Mediatel_license * @link http://www.zs.loc/git/gitweb.cgi?p=EDBM/reservationsystem/.git;a=summary * **/ class AorsReservationBanner extends AorsReservation { public $rsImgWidth = null; public $rsImgHeight = null; public $rsBannerPlace = null; /** * additionalConstruct - add special banner init values * * @param int $imgWidth image width * @param int $imgHeight image height * @param string $bannerPos image pos * * @return null */ public function additionalConstruct($imgWidth, $imgHeight, $bannerPos) { $this->rsImgWidth = $imgWidth; $this->rsImgHeight = $imgHeight; $this->rsBannerPlace = $bannerPos; }//end additionalConstruct() /** * addCreative - adds specific parameters for banner to array and adss in AO * * @return mixed -1 error, or id with creative */ protected function addCreative() { $arr = parent::addCreative(); if ($this->rsType === 'BANNER_IMG') { $arr = array_merge($arr, array( 'templateID' => _AO_CREATIVE_TMPL_BNR_IMG, 'param_targeturl' => $this->rsTargetUrl, 'param_imgpath' => $this->rsImgUrl, )); } else { $arr = array_merge($arr, array( 'templateID' => _AO_CREATIVE_TMPL_BNR_FLASH, 'param_width_bill' => $this->rsImgWidth, 'param_height_bill' => $this->rsImgHeight, 'param_swf_file_bill' => $this->rsImgUrl, 'param_redirection' => $this->rsTargetUrl, 'param_swf_transparency' => 'opaque', 'param_background_color' => '#ffffff', )); } $res = $this->aoLink->addCreative($arr); return $res; }//end addCreative() /** * addOrder -adds spefific parameter for banner order and adds order to AO * * @return mixed -1 error, or id of order */ protected function addOrder() { $arr = parent::addOrder(); $arr = array_merge($arr, array('placementIDs' => $this->rsBannerPlace, )); $res = $this->aoLink->addOrder($arr); return $res; }//end addOrder() /** * addCapping - on banners capping causes error * * @return int all the time -1 */ protected function addCapping() { $res = -1; return $res; }//end addCapping() /** * addTargeting - on banners no targetting * * @return int all the time -1 */ protected function addTargeting() { $res = -1; return $res; }//end addTargeting() /** * updateCreative - no updating of creative, content in flash or img * * @return null */ protected function updateCreative() { $res = ''; return $res; }//end updateCreative() /** * updateCapping - no updating of capping, banners independent on kw or heading * * @return null */ protected function updateCapping() { $res = ''; return $res; }//end updateCapping() /** * updateTargetting - no updating of targeting,banners independent on kw or heading * * @return null */ protected function updateTargetting() { $res = ''; return $res; }//end updateTargetting() }//end class ?>