Showing
1 changed file
with
2 additions
and
10 deletions
@@ -151,16 +151,8 @@ EOL; | @@ -151,16 +151,8 @@ EOL; | ||
151 | } | 151 | } |
152 | foreach($banners as $banner): | 152 | foreach($banners as $banner): |
153 | $res_size = json_decode($banner['res_size'], true); | 153 | $res_size = json_decode($banner['res_size'], true); |
154 | - if($res_size['height'] < 308 && $res_size['width']< 308) | ||
155 | - { | ||
156 | - $height = $res_size['height']; | ||
157 | - $width = $res_size['width']; | ||
158 | - } | ||
159 | - else | ||
160 | - { | ||
161 | - $height = ceil($res_size['height'] * (308 / $res_size['width'])); | ||
162 | - $width = 308; | ||
163 | - } | 154 | + $height = ceil($res_size['height'] * (308 / $res_size['width'])); |
155 | + $width = 308; | ||
164 | ?> | 156 | ?> |
165 | <div class="image-box" style="padding-bottom: 30px;"> | 157 | <div class="image-box" style="padding-bottom: 30px;"> |
166 | <a href="<?php echo $banner['url']?>" target="_blank" style="<?php echo sprintf("height:%spx;width:%spx;overflow:hidden;", $height, $width);?>"> | 158 | <a href="<?php echo $banner['url']?>" target="_blank" style="<?php echo sprintf("height:%spx;width:%spx;overflow:hidden;", $height, $width);?>"> |
-
Please register or login to post a comment