示例#1
0
文件: Link.php 项目: tecshuttle/51qsk
 /**
  * 自动化初始值/处理数据
  *
  * @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;
 }
示例#2
0
      </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>
示例#3
0
    ?>
</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 
示例#4
0
    ?>
</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 
}
?>