首页应用了调用分类的文章标签(最新更新和推荐文章调用)和一周内的热门点击的文章标签。
index.php引用头部:{#include file='include/top.php'}
index.php引用尾部:{#include file='include/bottom.php'}
include用法可参考《K9标签基础篇:引用模板文件[include 和 require]》
一周内的热门点击标签可参考《一周热门文章的调用》
<?php !defined('INC') && exit('Load failure!'); ?> {#include file='include/top.php'} <div class="box2"> <!--幻灯片--> <script type="text/javascript" src="{DIR.T}js/jquery.featureList-1.0.0.js"></script> <script language="javascript"> /******************************* * 幻灯片 * 当前状态时 .current * start_item 从第几个开始 *******************************/ $(document).ready(function() { $.featureList( $(".slides_nav li"), $(".slides_box div"), { start_item : 0 } ); }); </script> <div class="slides"> <div class="slides_box"> <div> <strong>Welcome to <span>focuznet.com</span></strong> <p>广州唯众网络,建网站基石,做网站营销.作为KingCMS内容管理系统K9开发商,围绕企业核心为网站解决问题,提供以效果为导向的网站营销服务.服务热线:400-663-8341.</p> </div> <div> <strong>Welcome to <span>K9</span></strong> <p>K9真相,提供KingCMS V9内容管理系统(简称:K9)整体的帮助文档,包括视频呢,手册,实例教程。</p> </div> <div> <strong>Welcome to <span>Kingcms.com</span></strong> <p>一路走来,我们接触的客户和项目很多,在了解客户需求和项目制作管理过程中,有一种感觉越发强烈:真正优秀的项目通常不是技术最复杂的项目,而是合作双方都用心去完成的项目,是在责任心的平台上共同努力的结果。没有了责任心,技术的发挥恐怕事倍功半,或是无的放矢,或是舍本逐末。</p> </div> </div> <!--slides_box end--> <ul class="slides_nav"> <li>1</li> <li>2</li> <li>3</li> </ul> <!--slides_nav end--> </div> <!--slides end--> <ul class="list_2"> <li> <a href="/feature/">系统特色</a> <p>KingCMS 是一款小巧、高效、人性化的, 基于WEB技术的内容管理系统</p> </li> <li> <a href="/serve">服务项目</a> <p>在责任心的平台上共同努力的结果。没有了责任心种感觉越发强烈</p> </li> <li> <a href="/originality/">产品创意</a> <p>在了解客户需求和项目制作管理过程中,有一种感觉越发强烈</p> </li> <li style="border:none;"> <a href="/contact/">联系方式</a> <p>客户和项目很多,在了解客户需求和项目制作管理过程强烈</p> </li> </ul> <!--/list_2--> </div> <!--/box2--> <div class="box"> <div class="w_490 fl"> <script type="text/javascript"> /******************************* * 选项卡 * hover(鼠标移入) click(点击) *******************************/ $(function(){ var _tab=$('.tabnav>a');//获取选项卡导航 var _box=$('.tabbox div');//获取内容切换区 var _hover='hover';//当前点击显示的样式 var _index;//索引值 _tab.hover(function(){ _index=_tab.index(this);//获取当前点击的索引值 $(this).addClass(_hover).siblings().removeClass(_hover);//当前点击高亮显示 _box.eq(_index).show().siblings().hide();//通过索引值让对应的选项内容区显示 }).eq(0).hover();//第一个导航高亮显示 }); </script> <div class="t_1"><h3>案例展示</h3> <div class="tabnav"> <a href="/case/">最新更新</a><a href="/commend/">推荐文章</a><a href="/case/">热门点击</a> </div> <!--/t_1--> </div> <!--/t_1--> <div class="tabbox"> <div class="f_1"> <p class="f12 h20 c_666 pt10 pb15">调用案例展示的最新文章,条数为10条</p> <a href="/case/" title="案例展示" class="img_1 fl"><img src="{DIR.T}images/temp/temp_2.jpg" alt="案例展示"width="100"height="75" /></a> <ul class="list_1 fr" style="width:320px;"> {@res table='%s_content' field='title,url' where='status=1 and mid=1' order='id desc' number='10'} {#foreach($res as $rs)} <li> <a href="{DIR}{$rs[url]}" title="{$rs[title] code='quote'}">{$rs[title]}</a> </li> {#endforeach} </ul> </div> <div class="f_1"> <p class="f12 h20 c_666 pt10 pb15">调用推荐文章,条数为10条</p> <a href="/commend/" title="产品名称" class="img_1 fl"><img src="{DIR.T}images/temp/temp_2.jpg" alt="产品名称"width="100" height="75" /></a> <ul class="list_1 fr" style="width:320px;"> {@res.join table1='%s_content_categroy_bind' table2='%s_content' field2='title,url' on='id' where='t2.mid=1 and t2.status=1 and cid=10' order='t2.id desc' number='10'} {#foreach($res as $rs)} <li><a href="{$rs[url]}" title="{$rs[title] code='quote'}">{$rs[title]}</a></li> {#endforeach} </ul> </div> <div class="f_1"> <p class="f12 h20 c_666 pt10 pb15">调用一周内的热门点击的文章</p> <a href="/case/" title="产品名称" class="img_1 fl"><img src="{DIR.T}images/temp/temp_2.jpg" alt="产品名称"width="100"height="75" /></a> <ul class="list_1 fr" style="width:320px;"> {? $today=date('Ymd',TIME-86400*7); ?} {@res.join table1='%s_content_hit' table2='%s_content' field='sum(t1.hit) hit' field2='title,url' on='id' where='t1.date>{$today} and t2.status=1 and t2.mid=1' group='t1.id' order='hit desc,t2.id desc' number='10'} {#foreach($res as $rs)} <li><a href="{DIR}{$rs[url]}" title="{$rs[title] code='quote'}">{$rs[title]}</a></li> {#endforeach} </ul> </div> </div> <!--/tabbox --> </div> <!--/w_490--> <div class="w_490 fr"> <div class="t_1"><h3>产品调用</h3><a href="/products/" class="t_1_more">更多</a></div> <!--/t_1--> <ul class="list_img_1"> {@res table='%s_content' field='image,title,url,description' where='mid=2' order='id desc' number='3'} {#foreach($res as $rs)} <li> <a href="{DIR}{$rs[url]}" title="{$rs[title]}"><img src="{DIR}images/?id={$rs[image]}" alt="{$rs[name]}"width="100"height="75" /></a> <h4><a href="{DIR}{$rs[url]}" title="{$rs[title]}">{$rs[title]}</a></h4> <p>{$rs[description]}</p> </li> {#endforeach} </ul> </div> <!--/w_490--> <p class="clear_all"></p> </div> <!--/box--> {#include file='include/bottom.php'} </body> </html>
转载请注明出处:唯众网络