Bez popisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

style_3.htm 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <?php
  2. $name = "detail-s-3";
  3. ?>
  4. <link rel="stylesheet" href="/template/mobile/components/detail/style_3.css?v=<?php echo rand(1,100000); ?>" media="all">
  5. <!--定义div盒子-->
  6. <div class="<?php echo $name; ?>-content">
  7. <div class="box">
  8. <!--定义内容布局--->
  9. <div class="row">
  10. <!--定义内部栅格 上下中左右 使用浮动-->
  11. <div class="top">
  12. <!--定义内容标签 p span a li img--->
  13. <!-- <span></span>-->
  14. <div class="one">
  15. <a href="">{$eyou.field.title}<?php echo $title; ?></a>
  16. </div>
  17. <div class="two">
  18. <!--<img src="https://oss.zc10000.com/static/images/033.svg"/> <font>{$eyou.field.add_time|MyDate='Y-m-d',###}</font>-->
  19. <!--<font>转发</font> <font>收藏</font><font>点赞 </font><font>下载</font>-->
  20. <font>浏览: {$eyou.field.click}</font>
  21. {eyou:if condition='($page == "down")'}
  22. <font>下载: {$eyou.field.downcount}</font>
  23. {/eyou:if}
  24. <font>点赞: <num id="likecount">{$eyou.field.likecount}</num></font>
  25. <font>收藏: <num id="collection">{$eyou.field.collection}</num></font>
  26. <!--<img src="https://oss.zc10000.com/static/images/034.svg"/> -->
  27. <font style="float:right;margin-top:10px;">更新时间: {$eyou.field.update_time|MyDate='Y-m-d',###}</font>
  28. </div>
  29. </div>
  30. <div class="center">
  31. <!--定义内容标签 p span a li img--->
  32. <p>
  33. {eyou:if condition='($page == "down")'}
  34. <?php
  35. $html = $eyou['field']['content_5'];
  36. //提取详情图片
  37. $pattern = '/<img[^>]+>/i';
  38. //使用preg_match_all函数来查找所有匹配的img标签
  39. preg_match_all($pattern, $html, $matches);
  40. // 输出结果
  41. //var_dump($matches[0]);
  42. $k = $pa - 1;
  43. echo $matches[0][$k];
  44. ?>
  45. <!--分页开始-->
  46. <div class="page">
  47. <?php
  48. //需要变量
  49. $request = request();
  50. $url = $request->url();
  51. if (strpos($url, '-') !== false) {
  52. $url = explode('-', $url);
  53. $url = $url[0];
  54. } else {
  55. }
  56. $total = count($matches[0]);
  57. $pagesize = 1;
  58. $total_page = ceil($total / $pagesize);
  59. $curpage = $pa;
  60. $total_page_for = $total_page + 1;
  61. $pro_page = $pa - 1;
  62. $pev_page = $pa + 1;
  63. ?>
  64. {eyou:if condition='((int)$total_page > 1)'}
  65. {eyou:if condition='((int)$curpage === 1)'}
  66. <li><a>首页</a></li>
  67. <li><a>上一页</a></li>
  68. {eyou:else /}
  69. <li><a href="{$url}">首页</a></li>
  70. {eyou:if condition='((int)$curpage === 2)'}
  71. <li><a href="{$url}">上一页</a></li>
  72. {eyou:else /}
  73. <li><a href="{$url}-{$pro_page}">上一页</a></li>
  74. {/eyou:if}
  75. {/eyou:if}
  76. {eyou:for start='1' end="$total_page_for"}
  77. {eyou:if condition='((int)$i === 1)'}
  78. {eyou:if condition='((int)$curpage === $i)'}
  79. <li class="active-1"><a>{$i}</a></li>
  80. {eyou:else /}
  81. <li><a href="{$url}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  82. {/eyou:if}
  83. {eyou:else /}
  84. {eyou:if condition='((int)$curpage === $i)'}
  85. <li class="active-1"><a>{$i}</a></li>
  86. {eyou:else /}
  87. <?php
  88. if ($total_page > 10) {
  89. if (((int)$curpage - 2) < $i && ((int)$curpage + 2) > $i || ((int)$total_page - 1) < $i && ((int)$total_page + 1) > $i || 0 < $i && 2 > $i) { ?>
  90. <li><a href="{$url}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  91. <?php } else { ?>
  92. <?php }
  93. } else { ?>
  94. <li><a href="{$url}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  95. <?php } ?>
  96. {/eyou:if}
  97. {/eyou:if}
  98. {/eyou:for}
  99. {eyou:if condition='((int)$curpage === (int)$total_page)'}
  100. <li><a>下一页</a></li>
  101. <li><a>末页</a></li>
  102. {eyou:else /}
  103. <li><a href="{$url}-{$pev_page}" data-ey_fc35fdc="html" data-tmp="1">下一页</a></li>
  104. <li><a href="{$url}-{$total_page}" data-ey_fc35fdc="html" data-tmp="1">末页</a></li>
  105. {/eyou:if}
  106. {/eyou:if}
  107. 共<strong>
  108. {eyou:php}
  109. echo $total_page;
  110. {/eyou:php}
  111. </strong>页 <strong>{$total}</strong>条
  112. </div>
  113. <!--分页结束--->
  114. </div>
  115. {eyou:else /}
  116. {$eyou.field.content_5}
  117. {/eyou:if}
  118. </p>
  119. </div>
  120. <div class="bottom">
  121. <?php if (isset($page) && $page == 'works' || isset($page) && $page == 'document.htm' || isset($page) && $page == 'down') { ?>
  122. <?php } else { ?>
  123. {eyou:tags getall='0' empty=''}
  124. <div class="one">
  125. <a href='{$field.link}'>{$field.tag}</a>
  126. </div>
  127. {/eyou:tags}
  128. <?php } ?>
  129. <div class="two">
  130. <div class="layui-row">
  131. <?php
  132. $tid = $eyou['field']['typeid'];
  133. ?>
  134. {eyou:if condition='($page == "lunwen-detail")'}
  135. <!--论文期刊-->
  136. <div class="layui-col-xs6 a">
  137. <?php
  138. //var_dump($number);
  139. $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)";
  140. ?>
  141. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  142. {eyou:arcview aid='$kp.aid'}
  143. {eyou:if condition='((int)$field.is_del === 0)'}
  144. <a href="/zclw/lunwen{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
  145. {eyou:else /}
  146. 文档已删除
  147. {/eyou:if}
  148. {/eyou:arcview}
  149. {/eyou:sql}
  150. <span>上一篇</span>
  151. </div>
  152. <div class="layui-col-xs6 b">
  153. <span>下一篇</span>
  154. <?php
  155. $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)";
  156. ?>
  157. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  158. {eyou:arcview aid='$kp.aid'}
  159. {eyou:if condition='((int)$field.is_del === 0)'}
  160. <a href="/zclw/lunwen{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
  161. {eyou:else /}
  162. 文档已删除
  163. {/eyou:if}
  164. {/eyou:arcview}
  165. {/eyou:sql}
  166. </div>
  167. {eyou:elseif condition='($page == "down")' /}
  168. <!--资料文档-->
  169. <div class="layui-col-xs6 a">
  170. <?php
  171. $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)";
  172. ?>
  173. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  174. {eyou:arcview aid='$kp.aid'}
  175. {eyou:if condition='((int)$field.is_del === 0)'}
  176. <a href="/zlwd/cms{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
  177. {eyou:else /}
  178. 文档已删除
  179. {/eyou:if}
  180. {/eyou:arcview}
  181. {/eyou:sql}
  182. <span>上一篇</span>
  183. </div>
  184. <div class="layui-col-xs6 b">
  185. <span>下一篇</span>
  186. <?php
  187. $tid = $eyou['field']['typeid'];
  188. $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)";
  189. ?>
  190. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  191. {eyou:arcview aid='$kp.aid'}
  192. {eyou:if condition='((int)$field.is_del === 0)'}
  193. <a href="/zlwd/cms{$kp.number}">{$field.title|msubstr=###,0,10,true}</a>
  194. {eyou:else /}
  195. 文档已删除
  196. {/eyou:if}
  197. {/eyou:arcview}
  198. {/eyou:sql}
  199. </div>
  200. {eyou:else /}
  201. {eyou:if condition='((int)$tid === 115 || (int)$tid === 117)'}
  202. <!---评审攻略和政策-->
  203. <?php
  204. $where_prov = '';
  205. if(!empty($provid)){
  206. $where_prov = ' and area_id='.$provid;
  207. }
  208. $where_city = '';
  209. if(!empty($cityid)){
  210. $where_city = ' and city_id='.$cityid;
  211. }
  212. ?>
  213. <div class="layui-col-xs6 a">
  214. <?php
  215. $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)";
  216. ?>
  217. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  218. {eyou:arcview aid='$kp.aid'}
  219. {eyou:if condition='((int)$field.is_del === 0)'}
  220. <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>
  221. {eyou:else /}
  222. 文档已删除
  223. {/eyou:if}
  224. {/eyou:arcview}
  225. {/eyou:sql}
  226. <span>上一篇</span>
  227. </div>
  228. <div class="layui-col-xs6 b">
  229. <span>下一篇</span>
  230. <?php
  231. $tid = $eyou['field']['typeid'];
  232. $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)";
  233. ?>
  234. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  235. {eyou:arcview aid='$kp.aid'}
  236. {eyou:if condition='((int)$field.is_del === 0)'}
  237. <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>
  238. {eyou:else /}
  239. 文档已删除
  240. {/eyou:if}
  241. {/eyou:arcview}
  242. {/eyou:sql}
  243. </div>
  244. {eyou:else /}
  245. <!--其他文章的上下篇-->
  246. <div class="layui-col-xs6 a">
  247. <?php
  248. //var_dump($number);
  249. $tid = $eyou['field']['typeid'];
  250. if($tid === 127){
  251. //论文参考
  252. $type = 4;
  253. }else{
  254. $type = 2;
  255. }
  256. $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)";
  257. ?>
  258. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  259. {eyou:arcview aid='$kp.aid'}
  260. {eyou:if condition='((int)$field.is_del === 0)'}
  261. <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>
  262. {eyou:else /}
  263. 文档已删除
  264. {/eyou:if}
  265. {/eyou:arcview}
  266. {/eyou:sql}
  267. <span>上一篇</span>
  268. </div>
  269. <div class="layui-col-xs6 b">
  270. <span>下一篇</span>
  271. <?php
  272. $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)";
  273. ?>
  274. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'}
  275. {eyou:arcview aid='$kp.aid'}
  276. {eyou:if condition='((int)$field.is_del === 0)'}
  277. <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>
  278. {eyou:else /}
  279. 文档已删除
  280. {/eyou:if}
  281. {/eyou:arcview}
  282. {/eyou:sql}
  283. </div>
  284. {/eyou:if}
  285. {/eyou:if}
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>