From b0e9855404c70853f33237bbb1458ce0f650d786 Mon Sep 17 00:00:00 2001 From: wurong <1667629529@qq.com> Date: Fri, 31 May 2019 14:22:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=95=B0=E6=8D=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + app/admin/controller/Pages.php | 4 ++-- app/common/Base.php | 2 +- app/web/controller/Contest.php | 1 - data/file/default | 0 public/radio.txt | 1 - public/robots.txt | 2 -- 7 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 data/file/default delete mode 100644 public/radio.txt delete mode 100644 public/robots.txt diff --git a/.gitignore b/.gitignore index 8d8e1ea..3d8b73f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /public/upload/users/head/[0-9]*[0-9]/** /public/upload/old-img/attached/** public/upload/image/[0-9]*[0-9]/** +/data/file/*.txt diff --git a/app/admin/controller/Pages.php b/app/admin/controller/Pages.php index e1df0d5..915779c 100644 --- a/app/admin/controller/Pages.php +++ b/app/admin/controller/Pages.php @@ -64,7 +64,7 @@ class Pages extends AdminBase { if(!$this->have_power(6)) { $this->error('对不起,您没有对应的权限!',url('admin/index/welcome')); } - $content = @file_get_contents('radio.txt'); + $content = @file_get_contents('../data/file/radio.txt'); //if(empty()) $this->assign('data',$content); return $this->fetch(); @@ -74,7 +74,7 @@ class Pages extends AdminBase { if(!$this->have_power(6)) { $this->error('对不起,您没有对应的权限!',url('admin/index/welcome')); } - file_put_contents('radio.txt',input('content')); + file_put_contents('../data/file/radio.txt',input('content')); $this->success('编辑成功!'); } //查找新闻 权限:编辑权限 diff --git a/app/common/Base.php b/app/common/Base.php index 95362b3..1dae38b 100644 --- a/app/common/Base.php +++ b/app/common/Base.php @@ -60,7 +60,7 @@ class Base extends Controller{ $this->assign('is_admin', $this->is_admin); $this->assign('login_userid', $this->user_id); $this->assign('readmsg',$no_read_msg); - $tmp= @file_get_contents('radio.txt'); + $tmp= @file_get_contents('../data/file/radio.txt'); $this->assign('broadcast',$tmp); $this->assign('qq_login', config('qq_login_switch')?'true':null); $this->assign('sign_disable', time()-$this->last_sign_time > config('community.sign_time')?false:true); diff --git a/app/web/controller/Contest.php b/app/web/controller/Contest.php index 2d325ed..28eb61f 100644 --- a/app/web/controller/Contest.php +++ b/app/web/controller/Contest.php @@ -344,7 +344,6 @@ class Contest extends Base { $rel_passwd = db('contest')->where(['contest_id' => $cid])->field('password')->select(); if (isset($rel_passwd[0]['password']) && $rel_passwd[0]['password'] == $passwd) { $_SESSION['cid-'.$cid] = $passwd; - //cookie('cid-'.$cid.'-'.$this->user_id, $passwd,315360000); return json(['result' => 1, 'url' => url('web/contest/show', ['cid' => $cid]) ]); } return json(['result' => 0]); diff --git a/data/file/default b/data/file/default new file mode 100644 index 0000000..e69de29 diff --git a/public/radio.txt b/public/radio.txt deleted file mode 100644 index b499235..0000000 --- a/public/radio.txt +++ /dev/null @@ -1 +0,0 @@ -ssadsad \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index a82d96e..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: -- Gitee