php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용

This commit is contained in:
thisgun
2021-01-04 15:39:15 +09:00
parent 131b170b54
commit 27e9af5e42
1009 changed files with 12120 additions and 10849 deletions

View File

@ -1,3 +1,2 @@
<?php
include_once('../../common.php');
?>
include_once('../../common.php');

View File

@ -1,3 +1,2 @@
<?php
require(dirname(__FILE__).'/kcaptcha.lib.php');
?>
require(dirname(__FILE__).'/kcaptcha.lib.php');

View File

@ -75,6 +75,8 @@ class KCAPTCHA{
$odd=mt_rand(0,1);
if($odd==0) $odd=-1;
for($i=0;$i<$length;$i++){
if( ! isset($this->keystring[$i]) ) continue;
$m=$font_metrics[$this->keystring[$i]];
$y=(($i%2)*$fluctuation_amplitude - $fluctuation_amplitude/2)*$odd
@ -240,7 +242,7 @@ function captcha_html($class="captcha")
if(is_mobile())
$class .= ' m_captcha';
$html .= "\n".'<script>var g5_captcha_url = "'.G5_CAPTCHA_URL.'";</script>';
$html = "\n".'<script>var g5_captcha_url = "'.G5_CAPTCHA_URL.'";</script>';
//$html .= "\n".'<script>var g5_captcha_path = "'.G5_CAPTCHA_PATH.'";</script>';
$html .= "\n".'<script src="'.G5_CAPTCHA_URL.'/kcaptcha.js"></script>';
$html .= "\n".'<fieldset id="captcha" class="'.$class.'">';
@ -279,5 +281,4 @@ function chk_captcha()
return false;
}
return true;
}
?>
}

View File

@ -48,5 +48,4 @@ $background_color = array(255, 255, 255);
# JPEG quality of CAPTCHA image (bigger is better quality, but larger file size)
$jpeg_quality = 90;
$wave = true;
?>
$wave = true;

View File

@ -5,5 +5,4 @@ include_once('captcha.lib.php');
$captcha = new KCAPTCHA();
$captcha->setKeyString(get_session("ss_captcha_key"));
$captcha->getKeyString();
$captcha->image();
?>
$captcha->image();

View File

@ -40,5 +40,4 @@ function make_mp3()
return G5_DATA_URL.'/'.$mp3_file;
}
echo make_mp3();
?>
echo make_mp3();

View File

@ -2,11 +2,12 @@
// 캡챠 세션값과 비교하여 맞는지? 틀린지? 결과값을 출력합니다.
include_once("_common.php");
$captcha_key = isset($_POST['captcha_key']) ? $_POST['captcha_key'] : '';
$count = (int)get_session("ss_captcha_count");
if ($count >= 5) { // 설정값 이상이면 자동등록방지 입력 문자가 맞아도 오류 처리
echo false;
} else {
set_session("ss_captcha_count", $count + 1);
echo (get_session("ss_captcha_key") == $_POST['captcha_key']) ? true : false;
}
?>
echo (get_session("ss_captcha_key") === $captcha_key) ? true : false;
}

View File

@ -6,7 +6,7 @@ include_once('captcha.lib.php');
while(true){
$keystring='';
for($i=0;$i<$length;$i++){
$keystring.=$allowed_symbols{mt_rand(0,strlen($allowed_symbols)-1)};
$keystring.=$allowed_symbols[mt_rand(0,strlen($allowed_symbols)-1)];
}
if(!preg_match('/cp|cb|ck|c6|c9|rn|rm|mm|co|do|cl|db|qp|qb|dp|ww/', $keystring)) break;
}
@ -14,5 +14,4 @@ while(true){
set_session("ss_captcha_count", 0);
set_session("ss_captcha_key", $keystring);
$captcha = new KCAPTCHA();
$captcha->setKeyString(get_session("ss_captcha_key"));
?>
$captcha->setKeyString(get_session("ss_captcha_key"));