• phpcms之文章详情页


    位置:

    <div class="breadcrumb">您的位置: <a itemprop="breadcrumb" href="{siteurl($siteid)}">首页</a> » <span class="current"><a href="newslist.html">{catpos($catid)}</a> {$title}</span></div>
            

    文章信息:

    <h1 class="text-left">{$title}</h1>
                    <div class="article-meta">
                        <span class="glyphicon glyphicon-time" aria-hidden="true"></span>{$inputtime}
                        <span class="glyphicon glyphicon-user" aria-hidden="true"></span>{$copyfrom}                    
                        <span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>分类:<a href="#" rel="category tag"></a>
                        <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>阅读:<span id="hits"><script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>次</span>
                    </div>

    内容:

    {$content}

    上下一篇:

    <div class="col-sm-6 col-xs-12"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><strong>上一篇</strong><br /><a href="{$previous_page[url]}" rel="prev">{$previous_page[title]}</a></div>
                    <div class="col-sm-6 col-xs-12"><strong>下一篇<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></strong><br /><a href="{$next_page[url]}" rel="next">{$next_page[title]}</a></div>
                

    其他文章:

    {pc:content action="hits" catid="$catid" num="3" order="monthviews DESC" cache="3600"}
             {if $data}
            <div class="related wow fadeInUp" data-wow-delay="0.5s">
                <h2 class="widget_title">他们还看的文章</h2>
                <!--related_box start-->
                <div class="related_box row">
                {loop $data $r}
                    <div class="col-md-4 col-sm-4">
                        <!--related_body start-->
                        <div class="related_body">
                            <a href="#" class="related_thum">
                            {if $r['thumb'] == null}
                                
                            {else}
                            <img src="{$r[thumb]}" class="img-responsive" title="{$r[title]}" alt="{$r[title]}">
                            {/if}
                            </a>
                            <div class="related-title">
                                <a href="{$r[url]}" title="{$r[title]}">{$r[title]}</a>
                            </div>
                        </div>
                        <!--related_body end-->
                    </div>
                {/loop}
                </div>
                <!--related_box end-->        
            </div>
            {/if}
            {/pc}

    右边栏:

    {pc:content action="hits" catid="$catid" num="5" order="monthviews DESC"}
            {loop $data $r} 
                <li>
                     <span class="hots_img">
                        <a href="{$r[url]}" target="_blank"><img src="{$r[thumb]}" class="img-responsive" alt="{$r[title]}"></a>
                     </span>
                    <span class="hots_title"><a href="{$r[url]}" target="_blank">{$r[title]}</a></span>
                    <span class="hots_views">
                    {php $h_md=pc_base::load_model('hits_model');$get_db=$h_md->get_one(array('hitsid'=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}
                    <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>{$views}
                    </span>
                        
                </li>
            {/loop}
            {/pc}
  • 相关阅读:
    HTTP协议学习笔记
    linux对文件某列求和
    mongodb拆库分表脚本
    mongodb基础应用
    mongodb实现对某列求和SUM
    员工价值——如何体现自己价值,如何被自己的领导认可
    使用MySQLMTOP监控MySQL性能(二)
    使用MySQLMTOP监控MySQL性能(一)
    apache+tomcat实现session共享
    apache+tomcat负载均衡3种实现方式
  • 原文地址:https://www.cnblogs.com/l979662050/p/8350602.html
Copyright © 2020-2023  润新知