Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
entrix
WoWSimpleRegistration
Commits
60c99324
Commit
60c99324
authored
Jul 27, 2020
by
Amin.MasterkinG
Browse files
Icecrown template support HCaptcha/Recaptcha v2.
parent
2f36816d
Changes
3
Hide whitespace changes
Inline
Side-by-side
application/include/functions.php
View file @
60c99324
...
...
@@ -266,9 +266,9 @@ function getCaptchaJS()
global
$config
;
if
(
!
empty
(
$config
[
'captcha_type'
]))
{
if
(
$config
[
'captcha_type'
]
==
1
)
{
return
'<script src="https://hcaptcha.com/1/api.js?hl='
.
$config
[
'captcha_language'
]
.
'" async defer></script>'
;
return
'<script src="https://hcaptcha.com/1/api.js?hl='
.
$config
[
'captcha_language'
]
.
'" async defer></script>
<style>.h-captcha { display: inline-block;}</style>
'
;
}
else
if
(
$config
[
'captcha_type'
]
==
2
)
{
return
'<script src="https://www.google.com/recaptcha/api.js?hl='
.
$config
[
'captcha_language'
]
.
'" async defer></script>'
;
return
'<script src="https://www.google.com/recaptcha/api.js?hl='
.
$config
[
'captcha_language'
]
.
'" async defer></script>
<style>.g-recaptcha { display: inline-block;}</style>
'
;
}
}
...
...
@@ -280,9 +280,9 @@ function GetCaptchaHTML()
global
$config
;
if
(
!
empty
(
$config
[
'captcha_type'
]))
{
if
(
$config
[
'captcha_type'
]
==
1
)
{
return
'<div class="row text-center"><div class="h-captcha" data-sitekey="'
.
$config
[
'captcha_key'
]
.
'" style=\'margin:10px auto\'></div></div>'
;
return
'<div class="row text-center"><div
class="col-md-12 text-center"><div
class="h-captcha" data-sitekey="'
.
$config
[
'captcha_key'
]
.
'" style=\'margin:10px auto\'></div></div>
</div>
'
;
}
else
if
(
$config
[
'captcha_type'
]
==
2
)
{
return
'<div class="row text-center
xs
-center"><div class="g-recaptcha" data-sitekey="'
.
$config
[
'captcha_key'
]
.
'" style=\'margin:10px auto\'></div></div>'
;
return
'<div class="row text-center
"><div class="col-md-12 text
-center"><div class="g-recaptcha" data-sitekey="'
.
$config
[
'captcha_key'
]
.
'" style=\'margin:10px auto\'></div></div>
</div>
'
;
}
else
{
return
''
;
}
...
...
template/icecrown/tpl/header.php
View file @
60c99324
...
...
@@ -31,6 +31,7 @@
<script
src=
"
<?php
echo
$antiXss
->
xss_clean
(
get_config
(
"baseurl"
));
?>
/template/
<?php
echo
$antiXss
->
xss_clean
(
get_config
(
"template"
));
?>
/js/bootstrap.min.js"
></script>
<script
src=
"
<?php
echo
$antiXss
->
xss_clean
(
get_config
(
"baseurl"
));
?>
/template/
<?php
echo
$antiXss
->
xss_clean
(
get_config
(
"template"
));
?>
/js/bootsnav.js"
></script>
<script
src=
"
<?php
echo
$antiXss
->
xss_clean
(
get_config
(
"baseurl"
));
?>
/template/
<?php
echo
$antiXss
->
xss_clean
(
get_config
(
"template"
));
?>
/js/popper.min.js"
></script>
<?php
echo
getCaptchaJS
();
?>
</head>
<body>
<video
autoplay
muted
loop
id=
"myVideo"
>
...
...
template/icecrown/tpl/main.php
View file @
60c99324
...
...
@@ -94,15 +94,7 @@ require_once 'header.php'; ?>
<input
type=
"password"
class=
"form-control"
placeholder=
"Re-Password"
name=
"repassword"
>
</div>
<div
class=
"input-group"
>
<span
class=
"input-group"
>
Captcha
</span>
<input
type=
"text"
class=
"form-control"
placeholder=
"Captcha"
name=
"captcha"
>
</div>
<p
style=
"text-align: center;margin-top: 10px;"
>
<img
src=
"
<?php
echo
user
::
$captcha
->
inline
();
?>
"
style=
"border-radius: 5px;"
/>
</p>
<?php
echo
GetCaptchaHTML
();
?>
<input
name=
"submit"
type=
"hidden"
value=
"register"
>
<div
class=
"text-center"
style=
"margin-top: 10px;"
><input
type=
"submit"
class=
"btn btn-info"
...
...
@@ -207,17 +199,8 @@ require_once 'header.php'; ?>
placeholder=
"Username"
name=
"username"
>
</div>
<?php
}
?>
<div
class=
"input-group"
>
<span
class=
"input-group"
>
Captcha
</span>
<input
type=
"text"
class=
"form-control"
placeholder=
"Captcha"
name=
"captcha"
>
</div>
<p
style=
"text-align: center;margin-top: 10px;"
>
<img
src=
"
<?php
echo
user
::
$captcha
->
inline
();
?>
"
style=
"border-radius: 5px;"
/>
</p>
<?php
}
echo
GetCaptchaHTML
();
?>
<input
name=
"submit"
type=
"hidden"
value=
"restorepassword"
>
<div
class=
"text-center"
style=
"margin-top: 10px;"
><input
type=
"submit"
...
...
@@ -277,16 +260,7 @@ require_once 'header.php'; ?>
placeholder=
"Re-Password"
name=
"repassword"
>
</div>
<div
class=
"input-group"
>
<span
class=
"input-group"
>
Captcha
</span>
<input
type=
"text"
class=
"form-control"
placeholder=
"Captcha"
name=
"captcha"
>
</div>
<p
style=
"text-align: center;margin-top: 10px;"
>
<img
src=
"
<?php
echo
user
::
$captcha
->
inline
();
?>
"
style=
"border-radius: 5px;"
/>
</p>
<?php
echo
GetCaptchaHTML
();
?>
<input
name=
"submit"
type=
"hidden"
value=
"changepass"
>
<div
class=
"text-center"
style=
"margin-top: 10px;"
><input
type=
"submit"
...
...
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