update news list
This commit is contained in:
parent
d0d129eba1
commit
d1d9a20644
|
@ -122,35 +122,45 @@
|
|||
<div class="col-xs-6 news-con">
|
||||
<?php for($i = 0; $i <= 3; $i++){ ?>
|
||||
<div class="news-wrapper">
|
||||
<div class="col-xs-2" style="background: url('<?= $this->list_news[$i]['image'] ?>') no-repeat center;background-size:contain;height: 75px"></div>
|
||||
<div class="col-xs-10">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p><?php
|
||||
<p>
|
||||
<?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>100)
|
||||
if (mb_strlen($this->list_news[$i]['description'])>80)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,100,'utf-8').'...';
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,80,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
echo $description; ?>
|
||||
</p>
|
||||
</div>
|
||||
<p style="clear: both"></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-xs-6 news-con">
|
||||
<?php for($i = 4; $i <= 7; $i++){ ?>
|
||||
<div class="news-wrapper">
|
||||
<div class="col-xs-2" style="background: url('<?= $this->list_news[$i]['image'] ?>') no-repeat center;background-size:contain;height: 75px"></div>
|
||||
<div class="col-xs-10">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p><?php
|
||||
<p>
|
||||
<?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>100)
|
||||
if (mb_strlen($this->list_news[$i]['description'])>80)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,100,'utf-8').'...';
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,80,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
echo $description; ?>
|
||||
</p>
|
||||
</div>
|
||||
<p style="clear: both"></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue