diff --git a/Application/Admin/Controller/CheckController.class.php b/Application/Admin/Controller/CheckController.class.php index 68a066a..2409b19 100644 --- a/Application/Admin/Controller/CheckController.class.php +++ b/Application/Admin/Controller/CheckController.class.php @@ -12,9 +12,24 @@ use Think\Controller; class CheckController extends Controller { + /** + * 导出漏洞报告 + */ + public function view(){ + $id = I('get.session_id'); + $model = M('post')->where('visible=1')->where(array('session'=>$id))->find(); + $arr['id']= $model['id']; + $arr['title']= $model['title']; + $arr['content']= $model['content']; + $arr['advise']= $model['advise']; + $arr['time']= $model['time']; + $arr['type']= $model['type']; + $this->ajaxReturn ($arr,'JSON'); + } + /** * 临时查看漏洞报告 - */ + public function view(){ $id = I('get.session_id',0,'number_int'); //seesion token防注入 $model = M('post')->where('session='.$id)->find(); @@ -23,9 +38,12 @@ class CheckController extends Controller $this->assign('model',$model); $this->display(); } + */ + + + /** * 添加漏洞处理进展 - */ public function add() { //默认显示添加表单 @@ -46,4 +64,5 @@ class CheckController extends Controller } } } + */ } diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 0ff9701..b5f5fb6 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -115,13 +115,21 @@ class MemberController extends BaseController } /** * 删除用户 - * @param [type] $id [管理员ID] */ public function delete() { $id = I('get.id',0,'intval'); $model = M('member'); - if($model->where('id='.$id)->delete()){ + $data['username'] = '[已删除]'; + $data['realname'] = '[已删除]'; + $data['email'] = '0'; + $data['salt'] = '0'; + $data['passwd'] = '0'; + $data['team'] = '[已删除]'; + $data['description'] = '[已删除]'; + $data['website'] = '[已删除]'; + $data['status'] = 1; + if($model->where('id='.$id)->save($data)){ $this->success("用户删除成功", U('member/index')); }else{ $this->error("用户删除失败"); diff --git a/Application/Admin/Controller/PostController.class.php b/Application/Admin/Controller/PostController.class.php index 03d9dba..18f11cc 100644 --- a/Application/Admin/Controller/PostController.class.php +++ b/Application/Admin/Controller/PostController.class.php @@ -178,23 +178,63 @@ class PostController extends BaseController /** * 生成session key + **/ - public function session(){ - $id = I('get.id',0,'intval'); - $str = '1234567890'; - $session = $str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)].$str[rand(0,10)]; + public function session(){ + $id = I('get.id'); + $str = '1234567890abcdefg'; + $session = $str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)].$str[rand(0,17)]; $visible = 1; $model = M('post'); $model->session = $session; $model->visible = $visible; - $result = $model->where('id='.$id)->save(); + $result = $model->where(array('id'=>$id))->save(); if($result){ - $this->success("授权成功", U('Check/view?session_id='.$session)); + $this->success("授权成功", U('post/index')); }else{ $this->error("授权失败"); } } - */ + + + /** + * 取消导出 + **/ + + public function cancel(){ + $id = I('get.id'); + $visible = 0; + $model = M('post'); + $model->visible = $visible; + $result = $model->where(array('id'=>$id))->save(); + if($result){ + $this->success("取消成功", U('post/index')); + }else{ + $this->error("取消失败"); + } + } + + + /** + * 导出全部 + **/ + + public function portall(){ + $model = M('post')->field('id,title,content,advise,time,day,bounty')->limit(100)->select(); + set_time_limit(0); + ini_set('memory_limit', '512M'); + $output = fopen('php://output', 'w') or die("can't open php://output"); + $filename = "安全应急响应中心外部漏洞报告统计表" . date('Y-m-d', time()); + header("Content-Type: application/csv"); + header("Content-Disposition: attachment; filename=$filename.csv"); + $table_head = array('报告编号','报告名称','报告内容', '修复建议','提交时间','修补期限','漏洞奖励'); + fputcsv($output, $table_head); + foreach ($model as $e) { + fputcsv($output, array_values($e)); + } + fclose($output) or die("can't close php://output"); + exit; + } /** 添加报告评论 diff --git a/Application/Admin/View/Post/index.html b/Application/Admin/View/Post/index.html index 06f221f..12b8578 100644 --- a/Application/Admin/View/Post/index.html +++ b/Application/Admin/View/Post/index.html @@ -15,6 +15,16 @@
  • 已确认
  • 已修复
  • + +
    + + +
    @@ -57,7 +67,7 @@ {$v.time|date="Y/m/d",###} {$v.username} {$v.category_title} - 审核 | 编辑 | 删除 + 审核 | 编辑 | 导出工单 查看工单 | 取消导出 | 删除 diff --git a/Application/Home/Controller/HallController.class.php b/Application/Home/Controller/HallController.class.php index 7ac5536..5f576d3 100644 --- a/Application/Home/Controller/HallController.class.php +++ b/Application/Home/Controller/HallController.class.php @@ -32,6 +32,9 @@ class HallController extends Controller{ $pid = I('get.pid',0,'number_int'); $model = M('member'); $report = M('post'); + $tmodel= M('setting'); + $settings = $tmodel -> where('id=1') -> select(); + $this->assign('settings', $settings); $user = $model -> where(array('pid'=>$pid)) -> select(); $uid = $user[0]['id']; if ($uid != null){ diff --git a/Application/Home/View/Blog/view.html b/Application/Home/View/Blog/view.html index dd9c785..b06b8e8 100644 --- a/Application/Home/View/Blog/view.html +++ b/Application/Home/View/Blog/view.html @@ -6,7 +6,7 @@ - {$model.title} - <foreach name="settings" item="s"> {$s.key2} </foreach>安全应急响应中心 + {$model.title} - <foreach name="title" item="s"> {$s.key2} </foreach>安全应急响应中心 @@ -43,7 +43,7 @@ - {$s.key2} + {$s.key2} 安全应急响应中心 diff --git a/Application/Home/View/Page/view.html b/Application/Home/View/Page/view.html index 1d5b8f9..533f93b 100644 --- a/Application/Home/View/Page/view.html +++ b/Application/Home/View/Page/view.html @@ -6,7 +6,7 @@ - {$model.title} - <foreach name="settings" item="s"> {$s.key2} </foreach>安全应急响应中心 + {$model.title} - <foreach name="title" item="s"> {$s.key2} </foreach>安全应急响应中心 @@ -43,7 +43,7 @@ - {$s.key2} + {$s.key2} 安全应急响应中心 diff --git a/Application/User/Controller/GiftController.class.php b/Application/User/Controller/GiftController.class.php index be039c5..4002c48 100644 --- a/Application/User/Controller/GiftController.class.php +++ b/Application/User/Controller/GiftController.class.php @@ -82,7 +82,10 @@ class GiftController extends BaseController{ $record_result = $record -> add($rdata); $token = $data['token']; - if($token != $user['token']){$this->error("非法请求");} + if($token != $user['token']){ + $this->error("非法请求"); + } + $result = M('member')->where('id='.$id)->setDec('jinbi',$gift['price']); if ($model->field('userid,username,gid,tel,alipay,realname,address,zipcode,price,update_time')->add($data)) { diff --git a/Application/User/Controller/LoginController.class.php b/Application/User/Controller/LoginController.class.php index 4c72c4f..63a1d2c 100644 --- a/Application/User/Controller/LoginController.class.php +++ b/Application/User/Controller/LoginController.class.php @@ -66,7 +66,7 @@ class LoginController extends Controller { 'id' => $user['id'], 'update_at' => time(), 'login_ip' => get_client_ip(), - 'token' => $token, + 'token' => $token //2017-07-02 fix bug: token can't be inserted into databease. ); //登陆成功 if($member->save($data)){ diff --git a/Public/ueditor/php/config.json b/Public/ueditor/php/config.json index e5458c7..dd5bc17 100644 --- a/Public/ueditor/php/config.json +++ b/Public/ueditor/php/config.json @@ -9,7 +9,7 @@ "imageCompressBorder": 1600, /* 图片压缩最长边限制 */ "imageInsertAlign": "none", /* 插入的图片浮动方式 */ "imageUrlPrefix": "", /* 图片访问路径前缀 */ - "imagePathFormat": "../../Temp/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + "imagePathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */ /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */ /* {time} 会替换成时间戳 */ diff --git a/ThinkPHP/Tpl/dispatch_jump.tpl b/ThinkPHP/Tpl/dispatch_jump.tpl index b9bf0fe..46b8b0e 100644 --- a/ThinkPHP/Tpl/dispatch_jump.tpl +++ b/ThinkPHP/Tpl/dispatch_jump.tpl @@ -1359,11 +1359,11 @@ var interval = setInterval(function(){
  • 回到首页
  • 返回上一页
  • -

    Powered By SRCMS2.0

    -

    版本:v2.0.0-alpha.1. Code licensed MIT.

    +

    Powered By SRCMS2.2

    +

    版本:v2.2.0-final.1. Code licensed GPL.

    - +
    diff --git a/ThinkPHP/Tpl/think_exception.tpl b/ThinkPHP/Tpl/think_exception.tpl index 8c526da..692ea45 100644 --- a/ThinkPHP/Tpl/think_exception.tpl +++ b/ThinkPHP/Tpl/think_exception.tpl @@ -1365,11 +1365,11 @@ h1{ font-size: 32px; line-height: 48px; }
  • 回到首页
  • 返回上一页
  • -

    Powered By SRCMS2.0

    -

    版本:v2.0.0-alpha.1. Code licensed MIT.

    +

    Powered By SRCMS2.2

    +

    版本:v2.2.0-final.1. Code licensed GPL.

    - +
    diff --git a/admin.php b/admin.php index 81dd035..0ba67de 100644 --- a/admin.php +++ b/admin.php @@ -15,7 +15,7 @@ if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !'); define('BIND_MODULE','Admin'); // 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false -define('APP_DEBUG',False); +define('APP_DEBUG',True); // 定义应用目录 define('APP_PATH','./Application/'); diff --git a/robots.txt b/robots.txt index 9697694..99e07f6 100644 --- a/robots.txt +++ b/robots.txt @@ -1,5 +1,5 @@ # -# robots.txt for SRCMS V2 Community Version +# robots.txt for SRCMS V2.2 Community Version # User-agent: *