Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
whb
9 years ago
Commit
b369478bf1e9f0e6dd9ce57873113574e6586e71
1 parent
c81e5eed
在线登记
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
website/controller/Onlinereg.class.php
website/controller/Onlinereg.class.php
View file @
b369478
...
...
@@ -157,6 +157,14 @@ class Controller_Onlinereg extends Controller_Abstract
$imgCode
->
setWidth
(
150
)
->
setHeight
(
50
)
->
setWordLen
(
$len
)
->
generate
(
$namespace
);
}
public
function
getcodeAction
()
{
$g
=
trim
(
$this
->
_request
->
query
(
'g'
));
$namespace
=
!
empty
(
$g
)
?
$g
:
'passport_istration'
;
echo
strtolower
(
Util_Captcha
::
getFromSession
(
$namespace
));
}
/**
* 验证code
*
...
...
@@ -166,7 +174,9 @@ class Controller_Onlinereg extends Controller_Abstract
private
function
validate
(
$code
)
{
$code
=
strtolower
(
$code
);
$sessionCode
=
strtolower
(
Util_Captcha
::
getFromSession
(
'passport_istration'
));
$g
=
trim
(
$this
->
_request
->
query
(
'g'
));
$namespace
=
!
empty
(
$g
)
?
$g
:
'passport_istration'
;
$sessionCode
=
strtolower
(
Util_Captcha
::
getFromSession
(
$namespace
));
Util_Captcha
::
setToSession
(
'passport_istration'
,
''
);
if
(
$code
==
$sessionCode
)
{
...
...
@@ -176,6 +186,5 @@ class Controller_Onlinereg extends Controller_Abstract
{
return
true
;
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment