//当subday=7的时候调用7天内得所有文章
if($subday > 0) { if($subday == 1) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } else if ($subday == 2) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $lomitday = $ntime; $orwheres[] = " arc.senddate > $lomitday && arc.senddate < $limitday"; } else if ($subday == 3) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime -($subday * 24 * 3600)+(1*24 * 3600); $orwheres[] = " arc.senddate < $limitday "; } else if ($subday == 7) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } } } |
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: 织梦dede源码模板下载调用某个时间段发布的文章的代码