123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
-
- <?php
- $name = "list-s-1";
- ?>
- <link rel="stylesheet" href="/template/pc/components/list/style_1.css" 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>-->
- {eyou:type typeid='$route_param.tid' empty='暂时没有数据'}
- <a target="_blank" href="{:get_tid_url_2($field['typeurl'])}">
- {eyou:if condition='($route_param.tid != 38)'}
- {$field.typename}
- {eyou:else /}
- 职称工种
- {/eyou:if}
- </a>
- {/eyou:type}
- </div>
- <div class="center">
- <!--定义内容标签 p span a li img--->
- <!-- <?php for($i=1;$i<=15;$i++){ ?>
- <li>
- <img src="https://www.wetools.com/imgplaceholder/160x140" />
- <a target="_blank" href="">建筑工职称</a>
- </li>
- <?php } ?> -->
- <!--list 标签只能使用一次 会导致程序变量错乱-->
- {eyou:if condition='($route_param.tid == 38)'}
- <!--调用全部职称产品并分页-->
- {eyou:php}
- //计算limit属性
- $pagesize = 12;
- if(!empty($route_param['pa'])){
- $curpage = $route_param['pa'];
- $start_li = $pagesize*($curpage-1); //开始位置
- $end_li = $pagesize*$curpage;
- $limit_cat_value = $start_li.','.$pagesize;
- }else{
- $curpage = 1;
- $limit_cat_value = '0,'.$pagesize;
- }
- {/eyou:php}
- {eyou:assign name='$limit_cat' value="$limit_cat_value" /}
-
- <!--直接用sql-->
- {eyou:sql sql="SELECT id FROM __PREFIX__arctype WHERE topid=38 and status=1 and type='产品' limit $limit_cat" cachetime='3600' id='res'}
- {eyou:foreach name='$res' item='cat'}
- {eyou:type typeid='$cat' empty='暂时没有数据' id='item'}
- <li style="position:relative;">
- <img src="/template/pc/images/bg_1.png" width='160' height='140'/>
- <a target="_blank" href="{:get_tid_url_2($item['typeurl'],0,0,0,'产品',$item['topid'])}">{$item.typename}</a>
-
- <span style="display:block;position: absolute;top:35%;width:100%;text-align:center;font-size: 20px;font-weight: bold;">
- {$item.typename}
- </span>
-
- </li>
- {/eyou:type}
- {/eyou:foreach}
- {/eyou:sql}
- {eyou:else /}
- <!--具体职称分类-->
- {eyou:php}
- //计算limit属性
- $pagesize = 12;
- if(!empty($route_param['pa'])){
- $curpage = $route_param['pa'];
- $start_li = $pagesize*($curpage-1); //开始位置
- $end_li = $pagesize*$curpage;
- $limit_cat_value = $start_li.','.$pagesize;
- }else{
- $curpage = 1;
- $limit_cat_value = '0,'.$pagesize;
- }
- {/eyou:php}
- <!--一开始用sql 用limit浪费时间-->
- {eyou:assign name='$limit_cat' value="$limit_cat_value" /}
- {eyou:channel typeid='$route_param.tid' limit="$limit_cat" currentclass='active'}
- <li style="position:relative;">
- <img src="/template/pc/images/bg_1.png" width='160' height='140'/>
- <a target="_blank" href="{:get_tid_url_2($field['typeurl'],0,0,0,'产品',$field['topid'])}">{$field.typename}</a>
-
- <span style="display:block;position: absolute;top:35%;width:100%;text-align:center;font-size: 20px;font-weight: bold;">
- {$field.typename}
- </span>
-
- </li>
- {/eyou:channel}
- {/eyou:if}
- </div>
- <div class="bottom">
- <div class="bottom-row">
- <!--定义内容标签 p span a li img--->
-
- {eyou:assign name='pid' value="$route_param.tid" /}
- {eyou:sql sql="select COUNT(*) as total FROM __PREFIX__arctype where parent_id=$pid" cachetime='3600' empty='没有数据' id="list"}
-
- {eyou:php}
- $total_page = ceil($list['total']/$pagesize);
- $total_page_for = $total_page + 1;
- $pro_page = $curpage - 1;
- $pev_page = $curpage + 1;
- {/eyou:php}
- <div class="bottom bottom-row">
- {eyou:if condition='($route_param.tid == 38)'}
- {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 target="_blank" href="/zczl">首页</a></li>
- {eyou:if condition='((int)$curpage === 2)'}
- <li><a target="_blank" href="/zczl">上一页</a></li>
- {eyou:else /}
- <li><a target="_blank" href="/zczl-{$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 target="_blank" href="/zczl" 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 /}
- <li><a target="_blank" href="/zczl-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
- {/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 target="_blank" href="/zczl-{$pev_page}" data-ey_fc35fdc="html" data-tmp="1">下一页</a></li>
- <li><a target="_blank" href="/zczl-{$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>{$list.total}</strong>条
- {eyou:else /}
- {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 target="_blank" href="/zczl/jzzc{$route_param.tid}">首页</a></li>
- {eyou:if condition='((int)$curpage === 2)'}
- <li><a target="_blank" href="/zczl/jzzc{$route_param.tid}">上一页</a></li>
- {eyou:else /}
- <li><a target="_blank" href="/zczl/jzzc{$route_param.tid}-{$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 target="_blank" >{$i}</a></li>
- {eyou:else /}
- <li><a target="_blank" href="/zczl/jzzc{$route_param.tid}" 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 /}
- <li><a target="_blank" href="/zczl/jzzc{$route_param.tid}-{$i}" data-ey_fc35fdc="html" data-tmp="1">{$i}</a></li>
- {/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 target="_blank" href="/zczl/jzzc{$route_param.tid}-{$pev_page}" data-ey_fc35fdc="html" data-tmp="1">下一页</a></li>
- <li><a target="_blank" href="/zczl/jzzc{$route_param.tid}-{$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>{$list.total}</strong>条
- {/eyou:if}
-
- </div>
- {/eyou:sql}
-
- <!-- <a target="_blank" href=""><img src="/template/pc/images/011.svg" /></a>
- <?php for($i=1;$i<=5;$i++){ ?>
- <a target="_blank" href="" class="active-<?php echo $i; ?>"><?php echo $i; ?></a>
- <?php } ?>
- <a target="_blank" href="">.....</a>
- <a target="_blank" href="">18</a>
- <a target="_blank" href="">19</a>
- <a target="_blank" href="">20</a>
- <a target="_blank" href=""><img src="/template/pc/images/012.svg" /></a>
- <span>跳至<input type="text" />页</span>-->
- </div>
- </div>
- </div>
- <div class="clear"></div>
- </div>
- </div>
|