安装模块模版替换参数问题
This commit is contained in:
@@ -14,7 +14,7 @@ class User extends Front {
|
|||||||
public function _initialize() {
|
public function _initialize() {
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
|
|
||||||
if (!is_login() and !in_array($this->url, array('user/login/index', 'user/index/verify'))) {
|
if (!is_login() and !in_array($this->url_path, array('user/login/index', 'user/index/verify'))) {
|
||||||
return $this->redirect('user/login/index');
|
return $this->redirect('user/login/index');
|
||||||
} elseif (is_login()) {
|
} elseif (is_login()) {
|
||||||
$user = model('User')->getInfo(session('user_auth.uid'));
|
$user = model('User')->getInfo(session('user_auth.uid'));
|
||||||
|
|||||||
@@ -2,12 +2,6 @@
|
|||||||
return array(
|
return array(
|
||||||
|
|
||||||
'view_replace_str' => array(
|
'view_replace_str' => array(
|
||||||
'__ADDONS__' => BASE_PATH . '/addons',
|
|
||||||
'__PUBLIC__' => BASE_PATH . '/public',
|
|
||||||
'__STATIC__' => BASE_PATH . '/application/admin/static',
|
|
||||||
'__IMG__' => BASE_PATH . '/application/admin/static/images',
|
|
||||||
'__CSS__' => BASE_PATH . '/application/admin/static/css',
|
|
||||||
'__JS__' => BASE_PATH . '/application/admin/static/js',
|
|
||||||
'__COMPANY__' => '南昌腾速科技有限公司',
|
'__COMPANY__' => '南昌腾速科技有限公司',
|
||||||
'__NAME__' => 'SentCMS网站管理系统',
|
'__NAME__' => 'SentCMS网站管理系统',
|
||||||
'__COMPANY_WEBSITE__' => 'www.tensent.cn',
|
'__COMPANY_WEBSITE__' => 'www.tensent.cn',
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<!-- zui -->
|
<!-- zui -->
|
||||||
<link href="__PUBLIC__/css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
<link href="__STATIC__/css/libs/bootstrap.min.css" rel="stylesheet">
|
||||||
<script src="__PUBLIC__/js/jquery.js"></script>
|
<script src="__STATIC__/js/jquery.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body{font-family: "Microsoft Yahei",'新宋体';}
|
body{font-family: "Microsoft Yahei",'新宋体';}
|
||||||
.container{background: #ffffff; margin: 50px auto; padding: 20px 0; width: 1024px;}
|
.container{background: #ffffff; margin: 50px auto; padding: 20px 0; width: 1024px;}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ use app\common\controller\Front;
|
|||||||
class Login extends Front{
|
class Login extends Front{
|
||||||
|
|
||||||
public function index($username = '', $password = '', $verify = ''){
|
public function index($username = '', $password = '', $verify = ''){
|
||||||
if (IS_POST) {
|
if ($this->request->isPost()) {
|
||||||
if (!$username || !$password) {
|
if (!$username || !$password) {
|
||||||
return $this->error('用户名或者密码不能为空!','');
|
return $this->error('用户名或者密码不能为空!','');
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ class Login extends Front{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function register($username = '', $password = '', $repassword = '', $email = '', $verify = ''){
|
public function register($username = '', $password = '', $repassword = '', $email = '', $verify = ''){
|
||||||
if (IS_POST) {
|
if ($this->request->isPost()) {
|
||||||
$user = model('User');
|
$user = model('User');
|
||||||
|
|
||||||
//验证码验证
|
//验证码验证
|
||||||
@@ -72,7 +72,7 @@ class Login extends Front{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function forget($email = '', $verify = ''){
|
public function forget($email = '', $verify = ''){
|
||||||
if (IS_POST) {
|
if ($this->request->isPost()) {
|
||||||
//验证码验证
|
//验证码验证
|
||||||
$this->checkVerify($verify);
|
$this->checkVerify($verify);
|
||||||
if (!$email) {
|
if (!$email) {
|
||||||
@@ -100,8 +100,7 @@ class Login extends Front{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function find(){
|
public function find(){
|
||||||
//http://127.0.0.2/user/login/find.html?time=1467174578&token=b561PJhVI2OjWUPNLsAMdeW8AKZLw/RcqyXUHBa1mCiX2OUzvq0D69Rt40F/n7zfJKR05d7qA41G6/33NQ
|
if ($this->request->isPost()) {
|
||||||
if (IS_POST) {
|
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
//验证码验证
|
//验证码验证
|
||||||
$this->checkVerify($data['verify']);
|
$this->checkVerify($data['verify']);
|
||||||
|
|||||||
Reference in New Issue
Block a user