...
|
...
|
@@ -28,7 +28,7 @@ |
|
|
</div>
|
|
|
<div class="content-wrap clearfix">
|
|
|
<div class="fluid-list">
|
|
|
<div class="fluid-list-inner main-layout clearfix" id="img_flow">
|
|
|
<div id="index_content" class="fluid-list-inner main-layout clearfix" id="img_flow">
|
|
|
<?php
|
|
|
$this->_widget('news_list', array('list'=> $this->view->news));
|
|
|
?>
|
...
|
...
|
@@ -153,12 +153,17 @@ EOL; |
|
|
$banners = $this->view->rightBanners;
|
|
|
$temp = array();
|
|
|
$len = count($banners);
|
|
|
if($len >=3)
|
|
|
if($len >=3 && is_numeric($len)&($len&1))
|
|
|
{
|
|
|
$temp = array_slice($banners, 0, 1);
|
|
|
$pos = rand(1, $len - 1);
|
|
|
$pos = rand(1, $len);
|
|
|
$banners = array_merge($temp, array_slice($banners, $pos, 1));
|
|
|
}
|
|
|
if($len >3 && is_numeric($len)&(!($len&1))){
|
|
|
$temp = array_slice($banners, 0, 1);
|
|
|
$pos = rand(1, $len);
|
|
|
$banners = array_merge($temp, array_slice($banners, $pos, 2));
|
|
|
}
|
|
|
foreach($banners as $banner):
|
|
|
$res_size = json_decode($banner['res_size'], true);
|
|
|
if($res_size['height'] < 308 && $res_size['width']< 308)
|
...
|
...
|
|