/** * 自动化初始值/处理数据 * * @return unknown */ public function beforeSave() { if ($this->isNewRecord) { isset($this->create_time) && ($this->create_time = time()); } $this->sort_order = intval($this->sort_order); $this->site_url = XUtils::convertHttp($this->site_url); return true; }
</em></div> <!--/上下篇--> <!--相关阅读--> <div id="relatedPost" class="bm"> <div class="boxTit clear"> <h3>相关阅读</h3> </div> <div class="bmc"> <ul class="list clear" id="raid_div"> <?php foreach ((array) Bagecms::getList('post', 'index_news', array('where' => "status_is='Y' AND catalog_id={$bagecmsShow['catalog_id']} AND id!={$bagecmsShow['id']}", 'order' => 'id DESC', 'limit' => 8)) as $newsKey => $newsRow) { ?> <li>• <a href="<?php if ($newsRow['redirect_url']) { echo XUtils::convertHttp($newsRow['redirect_url']); } else { echo $this->createUrl('post/show', array('id' => $newsRow['id'])); } ?> " target="_blank"><?php echo $newsRow['title']; ?> </a></li> <?php } ?> </ul> </div> </div>
?> </a> <?php } ?> </ul> </div> <div class="listBox clear"> <ul> <?php foreach ((array) $bagecmsDataList as $bagecmsKey => $bagecmsRow) { ?> <li class="full cl "> <div class="b_img"><a href="<?php if ($bagecmsRow->redirect_url) { echo XUtils::convertHttp($bagecmsRow->redirect_url); } else { echo $this->createUrl('post/show', array('id' => $bagecmsRow->id)); } ?> " target="_blank"><img src="<?php echo $this->_baseUrl; ?> /<?php echo $bagecmsRow->attach_thumb; ?> " alt="<?php echo $bagecmsRow->title; ?> " class="tn"></a></div> <h2><a href="<?php
?> </a> <?php } else { ?> 没有了 <?php } ?> </em><em class="floatR">下一篇: <?php if ($behind) { ?> <a href="<?php if ($behind[0]['redirect_url']) { echo XUtils::convertHttp($behind[0]['redirect_url']); } else { echo $this->createUrl('post/show', array('id' => $behind[0]['id'])); } ?> "><?php echo $behind[0]['title']; ?> </a> <?php } else { ?> 没有了 <?php } ?>