캡챠 아이프레임
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
/* 초기화 */
|
||||
html {overflow-y:scroll}
|
||||
body {background:#fff;font-size:1em}
|
||||
body {margin:0;padding:0;background:#fff;font-size:1em}
|
||||
html, body, h1, h2, h3, h4, h5, h6 {margin:0 0 0;padding:0}
|
||||
h1, h2, h3, h4, h5, h6 {font-family:"verdana","dotum"}
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
|
||||
@ -16,6 +16,11 @@ hr {display:none}
|
||||
/* 웹접근성 스킬 */
|
||||
.sound_only {display:inline-block;margin:0;padding:0;width:0;height:0;overflow:hidden}
|
||||
|
||||
/* 자동등록방지 */
|
||||
.captcha {display:inline-block;vertical-align:middle}
|
||||
.captcha label {display:inline-block;margin:0;padding:0;width:0;height:0;overflow:hidden}
|
||||
.captcha iframe {margin:0;padding:0;width:80px;height:25px;border:0;overflow:hidden}
|
||||
|
||||
/* 기본테이블 */
|
||||
table {margin-bottom:20px;width:100%;border-collapse:collapse;border-spacing:0}
|
||||
tfoot td {background:#f9f9f5;font-weight:bold;text-align:center}
|
||||
|
||||
@ -144,15 +144,15 @@ function captcha_html($input_name, $captcha_id_suffix='')
|
||||
// 세션생성을 한후 다음페이지에서 해당 세션이 있을때만 올바른 캡챠코드인지 비교합니다.
|
||||
set_session('ss_captcha_use', true);
|
||||
|
||||
$html = '<fieldset id="captcha'.$captcha_id_suffix.'">';
|
||||
$html .= '<legend>자동등록방지</legend>';
|
||||
$html = '<fieldset id="captcha'.$captcha_id_suffix.'" class="captcha">';
|
||||
$html .= '<legend class="sound_only">자동등록방지</legend>';
|
||||
//$html .= '<img src="" id="captcha" alt="자동등록방지 이미지" title="이미지를 클릭하시면 숫자가 바뀝니다.">';
|
||||
$html .= '<iframe id="captcha_iframe" name="captcha_iframe" src="'.$g4['path'].'/plugin/captcha/run.php" width="80" height="25" frameborder="0" scrolling="no"></iframe>';
|
||||
$html .= '<iframe id="captcha_iframe" name="captcha_iframe" src="'.$g4['path'].'/plugin/captcha/run.php" title="자동등록방지숫자"></iframe>';
|
||||
$html .= '<a href="'.$g4['path'].'/plugin/captcha/run.php" target="captcha_iframe">새로고침</a>';
|
||||
$html .= '<a href="'.$g4['path'].'/plugin/captcha/wav.php" id="captcha_wav">wav</a>';
|
||||
$html .= '<label>자동등록방지 입력</label>';
|
||||
$html .= '<input type="text" id="captcha_key" name="'.$input_name.'" class="captcha_box frm_input" size="10" maxlength="5" required title="자동등록방지 입력">';
|
||||
$html .= '<p>이미지의 숫자를 순서대로 입력하세요. 새로고침을 클릭하시면 새로운 숫자가 나타납니다.</p>';
|
||||
$html .= '<a href="'.$g4['path'].'/plugin/captcha/wav.php" id="captcha_wav">음성듣기</a>';
|
||||
$html .= '<label for="captcha_key">자동등록방지 입력</label>';
|
||||
$html .= '<input type="text" id="captcha_key" name="'.$input_name.'" class="captcha_box fieldset_input" size="10" maxlength="5" required title="자동등록방지 입력">';
|
||||
$html .= '<p class="sound_only">이미지의 숫자를 순서대로 입력하세요. 새로고침을 클릭하시면 새로운 숫자가 나타납니다.</p>';
|
||||
$html .= '</fieldset>';
|
||||
return $html;
|
||||
}
|
||||
@ -175,4 +175,4 @@ function captcha_js($element)
|
||||
{
|
||||
return "if (!check_captcha({$element})) { return false; }";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
18
tail.sub.php
18
tail.sub.php
@ -12,17 +12,17 @@ $tmp_row = sql_fetch($tmp_sql);
|
||||
|
||||
//sql_query(" lock table $g4['login_table'] write ", false);
|
||||
if ($tmp_row['cnt']) {
|
||||
$tmp_sql = " update {$g4['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '{$g4['time_ymdhis']}', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
sql_query($tmp_sql, FALSE);
|
||||
$tmp_sql = " update {$g4['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '{$g4['time_ymdhis']}', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
sql_query($tmp_sql, FALSE);
|
||||
} else {
|
||||
$tmp_sql = " insert into {$g4['login_table']} ( lo_ip, mb_id, lo_datetime, lo_location, lo_url ) values ( '{$_SERVER['REMOTE_ADDR']}', '{$member['mb_id']}', '{$g4['time_ymdhis']}', '$lo_location', '$lo_url' ) ";
|
||||
sql_query($tmp_sql, FALSE);
|
||||
$tmp_sql = " insert into {$g4['login_table']} ( lo_ip, mb_id, lo_datetime, lo_location, lo_url ) values ( '{$_SERVER['REMOTE_ADDR']}', '{$member['mb_id']}', '{$g4['time_ymdhis']}', '$lo_location', '$lo_url' ) ";
|
||||
sql_query($tmp_sql, FALSE);
|
||||
|
||||
// 시간이 지난 접속은 삭제한다
|
||||
sql_query(" delete from {$g4['login_table']} where lo_datetime < '".date("Y-m-d H:i:s", $g4['server_time'] - (60 * $config['cf_login_minutes']))."' ");
|
||||
// 시간이 지난 접속은 삭제한다
|
||||
sql_query(" delete from {$g4['login_table']} where lo_datetime < '".date("Y-m-d H:i:s", $g4['server_time'] - (60 * $config['cf_login_minutes']))."' ");
|
||||
|
||||
// 부담(overhead)이 있다면 테이블 최적화
|
||||
//$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4['login_table']' ");
|
||||
//if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] ");
|
||||
// 부담(overhead)이 있다면 테이블 최적화
|
||||
//$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4['login_table']' ");
|
||||
//if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] ");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user