Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!--拼接查询条件-->
  2. <?php
  3. //关联 其他栏目 用的 查询
  4. $catid = 0;
  5. if(empty($provid)){
  6. $provid = 0;
  7. }
  8. if(empty($cityid)){
  9. $cityid = 0;
  10. }
  11. //只调用省级 城市为空
  12. if((int)$provid === 0 && (int)$catid === 0){
  13. //所有省份的数据
  14. //不限制 and province_id='0' and city_id='0'
  15. $where = "typeid=".$tid." and is_del=0";
  16. }else if((int)$provid > 0 && (int)$catid === 0 && (int)$cityid === 0){
  17. //只选择省 不选择职称
  18. //不限制市 and city_id='0'
  19. $where = "typeid=".$tid." and province_id='$provid' and is_del=0";
  20. }else{
  21. //存在城市
  22. //and stypeid='$catid'
  23. $where = "typeid=".$tid." and province_id='$provid' and city_id='$cityid' and is_del=0";
  24. }
  25. if($tagid > 0){
  26. //加入筛选
  27. $where = $where.' and product_tag_id='.$tagid;
  28. }
  29. //var_dump($where);
  30. ?>
  31. <?php
  32. //计算limit属性
  33. $pagesize = 12;
  34. if(!empty($route_param['page'])){
  35. $curpage = $route_param['page'];
  36. $start_li = $pagesize*($curpage-1); //开始位置
  37. $end_li = $pagesize*$curpage;
  38. $limit_cat_value = $start_li.','.$pagesize;
  39. }else{
  40. $curpage = 1;
  41. $limit_cat_value = '0,'.$pagesize;
  42. }
  43. ?>
  44. {eyou:assign name='limit_cat' value="$limit_cat_value" /}
  45. <?php
  46. /*<!--add_time desc,province_id,city_id-->*/
  47. //$sql = "select GROUP_CONCAT(aid SEPARATOR ',') AS ids from ey_archives where $where order by update_time desc limit $limit_cat";
  48. $sql = "select aid from ey_archives where $where order by update_time desc limit $limit_cat";
  49. //echo $sql;die;
  50. $ids = '';
  51. ?>
  52. {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id="res"}
  53. <?php
  54. //var_dump($provid);
  55. //var_dump($res);
  56. $ids = $res['aid'].','.$ids;
  57. ?>
  58. {/eyou:sql}
  59. <?php
  60. $ids = preg_replace("/.$/", "", $ids);
  61. ?>
  62. <!--开始查询-->
  63. {eyou:empty name='$ids' /}
  64. ----------------------(暂无相关文档)-----------------------
  65. {eyou:else /}
  66. {eyou:artlist idlist="$ids" titlelen='30' limit='0,12' infolen='160' orderby='update_time desc' addfields='handle_time,province_id'}
  67. <li>
  68. <!-- <img src="{$field.litpic}" width='160' height='140'/>-->
  69. <a href="{:get_tid_url_2($field['arcurl'],$field['typeid'],$field['stypeid'],'0','',0,$field['province_id'],$field['city_id'])}">{$field.title|msubstr=###,0,30,true}</a>
  70. <span>{$field.add_time|MyDate='Y-m-d',###}</span>
  71. </li>
  72. {/eyou:artlist}
  73. {/eyou:empty}