1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 11:34:41 +00:00

uwuzu v1.3.4 new_planet

This commit is contained in:
Daichimarukana
2024-03-26 22:48:57 +09:00
parent e0b3b93414
commit ea4ca882da
92 changed files with 3192 additions and 1567 deletions
+46 -9
View File
@@ -7,6 +7,8 @@ $serversettings = parse_ini_file($serversettings_file, true);
require('../db.php');
//hCaptcha--------------------------------------------
require('../settings_admin/hCaptcha_settings/hCaptcha_settings.php');
//Cloudflare_Turnstile--------------------------------------------
require('../settings_admin/CloudflareTurnstile_settings/CloudflareTurnstile_settings.php');
//----------------------------------------------------
@@ -57,14 +59,14 @@ if( !empty($_POST['btn_submit']) ) {
$userid = $_POST['userid'];
$mailadds = $_POST['mailadds'];
if(!empty(CAPTCHA && CAPTCHA == "true")){
if(!empty(H_CAPTCHA_ONOFF && H_CAPTCHA_ONOFF == "true")){
if(isset($_POST['h-captcha-response'])){
$hcaptcha_token = htmlentities($_POST['h-captcha-response']);
if($hcaptcha_token){
$captcha_data = [
'secret' => htmlentities(SEAC_KEY),
'secret' => htmlentities(H_CAPTCHA_SEAC_KEY),
'response' => $hcaptcha_token,
'sitekey' => htmlentities(SITE_KEY)
'sitekey' => htmlentities(H_CAPTCHA_SITE_KEY)
];
$options = [
'http' => [
@@ -75,13 +77,39 @@ if( !empty($_POST['btn_submit']) ) {
];
$hCaptcha_result = json_decode(file_get_contents('https://hcaptcha.com/siteverify', false, stream_context_create($options)),true);
if(!($hCaptcha_result["success"] == true)){
$error_message[] = "あなたが人間である確認ができませんでした。(ERROR)";
$error_message[] = "hCaptchaであなたが人間である確認ができませんでした。(ERROR)";
}
}else{
$error_message[] = "あなたが人間である確認ができませんでした。(ERROR)";
$error_message[] = "hCaptchaであなたが人間である確認ができませんでした。(ERROR)";
}
}else{
$error_message[] = "あなたが人間である確認ができませんでした。(ERROR)";
$error_message[] = "hCaptchaであなたが人間である確認ができませんでした。(ERROR)";
}
}
if(!empty(CF_TURNSTILE_ONOFF && CF_TURNSTILE_ONOFF == "true")){
if(isset($_POST['cf-turnstile-response'])){
$CF_Turnstile_token = htmlentities($_POST['cf-turnstile-response']);
if($CF_Turnstile_token){
$CF_Turnstile_data = [
'secret' => htmlentities(CF_TURNSTILE_SEAC_KEY),
'response' => $CF_Turnstile_token
];
$CF_Turnstile_options = [
'http' => [
'method'=> 'POST',
'header'=> 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query($CF_Turnstile_data, '', '&')
]
];
$CF_Turnstile_result = json_decode(file_get_contents('https://challenges.cloudflare.com/turnstile/v0/siteverify', false, stream_context_create($CF_Turnstile_options)),true);
if(!($CF_Turnstile_result["success"] == true)){
$error_message[] = "CloudflareTurnstileであなたが人間である確認ができませんでした。(ERROR)";
}
}else{
$error_message[] = "CloudflareTurnstileであなたが人間である確認ができませんでした。(ERROR)";
}
}else{
$error_message[] = "CloudflareTurnstileであなたが人間である確認ができませんでした。(ERROR)";
}
}
@@ -172,9 +200,13 @@ $pdo = null;
<meta charset="utf-8">
<link rel="stylesheet" href="../css/style.css">
<script src="../js/unsupported.js"></script>
<?php if(!empty(CAPTCHA && CAPTCHA == "true")){?>
<script src="../js/jquery-min.js"></script>
<?php if(!empty(H_CAPTCHA_ONOFF && H_CAPTCHA_ONOFF == "true")){?>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<?php }?>
<?php if(!empty(CF_TURNSTILE_ONOFF && CF_TURNSTILE_ONOFF == "true")){?>
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<?php }?>
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<meta name="viewport" content="width=device-width,initial-scale=1">
@@ -221,10 +253,15 @@ $pdo = null;
<input id="mailadds" class="inbox" type="text" name="mailadds" value="<?php if( !empty($_SESSION['mailadds']) ){ echo htmlentities( $_SESSION['mailadds'], ENT_QUOTES, 'UTF-8'); } ?>">
</div>
<?php if(!empty(CAPTCHA && CAPTCHA == "true")){?>
<?php if(!empty(H_CAPTCHA_ONOFF && H_CAPTCHA_ONOFF == "true")){?>
<div class="captcha_zone">
<div class="p2">パスワードを復元するためには人間である確認が必要です!<br>下のチェックボックスにチェックしてください。</div>
<div class="h-captcha" data-sitekey="<?php echo htmlentities(SITE_KEY);?>"></div>
<div class="h-captcha" data-sitekey="<?php echo htmlentities(H_CAPTCHA_SITE_KEY);?>"></div>
</div>
<?php }?>
<?php if(!empty(CF_TURNSTILE_ONOFF && CF_TURNSTILE_ONOFF == "true")){?>
<div class="captcha_zone">
<div class="cf-turnstile" data-sitekey="<?php echo htmlentities(CF_TURNSTILE_SITE_KEY);?>" data-callback="javascriptCallback" data-language="ja"></div>
</div>
<?php }?>