当前位置 :首页 >> 电影

在线阅读中英文百科小学馆网站项目搭建开发 第十三篇

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日讯 据新闻工作者马德兴另据,两名归化守门员蒋光缘故和塔里大期望值前往日本人,但能否负...

友情链接