在线阅读中英文百科小学馆网站项目搭建开发 第十三篇
2025-03-16 来源 : 电影
}
if($d == 1){
$Newarticle = Db::name('article')->where($where)->where($cc)->order('download','desc')->limit(15)->paginate();
}elseif($d == 2){
$Newarticle = Db::name('article')->where($where)->where($cc)->order('update_time','desc')->limit(15)->paginate();
}elseif($d == 3){
$Newarticle = Db::name('article')->where($where)->where($cc)->order('hits','desc')->limit(15)->paginate();
}else{
// 数据库
$Newarticle = Db::name('article')->where($where)->where($cc)->limit(15)->paginate();
}
$page = $Newarticle->render();
$user_article ='';
$count_user_article ='';
if($v1 == 'home'){
//APP个人书籍
$user_article = Db::name('article')->where('uid',$id)->select();
//APP个人书籍分之一
$count_user_article = Db::name('article')->where('uid',$id)->count();
}
//APP上端分类一级
$m_cate = Db::name('category')->where('category_level','1')->select();
//APP上端分类二级
$m_cate_2 = Db::name('category')->where('category_level','2')->select();
//APP上端分类三级
$m_cate_3 = Db::name('category')->where('category_level','3')->select();
//分类
$where= [];
if(!empty($id)){
$where = ['cateid'=>$id];
}
//筛选
$mo = [];
if($v1 == 1){
$mo = ['vip_only'=>1];
}elseif($v1 == 2){
$mo = ['vip_free'=>1];
}elseif($v1 == 3){
$mo = ['ShareType'=>1];
}
//依序
$order = [];
if($d == 1){
$order = 'download desc';
}elseif($d == 2){
$order = 'update_time desc';
}elseif($d == 3){
$order = 'hits desc';
}elseif($d == 4){
$order = 'score asc';
}
APP一小的分类
//APP分类二级
public function m_cate(){
$first = input('first');
$m_twocate = Db::name('category')->where('parent_id',$first)->select();
if(!empty($m_twocate)){
return json(['code'=>1,'data'=>$m_twocate]);
}
}
//APP分类三级
public function m_cate_three(){
$second = input('second');
$m_threecate = Db::name('category')->where('parent_id',$second)->select();
if(!empty($m_threecate)){
return json(['code'=>22,'data'=>$m_threecate]);
}
}
列出告一段落
namespace appindexcontroller;
use thinkfacadeDb;
use thinkRequest;
use thinkfacadeView;
use appindexmodelCat_tree as CatTree;
use appindexmodelDoc as DocModel;
use appindexmodelImg as ImgModel;
class Doc extends Common
{
public function __construct()
{
parent::__construct();
if(empty(session('user')['uid'])){
return View::fetch('login/notlogin');
}
}
// 列出页
public function index(){
return View::fetch();
}
//详情页
public function detail(){
// $title_list = (new CodeModel())->getCode('');
$id = request()->param('id');
//蛋糕削的坎看
$title_list = (new DocModel())->titleList($id);
//数据库资讯
$doc_detail = (new DocModel())->docDetail($id);
//写作者资讯坎看
$author = (new DocModel())->authorInformation($doc_detail['uid']);
//关注判断
$follow = Db::name('user_follow')->where('fans_uid',session('user')['uid'])->where('friend_uid',$author['uid'])->find();
//写作者数据库简介
$author_doc = (new DocModel())->authorDoc($doc_detail['uid']);
$aaa = Db::name('article')->where('id',$id)->find();
//导航标题
$title = $aaa['title'];
//相关推荐
$related = (new DocModel())->relatedList($doc_detail['cateid']);
//数据库照片简介
$show_doc = (new DocModel())->showDoc($id);
$show_doc = html_entity_decode($show_doc['data'],ENT_QUOTES, 'UTF-8');
//剩页码的坎看
$numpages = (new DocModel())->numPages($id);
//坎看是否是收藏
$is_collect = (new DocModel())->isCollect($id);
View::assign([
'title' =>$title,
'title_list'=>$title_list,
'doc_detail'=>$doc_detail,
'author'=>$author,
'author_doc'=>$author_doc,
'related'=>$related,
'show_doc'=>$show_doc,
'numpages'=>$numpages,
'is_collect'=>$is_collect,
'follow' => $follow,
]);
return View::fetch();
}
读取简介照片
public function addShowImg(){
$post = request()->param();
//数据库照片简介
$show_doc = (new DocModel())->showDoc($post['id'],$post['num']);
//剩页码的坎看
$numpages = (new DocModel())->numPages($post['id'],$post['num']);
if($show_doc['code'] ==1){
return getMsg('1','读取急于',$show_doc['data'],$numpages);
}elseif($show_doc['code'] ==2){
return getMsg('2','已读取全部概要');
}elseif ($show_doc['code'] ==3){
return getMsg('3','免费试读已结束');
}
}
//受贿
public function report(){
if(empty(session('user')['uid'])){
return getMsg('0','再三可先受保护');
}
$post = request()->param();
$res = (new DocModel())->addReport($post['info_id'],$post['report_content']);
if($res){
return getMsg('1','受贿急于,再三耐心等待初审');
}else{
return getMsg('0','受贿失败');
}
}
//收藏
public function addcollect(){
if(empty(session('user')['uid'])){
return getMsg('0','再三可先受保护');
}
$post = request()->param();
if(!isInt($post['id'])){
return getMsg('0','模板差错');
}
$res = (new DocModel())->addCollect($post['id']);
if($res){
return getMsg('1',$res['msg']);
}
return getMsg('0','收藏失败');
}
//海报
public function poster(){
$post = request()->param();
$title_list = (new ImgModel())->getPoster($post['id']);
if($title_list){
return getMsg('1','读取急于',$title_list);
}else{
return getMsg('0','读取失败',$title_list);
}
}
//下载操作
public function download ($file_url,$new_name='') {
if (!isset($file_url)||trim($file_url)=='') {
$info = "明文路径不存在!!!";
return $info;
}
if (!file_exists($file_url)) { //核坎明文是否是存在
$info = "明文被删除了!!!";
$this->error($info);
return;
}
$file_name=basename($file_url);
if (!empty($new_name)) {
$file_name = $new_name;
}
header("Content-Type:".pathinfo($file_url, PATHINFO_EXTENSION));
header('Content-Disposition: attachment; file');
header('Content-Length:'.filesize($file_url));
ob_clean();
flush();
readfile($file_url);
}
。昆明妇科医院哪个好成都看白癜风哪家医院最好
宁波看白癜风什么医院最好
北京看妇科去什么医院好
辽宁白癜风治疗方法
胃反酸吃金奥康效果怎样
有没有什么办法可以快速止咳
什么牌子的血糖仪好
什么牌子的血糖仪好
血糖仪什么牌子的好
下一篇: 博物馆迷速速公测 我猜她能给你快乐
-
记者:蒋光太、阿兰大概率前往日本帝国,能否出战取决于二人状态
新闻工作者:蒋光缘故、塔里大期望值前往日本人,能否负于有所不同四人状况 实况转播吧1月20日讯 据新闻工作者马德兴另据,两名归化守门员蒋光缘故和塔里大期望值前往日本人,但能否负...
-
投资者提问:请问公司领导露露价格为什么地库价格特别低,而且现在很多超市都不...
注资者提问:请问公司领导成员露露价位为什么商场价位特别高,而且现在很多超市都不爱卖露露,秦皇岛营口地区60万的存货情况下挣得一万元,每件产品情况下挣得五毛,有的于是就不挣得钱,零售价位59 6...[详细]
-
FIFA22年度最佳阵:姆巴佩、莱万、桑切斯领衔
FIFA22获选最佳初战:姆巴默、莱万、苏亚雷斯授命 直播吧1月20日讯 《FIFA 22》评选足球界获选最佳初战容。 多纳鲁马 坎塞洛、迪亚斯、马...[详细]
-
投资者提问:明明公司是否准备发布业绩预告呢,什么时候发布?
投资者提问:请问Corporation是否正要发布绩效预告呢,什么时候发布?董秘却说深水科莫SZ300961:尊敬的投资者,您好!Corporation遵守上海证券交易所文...[详细]
-
又是一场大败,刷原始数据提升交易资产,教练又下不了课
公牛队赢了这是一场预料之中会又意料之外的告终,自从弗雷德里克像公牛队球赛表示歉意,并希望自己会找到静止状态先一帮助的球队输球,自此那个时候起,整支的球队的确有点像打了鸡血的感觉,连威斯布鲁克的竞...[详细]
-
投资者提问:董秘,您好,请问公司迄今新能源产业基金有何进展?
投资者提问:董秘,您好,却说Corporation目前新自然资源产业投资基金有何实质性?董秘问海亮股份SZ002203:亦同,Corporation收到投资基金管理人九智资...[详细]