No Description
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.

page.htm 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. if($areaid > 0){
  3. $where2 = "area_id=$areaid and parent_id=38 and topid=38 and is_del=0 and status=1";
  4. }else{
  5. $where2 = "parent_id=38 and topid=38 and is_del=0 and status=1";
  6. }
  7. ?>
  8. {eyou:assign name='pid' value="$route_param.tid" /}
  9. {eyou:sql sql="select COUNT(*) as total FROM __PREFIX__arctype where $where2" cachetime='3600' empty='没有数据' id="list"}
  10. {eyou:php}
  11. $total_page = ceil($list['total']/$pagesize);
  12. $total_page_for = $total_page + 1;
  13. $pro_page = $curpage - 1;
  14. $pev_page = $curpage + 1;
  15. {/eyou:php}
  16. <div class="bottom bottom-row">
  17. {eyou:if condition='($route_param.tid == 38 && $areaid === 0)'}
  18. <div class="page-a">
  19. {eyou:if condition='((int)$total_page > 1)'}
  20. {eyou:if condition='((int)$curpage === 1)'}
  21. <li><a>首页</a></li>
  22. <li><a>上一页</a></li>
  23. {eyou:else /}
  24. <li><a href="/zczl">首页</a></li>
  25. {eyou:if condition='((int)$curpage === 2)'}
  26. <li><a href="/zczl">上一页</a></li>
  27. {eyou:else /}
  28. <li><a href="/zczl-{$pro_page}">上一页</a></li>
  29. {/eyou:if}
  30. {/eyou:if}
  31. {eyou:for start='1' end="$total_page_for"}
  32. {eyou:if condition='((int)$i === 1)'}
  33. {eyou:if condition='((int)$curpage === $i)'}
  34. <li class="active-1"><a>{$i}</a></li>
  35. {eyou:else /}
  36. <li><a href="/zczl" data-ey_fc35fdc="html" data-tmp="1" >{$i}</a></li>
  37. {/eyou:if}
  38. {eyou:else /}
  39. {eyou:if condition='((int)$curpage === $i)'}
  40. <li class="active-1"><a>{$i}</a></li>
  41. {eyou:else /}
  42. <?php
  43. if($total_page > 10){
  44. if(((int)$curpage-2)<$i && ((int)$curpage+2)>$i || ((int)$total_page-1)<$i && ((int)$total_page+1)>$i || 0<$i && 2>$i){ ?>
  45. <li><a href="/zczl-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  46. <?php }else{ ?>
  47. <?php
  48. if(((int)$curpage) > 3 && ((int)$curpage-2) === $i){
  49. echo "<li>...</li>";
  50. }
  51. if(((int)$curpage+2) < $total_page && ((int)$curpage+2) === $i){
  52. echo "<li>...</li>";
  53. }else{
  54. }
  55. ?>
  56. <?php }}else{ ?>
  57. <li><a href="/zczl-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  58. <?php } ?>
  59. {/eyou:if}
  60. {/eyou:if}
  61. {/eyou:for}
  62. {eyou:if condition='((int)$curpage === (int)$total_page)'}
  63. <li><a>下一页</a></li>
  64. <li><a>末页</a></li>
  65. {eyou:else /}
  66. <li><a href="/zczl-{$pev_page}" data-ey_fc35fdc="html" data-tmp="1">下一页</a></li>
  67. <li><a href="/zczl-{$total_page}" data-ey_fc35fdc="html" data-tmp="1">末页</a></li>
  68. {/eyou:if}
  69. {/eyou:if}
  70. </div>
  71. <div class="page-b">
  72. 共<strong>
  73. {eyou:php}
  74. echo $total_page;
  75. {/eyou:php}
  76. </strong>页 <strong>{$list.total}</strong>条
  77. </div>
  78. {eyou:else /}
  79. <div class="page-a">
  80. {eyou:if condition='((int)$total_page > 1)'}
  81. {eyou:if condition='((int)$curpage === 1)'}
  82. <li><a>首页</a></li>
  83. <li><a>上一页</a></li>
  84. {eyou:else /}
  85. <li><a href="/zczl/jzzc{$number}">首页</a></li>
  86. {eyou:if condition='((int)$curpage === 2)'}
  87. <li><a href="/zczl/jzzc{$number}">上一页</a></li>
  88. {eyou:else /}
  89. <li><a href="/zczl/jzzc{$number}-{$pro_page}">上一页</a></li>
  90. {/eyou:if}
  91. {/eyou:if}
  92. {eyou:for start='1' end="$total_page_for"}
  93. {eyou:if condition='((int)$i === 1)'}
  94. {eyou:if condition='((int)$curpage === $i)'}
  95. <li class="active-1"><a >{$i}</a></li>
  96. {eyou:else /}
  97. <li><a href="/zczl/jzzc{$number}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  98. {/eyou:if}
  99. {eyou:else /}
  100. {eyou:if condition='((int)$curpage === $i)'}
  101. <li class="active-1"><a>{$i}</a></li>
  102. {eyou:else /}
  103. <?php
  104. if($total_page > 10){
  105. if(((int)$curpage-2)<$i && ((int)$curpage+2)>$i || ((int)$total_page-1)<$i && ((int)$total_page+1)>$i || 0<$i && 2>$i){ ?>
  106. <li><a href="/zczl/jzzc{$number}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  107. <?php }else{ ?>
  108. <?php
  109. if(((int)$curpage) > 3 && ((int)$curpage-2) === $i){
  110. echo "<li>...</li>";
  111. }
  112. if(((int)$curpage+2) < $total_page && ((int)$curpage+2) === $i){
  113. echo "<li>...</li>";
  114. }else{
  115. }
  116. ?>
  117. <?php }}else{ ?>
  118. <li><a href="/zczl/jzzc{$number}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
  119. <?php } ?>
  120. {/eyou:if}
  121. {/eyou:if}
  122. {/eyou:for}
  123. {eyou:if condition='((int)$curpage === (int)$total_page)'}
  124. <li><a>下一页</a></li>
  125. <li><a>末页</a></li>
  126. {eyou:else /}
  127. <li><a href="/zczl/jzzc{$number}-{$pev_page}" data-ey_fc35fdc="html" data-tmp="1">下一页</a></li>
  128. <li><a href="/zczl/jzzc{$number}-{$total_page}" data-ey_fc35fdc="html" data-tmp="1">末页</a></li>
  129. {/eyou:if}
  130. {/eyou:if}
  131. </div>
  132. <div class="page-b">
  133. 共<strong>
  134. {eyou:php}
  135. echo $total_page;
  136. {/eyou:php}
  137. </strong>页 <strong>{$list.total}</strong>条
  138. </div>
  139. {/eyou:if}
  140. </div>
  141. {/eyou:sql}