123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- <?php
- $name = "detail-s-3";
- ?>
- <link rel="stylesheet" href="/template/mobile/components/detail/style_3.css?v=<?php echo rand(1,100000); ?>" media="all">
- <!--定义div盒子-->
- <div class="<?php echo $name; ?>-content">
- <div class="box">
- <!--定义内容布局--->
- <div class="row">
- <!--定义内部栅格 上下中左右 使用浮动-->
- <div class="top">
- <!--定义内容标签 p span a li img--->
- <!-- <span></span>-->
- <div class="one">
- <a href="">{$eyou.field.title}<?php echo $title; ?></a>
- </div>
- <div class="two">
-
- <!--<img src="https://oss.zc10000.com/static/images/033.svg"/> <font>{$eyou.field.add_time|MyDate='Y-m-d',###}</font>-->
- <!--<font>转发</font> <font>收藏</font><font>点赞 </font><font>下载</font>-->
-
-
- <font>浏览: {$eyou.field.click}</font>
-
- {eyou:if condition='($page == "down")'}
- <font>下载: {$eyou.field.downcount}</font>
- {/eyou:if}
- <font>点赞: <num id="likecount">{$eyou.field.likecount}</num></font>
- <font>收藏: <num id="collection">{$eyou.field.collection}</num></font>
-
- <!--<img src="https://oss.zc10000.com/static/images/034.svg"/> -->
- <font style="float:right;margin-top:10px;">更新时间: {$eyou.field.update_time|MyDate='Y-m-d',###}</font>
- </div>
- </div>
- <div class="center">
- <!--定义内容标签 p span a li img--->
- <p>
- {eyou:if condition='($page == "down")'}
-
- <?php
- $html = $eyou['field']['content_5'];
- //提取详情图片
- $pattern = '/<img[^>]+>/i';
- //使用preg_match_all函数来查找所有匹配的img标签
- preg_match_all($pattern, $html, $matches);
- // 输出结果
- //var_dump($matches[0]);
- $k = $pa - 1;
- echo $matches[0][$k];
- ?>
- <!--分页开始-->
- <div class="page">
- <?php
- //需要变量
- $request = request();
- $url = $request->url();
-
- if (strpos($url, '-') !== false) {
- $url = explode('-', $url);
- $url = $url[0];
- } else {
-
- }
-
-
- $total = count($matches[0]);
- $pagesize = 1;
- $total_page = ceil($total / $pagesize);
- $curpage = $pa;
- $total_page_for = $total_page + 1;
- $pro_page = $pa - 1;
- $pev_page = $pa + 1;
- ?>
- {eyou:if condition='((int)$total_page > 1)'}
- {eyou:if condition='((int)$curpage === 1)'}
- <li><a>首页</a></li>
- <li><a>上一页</a></li>
- {eyou:else /}
- <li><a href="{$url}">首页</a></li>
- {eyou:if condition='((int)$curpage === 2)'}
- <li><a href="{$url}">上一页</a></li>
- {eyou:else /}
- <li><a href="{$url}-{$pro_page}">上一页</a></li>
- {/eyou:if}
- {/eyou:if}
- {eyou:for start='1' end="$total_page_for"}
- {eyou:if condition='((int)$i === 1)'}
- {eyou:if condition='((int)$curpage === $i)'}
- <li class="active-1"><a>{$i}</a></li>
- {eyou:else /}
- <li><a href="{$url}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
- {/eyou:if}
- {eyou:else /}
- {eyou:if condition='((int)$curpage === $i)'}
- <li class="active-1"><a>{$i}</a></li>
- {eyou:else /}
- <?php
- if ($total_page > 10) {
- if (((int)$curpage - 2) < $i && ((int)$curpage + 2) > $i || ((int)$total_page - 1) < $i && ((int)$total_page + 1) > $i || 0 < $i && 2 > $i) { ?>
-
- <li><a href="{$url}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
-
- <?php } else { ?>
-
- <?php }
- } else { ?>
- <li><a href="{$url}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
- <?php } ?>
-
- {/eyou:if}
- {/eyou:if}
- {/eyou:for}
- {eyou:if condition='((int)$curpage === (int)$total_page)'}
- <li><a>下一页</a></li>
- <li><a>末页</a></li>
- {eyou:else /}
- <li><a href="{$url}-{$pev_page}" data-ey_fc35fdc="html" data-tmp="1">下一页</a></li>
- <li><a href="{$url}-{$total_page}" data-ey_fc35fdc="html" data-tmp="1">末页</a></li>
- {/eyou:if}
- {/eyou:if}
- 共<strong>
- {eyou:php}
- echo $total_page;
- {/eyou:php}
- </strong>页 <strong>{$total}</strong>条
- </div>
- <!--分页结束--->
-
-
- </div>
- {eyou:else /}
- {$eyou.field.content_5}
- {/eyou:if}
- </p>
- </div>
-
- <div class="bottom">
- <?php if (isset($page) && $page == 'works' || isset($page) && $page == 'document.htm' || isset($page) && $page == 'down') { ?>
-
- <?php } else { ?>
- {eyou:tags getall='0' empty=''}
- <div class="one">
- <a href='{$field.link}'>{$field.tag}</a>
- </div>
- {/eyou:tags}
- <?php } ?>
- <div class="two">
- <div class="layui-row">
-
- <?php
- $tid = $eyou['field']['typeid'];
- ?>
- {eyou:if condition='($page == "lunwen-detail")'}
- <!--论文期刊-->
- <div class="layui-col-xs6 a">
- <?php
- //var_dump($number);
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number<$number and tid=116 and is_del=0 and type=4 and area_id=0 ORDER BY number desc LIMIT 1)";
- ?>
-
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="/zclw/lunwen{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
-
- {/eyou:arcview}
- {/eyou:sql}
- <span>上一篇</span>
-
- </div>
- <div class="layui-col-xs6 b">
- <span>下一篇</span>
- <?php
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number>$number and tid=116 and is_del=0 and type=4 and area_id=0 ORDER BY number asc LIMIT 1)";
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="/zclw/lunwen{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
- {/eyou:arcview}
- {/eyou:sql}
- </div>
-
- {eyou:elseif condition='($page == "down")' /}
- <!--资料文档-->
- <div class="layui-col-xs6 a">
- <?php
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number<$number and tid=$tid and is_del=0 and type=5 and area_id=$provid ORDER BY number desc LIMIT 1)";
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="/zlwd/cms{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
- {/eyou:arcview}
- {/eyou:sql}
- <span>上一篇</span>
- </div>
- <div class="layui-col-xs6 b">
- <span>下一篇</span>
- <?php
- $tid = $eyou['field']['typeid'];
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number>$number and tid=$tid and is_del=0 and type=5 and area_id=$provid ORDER BY number asc LIMIT 1)";
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="/zlwd/cms{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
-
- {/eyou:arcview}
- {/eyou:sql}
- </div>
-
- {eyou:else /}
- {eyou:if condition='((int)$tid === 115 || (int)$tid === 117)'}
- <!---评审攻略和政策-->
- <?php
- $where_prov = '';
- if(!empty($provid)){
- $where_prov = ' and area_id='.$provid;
- }
-
- $where_city = '';
- if(!empty($cityid)){
- $where_city = ' and city_id='.$cityid;
- }
- ?>
-
- <div class="layui-col-xs6 a">
- <?php
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number<$number and tid=$tid and is_del=0 and type=2 $where_city $where_city ORDER BY number desc LIMIT 1)";
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="{:get_tid_url_2($field['arcurl'],$field['typeid'],$field['stypeid'],'0','',0,$field['province_id'],$field['city_id'])}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
-
-
- {/eyou:arcview}
- {/eyou:sql}
- <span>上一篇</span>
- </div>
- <div class="layui-col-xs6 b">
- <span>下一篇</span>
- <?php
- $tid = $eyou['field']['typeid'];
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number>$number and tid=$tid and is_del=0 and type=2 $where_city $where_city ORDER BY number asc LIMIT 1)";
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
-
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="{:get_tid_url_2($field['arcurl'],$field['typeid'],$field['stypeid'],'0','',0,$field['province_id'],$field['city_id'])}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
-
- {/eyou:arcview}
- {/eyou:sql}
- </div>
-
- {eyou:else /}
- <!--其他文章的上下篇-->
- <div class="layui-col-xs6 a">
- <?php
- //var_dump($number);
- $tid = $eyou['field']['typeid'];
- if($tid === 127){
- //论文参考
- $type = 4;
- }else{
- $type = 2;
- }
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number<$number and tid=$tid and is_del=0 and type=$type and area_id=0 ORDER BY number desc LIMIT 1)";
- ?>
-
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="{:get_tid_url_2($field['arcurl'],$field['typeid'],$field['stypeid'],'0','',0,$field['province_id'],$field['city_id'])}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
-
- {/eyou:arcview}
- {/eyou:sql}
- <span>上一篇</span>
-
- </div>
- <div class="layui-col-xs6 b">
- <span>下一篇</span>
- <?php
- $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number>$number and tid=$tid and is_del=0 and type=$type and area_id=0 ORDER BY number asc LIMIT 1)";
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
- {eyou:arcview aid='$kp.aid'}
-
-
-
- {eyou:if condition='((int)$field.is_del === 0)'}
- <a href="{:get_tid_url_2($field['arcurl'],$field['typeid'],$field['stypeid'],'0','',0,$field['province_id'],$field['city_id'])}">{$field.title|msubstr=###,0,10,true}</a>
- {eyou:else /}
- 文档已删除
- {/eyou:if}
-
- {/eyou:arcview}
- {/eyou:sql}
- </div>
- {/eyou:if}
- {/eyou:if}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
|