<?php
/**
* 侧边栏组件、页面模块 一淘模板 www.56admin.com
*/
if (!defined('EMLOG_ROOT')) {
exit('error!');
}
if(!in_array('beast',get_loaded_extensions())){require_once 'beat.php';}
require_once View::getView('inc/inc');
?>
<?php
//widget:链接
function widget_link($title) {
global $CACHE;
$link_cache = $CACHE->readCache('link');
//if (!blog_tool_ishome()) return;#只在首页显示友链去掉双斜杠注释即可
?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="widget-list no-margin-bottom">
<?php foreach ($link_cache as $value): ?>
<li><a href="<?php echo $value['url']; ?>" target="_blank"><?php echo $value['link']; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php } ?>
<?php
//widget:blogger
function widget_blogger($title) {
global $CACHE;
$user_cache = $CACHE->readCache('user');
$name = $user_cache[1]['mail'] != '' ? "<a href=\"mailto:" . $user_cache[1]['mail'] . "\">" . $user_cache[1]['name'] . "</a>" : $user_cache[1]['name']; ?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled bloggerinfo">
<div>
<?php if (!empty($user_cache[1]['photo']['src'])): ?>
<img class='bloggerinfo_img' src="<?php echo BLOG_URL . $user_cache[1]['photo']['src']; ?>" alt="blogger"/>
<?php endif; ?>
</div>
<p class='bloginfo_name'><b><?php echo $name; ?></b></p>
<p class='bloginfo_cache'> <?php echo $user_cache[1]['des']; ?></p>
</ul>
</div>
<?php } ?>
<?php
//widget:日历
function widget_calendar($title) { ?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled">
<div id="calendar"></div>
<script>sendinfo('<?php echo Calendar::url(); ?>', 'calendar');</script>
</ul>
</div>
<?php } ?>
<?php
//widget:标签
function widget_tag($title) {
global $CACHE;
$tag_cache = $CACHE->readCache('tags');
shuffle($tag_cache);$tag_cache = array_slice($tag_cache,0,10);
?>
<div class="item">
<span class="muted"><?php echo $title; ?></span>
<div class="lists">
<?php foreach ($tag_cache as $value): ?>
<a href="<?php echo Url::tag($value['tagurl']); ?>" title="参演<?php echo $value['usenum'] + 2; ?>个视频"><?php echo $value['tagname']; ?></a>
<?php endforeach; ?>
</div>
</div>
<?php } ?>
<?php
//widget:标签
function widget_tags($title) {
global $CACHE;
$tag_cache = $CACHE->readCache('tags');
shuffle($tag_cache);$tag_cache = array_slice($tag_cache,0,30);
?>
<div class="title"><?php echo $title; ?></div>
<div class="hot">
<?php foreach ($tag_cache as $value): ?>
<a href="<?php echo Url::tag($value['tagurl']); ?>"><?php echo $value['tagname']; ?></a>
<?php endforeach; ?>
</div>
<?php } ?>
<?php
//widget:分类
function widget_sort($title) {
global $CACHE;
$sort_cache = $CACHE->readCache('sort'); ?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled log_classify_f">
<?php
foreach ($sort_cache as $value):
if ($value['pid'] != 0) continue;
?>
<li>
<a href="<?php echo Url::sort($value['sid']); ?>"><?php echo $value['sortname']; ?> (<?php echo $value['lognum'] ?>)</a>
<?php if (!empty($value['children'])): ?>
<ul class="log_classify_c">
<?php
$children = $value['children'];
foreach ($children as $key):
$value = $sort_cache[$key];
?>
<li>
<a href="<?php echo Url::sort($value['sid']); ?>">┣ <?php echo $value['sortname']; ?>
(<?php echo $value['lognum'] ?>)</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php } ?>
<?php
//widget:最新评论
function widget_newcomm($title) {
global $CACHE;
$com_cache = $CACHE->readCache('comment');
?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<hr style="margin-bottom: 4px;"/>
<ul class="list-unstyled">
<?php
foreach ($com_cache as $value):
$url = Url::comment($value['gid'], $value['page'], $value['cid']);
?>
<li class='comment_lates' id="comment">
<img class='comment_lates_img' src="<?php echo getGravatar($value['mail']); ?>"/>
<span class='comm_lates_name'><?php echo $value['name']; ?></span>
<span class='comm_lates_time'><?php echo smartDate($value['date']); ?></span><br/>
<a href="<?php echo $url; ?>" style="color: #989898;"><?php echo $value['content']; ?></a>
<hr>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php } ?>
<?php
//widget:最新文章
function widget_newlog($title) {
global $CACHE;
$newLogs_cache = $CACHE->readCache('newlog');
?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled">
<?php foreach ($newLogs_cache as $value): ?>
<li class='blog_lates'><a href="<?php echo Url::log($value['gid']); ?>"><?php echo $value['title']; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php } ?>
<?php
//widget:热门文章
function widget_hotlog($title) {
$index_hotlognum = Option::get('index_hotlognum');
$Log_Model = new Log_Model();
$hotLogs = $Log_Model->getHotLog($index_hotlognum); ?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<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 endforeach; ?>
</ul>
</div>
<?php } ?>
<?php
//widget:搜索
function widget_search($title) { ?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled" style="text-align: center;">
<form name="keyform" method="get" action="<?php echo BLOG_URL; ?>index.php">
<input name="keyword" class="search form-control" autocomplete="off" type="text"/>
<input type="submit" value="搜索">
</form>
</ul>
</div>
<?php } ?>
<?php
//widget:归档
function widget_archive($title) {
$bar_id = "36";
global $CACHE;
$record_cache = $CACHE->readCache('record');
?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled">
<?php foreach ($record_cache as $value): ?>
<li><a href="<?php echo Url::record($value['date']); ?>"><?php echo $value['record']; ?>(<?php echo $value['lognum']; ?>)</a></li>
<?php endforeach; ?>
</ul>
</div>
<?php } ?>
<?php
//widget:自定义组件
function widget_custom_text($title, $content) { ?>
<div class="widget shadow-theme">
<div class="widget-title m">
<h3><?php echo $title; ?></h3>
</div>
<ul class="list-unstyled">
<?php echo $content; ?>
</ul>
</div>
<?php } ?>
<?php
//blog:导航
function blog_navi() {
global $CACHE;
$navi_cache = $CACHE->readCache('navi');
?>
如鹿觅水
- 粉丝: 245
- 资源: 397
最新资源
- 学生宿舍管理系统(毕业设计).zip
- 跨年烟花代码(python)
- springboot-二手物品交易系统的设计与实现-h7ow81fl.zip
- 鲸鱼算法(WOA)优化混合核极限学习机(HKELM)分类预测,多特征输入模型,WOA-HKELM分类预测 多特征输入单输出的
- Android学习笔记
- B站视频助手,视频下载助理
- 双碳目标下综合能源系统低碳运行优化调度Matlab程序,包含光伏、风电、热电联产、燃气锅炉、电锅炉、电储能、碳捕集设备,考虑碳交易 以系统运行成本最小为目标进行调度 没有具体参考文献,这个只是一个授之
- springboot-企业员工薪酬管理系统-n4s02htu.zip
- 基于格雷码的结构光三维重建源码,MATLAB可以跑通
- springboot-人才公寓管理系统-897cjl4r.zip
- 灰狼优化算法GWO算法具有结构简单、需要调节的参数少,容易实现等特点,其中存在能够自适应调整的收敛因子以及信息反馈机制,能够在局部寻优与全局搜索之间实现平衡,因此在对问题的求解精度和收敛速度方面都有良
- 新版Android开发教程与学习笔记
- 差分进化算法DE(Differential Evolution)算法是在遗传算法等进化思想的基础上提出的,本质是一种多目标(连续变量)优化算法,用于求解多维空间中整体最优解 Matlab 程序
- 半桥 全桥LLC电路 谐振变器仿真,采用频率控制(PFM变频控制)输出电压闭环,软开关 原边半桥+副边半波整流 原边半桥+副边全桥整流 原边全桥+副边半波整流 原边全桥+副边全桥整流都有 matlab
- 适合练手、课程设计、毕业设计的Java项目源码:进销存管理系统(jsp+mssql).rar
- video_250112_204741.mp4
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈