www.gusucode.com > 网猫影视系统NetMao Movie 4.6.6 开源版源码程序 > upload/templates/default/mlist.ctrl.php
<?php if(!defined('IN_NetMao')) exit('Access Denied'); $str_listnum = '10'; //$category $category=$_NCACHE['categorys'][$cid]; //mlists $num=''; $query="SELECT count(*) AS num FROM {$tablepre}movies where isshow>0 and cid=$cid"; $result=$db->query($query); $r=$db->fetch_array($result); $num=$r["num"]; $pagenumber=ceil($num/$str_listnum); $pagenumber = ($pagenumber >0) ? $pagenumber : 1; for($page=1;$page<$pagenumber+1;$page++){ $offset = $page ? ($page-1)*$str_listnum : 0; if($page==1){ $filename=NetMao_ROOT."./mlist/".$category[content].".htm" ; }else{ $filename=NetMao_ROOT."./mlist/".$category[content]."_".$page.".htm" ; } $mpurl=ROOTDIR.'/mlist/'.$category[content]; $pages=htmlpage($num,$str_listnum,$page,$mpurl); $mlists=''; $result=$db->query("SELECT * FROM {$tablepre}movies where cid=$cid and isshow>0 order by addtime desc limit $offset,$str_listnum"); while($r=$db->fetch_array($result)){ $r[category]=$_NCACHE['categorys'][$r[cid]]; $r[movieurl]=movieurl($r[mid]); $r[picture]=moviepic($r[picture]); $r[srun]=movierun($r[isrun]); $r[stime]=date("Y-m-d",$r[addtime]); $r[sname]=cutstr($r[name],24); $r[sactor]=cutstr($r[actor],30); $r[scontent]=cutstr($r[content],65); $mlists[]=$r; } //don't modify the content below $navtitle = ''; $navtitle = strip_tags($category[name]); $metakeywords = ''; $metakeywords = $category[keyword]; //tohtml nmtohtml($filename,'mlist'); } ?>