基本信息
源码名称:php在线书城 thinkphp源码(含数据库脚本)
源码大小:15.64M
文件格式:.rar
开发语言:PHP
更新时间:2019-04-04
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 1 元×
微信扫码支付:1 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
<?php // 本类由系统自动生成,仅供测试用途 class IndexAction extends PublicAction { public function index(){ //公告板 $notice=M('Notice'); $notice=$notice->limit(8)->select(); $this->assign('notice',$notice); $book=M('Book'); //强力推荐 $abook=$book->table('book_book as a,book_cats as b')->where("a.book_cat=b.cat_id and a.flags like '%a%'")->limit(7)->select(); $this->assign('abook',$abook); //最新完本 $endbook=$book->table('book_book as a,book_cats as b')->order('a.public_time')->where('a.book_cat=b.cat_id and a.progress=59')->limit(7)->select(); $this->assign('endbook',$endbook); //封面推荐 $bbook=$book->table('book_book as a,book_cats as b')->where("a.book_cat=b.cat_id and a.flags like '%b%'")->limit(3)->select(); $this->assign('bbook',$bbook); //最新上架 $newbook=$book->table('book_book as a,book_cats as b')->order('a.public_time')->where('a.book_cat=b.cat_id')->limit(12)->select(); $this->assign('newbook',$newbook); //编辑推荐 $bianji=$book->table('book_book as a,book_cats as b')->where("a.book_cat=b.cat_id and a.flags like '%c%'")->select(); $this->assign('bianji',$bianji); //精品推荐 $jingpin=$book->table('book_book as a,book_cats as b')->where("a.book_cat=b.cat_id and a.flags like '%d%'")->select(); $this->assign('jingpin',$jingpin); //最近更新 $book=D('Book'); $newUpdate=$book->relation(true)->select(); // dump($newUpdate); $this->assign('newUpdate',$newUpdate); //热评榜 $book=M('Book'); $hots=$book->order('hits asc')->select(); $this->assign('hots',$hots); //最新评论 $comment=D('Comment'); $comment=$comment->relation(true)->order('time desc')->select(); $this->assign('comment',$comment); //会员积分排行榜 $user_info=M('User_info'); $user_info=$user_info->order('user_score desc')->select(); $this->assign('user_info',$user_info); //友情链接 $link=M('Link'); $links=$link->where('status=1')->limit(32)->select(); $this->assign('links',$links); //显示模板 $this->display(); } }