当前位置:网站首页>(PHP graduation project) obtained based on thinkphp5 campus news release management system
(PHP graduation project) obtained based on thinkphp5 campus news release management system
2022-07-28 06:18:00 【BiShe source code library】
be based on thinkphp5 Campus news release management system
Campus news release management system is based on php Programming languages and mysql database ,thinkphp5 Developed BS Architecture system , This system is divided into two roles: user and administrator , User login system , View news categories , News detail , News reviews , Website message and other functions , Administrators are for news , classification , user , Leaving a message. , Management of evaluation information . The design interface is beautiful , The function is all ready , For a php Graduation project reference and learning .
One . Technical environment
php edition : 5.4 above
php frame :thinkphp5
development tool : notepad++,sublime,phpstorm All right
database : mysql
The server : apache
Integrated environment : phpstudy
The front frame :bootstrap
Detailed technical :HTML+CSS+JS+PHP+MYSQL+PhpStudy
Two . Project documents

3、 ... and . system function

Four . Code example
<?php
namespace app\admin\controller;
use think\Controller;
use think\Request;
use app\admin\controller\Base;
class News extends Base
{
/* Show news information */
public function index()
{
$user = session('User','','adminuser');
if(!$user || !$user->id){
return $this->redirect(url('user/login'));
}else{
$username = $user['username'];
$news = Model('News')->getList('News');
foreach ($news as $key => $value) {
$value['category'] = Model('Category')->get($value['category_id'])['name'];
if($value['se_category_id'] == 0){
$value['se_category'] = ' nothing ';
}else{
$value['se_category'] = Model('Category')->get($value['se_category_id'])['name'];
}
}
return $this->fetch('',[
'username'=>$username,
'news'=>$news,
]);
}
}
/* Add news information */
public function add()
{
$user = session('User','','adminuser');
if(!$user || !$user->id){
return $this->redirect(url('user/login'));
}else{
$username = $user['username'];
$category = Model('Category')->getParentCategory();
return $this->fetch('',[
'username'=>$username,
'category'=>$category,
]);
}
}
/* Edit page */
public function edit(){
$user = session('User','','adminuser');
if(!$user || !$user->id){
return $this->redirect(url('user/login'));
}else{
$username = $user['username'];
$id = Request::instance()->param('id');
$news = Model('News')->get($id);
if($news['se_category_id'] == 0){
$news['second'] = 0;
}else{
$news['second'] = 1;
$news['se_category'] = Model('Category')->getCategoryByParentID($news['category_id']);
}
$category = Model('Category')->getParentCategory();
return $this->fetch('',[
'username'=>$username,
'news'=>$news,
'category'=>$category,
]);
}
}
/* Modify news information */
public function update(){
$data = input('post.');
if(isset($data['fileselect'])){
unset($data['fileselect']);
}
$data['update_time'] = date('Y-m-d H:i:s',time());
$result =model('News')->update($data,['id'=>intval($data['id'])]);
if($result){
return $this->success(' Modification successful !',url('news/index'));
}else{
return $this->error(' Modification failed !');
}
}
/* Save news information */
public function save()
{
if(request()->isPost()){
$now = date('Y-m-d H:i:s',time());
$data = input('post.');
// $data = Request::instance()->param();
if(isset($data['fileselect'])){
unset($data['fileselect']);
}
// p($data);exit();
$data['create_time'] = $now;
$data['update_time'] = $now;
$res = Model('News')->add($data);
if($res){
return $this->success(' Add success ',url('news/index'));
}else{
return $this->error(' Add failure ');
}
}
}
}
5、 ... and . Project screenshots













边栏推荐
- Geek challenge 2019-sql injection five questions PW
- 4、 Model optimizer and inference engine
- Paper reading notes of field low resolution face recognition based on selective knowledge extraction
- Using neural network to predict the weather
- Reinforcement learning - Basic Concepts
- Addition and multiplication calculation of GF (2^8)
- CVE_ 2017_ 11882 vulnerability recurrence (Metasploit opens NT remote desktop to add an account)
- 五、视频处理与GStreamer
- 光伏发电系统——mppt最大功率点追踪
- Byte Android post 4 rounds of interviews, received 50k*18 offers, and successfully broke the situation under the layoff
猜你喜欢

关于Fusion on Apple Silicon的谨慎猜测

1、 Speech synthesis and autoregressive model

Which is more reliable for small program development?

关于接触器线圈控制电路设计分析

The number of password errors during login is too many, and the user is blocked,

Tf.keras build neural network function expansion

Deep learning - patches are all you need

Reinforcement learning -- SARS in value learning

D2sc-gan: low resolution face recognition of classroom scenes based on dual depth and shallow channel generation confrontation network

基于tensorflow搭建神经网络
随机推荐
一个票据打印实例
Neural network learning
VB-ocx应用于Web
《On Low-Resolution Face Recognition in the Wild:Comparisons and New Techniques》低分辨率人脸识别论文解读
Deep learning (self supervision: simple Siam) -- Exploring simple Siamese representation learning
Adaface: quality adaptive margin for face recognition image quality adaptive edge loss for face recognition
基于差值扩展的可逆水印方法
3、 Openvino practice: image classification
Prime_ Series range from detection to weight lifting
Internet of things interoperability system: classification, standards and future development
5、 Video processing and GStreamer
Interpreting the knowledge in a neural network
开关电源电路EMI设计在layout过程中注意事项
Nsctf web Title writeup
Research on threat analysis and defense methods of deep learning data theft attack in data sandbox mode
ESXi社区版NVMe驱动更新v1.1
CalendarExtender控件的中文显示问题
dsp和fpga的通讯
Building neural network based on tensorflow
WebService出错 Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(655