《CMS教程:phpcms v9列表页时间轴效果》要点:
本文介绍了CMS教程:phpcms v9列表页时间轴效果,希望对您有用。如果有疑问,可以联系我们。
相关主题:PHPCMS教程
- {pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}
- <?php
- $arr=array();
- foreach ($data as $k=>$t)
- {
- $y=date("Y",$t['inputtime']);
- $arr[$y][0]=$y;
- $arr[$y][]=$t;
- }
- ?>
- <?php
- foreach ($arr as $p=>$k)
- {
- ?>
- <div class="history-date">
- <ul>
- <?php
- $num=1;
- for($j=1;$j<count($k);$j++)
- {
- ?>
- <h2 class='first'><a href='#nogo'><?php if($num==1){echo $k[0];};$num++; ?></a></h2>
- <li>
- <h3><?php echo date('m-d',$k[$j]['inputtime']); ?></h3>
- <div class="zxhdListBj">
- <div class="zxhdListL">
- <a href="<?php echo $k[$j]['url']; ?>"><img src=" <?php echo $k[$j]['thumb']; ?>" width="124" height="124" /></a>
- </div>
- <div class="zxhdListR">
- <h1><a href=" <?php echo $k[$j]['url']; ?>"><?php echo $k[$j]['title']; ?></a></h1>
- <p>
- <?php echo $k[$j]['description']; ?>
- </p>
- <p class="xx"><a href=" <?php echo $k[$j]['url']; ?>" target="_blank">查看详情>></A></p>
- </div>
- </div>
- </li>
- <?php } ?>
- </ul>
- </div>
- <?php } ?>
- <div id="pages" class="text-c">{$pages}</div>
- {/pc}
转载请注明本页网址:
http://www.vephp.com/jiaocheng/6021.html