function widget_hotlog($title) { $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getHotLog($index_hotlognum); ?> <li> <h3><span><?php echo $title; ?> </span></h3> <ul id="hotlog"> <?php foreach ($randLogs as $value) { ?> <li><a href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> </li> <?php }
$tag_cache = $CACHE->readCache('tags'); $sort_cache = $CACHE->readCache('sort'); $newtws_cache = $CACHE->readCache('newtw'); $com_cache = $CACHE->readCache('comment'); $newLogs_cache = $CACHE->readCache('newlog'); $record_cache = $CACHE->readCache('record'); // 文章所属分类 $log_cache_sort = $CACHE->readCache('logsort'); // 文章标签 $log_cache_tags = $CACHE->readCache('logtags'); $istwitter = Option::get('istwitter'); // 热门文章 && 随机文章 $index_hotlognum = Option::get('index_hotlognum'); $index_randlognum = Option::get('index_randlognum'); $Log_Model = new Log_Model(); $hotLogs = $Log_Model->getHotLog($index_hotlognum); $randLogs = $Log_Model->getRandLog($index_randlognum); global $widgets_exist; global $widgets_num; global $widgets_arr; $widgets_exist = array(); $widgets_num = 0; $widgets_arr = array('home'); // 个人资料 function widget_blogger($title, $exists = true) { global $widgets_exist; $widgets_exist['blogger']['title'] = $title; $widgets_exist['blogger']['exists'] = $exists; } // 日历
function widget_hotlog($title) { $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getHotLog($index_hotlognum); $row['content'] = strip_tags($row['content']); ?> <?php foreach ($randLogs as $value) { ?> <div class="random_text_log"> <a href="<?php echo Url::log($value['gid']); ?> "> <h3> <i class="fa fa-quote-left"></i> <?php echo mb_substr($value['title'], 0, 12, 'utf-8'); ?> </h3> <?php echo subString(strip_tags($value['log_description']), 0, 30); ?> </a> </div> <?php } ?> <?php }
function widget_hotlog($title) { $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getHotLog($index_hotlognum); ?> <div class="widget widget_hotlog widget_log_list"> <h3><?php echo $title; ?> </h3> <ul class="J_log_list"> <?php foreach ($randLogs as $value) { ?> <li><i class="fa fa-list-ul"></i> <a href="<?php echo Url::log($value['gid']); ?> " title="<?php echo $value['title']; ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> </div> <?php }
function widget_hotlog($title) { $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $hotLogs = $Log_Model->getHotLog($index_hotlognum); ?> <h4><?php echo $title; ?> </h4> <ul class="list-unstyled"> <?php foreach ($hotLogs as $value) { ?> <li><a href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> <?php }
function widget_newlog($title) { ?> <div id="tab-title"><h3><span class="">最新文章</span><span class="">热门文章</span><span class="selected">随机文章</span></h3> <div id="tab-content"> <?php global $CACHE; $newLogs_cache = $CACHE->readCache('newlog'); ?> <ul class="hide" style="display: none; "> <?php foreach ($newLogs_cache as $value) { ?> <li><a href="<?php echo Url::log($value['gid']); ?> " rel="bookmark" title="详细阅读<?php echo $value['title']; ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> <?php $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getHotLog($index_hotlognum); ?> <ul class="hide" style="display: none; "> <?php foreach ($randLogs as $value) { ?> <li><a href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> <?php $index_randlognum = Option::get('index_randlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getRandLog($index_randlognum); ?> <ul class="hide" style="display: block; "> <?php foreach ($randLogs as $value) { ?> <li><a href="<?php echo Url::log($value['gid']); ?> " rel="bookmark" title="详细阅读 <?php echo $value['title']; ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> </div> </div> <?php }
function widget_hotlog($title) { $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getHotLog($index_hotlognum); ?> <ul id="hotlog"> <?php foreach ($randLogs as $key => $value) { ?> <?php if ($key == 0) { ?> <li><span><strong><?php echo $key + 1; ?> </strong></span><a href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } elseif ($key == 1) { ?> <li><span><strong><?php echo $key + 1; ?> </strong></span><a href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } else { ?> <li><span><strong><?php echo $key + 1; ?> </strong></span><a href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> <?php } ?> </ul> </li> <?php }
function widget_hotlog($title) { $index_hotlognum = Option::get('index_hotlognum'); $Log_Model = new Log_Model(); $randLogs = $Log_Model->getHotLog($index_hotlognum); ?> <aside class="widget clearfix widget_recent_entries" id="recent-posts"> <h3 class="widget-title"><?php echo $title; ?> </h3> <ul> <?php foreach ($randLogs as $value) { ?> <li><a title="<?php echo $value['title']; ?> " href="<?php echo Url::log($value['gid']); ?> "><?php echo $value['title']; ?> </a></li> <?php } ?> </ul> </aside> <?php }