From 1d4697354814289237b6e202b03b4afb054a30e1 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 5 Jun 2019 15:19:43 +0800 Subject: [PATCH 01/78] =?UTF-8?q?value=20=E7=B3=BB=E7=BB=9F=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=96=B0=E7=9A=84=E7=99=BB=E5=BD=95=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dingmail/controllers/index.php | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index 2a2549c0..2c04ef12 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -7,24 +7,17 @@ class Index extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('ding_value_model'); - } - - public function test_cookie(){ - //https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoagxeeheunc0p95eu8&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/webht.php/apps/dingmail/index/test_cookie - + $this->load->helper('cookie'); } public function index($unionid = null,$type = null){ - if($this->session->userdata('dingding_user_info') === false){ - $this->session->set_userdata('unionid', $unionid); - $this->session->set_userdata('type',$type); - $this->load->view('login'); + if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){ + redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); }else{ if($unionid != null && $type != null){ - $user_info = $this->session->userdata('dingding_user_info'); $data['type'] = $type; - $data['user'] = $user_info->ddu_Name; - $data['user_unionid'] = $user_info->ddu_Unionid; + $data['user'] = get_cookie('dingname'); + $data['user_unionid'] = get_cookie('dingunionid'); if($this->ding_value_model->get_dingding_user($unionid) == null){ echo '该用户还未登录过,请告知他登录后才能对他点赞或拍砖!
'; echo '有问题请联系:CYC!'; @@ -73,12 +66,10 @@ class Index extends CI_Controller { //value邮件页面 public function mail_index(){ - if($this->session->userdata('dingding_user_info') === false){ - $this->load->view('login'); - }else{ - //print_r($this->session->userdata('dingding_user_info')); - $this->load->view('mail'); - } + if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){ + redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); + } + $this->load->view('mail'); } //发送邮件 @@ -397,8 +388,8 @@ class Index extends CI_Controller { //点赞排行榜 public function rank_person() { - if($this->session->userdata('dingding_user_info') === false){ - $this->load->view('login'); + if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){ + redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); }else{ $data = array(); $user_info = $this->session->userdata('dingding_user_info'); @@ -599,7 +590,6 @@ class Index extends CI_Controller { //退出 public function logout(){ - $this->session->unset_userdata('dingding_user_info'); $this->session->unset_userdata('unionid'); $this->session->unset_userdata('type'); $this->session->unset_userdata('identify'); From 5eed08993e2f0d3f8188cba6e0b21482924b4f16 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 5 Jun 2019 15:22:33 +0800 Subject: [PATCH 02/78] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/dingmail/controllers/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index 2c04ef12..45f2d217 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -12,7 +12,7 @@ class Index extends CI_Controller { public function index($unionid = null,$type = null){ if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){ - redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); + redirect('http://www.mycht.cn/info.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); }else{ if($unionid != null && $type != null){ $data['type'] = $type; @@ -67,7 +67,7 @@ class Index extends CI_Controller { //value邮件页面 public function mail_index(){ if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){ - redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); + redirect('http://www.mycht.cn/info.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); } $this->load->view('mail'); } @@ -389,7 +389,7 @@ class Index extends CI_Controller { //点赞排行榜 public function rank_person() { if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){ - redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); + redirect('http://www.mycht.cn/info.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/'); }else{ $data = array(); $user_info = $this->session->userdata('dingding_user_info'); From 83ad7134c22a04ee25f336b0b042a2cda4aa6712 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 5 Jun 2019 15:29:17 +0800 Subject: [PATCH 03/78] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=AD=E8=B0=83=E7=94=A8cookie=E7=9A=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/dingmail/views/like.php | 2 +- webht/third_party/dingmail/views/mail.php | 2 +- webht/third_party/dingmail/views/rank_person.php | 2 +- webht/third_party/dingmail/views/user.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webht/third_party/dingmail/views/like.php b/webht/third_party/dingmail/views/like.php index fdde9754..7556be98 100644 --- a/webht/third_party/dingmail/views/like.php +++ b/webht/third_party/dingmail/views/like.php @@ -43,7 +43,7 @@ diff --git a/webht/third_party/dingmail/views/mail.php b/webht/third_party/dingmail/views/mail.php index de104df7..b585fdee 100644 --- a/webht/third_party/dingmail/views/mail.php +++ b/webht/third_party/dingmail/views/mail.php @@ -46,7 +46,7 @@