Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
166414f4
Commit
166414f4
authored
5 years ago
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新登录账号/密码加密
parent
c1e3abf5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
LoginAction.class.php
SooonerHotel/App/Lib/Action/LoginAction.class.php
+4
-2
index.html
SooonerHotel/App/Tpl/zh-cn/Login/index.html
+2
-0
index_up.html
SooonerHotel/App/Tpl/zh-cn/Login/index_up.html
+2
-0
No files found.
SooonerHotel/App/Lib/Action/LoginAction.class.php
View file @
166414f4
...
@@ -37,7 +37,8 @@ class LoginAction extends Action{
...
@@ -37,7 +37,8 @@ class LoginAction extends Action{
$r
=
$UserModel
->
where
(
$where
)
->
find
();
$r
=
$UserModel
->
where
(
$where
)
->
find
();
if
(
$r
)
{
if
(
$r
)
{
$this
->
remove_limit
();
$this
->
remove_limit
();
session
(
'username'
,
$username
);
// session('username', $username);
session
(
'username'
,
$r
[
'account'
]);
session
(
C
(
'USER_AUTH_KEY'
),
$r
[
'id'
]);
session
(
C
(
'USER_AUTH_KEY'
),
$r
[
'id'
]);
setcookie
(
"USER_AUTH_KEY"
,
$r
[
'id'
],
time
()
+
3600
*
24
);
setcookie
(
"USER_AUTH_KEY"
,
$r
[
'id'
],
time
()
+
3600
*
24
);
$userInfo
=
$UserModel
->
getUserInfo
(
$r
[
'id'
]);
$userInfo
=
$UserModel
->
getUserInfo
(
$r
[
'id'
]);
...
@@ -162,7 +163,8 @@ class LoginAction extends Action{
...
@@ -162,7 +163,8 @@ class LoginAction extends Action{
$secret
=
$r
[
"secret"
];
$secret
=
$r
[
"secret"
];
if
(
$ga
->
verifyCode
(
$secret
,
$code
,
2
))
{
if
(
$ga
->
verifyCode
(
$secret
,
$code
,
2
))
{
session
(
'username'
,
$username
);
// session('username', $username);
session
(
'username'
,
$r
[
'account'
]);
session
(
C
(
'USER_AUTH_KEY'
),
$r
[
'id'
]);
session
(
C
(
'USER_AUTH_KEY'
),
$r
[
'id'
]);
setcookie
(
"USER_AUTH_KEY"
,
$r
[
'id'
],
time
()
+
3600
*
24
);
setcookie
(
"USER_AUTH_KEY"
,
$r
[
'id'
],
time
()
+
3600
*
24
);
$userInfo
=
$UserModel
->
getUserInfo
(
$r
[
'id'
]);
$userInfo
=
$UserModel
->
getUserInfo
(
$r
[
'id'
]);
...
...
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Tpl/zh-cn/Login/index.html
View file @
166414f4
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
var
keyCode
=
e
.
keyCode
?
e
.
keyCode
:
e
.
which
?
e
.
which
:
e
.
charCode
;
var
keyCode
=
e
.
keyCode
?
e
.
keyCode
:
e
.
which
?
e
.
which
:
e
.
charCode
;
if
(
keyCode
==
13
){
if
(
keyCode
==
13
){
if
(
$
(
"#username"
).
val
()
!=
""
&&
$
(
"#password"
).
val
()
!=
""
){
if
(
$
(
"#username"
).
val
()
!=
""
&&
$
(
"#password"
).
val
()
!=
""
){
$
(
'input[name="username"]'
).
val
(
hex_md5
(
$
(
"input#username"
).
val
()));
$
(
'input[name="password"]'
).
val
(
hex_md5
(
$
(
"input#password"
).
val
()));
$
(
"#f"
).
submit
();
$
(
"#f"
).
submit
();
}
else
{
}
else
{
$
(
'input:first'
).
focus
();
$
(
'input:first'
).
focus
();
...
...
This diff is collapsed.
Click to expand it.
SooonerHotel/App/Tpl/zh-cn/Login/index_up.html
View file @
166414f4
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
var
keyCode
=
e
.
keyCode
?
e
.
keyCode
:
e
.
which
?
e
.
which
:
e
.
charCode
;
var
keyCode
=
e
.
keyCode
?
e
.
keyCode
:
e
.
which
?
e
.
which
:
e
.
charCode
;
if
(
keyCode
==
13
){
if
(
keyCode
==
13
){
if
(
$
(
"#username"
).
val
()
!=
""
&&
$
(
"#password"
).
val
()
!=
""
){
if
(
$
(
"#username"
).
val
()
!=
""
&&
$
(
"#password"
).
val
()
!=
""
){
$
(
'input[name="username"]'
).
val
(
hex_md5
(
$
(
"input#username"
).
val
()));
$
(
'input[name="password"]'
).
val
(
hex_md5
(
$
(
"input#password"
).
val
()));
$
(
"#f"
).
submit
();
$
(
"#f"
).
submit
();
}
else
{
}
else
{
$
(
'input:first'
).
focus
();
$
(
'input:first'
).
focus
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment