diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index e69de29..a8733eb 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index 6949fd5..71865cf 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -1,4 +1,12 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + return array( //'配置项'=>'配置值' //主题静态文件路径 diff --git a/Application/Admin/Controller/BaseController.class.php b/Application/Admin/Controller/BaseController.class.php index 2ebbedd..ab33760 100644 --- a/Application/Admin/Controller/BaseController.class.php +++ b/Application/Admin/Controller/BaseController.class.php @@ -2,6 +2,14 @@ namespace Admin\Controller; use Think\Controller; +/** + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + + class BaseController extends Controller { public function _initialize(){ $sid = session('adminId'); diff --git a/Application/Admin/Controller/BlogController.class.php b/Application/Admin/Controller/BlogController.class.php index 4f17314..98d6844 100644 --- a/Application/Admin/Controller/BlogController.class.php +++ b/Application/Admin/Controller/BlogController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 博客管理 */ diff --git a/Application/Admin/Controller/CategoryController.class.php b/Application/Admin/Controller/CategoryController.class.php index 189fe7a..f82ab85 100644 --- a/Application/Admin/Controller/CategoryController.class.php +++ b/Application/Admin/Controller/CategoryController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 分类管理 */ diff --git a/Application/Admin/Controller/CheckController.class.php b/Application/Admin/Controller/CheckController.class.php new file mode 100644 index 0000000..a56a8dd --- /dev/null +++ b/Application/Admin/Controller/CheckController.class.php @@ -0,0 +1,23 @@ + 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + +class CheckController extends Controller +{ + /** + * 临时查看漏洞报告 + */ + public function view(){ + $id = I('get.session_id',0,'intval'); + $model = M('post')->where('session='.$id)->find(); + $this->assign('model',$model); + $this->display(); + } +} diff --git a/Application/Admin/Controller/HallController.class.php b/Application/Admin/Controller/HallController.class.php index d221615..c9ef63f 100644 --- a/Application/Admin/Controller/HallController.class.php +++ b/Application/Admin/Controller/HallController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 贡献榜管理 */ diff --git a/Application/Admin/Controller/IndexController.class.php b/Application/Admin/Controller/IndexController.class.php index 9b53ea1..9102bbb 100644 --- a/Application/Admin/Controller/IndexController.class.php +++ b/Application/Admin/Controller/IndexController.class.php @@ -2,6 +2,13 @@ namespace Admin\Controller; use Admin\Controller; +/** + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + class IndexController extends BaseController{ public function index(){ diff --git a/Application/Admin/Controller/InfoController.class.php b/Application/Admin/Controller/InfoController.class.php index 55d9fbe..116fd0c 100644 --- a/Application/Admin/Controller/InfoController.class.php +++ b/Application/Admin/Controller/InfoController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 单页管理 */ diff --git a/Application/Admin/Controller/LinksController.class.php b/Application/Admin/Controller/LinksController.class.php index e17393b..24ff70e 100644 --- a/Application/Admin/Controller/LinksController.class.php +++ b/Application/Admin/Controller/LinksController.class.php @@ -1,6 +1,15 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + + /** * 链接管理 */ diff --git a/Application/Admin/Controller/LoginController.class.php b/Application/Admin/Controller/LoginController.class.php index 3c83364..b5524f9 100644 --- a/Application/Admin/Controller/LoginController.class.php +++ b/Application/Admin/Controller/LoginController.class.php @@ -2,6 +2,13 @@ namespace Admin\Controller; use Think\Controller; +/** + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + class LoginController extends Controller { //登陆主页 public function index(){ diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index aa2e570..5471296 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 用户管理 */ diff --git a/Application/Admin/Controller/OrderController.class.php b/Application/Admin/Controller/OrderController.class.php new file mode 100644 index 0000000..c80d15b --- /dev/null +++ b/Application/Admin/Controller/OrderController.class.php @@ -0,0 +1,51 @@ + 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + +/** + * 单页管理 + */ +class OrderController extends BaseController +{ + /** + * 单页列表 + * @return [type] [description] + */ + public function index($key="") + { + if($key == ""){ + $model = M('order'); + }else{ + $where['title'] = array('like',"%$key%"); + $where['name'] = array('like',"%$key%"); + $where['_logic'] = 'or'; + $model = M('order')->where($where); + } + + $count = $model->where($where)->count();// 查询满足要求的总记录数 + $Page = new \Extend\Page($count,15);// 实例化分页类 传入总记录数和每页显示的记录数(25) + $show = $Page->show();// 分页显示输出 + $pages = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('id DESC')->select(); + $this->assign('model', $pages); + $this->assign('page',$show); + $this->display(); + } + + public function delete() + { + $id = I('get.id',0,'intval'); + $model = M('order'); + $result = $model->where("user_id=".$id)->delete(); + if($result){ + $this->success("删除成功", U('info/index')); + }else{ + $this->error("删除失败"); + } + } +} diff --git a/Application/Admin/Controller/PageController.class.php b/Application/Admin/Controller/PageController.class.php index b3e013f..18bfc1c 100644 --- a/Application/Admin/Controller/PageController.class.php +++ b/Application/Admin/Controller/PageController.class.php @@ -1,6 +1,13 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 单页管理 */ diff --git a/Application/Admin/Controller/PostController.class.php b/Application/Admin/Controller/PostController.class.php index 9ea6656..838c263 100644 --- a/Application/Admin/Controller/PostController.class.php +++ b/Application/Admin/Controller/PostController.class.php @@ -2,10 +2,10 @@ namespace Admin\Controller; use Admin\Controller; /** - * @author Zhou Yuyang <1009465756@qq.com> 2015-07-27 - * @copyright ©2105-2018 SRCMS + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS * @homepage http://www.src.pw - * @version 1.0 + * @version 1.5 */ class PostController extends BaseController @@ -125,30 +125,21 @@ class PostController extends BaseController } } + /** - * 分发漏洞报告 - * @param [type] $id [description] - * @return [type] [description] + * 生成session key */ - public function send() - { - import('ORG.Net.Mail'); + public function session(){ $id = I('get.id',0,'intval'); - $email = I('post.email'); - $title = I('post.title'); - $tips = I('post.tips'); - if (!IS_POST) { - $model = M('post')->where('id='.$id)->find(); - $this->assign('post',$model); - $this->display(); + $str = '!@#$%^&*abcdefghijklmnopqrstuvwxyz'; + $session = md5($str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)]); + $model = M('post'); + $model->session = $session; + $result = $model->where('id='.$id)->save(); + if($result){ + $this->success("授权成功", U('Check/view?session_id='.$session)); + }else{ + $this->error("授权失败"); } - if (IS_POST) { - $result = SendMail($email,$title,$tips,'应急响应中心'); - if($result){ - $this->success("发送成功", U('post/index')); - }else{ - $this->error("发送失败"); - } - } - } + } } \ No newline at end of file diff --git a/Application/Admin/Controller/SettingController.class.php b/Application/Admin/Controller/SettingController.class.php index fe2b273..a70d6a1 100644 --- a/Application/Admin/Controller/SettingController.class.php +++ b/Application/Admin/Controller/SettingController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 字段管理 */ @@ -76,9 +84,9 @@ class SettingController extends BaseController }else{ // dd(I());die; if ($model->save()) { - $this->success("字段更新成功", U('setting/index')); + $this->success("设置更新成功", U('setting/index')); } else { - $this->error("字段更新失败"); + $this->error("设置更新失败"); } } } diff --git a/Application/Admin/Model/PostViewModel.class.php b/Application/Admin/Model/PostViewModel.class.php index 5f34cc5..c01141c 100644 --- a/Application/Admin/Model/PostViewModel.class.php +++ b/Application/Admin/Model/PostViewModel.class.php @@ -3,7 +3,7 @@ namespace Admin\Model; use Think\Model\ViewModel; class PostViewModel extends ViewModel { public $viewFields = array( - 'post'=>array('id','title','content','user_id','cate_id','time','type'), + 'post'=>array('id','session','title','content','user_id','cate_id','time','type'), 'category'=>array('name'=>'category_name','title'=>'category_title', '_on'=>'post.cate_id=category.id'), 'member'=>array('username', '_on'=>'post.user_id=member.id'), ); diff --git a/Application/Admin/View/Check/view.html b/Application/Admin/View/Check/view.html new file mode 100644 index 0000000..bf807df --- /dev/null +++ b/Application/Admin/View/Check/view.html @@ -0,0 +1,81 @@ + + +
+ + +#{$model.id} / @{$model.time|date="Y-m-d H:i:s",###} /
+ {$model.content|htmlspecialchars_decode|waf}
+
+ #修复建议 / 修补期限:
+ {$model.advise}
+
+ 注意事项:
+1.本页面为公司应急响应中心安全工单系统临时授权页面,请您不要对外泄露本页面链接。
+2.请参照本页面的修复建议对存在问题的业务漏洞进行修补,并及时同步修补结果
+| 编号 | +用户名 | +真实姓名 | +住址 | +联系方式 | +邮编 | +状态 | +操作 | +
|---|---|---|---|---|---|---|---|
| {$v.id} | +{$v.username} | +{$v.realname} | +{$v.location} | +{$v.tel} | +{$v.zipcode} | +删除 | +