1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<div
class
=
"dbzbox clearfix"
>
<?php
$bclassid
=
$GLOBALS
[navclassid];
//取得本栏目下的子栏目
?>
<?php
for
(
$n
=0;
$n
<=5;
$n
++)
//判断子栏目的个数,循环的次数
{
if
(
$n
%2==0)
//两个一组的循环
{
?>
<div
class
=
"dbzlist"
>
<div
class
=
"dbzdh clearfix"
>
<ul
class
=
"tab_nav"
>
[e:loop={
"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` ASC "
,7,24,0}]
<?php
if
(
$bqno
>
$n
&
$bqno
<=(
$n
+2)){?>
//$bqno是默认的序号,根据循环的序号来判断
<li
class
=
"selected"
>
<?=
$bqr
[classname]?>
</li>
<?php }?>
[/e:loop]
</ul>
</div>
<div
class
=
"tab_switch"
> [e:loop={
"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` ASC "
,7,24,0}]
<?php
if
(
$bqno
>
$n
&
$bqno
<=(
$n
+2)){?>
//$bqno是默认的序号,根据循环的序号来判断
<div
class
=
"tabcon selected"
>
<dl>[ecmsinfo]
$bqr
[classid],1,14,0,0,18,0[/ecmsinfo]</dl>
<ul
class
=
"nrcon"
>[ecmsinfo]
$bqr
[classid],
'1,4'
,26,0,0,17,0[/ecmsinfo]</ul>
<div
class
=
"dbzbtn"
><a href=
"<?=$bqsr[classurl]?>"
>详细了解<?=
$bqr
[classname]?></a></div>
</div>
<?php }?>
[/e:loop]
</div>
</div>
<?php
}}
?>
</div>
|
本文转自 gutaotao1989 51CTO博客,原文链接:http://blog.51cto.com/taoyouth/1859720