平时偶尔会接几个模板定制,几个标签还是有些不怎么熟悉,随手记录一下吧,部分可能存在环境及PHP、MYSQL配合,请知悉。
苹果CMS按星期几调用信息教程
首先循环一个7天遍历出来,方便判断
{php} $rq=date("w");
if($rq==0){
$rq=7;
}
$rqarray=array(1,2,3,4,5,6,7);
{/php}
然后来调用判断日期来调用数据
<div class="all_tab">
{volist name="rqarray" id="week" key="iii"}
<ul class="list-txt {if condition="$rq neq $iii"}fn-hide{/if}" id="con_zy_{$iii}">
{maccms:vod num="6" type="'.$vo5['type_id'].'" weekday="'.$iii.'" order="desc" by="time" id="vo2" key="key2"}
<li ><a href="{:mac_url_vod_detail($vo2)}" title="{$vo2.vod_name}" target="_self">{$vo2.vod_name}</a><span>{include file="public/serial"}</span></li>
{/maccms:vod}
</ul>
{/volist}
</div>
{else /}
<div class="week">
<ul>
{if condition="$rq eq 1"}<li onMouseOver="setTab('dm',1,7);" id="dm1" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',1,7);" id="dm1">周一</li>{/if}
{if condition="$rq eq 2"}<li onMouseOver="setTab('dm',2,7);" id="dm2" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',2,7);" id="dm2">周二</li>{/if}
{if condition="$rq eq 3"}<li onMouseOver="setTab('dm',3,7);" id="dm3" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',3,7);" id="dm3">周三</li>{/if}
{if condition="$rq eq 4"}<li onMouseOver="setTab('dm',4,7);" id="dm4" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',4,7);" id="dm4">周四</li>{/if}
{if condition="$rq eq 5"}<li onMouseOver="setTab('dm',5,7);" id="dm5" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',5,7);" id="dm5">周五</li>{/if}
{if condition="$rq eq 6"}<li onMouseOver="setTab('dm',6,7);" id="dm6" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',6,7);" id="dm6">周六</li>{/if}
{if condition="$rq eq 7"}<li onMouseOver="setTab('dm',7,7);" id="dm7" class="current">今天</li>{else /}<li onMouseOver="setTab('dm',7,7);" id="dm7">周日</li>{/if}
</ul>
</div>
<div class="all_tab">
{volist name="rqarray" id="week" key="iii"}
<ul class="list-txt {if condition="$rq neq $iii"}fn-hide{/if}" id="con_dm_{$iii}">
{maccms:vod num="6" type="'.$vo5['type_id'].'" weekday="'.$iii.'" order="desc" by="time" id="vo2" key="key2"}
<li ><a href="{:mac_url_vod_detail($vo2)}" title="{$vo2.vod_name}" target="_self">{$vo2.vod_name}</a><span>{include file="public/serial"}</span></li>
{/maccms:vod}
</ul>
{/volist}
只显示一组播放组数据代码
{maccms:foreach name="obj.vod_play_list" id="vo"}
{if condition="$key == 1"}第一組{/if}
{/maccms:foreach}
{if condition="strpos($obj.vod_play_from,'$
)!==false && $key == 1"}第一組{elseif $key == 2}第二組{elseif $key == 3}第三組{/if}
温馨提示:本文最后更新于
2024-06-27 02:29:10
,某些文章具有时效性,若有错误或已失效,请在下方留言或联系© 版权声明
THE END
暂无评论内容