diff --git a/application/controllers/home.php b/application/controllers/home.php index f357f23..333c3d7 100755 --- a/application/controllers/home.php +++ b/application/controllers/home.php @@ -1,62 +1,67 @@ -common_model->checkpurview(); - $this->jxcsys = $this->session->userdata('jxcsys'); - } - - public function index(){ - //add by michen 20170820 for 修改登录异常 begin - if(!strstr($_SERVER['REQUEST_URI'], 'home/index')) - redirect('home/index', 'refresh'); - //add by michen 20170820 for 修改登录异常 end - $data['uid'] = $this->jxcsys['uid']; - $data['name'] = $this->jxcsys['name']; - $data['roleid'] = 0; - $data['username'] = $this->jxcsys['username']; - $data['system'] = $this->common_model->get_option('system'); - $data['rights'] = $this->common_model->get_admin_rights(); - $this->load->view('index',$data); - } - - public function main(){ - $this->load->view('main'); - } - - - public function set_password(){ - $data = str_enhtml($this->input->post(NULL,TRUE)); - if (is_array($data)&&count($data)>0) { - $info['userpwd'] = md5($data['newPassword']); - $info['mobile'] = $data['buyerMobile']; - $info['name'] = $data['buyerName']; - $this->mysql_model->get_count('admin','(uid<>'.$this->jxcsys['uid'].') and mobile='.$info['mobile'].'') >0 && str_alert(-1,'该手机号已被使用,请更换手机号码'); - $sql = $this->mysql_model->update('admin',$info,'(uid='.$this->jxcsys['uid'].')'); - if ($sql) { - $this->common_model->logs('密码修改成功 UID:'.$this->jxcsys['uid'].' 真实姓名改为:'.$info['name']); - str_alert(200,'密码修改成功'); - } - str_alert(-1,'设置独立密码失败,请稍候重试!'); - } else { - $data = $this->mysql_model->get_rows('admin','(uid='.$this->jxcsys['uid'].')'); - $this->load->view('set_password',$data); - } - } - - - public function Services(){ - die('jQuery110202928952066617039_1430920204305({"status":200,"msg":"success","data":[{"msgid":"20000000122" -,"msglinkcolor":"d9254a","msglink":"","msgtitle":"售后热线服务时间临时调整通知(5.6-5.8)>>"},{"msgid":"20000000119" -,"msglinkcolor":"d9254a","msglink":"index.html","msgtitle" -:"推荐送ipad mini,购买就返利>>"},{"msgid":"20000000115","msglinkcolor":"d9254a","msglink":"","msgtitle":">>"},{"msgid":"20000000068","msglinkcolor":"d9254a","msglink":"","msgtitle":"> ->"}]})'); - - } - -} - -/* End of file welcome.php */ -/* Location: ./application/controllers/welcome.php */ \ No newline at end of file +common_model->checkpurview(); + $this->jxcsys = $this->session->userdata('jxcsys'); + } + + public function index(){ + // 2026-04-20 add: 移动端自动跳转 + $ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; + if (preg_match('/(iPhone|iPad|iPod|Android|Mobile|BlackBerry|IEMobile|Opera Mini)/i', $ua)) { + redirect('mobile/login', 'refresh'); + } + //add by michen 20170820 for 修改登录异常 begin + if(!strstr($_SERVER['REQUEST_URI'], 'home/index')) + redirect('home/index', 'refresh'); + //add by michen 20170820 for 修改登录异常 end + $data['uid'] = $this->jxcsys['uid']; + $data['name'] = $this->jxcsys['name']; + $data['roleid'] = 0; + $data['username'] = $this->jxcsys['username']; + $data['system'] = $this->common_model->get_option('system'); + $data['rights'] = $this->common_model->get_admin_rights(); + $this->load->view('index',$data); + } + + public function main(){ + $this->load->view('main'); + } + + + public function set_password(){ + $data = str_enhtml($this->input->post(NULL,TRUE)); + if (is_array($data)&&count($data)>0) { + $info['userpwd'] = md5($data['newPassword']); + $info['mobile'] = $data['buyerMobile']; + $info['name'] = $data['buyerName']; + $this->mysql_model->get_count('admin','(uid<>'.$this->jxcsys['uid'].') and mobile='.$info['mobile'].'') >0 && str_alert(-1,'该手机号已被使用,请更换手机号码'); + $sql = $this->mysql_model->update('admin',$info,'(uid='.$this->jxcsys['uid'].')'); + if ($sql) { + $this->common_model->logs('密码修改成功 UID:'.$this->jxcsys['uid'].' 真实姓名改为:'.$info['name']); + str_alert(200,'密码修改成功'); + } + str_alert(-1,'设置独立密码失败,请稍候重试!'); + } else { + $data = $this->mysql_model->get_rows('admin','(uid='.$this->jxcsys['uid'].')'); + $this->load->view('set_password',$data); + } + } + + + public function Services(){ + die('jQuery110202928952066617039_1430920204305({"status":200,"msg":"success","data":[{"msgid":"20000000122" +,"msglinkcolor":"d9254a","msglink":"","msgtitle":"售后热线服务时间临时调整通知(5.6-5.8)>>"},{"msgid":"20000000119" +,"msglinkcolor":"d9254a","msglink":"index.html","msgtitle" +:"推荐送ipad mini,购买就返利>>"},{"msgid":"20000000115","msglinkcolor":"d9254a","msglink":"","msgtitle":">>"},{"msgid":"20000000068","msglinkcolor":"d9254a","msglink":"","msgtitle":"> +>"}]})'); + + } + +} + +/* End of file welcome.php */ +/* Location: ./application/controllers/welcome.php */