Changeset 1839117
- Timestamp:
- 03/13/2018 06:24:41 AM (8 years ago)
- Location:
- prime-ads/trunk
- Files:
-
- 3 edited
-
inc/services/AdsHelper.php (modified) (3 diffs)
-
prime-ads.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
prime-ads/trunk/inc/services/AdsHelper.php
r1838590 r1839117 55 55 public $positions = array(); 56 56 57 public $screenWidth ;57 public $screenWidth = array(); 58 58 public $screenWidthInPx; 59 59 … … 154 154 155 155 $widthCond = ''; 156 if($this->screenWidth) 157 $widthCond = ' AND (`resolutions`="" OR `resolutions` LIKE "%[' . $this->screenWidth . ']%") '; 156 if($this->screenWidth){ 157 $widthCond = ' AND (`resolutions`=""'; 158 foreach ($this->screenWidth as $sWidth) { 159 $widthCond .= ' OR `resolutions` LIKE "%[' . $sWidth . ']%"'; 160 } 161 $widthCond .= ') '; 162 } 158 163 159 164 $sql .= ') AS t WHERE `is_active`=1 AND ((`by_timetable`=0 AND `position`=' . $position . ' ' . $widthCond . ') OR (`by_timetable`=1 AND ((`days_of_week` LIKE "%[' . date('w') . ']%" AND ((`not_show`=0 AND time_exp) OR (`not_show`=1 AND !time_exp)) AND `position`=' . $position . ' ' . $widthCond . ') OR (!(`days_of_week` LIKE "%[' . date('w') . ']%" AND ((`not_show`=0 AND time_exp) OR (`not_show`=1 AND !time_exp))) AND `position_not_in_timetable`=' . $position . '))))'; … … 649 654 public function setScreenWidth($width) 650 655 { 651 if($width < 360) $this->screenWidth = '<360';652 if($width >= 360 && $width < 600) $this->screenWidth = '360-600';653 if($width >= 600 && $width < 768) $this->screenWidth = '600-767';654 if($width >= 768 && $width < 1024) $this->screenWidth = '768-1023';655 if($width >= 1024) $this->screenWidth = '>1024';656 if($width >= 1280) $this->screenWidth = '>1280';657 if($width >= 1440) $this->screenWidth = '>1440';658 if($width >= 1920) $this->screenWidth = '>1920';656 if($width < 360) $this->screenWidth = array('<360'); 657 if($width >= 360 && $width < 600) $this->screenWidth = array('360-600'); 658 if($width >= 600 && $width < 768) $this->screenWidth = array('600-767'); 659 if($width >= 768 && $width < 1024) $this->screenWidth = array('768-1023'); 660 if($width >= 1024) $this->screenWidth = array('>1024'); 661 if($width >= 1280) $this->screenWidth[] = '>1280'; 662 if($width >= 1440) $this->screenWidth[] = '>1440'; 663 if($width >= 1920) $this->screenWidth[] = '>1920'; 659 664 } 660 665 -
prime-ads/trunk/prime-ads.php
r1838590 r1839117 3 3 Plugin Name: Prime Ads 4 4 Description: Вывод рекламы с сервиса Prime Ads 5 Version: 2.1. 05 Version: 2.1.1 6 6 Author: Proffit 7 7 Author URI: http://proffit.guru/ … … 19 19 use AdsNS\SxGeo\SxGeo; 20 20 21 define('ADS_VERSION', '2.1. 0');21 define('ADS_VERSION', '2.1.1'); 22 22 define('ADS_DB_VERSION', '2.0.4'); 23 23 define('ADS_PATH', realpath(__DIR__)); -
prime-ads/trunk/readme.txt
r1838590 r1839117 7 7 Requires at least: 4.0 8 8 Tested up to: 4.7 9 Stable tag: 2.1. 09 Stable tag: 2.1.1 10 10 11 11 Ответная часть сервиса монитизации Prime Ads (http://primeads.ru)
Note: See TracChangeset
for help on using the changeset viewer.