收藏关注不迷路!!
🌟文末获取源码+数据库🌟
感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题),项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人
前言
💗博主介绍:✨全网拥有20W+粉丝、CSDN作者、博客专家、全栈领域优质创作者、平台优质Java创作者、专注于Java、小程序、python、安卓技术领域和毕业项目实战✌💟!✨💗
👇🏻 精彩专栏 推荐订阅👇🏻
计算机毕业设计设计精品实战案例✅
感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题),项目以及论文编写等相关问题都可以给我留言咨询,博主免费解答、希望可以帮助更多人
详细视频演示
文章底部名片,获取项目的完整演示视频,免费解答技术疑问
项目介绍
快速发展的社会中,人们的生活水平都在提高,生活节奏也在逐渐加快。为了节省时间和提高工作效率,越来越多的人选择利用互联网进行线上打理各种事务,然后线上管理系统也就相继涌现。与此同时,人们开始接受方便的生活方式。他们不仅希望页面简单大方,还希望操作方便,可以快速锁定他们需要的线上管理方式。基于这种情况,我们需要这样一个界面简单大方、功能齐全的系统来解决用户问题,满足用户需求。
课题主要分为二大模块:即管理员模块和用户模块,主要功能包括:个人信息修改、用户信息、包厢信息、零食信息、猫咪信息、电影资讯等;
技术介绍
开发语言:PHP
框架:原生php/thinkphp5
服务器:Apache
数据库:mysql 5.7(一定要5.7版本)
数据库工具:Navicat 11
运行软件:小皮phpStudy
浏览器:谷歌浏览器
功能介绍
猫咖私人影院系统分为二个部分,即管理员模块和用户模块。该系统是根据用户的实际需求开发的,贴近生活。从管理员处获得的指定账号和密码可用于进入系统和使用相关的系统应用程序。管理员拥有最大的权限,其次是用户。管理员一般负责整个系统的运行维护和总体协调,系统结构如图4-1所示。
图4-1系统结构图
核心代码
<?php
require_once("./config.php");
class CommonController{
public function __construct()
{
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
header('Access-Control-Allow-Headers:Origin,Content-Type,Accept,token,X-Requested-With,device');
}
//公共方法文件
/**
* 获取头部token
**/
public function token(){
$token = $_SERVER['HTTP_TOKEN'];
if (!$token){
return false;
}
return $token;
}
/**
* 验证token和查询用户id
**/
public function checkToken(){
$token = $this->token();
$uid = $_SESSION[$token];
if (empty($uid)) return false;
return $uid;
}
/**
* curl请求
* post
* */
public function request_post($url = '', $param = '') {
if (empty($url) || empty($param)) {
return false;
}
$postUrl = $url;
$curlPost = $param;
$curl = curl_init();//初始化curl
curl_setopt($curl, CURLOPT_URL,$postUrl);//抓取指定网页
curl_setopt($curl, CURLOPT_HEADER, 0);//设置header
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl_setopt($curl, CURLOPT_POST, 1);//post提交方式
curl_setopt($curl, CURLOPT_POSTFIELDS, $curlPost);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);// 设置是否检查服务器端的证书
$data = curl_exec($curl);//运行curl
curl_close($curl);
return $data;
}
/**
* 字段 累加
* $tables 数据表
* $id 数据id
* $column 字段
* $num 累加值
* */
public function andone($tables,$id,$column,$num=1){
$sqlcheck = "select `id`,`".$column."` from `".$tables."` where `id` =".$id;
$dataCheck = table_sql($sqlcheck);
$rows = 0;
while($row = $dataCheck->fetch_assoc()) {
$rows = $row[$column];
}
$sum = round($rows+$num);
$sql = "update `".$tables."` set ".$column." = ".$sum." where `id` =".$id;
table_sql($sql);
return true;
}
/**
* 获取AccessToken
*/
public function getAccessToken() {
$url = 'https://aip.baidubce.com/oauth/2.0/token';
$post_data['grant_type'] = 'client_credentials';
$post_data['client_id'] = 'yMnHy1guHZRzGhXB7BILdktB';
$post_data['client_secret'] = '1oHG8X0yizyZmIwj3bZygG470b648iE1';
$o = "";
foreach ( $post_data as $k => $v )
{
$o.= "$k=" . urlencode( $v ). "&" ;
}
$postData = substr($o,0,-1);
$data = $this->request_post($url, $postData);
$json = json_decode($data,true);
return $json['access_token'];
}
}
数据库参考
--
-- Current Database: `phpcw65ooxk`
--
/*!40000 DROP DATABASE IF EXISTS `phpcw65ooxk`*/;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phpcw65ooxk` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `phpcw65ooxk`;
--
-- Table structure for table `aboutus`
--
DROP TABLE IF EXISTS `aboutus`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aboutus` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`title` varchar(200) NOT NULL COMMENT '标题',
`subtitle` varchar(200) DEFAULT NULL COMMENT '副标题',
`content` longtext NOT NULL COMMENT '内容',
`picture1` longtext COMMENT '图片1',
`picture2` longtext COMMENT '图片2',
`picture3` longtext COMMENT '图片3',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='关于我们';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `aboutus`
--
LOCK TABLES `aboutus` WRITE;
/*!40000 ALTER TABLE `aboutus` DISABLE KEYS */;
INSERT INTO `aboutus` VALUES (1,'2023-11-19 06:41:10','关于我们','ABOUT US','不管你想要怎样的生活,你都要去努力争取,不多尝试一些事情怎么知道自己适合什么、不适合什么呢?\n你说你喜欢读书,让我给你列书单,你还问我哪里有那么多时间看书;你说自己梦想的职业是广告文案,问我如何成为一个文案,应该具备哪些素质;你说你计划晨跑,但总是因为学习、工作辛苦或者身体不舒服第二天起不了床;你说你一直梦想一个人去长途旅行,但是没钱,父母觉得危险。其实,我已经厌倦了你这样说说而已的把戏,我觉得就算我告诉你如何去做,你也不会照做,因为你根本什么都不做。','upload/aboutus_picture1.jpg','upload/aboutus_picture2.jpg','upload/aboutus_picture3.jpg');
/*!40000 ALTER TABLE `aboutus` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `baoxiangfenlei`
--
DROP TABLE IF EXISTS `baoxiangfenlei`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `baoxiangfenlei` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`baoxiangfenlei` varchar(200) DEFAULT NULL COMMENT '包厢分类',
`image` longtext COMMENT '图片',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='包厢分类';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `baoxiangfenlei`
--
LOCK TABLES `baoxiangfenlei` WRITE;
/*!40000 ALTER TABLE `baoxiangfenlei` DISABLE KEYS */;
INSERT INTO `baoxiangfenlei` VALUES (21,'2023-11-19 06:41:10','包厢分类1','upload/baoxiangfenlei_image1.jpg,upload/baoxiangfenlei_image2.jpg,upload/baoxiangfenlei_image3.jpg'),(22,'2023-11-19 06:41:10','包厢分类2','upload/baoxiangfenlei_image2.jpg,upload/baoxiangfenlei_image3.jpg,upload/baoxiangfenlei_image4.jpg'),(23,'2023-11-19 06:41:10','包厢分类3','upload/baoxiangfenlei_image3.jpg,upload/baoxiangfenlei_image4.jpg,upload/baoxiangfenlei_image5.jpg'),(24,'2023-11-19 06:41:10','包厢分类4','upload/baoxiangfenlei_image4.jpg,upload/baoxiangfenlei_image5.jpg,upload/baoxiangfenlei_image6.jpg'),(25,'2023-11-19 06:41:10','包厢分类5','upload/baoxiangfenlei_image5.jpg,upload/baoxiangfenlei_image6.jpg,upload/baoxiangfenlei_image7.jpg'),(26,'2023-11-19 06:41:10','包厢分类6','upload/baoxiangfenlei_image6.jpg,upload/baoxiangfenlei_image7.jpg,upload/baoxiangfenlei_image8.jpg'),(27,'2023-11-19 06:41:10','包厢分类7','upload/baoxiangfenlei_image7.jpg,upload/baoxiangfenlei_image8.jpg,upload/baoxiangfenlei_image9.jpg'),(28,'2023-11-19 06:41:10','包厢分类8','upload/baoxiangfenlei_image8.jpg,upload/baoxiangfenlei_image9.jpg,upload/baoxiangfenlei_image10.jpg');
/*!40000 ALTER TABLE `baoxiangfenlei` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `baoxiangxinxi`
--
DROP TABLE IF EXISTS `baoxiangxinxi`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `baoxiangxinxi` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`baoxiangmingcheng` varchar(200) DEFAULT NULL COMMENT '包厢名称',
`baoxiangleixing` varchar(200) DEFAULT NULL COMMENT '包厢类型',
`rongnarenshu` int(11) DEFAULT NULL COMMENT '容纳人数',
`xiaoshijiage` double DEFAULT NULL COMMENT '小时价格',
`baoxiangzhuangtai` varchar(200) DEFAULT NULL COMMENT '包厢状态',
`baoxiangjieshao` longtext COMMENT '包厢介绍',
`baoxiangtupian` longtext COMMENT '包厢图片',
`baoxiangfenlei` varchar(200) DEFAULT NULL COMMENT '包厢分类',
`thumbsupnum` int(11) DEFAULT '0' COMMENT '赞',
`crazilynum` int(11) DEFAULT '0' COMMENT '踩',
`clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
`clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
`discussnum` int(11) DEFAULT '0' COMMENT '评论数',
`storeupnum` int(11) DEFAULT '0' COMMENT '收藏数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='包厢信息';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `baoxiangxinxi`
--
LOCK TABLES `baoxiangxinxi` WRITE;
/*!40000 ALTER TABLE `baoxiangxinxi` DISABLE KEYS */;
INSERT INTO `baoxiangxinxi` VALUES (31,'2023-11-19 06:41:10','包厢名称1','小包',1,1,'已预订','包厢介绍1','upload/baoxiangxinxi_baoxiangtupian1.jpg,upload/baoxiangxinxi_baoxiangtupian2.jpg,upload/baoxiangxinxi_baoxiangtupian3.jpg','包厢分类1',1,1,'2023-11-19 14:41:10',1,0,1),(32,'2023-11-19 06:41:10','包厢名称2','小包',2,2,'已预订','包厢介绍2','upload/baoxiangxinxi_baoxiangtupian2.jpg,upload/baoxiangxinxi_baoxiangtupian3.jpg,upload/baoxiangxinxi_baoxiangtupian4.jpg','包厢分类2',2,2,'2023-11-19 14:41:10',2,0,2),(33,'2023-11-19 06:41:10','包厢名称3','小包',3,3,'已预订','包厢介绍3','upload/baoxiangxinxi_baoxiangtupian3.jpg,upload/baoxiangxinxi_baoxiangtupian4.jpg,upload/baoxiangxinxi_baoxiangtupian5.jpg','包厢分类3',3,3,'2023-11-19 14:41:10',3,0,3),(34,'2023-11-19 06:41:10','包厢名称4','小包',4,4,'已预订','包厢介绍4','upload/baoxiangxinxi_baoxiangtupian4.jpg,upload/baoxiangxinxi_baoxiangtupian5.jpg,upload/baoxiangxinxi_baoxiangtupian6.jpg','包厢分类4',4,4,'2023-11-19 14:41:10',4,0,4),(35,'2023-11-19 06:41:10','包厢名称5','小包',5,5,'已预订','包厢介绍5','upload/baoxiangxinxi_baoxiangtupian5.jpg,upload/baoxiangxinxi_baoxiangtupian6.jpg,upload/baoxiangxinxi_baoxiangtupian7.jpg','包厢分类5',5,5,'2023-11-19 14:41:10',5,0,5),(36,'2023-11-19 06:41:10','包厢名称6','小包',6,6,'已预订','包厢介绍6','upload/baoxiangxinxi_baoxiangtupian6.jpg,upload/baoxiangxinxi_baoxiangtupian7.jpg,upload/baoxiangxinxi_baoxiangtupian8.jpg','包厢分类6',6,6,'2023-11-19 14:41:10',6,0,6),(37,'2023-11-19 06:41:10','包厢名称7','小包',7,7,'已预订','包厢介绍7','upload/baoxiangxinxi_baoxiangtupian7.jpg,upload/baoxiangxinxi_baoxiangtupian8.jpg,upload/baoxiangxinxi_baoxiangtupian9.jpg','包厢分类7',7,7,'2023-11-19 14:41:10',7,0,7),(38,'2023-11-19 06:41:10','包厢名称8','小包',6,20,'已预订','<p>自行添加包厢的介绍</p>','upload/baoxiangxinxi_baoxiangtupian8.jpg,upload/baoxiangxinxi_baoxiangtupian9.jpg,upload/baoxiangxinxi_baoxiangtupian10.jpg','包厢分类8',8,8,'2023-11-19 06:53:42',12,0,8);
/*!40000 ALTER TABLE `baoxiangxinxi` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `baoxiangyuding`
--
DROP TABLE IF EXISTS `baoxiangyuding`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `baoxiangyuding` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`yuyuebianhao` varchar(200) DEFAULT NULL COMMENT '预约编号',
`baoxiangmingcheng` varchar(200) DEFAULT NULL COMMENT '包厢名称',
`baoxiangleixing` varchar(200) DEFAULT NULL COMMENT '包厢类型',
`rongnarenshu` int(11) NOT NULL COMMENT '容纳人数',
`xiaoshijiage` double DEFAULT NULL COMMENT '小时价格',
`yuyueshizhang` int(11) NOT NULL COMMENT '预约时长',
`zongjine` double DEFAULT NULL COMMENT '总金额',
`xiadanshijian` datetime NOT NULL COMMENT '下单时间',
`beizhu` varchar(200) DEFAULT NULL COMMENT '备注',
`yonghuzhanghao` varchar(200) DEFAULT NULL COMMENT '用户账号',
`yonghuxingming` varchar(200) DEFAULT NULL COMMENT '用户姓名',
`shoujihao` varchar(200) DEFAULT NULL COMMENT '手机号',
`sfsh` varchar(200) DEFAULT '待审核' COMMENT '是否审核',
`shhf` longtext COMMENT '审核回复',
`ispay` varchar(200) DEFAULT '未支付' COMMENT '是否支付',
PRIMARY KEY (`id`),
UNIQUE KEY `yuyuebianhao` (`yuyuebianhao`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 COMMENT='包厢预订';
/*!40101 SET character_set_client = @saved_cs_client */;
系统效果图
源码获取
下方名片联系我即可!!
大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻