2016-01-24 11:54:16 +08:00
|
|
|
<?php
|
|
|
|
|
namespace Admin\Controller;
|
|
|
|
|
use Think\Controller;
|
|
|
|
|
|
|
|
|
|
/**
|
2017-02-03 12:32:57 +08:00
|
|
|
* @Author: Zhou Yuyang <1009465756@qq.com> 10:28 2017/02/02
|
2016-12-03 21:42:04 +08:00
|
|
|
* @Copyright 2015-2020 SISMO
|
|
|
|
|
* @Project homepage https://github.com/CNSISMO
|
2017-02-03 12:32:57 +08:00
|
|
|
* @Version 2.0
|
2016-01-24 11:54:16 +08:00
|
|
|
*/
|
2017-02-03 12:32:57 +08:00
|
|
|
|
2016-01-24 11:54:16 +08:00
|
|
|
|
|
|
|
|
class CheckController extends Controller
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 临时查看漏洞报告
|
|
|
|
|
*/
|
|
|
|
|
public function view(){
|
2016-12-03 21:42:04 +08:00
|
|
|
$id = I('get.session_id',0,'number_int'); //seesion token防注入
|
2016-01-24 11:54:16 +08:00
|
|
|
$model = M('post')->where('session='.$id)->find();
|
2016-12-03 21:42:04 +08:00
|
|
|
$flow = M('wflow')->where('session='.$id)->select();
|
|
|
|
|
$this->assign('wflow',$flow);
|
2016-01-24 11:54:16 +08:00
|
|
|
$this->assign('model',$model);
|
2016-12-03 21:42:04 +08:00
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 添加漏洞处理进展
|
|
|
|
|
*/
|
|
|
|
|
public function add()
|
|
|
|
|
{
|
|
|
|
|
//默认显示添加表单
|
|
|
|
|
if (!IS_POST) {
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
if (IS_POST) {
|
|
|
|
|
$model = D("wflow");
|
|
|
|
|
if (!$model->create()) {
|
|
|
|
|
$this->error($model->getError());
|
|
|
|
|
exit();
|
|
|
|
|
} else {
|
|
|
|
|
if ($model->add()) {
|
|
|
|
|
$this->success("添加成功", U('post/index'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->error("添加失败", U('post/index'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-01-24 11:54:16 +08:00
|
|
|
}
|
|
|
|
|
}
|