$classmainsite = new mainsite($db); /* 展讯 引用 引用编号 136 */ $list136 = $classmainsite->getmodelinfro('136'); /* 博客。论坛引用 引用编号 125 */ $list125 = $classmainsite->getmodelinfro('125'); /* 视频。访谈 引用 引用编号 126 */ $list126 = $classmainsite->getmodelinfro('126'); /* 专题。评论 | 专栏 引用 引用编号 127 */ $list127 = $classmainsite->getmodelinfro('127'); /*新闻列表处理部分*/ /*得到栏目名称*/ $sqlcolumnname = "select Channel,MainColumn from Page where PageId = '".$column_id."'"; $querycolumnname = $db->query($sqlcolumnname); $listcolumnname = $db->fetch_array($querycolumnname); /*定义每页显示记录条数*/ $page_size=32; /*得到记录总数*/ $sqlmore = "select count(NewsCode) as NewsCode from News where PageId='".$column_id."' and IsIssue = 1"; $querymore = $db->query($sqlmore); $listmore = $db->fetch_array($querymore); $newscount = $listmore['NewsCode']; /*得到总页数*/ $pagecount = ceil($newscount/$page_size); /*当前页数处理*/ if(!isset($pageNo)){ $pageNo=1; } $offset=($pageNo-1)*$page_size; /*得到记录*/ $sqlnews = "select NewsCode,PageId,Title,PublishTime from News where PageId = '".$column_id."' and IsIssue = 1 order by PublishTime desc limit $offset,$page_size"; $querynews = $db->query($sqlnews); $i = 0; while ($d=$db->fetch_array($querynews)){ $listnews[$i]=$d; $i++; } /*新闻列表处理部分就结束*/ template('morenews'); ?>