首要循环一个7天遍历出来,便利判别

{php}$rq=date("w");
if($rq==0){
$rq=7;
}
$rqarray=array(1,2,3,4,5,6,7);
{/php}

然后来调用判别日期来调用数据

<pclass="all_tab">
{volistname="rqarray"id="week"key="iii"}
<ulclass="list-txt{ifcondition="$rqneq$iii"}fn-hide{/if}"id="con_zy_{$iii}">
{maccms:vodnum="6"type="'.$vo5['type_id'].'"weekday="'.$iii.'"order="desc"by="time"id="vo2"key="key2"}
<li><ahref="{:mac_url_vod_detail($vo2)}"title="{$vo2.vod_name}"target="_self">{$vo2.vod_name}</a><span>{includefile="public/serial"}</span></li>
{/maccms:vod}
</ul>
{/volist}
</p>
{else/}
<pclass="week">
<ul>
{ifcondition="$rqeq1"}<lionMouseOver="setTab('dm',1,7);"id="dm1"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',1,7);"id="dm1">周一</li>{/if}
{ifcondition="$rqeq2"}<lionMouseOver="setTab('dm',2,7);"id="dm2"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',2,7);"id="dm2">周二</li>{/if}
{ifcondition="$rqeq3"}<lionMouseOver="setTab('dm',3,7);"id="dm3"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',3,7);"id="dm3">周三</li>{/if}
{ifcondition="$rqeq4"}<lionMouseOver="setTab('dm',4,7);"id="dm4"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',4,7);"id="dm4">周四</li>{/if}
{ifcondition="$rqeq5"}<lionMouseOver="setTab('dm',5,7);"id="dm5"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',5,7);"id="dm5">周五</li>{/if}
{ifcondition="$rqeq6"}<lionMouseOver="setTab('dm',6,7);"id="dm6"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',6,7);"id="dm6">周六</li>{/if}
{ifcondition="$rqeq7"}<lionMouseOver="setTab('dm',7,7);"id="dm7"class="current">今日</li>{else/}<lionMouseOver="setTab('dm',7,7);"id="dm7">周日</li>{/if}
</ul>
</p>
<pclass="all_tab">
{volistname="rqarray"id="week"key="iii"}
<ulclass="list-txt{ifcondition="$rqneq$iii"}fn-hide{/if}"id="con_dm_{$iii}">
{maccms:vodnum="6"type="'.$vo5['type_id'].'"weekday="'.$iii.'"order="desc"by="time"id="vo2"key="key2"}
<li><ahref="{:mac_url_vod_detail($vo2)}"title="{$vo2.vod_name}"target="_self">{$vo2.vod_name}</a><span>{includefile="public/serial"}</span></li>
{/maccms:vod}
</ul>
{/volist}

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!

原文地址:苹果CMS按星期几调用信息教程发布于2022-05-11 07:43:31

相关推荐