source/index/article.ctrl.php
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
*Author 雷日锦 362606856@qq.com
*控制器自动生成
*/
if(!defined("ROOT_PATH")) exit("die Access ");
class articleControl extends skymvc{
public function __construct(){
parent::__construct();
}
public function onDefault(){
$where=" status=1 ";
$url="/index.php?m=article&a=default";
$limit=24;
$start=get("per_page","i");
$catid=get('catid','i');
$w="";
if($catid){
$cids=M("category")->id_family($catid);
if($cids){
$w.=" AND catid in(".implode(",",$cids).") ";
}else{
$w.=" AND 1=2 ";
}
}
$where.=$w;
$option=array(
"start"=>$start,
"limit"=>$limit,
"order"=>" id DESC",
"where"=>$where
);
$rscount=true;
$data=M("article")->select($option,$rscount);
if($data){
foreach($data as $k=>$v){
$v["imgurl"]=images_site($v["imgurl"]);
$data[$k]=$v;
}
}
$pagelist=$this->pagelist($rscount,$limit,$url);
$catlist=M("category")->children(0,"article");
$per_page=$start+$limit;
$per_page=$per_page>=$rscount?0:$per_page;
$seo=M("seo")->get("article");
$this->smarty->goassign(
array(
"seo"=>$seo,
"list"=>$data,
"pagelist"=>$pagelist,
"rscount"=>$rscount,
"catlist"=>$catlist,
"per_page"=>$per_page,
"url"=>$url
)
);
$this->smarty->display("article/index.html");
后面还有 220 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。