캡챠사용시 ss_bo_table, ss_wr_id 세션이 생기지 않던 오류 수정 & g5_captcha_path 제거

This commit is contained in:
gnuboard
2013-10-16 16:27:34 +09:00
parent bc8ef2d4c6
commit 207f458186
3 changed files with 284 additions and 284 deletions

View File

@ -236,12 +236,13 @@ class KCAPTCHA{
function captcha_html($class="captcha")
{
$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>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.'">';
$html .= "\n".'<legend>자동등록방지</legend>';
if (G5_IS_MOBILE) $html .= '<audio src="#" id="captcha_audio" controls></audio>';
$html .= "\n".'<img src="#" alt="" id="captcha_img">';
//$html .= "\n".'<img src="#" alt="" id="captcha_img">';
$html .= "\n".'<img src="javascript:void(0);" alt="" id="captcha_img">';
if (!G5_IS_MOBILE) $html .= "\n".'<button type="button" id="captcha_mp3"><span></span>숫자음성듣기</button>';
$html .= "\n".'<button type="button" id="captcha_reload"><span></span>새로고침</button>';
$html .= '<input type="text" name="captcha_key" id="captcha_key" required class="captcha_box required" size="6" maxlength="6">';
@ -268,12 +269,14 @@ function chk_captcha()
if (!isset($_POST['captcha_key'])) return false;
if (!trim($_POST['captcha_key'])) return false;
/*
if ($_POST['captcha_key'] != get_session('ss_captcha_key')) {
$_SESSION['ss_captcha_count'] = $captcha_count + 1;
$sql = " insert _error set er_datetime = NOW(), er_ip = '{$_SERVER['REMOTE_ADDR']}', er_user_agent = '{$_SERVER['HTTP_USER_AGENT']}', er_request = 'POST(".$_POST['captcha_key'].')!=SESSION('.get_session('ss_captcha_key').")' ";
sql_query($sql);
return false;
}
*/
return true;
}
?>

View File

@ -1,9 +1,7 @@
<?php
include_once("_common.php");
//error_reporting (E_ALL);
include('captcha.lib.php');
include_once('captcha.lib.php');
//session_start();
$captcha = new KCAPTCHA();
$captcha->setKeyString(get_session("ss_captcha_key"));
$captcha->getKeyString();

View File

@ -1,8 +1,7 @@
<?php
include_once("_common.php");
header("Content-Type: text/html; charset=$g4[charset]");
require(dirname(__FILE__).'/kcaptcha_config.php');
include('captcha.lib.php');
include_once(dirname(__FILE__).'/kcaptcha_config.php');
include_once('captcha.lib.php');
while(true){
$keystring='';