Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/plugin/captcha/captcha.lib.php');
|
||||
|
||||
// 불법접근을 막도록 토큰생성
|
||||
$token = md5(uniqid(rand(), true));
|
||||
@ -17,11 +18,11 @@ if ($w == "") {
|
||||
// 리퍼러 체크
|
||||
referer_check();
|
||||
|
||||
if (!$_POST['agree']) {
|
||||
if (!isset($_POST['agree']) || !$_POST['agree']) {
|
||||
alert('회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.', './register.php');
|
||||
}
|
||||
|
||||
if (!$_POST['agree2']) {
|
||||
if (!isset($_POST['agree2']) || !$_POST['agree2']) {
|
||||
alert('개인정보취급방침의 내용에 동의하셔야 회원가입 하실 수 있습니다.', './register.php');
|
||||
}
|
||||
|
||||
@ -100,8 +101,17 @@ if ($w == "") {
|
||||
// 회원아이콘 경로
|
||||
$mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
|
||||
$g4['js_file'][] = "{$g4['path']}/plugin/captcha/captcha.js";
|
||||
|
||||
include_once('./_head.php');
|
||||
|
||||
if ($g4['https_url'])
|
||||
$register_action_url = "{$g4['https_url']}/{$g4['bbs']}/register_form_update.php";
|
||||
else
|
||||
$register_action_url = "{$g4['url']}/{$g4['bbs']}/register_form_update.php";
|
||||
|
||||
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400)));
|
||||
|
||||
include_once($member_skin_path.'/register_form.skin.php');
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
@ -1,44 +1,22 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
|
||||
/*
|
||||
// 081022 : CSRF 에서 토큰 비교는 의미 없음
|
||||
// 세션에 저장된 토큰과 폼값으로 넘어온 토큰을 비교하여 틀리면 에러
|
||||
if ($_POST["token"] && get_session("ss_token") == $_POST["token"])
|
||||
{
|
||||
// 이전 폼 전송 바로전에 만들어진 쿠키가 없다면 에러
|
||||
//if (!get_cookie($_POST["token"])) alert_close("쿠키 에러");
|
||||
|
||||
// 맞으면 세션과 쿠키를 지워 다시 입력폼을 통해서 들어오도록 한다.
|
||||
set_session("ss_token", "");
|
||||
set_cookie($_POST["token"], 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert_close("토큰 에러");
|
||||
exit;
|
||||
}
|
||||
*/
|
||||
include_once($g4['path'].'/plugin/captcha/captcha.lib.php');
|
||||
|
||||
// 리퍼러 체크
|
||||
//referer_check();
|
||||
referer_check();
|
||||
|
||||
if (!($w == '' || $w == 'u'))
|
||||
if (!($w == '' || $w == 'u')) {
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
if ($w == 'u' && $is_admin == 'super') {
|
||||
if (file_exists($g4['path'].'/DEMO'))
|
||||
alert('데모 화면에서는 하실(보실) 수 없는 작업입니다.');
|
||||
}
|
||||
|
||||
// 자동등록방지 검사
|
||||
//include_once ("./norobot_check.inc.php");
|
||||
|
||||
$key = get_session("captcha_keystring");
|
||||
if (!($key && $key == $_POST[wr_key])) {
|
||||
session_unregister("captcha_keystring");
|
||||
alert('정상적인 접근이 아닌것 같습니다.');
|
||||
if (!chk_tcaptcha("user_answer")) {
|
||||
alert("정상적인 접근이 아닌것 같습니다.");
|
||||
}
|
||||
|
||||
$mb_id = trim(strip_tags(mysql_escape_string($_POST[mb_id])));
|
||||
|
||||
@ -1560,4 +1560,71 @@ function convert_charset($from_charset, $to_charset, $str)
|
||||
else
|
||||
die("Not found 'iconv' or 'mbstring' library in server.");
|
||||
}
|
||||
|
||||
|
||||
// 회원가입시 회원아이디 오류 검사
|
||||
function check_mb_id($reg_mb_id, $length=3)
|
||||
{
|
||||
global $config, $g4;
|
||||
|
||||
if (!isset($reg_mb_id) || !$reg_mb_id)
|
||||
return "회원아이디를 입력해 주십시오.";
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $reg_mb_id)) {
|
||||
return "회원아이디는 영문자, 숫자, _ 만 입력하세요."; // 유효하지 않은 회원아이디
|
||||
} else if (strlen($reg_mb_id) < $length) {
|
||||
return "회원아이디는 최소 {$length}글자 이상 입력하세요.";
|
||||
} else {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_id = '$reg_mb_id' ");
|
||||
if ($row['cnt']) {
|
||||
return "이미 사용중인 회원아이디 입니다."; // 이미 존재하는 회원아이디
|
||||
} else {
|
||||
if (preg_match("/[\,]?{$reg_mb_id}/i", $config['cf_prohibit_id'])) {
|
||||
return "이미 예약된 단어로 사용할 수 없는 회원아이디 입니다."; // 예약어로 금지된 회원아이디
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""; // 사용해도 좋은 회원아이디
|
||||
}
|
||||
|
||||
|
||||
function check_mb_nick($reg_mb_nick)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
if (!isset($reg_mb_nick) || !$reg_mb_nick)
|
||||
return "별명을 입력해 주십시오.";
|
||||
|
||||
// 별명은 한글, 영문, 숫자만 가능
|
||||
if (!check_string($reg_mb_nick, _G4_HANGUL_ + _G4_ALPHABETIC_ + _G4_NUMERIC_)) {
|
||||
return "공백없이 한글, 영문, 숫자만 입력 가능합니다.";
|
||||
} else if (strlen($reg_mb_nick) < 4) {
|
||||
return "한글 2글자, 영문 4글자 이상 입력 가능합니다.";
|
||||
} else {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_nick = '$reg_mb_nick' ");
|
||||
if ($row['cnt']) {
|
||||
return "이미 존재하는 별명입니다.";
|
||||
}
|
||||
}
|
||||
return ""; // 사용해도 좋은 별명
|
||||
}
|
||||
|
||||
|
||||
function check_mb_email($reg_mb_id, $reg_mb_email)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
if (!isset($reg_mb_email) || !$reg_mb_email)
|
||||
return "E-mail 주소를 입력해 주십시오.";
|
||||
|
||||
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $reg_mb_email)) {
|
||||
return "E-mail 주소가 형식에 맞지 않습니다.";
|
||||
} else {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_id <> '$reg_mb_id' and mb_email = '$reg_mb_email' ");
|
||||
if ($row['cnt']) {
|
||||
return "이미 사용중인 E-mail 주소입니다.";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
?>
|
||||
4
plugin/captcha/_common.php
Normal file
4
plugin/captcha/_common.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?
|
||||
$g4_path = "../.."; // common.php 의 상대 경로
|
||||
include_once("$g4_path/common.php");
|
||||
?>
|
||||
32
plugin/captcha/captcha.js
Normal file
32
plugin/captcha/captcha.js
Normal file
@ -0,0 +1,32 @@
|
||||
function chk_captcha(input_key)
|
||||
{
|
||||
if (typeof(input_key) != 'undefined') {
|
||||
var captcha_result = false;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: g4_path+'/plugin/captcha/get.php',
|
||||
data: { 'captcha_key': input_key.value },
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(result) {
|
||||
captcha_result = result;
|
||||
}
|
||||
});
|
||||
if (!captcha_result) {
|
||||
alert('숫자가 틀렸거나 입력 횟수가 넘었습니다.\n\n이미지를 클릭하여 다시 입력해 주십시오.');
|
||||
input_key.select();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#captcha').click(function() {
|
||||
this.setAttribute('src', g4_path+'/plugin/captcha/run.php?t='+(new Date).getTime());
|
||||
//$('#captcha_key').focus();//이미지 새로고침 후 입력박스에 포커스 : 지운아빠 2012-07-13
|
||||
//캡챠 클릭 시에 포커스 줘야 하는데 페이지 새로 고침되면 포커스를 줘서 주석처리 : 지운아빠 2012-08-03
|
||||
})
|
||||
.css('cursor', 'pointer')
|
||||
.trigger('click');
|
||||
});
|
||||
176
plugin/captcha/captcha.lib.php
Normal file
176
plugin/captcha/captcha.lib.php
Normal file
@ -0,0 +1,176 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
class captcha
|
||||
{
|
||||
// 이미지크기 폭
|
||||
var $width = 80;
|
||||
// 이미지크기 높이
|
||||
var $height = 25;
|
||||
// 폰트 사이즈
|
||||
var $size = 16;
|
||||
// 폰트 기울기
|
||||
var $angle = 0;
|
||||
// 폰트 왼쪽 위치
|
||||
var $x = 5;
|
||||
// 폰트 위쪽 위치
|
||||
var $y = 21;
|
||||
// 캡챠이미지 배경색상 rgb
|
||||
var $back = array('r'=>255, 'g'=>255, 'b'=>255);
|
||||
// 글자색상 rgb
|
||||
var $text = array('r'=>0, 'g'=>0, 'b'=>0);
|
||||
// 그림자 글자색상 rgb
|
||||
var $shadow = array('r'=>128, 'g'=>128, 'b'=>128);
|
||||
|
||||
var $captcha_length = 5;
|
||||
|
||||
// 이미지 크기
|
||||
function set_box_size($width, $height) {
|
||||
$this->width = $width;
|
||||
$this->height = $height;
|
||||
}
|
||||
|
||||
// 폰트 사이즈
|
||||
function set_size($size) {
|
||||
$this->size = $size;
|
||||
}
|
||||
|
||||
// 폰트 기울기
|
||||
function set_angle($angle) {
|
||||
$this->angle = $angle;
|
||||
}
|
||||
|
||||
// 폰트 위치
|
||||
function set_position($x, $y) {
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
}
|
||||
|
||||
function set_captcha_length($length)
|
||||
{
|
||||
$this->captcha_length = $length;
|
||||
}
|
||||
|
||||
function set_back_color($r, $g, $b) {
|
||||
$this->back['r'] = $r;
|
||||
$this->back['g'] = $g;
|
||||
$this->back['b'] = $b;
|
||||
}
|
||||
|
||||
function set_text_color($r, $g, $b) {
|
||||
$this->text['r'] = $r;
|
||||
$this->text['g'] = $g;
|
||||
$this->text['b'] = $b;
|
||||
}
|
||||
|
||||
function set_shadow_color($r, $g, $b) {
|
||||
$this->shadow['r'] = $r;
|
||||
$this->shadow['g'] = $g;
|
||||
$this->shadow['b'] = $b;
|
||||
}
|
||||
|
||||
function get_captcha_key()
|
||||
{
|
||||
$from = (int)('1'.str_repeat('0', $this->captcha_length - 1));
|
||||
$to = (int)(str_repeat('9', $this->captcha_length));
|
||||
return mt_rand($from, $to);
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
||||
// The text to draw
|
||||
$captcha_key = $this->get_captcha_key();
|
||||
/*
|
||||
$_SESSION['ss_captcha_key'] = $captcha_key;
|
||||
$_SESSION['ss_captcha_cnt'] = 0;
|
||||
*/
|
||||
|
||||
set_session('ss_captcha_key', $captcha_key);
|
||||
set_session('ss_captcha_cnt', 0);
|
||||
|
||||
// Set the content-type
|
||||
header('Content-Type: image/gif');
|
||||
// Create the image
|
||||
$im = imagecreatetruecolor($this->width, $this->height);
|
||||
|
||||
// Create some colors
|
||||
$white = imagecolorallocate($im, $this->back['r'], $this->back['g'], $this->back['b']);
|
||||
$grey = imagecolorallocate($im, $this->shadow['r'], $this->shadow['g'], $this->shadow['b']);
|
||||
$black = imagecolorallocate($im, $this->text['r'], $this->text['g'], $this->text['b']);
|
||||
imagefilledrectangle($im, 0, 0, $this->width, $this->height, $white);
|
||||
|
||||
// Replace path by your own font path
|
||||
$fonts = Array();
|
||||
foreach (glob('fonts/*.ttf') as $filename) {
|
||||
$fonts[] = $filename;
|
||||
}
|
||||
$font = $fonts[mt_rand(0, count($fonts)-1)];
|
||||
|
||||
$size = $this->size;
|
||||
$angle = $this->angle;
|
||||
$x = $this->x;
|
||||
$y = $this->y;
|
||||
|
||||
// Add some shadow to the text
|
||||
imagettftext($im, $size, $angle, $x, $y, $grey, $font, $captcha_key);
|
||||
// Add the text
|
||||
imagettftext($im, $size, $angle, $x-1, $y-1, $black, $font, $captcha_key);
|
||||
if (mt_rand(0,1)) {
|
||||
imagettftext($im, $size, $angle, $x-2, $y-2, $white, $font, $captcha_key);
|
||||
} else if (mt_rand(0,1)) {
|
||||
imagettftext($im, $size, $angle, $x-2, $y-2, $grey, $font, $captcha_key);
|
||||
}
|
||||
|
||||
// Using imagepng() results in clearer text compared with imagejpeg()
|
||||
imagegif($im);
|
||||
imagedestroy($im);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
사용법 :
|
||||
$captcha = new captcha();
|
||||
$captcha->set_captcha_length(mt_rand(4, 6));
|
||||
$captcha->set_position(mt_rand(0, 10), mt_rand(15, 20));
|
||||
$captcha->set_angle(mt_rand(-3, 3));
|
||||
$captcha->set_size(mt_rand(15, 16));
|
||||
$captcha->set_back_color(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));
|
||||
$captcha->set_text_color(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
|
||||
$captcha->set_shadow_color(mt_rand(100,200), mt_rand(100,200), mt_rand(100,200));
|
||||
$captcha->run();
|
||||
*/
|
||||
|
||||
// 캡챠이미지는 한개만 사용 가능함.
|
||||
function get_captcha($input_name, $captcha_no)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
// 세션생성을 한후 다음페이지에서 해당 세션이 있을때만 올바른 캡챠코드인지 비교합니다.
|
||||
set_session('ss_captcha_use', true);
|
||||
$captcha_class = str_pad($captcha_no,2,'0',STR_PAD_LEFT);// 캡챠 클래스를 선택할 수 있도록 지운아빠 2012-07-24
|
||||
|
||||
$s = "";
|
||||
$s .= "<fieldset id=\"captcha".$captcha_class."\">\n";
|
||||
$s .= "<legend>자동등록방지</legend>\n";
|
||||
$s .= "<img src=\"{$g4['path']}/plugin/captcha/img/dot.gif\" id=\"captcha\" alt=\"자동등록방지 이미지\" title=\"이미지를 클릭하시면 숫자가 바뀝니다.\"/>\n";
|
||||
$s .= "<a href=\"{$g4['path']}/plugin/captcha/wav.php\" id=\"captcha_wav\">wav</a>\n";
|
||||
$s .= "<label>자동등록방지 입력</label>\n";
|
||||
$s .= "<input type=\"text\" id=\"captcha_key\" name=\"$input_name\" class=\"captcha_box\" size=\"10\" maxlength=\"5\" required=\"required\" title=\"스팸방지\" title=\"이미지의 숫자를 순서대로 입력하세요.\" />\n";
|
||||
$s .= "<p>이미지의 숫자를 순서대로 입력하세요. 이미지를 클릭하시면 새로운 숫자가 나타납니다.</p>\n";
|
||||
$s .= "</fieldset>\n";
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
function chk_captcha($input_name)
|
||||
{
|
||||
if (get_session('ss_captcha_use')) {
|
||||
$key = get_session('ss_captcha_key');
|
||||
if (!($key && $key == $_POST[$input_name])) {
|
||||
set_session('ss_captcha_key', '');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
?>
|
||||
35
plugin/captcha/example.php
Normal file
35
plugin/captcha/example.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
?>
|
||||
<meta charset='utf-8' />
|
||||
<form onsubmit='return form_submit(this)'>
|
||||
<a href='javascript:;' onclick='change_captcha();'><img src='./run.php' id='captcha' border='0' alt='캡챠이미지' title='이미지를 클릭하시면 숫자가 바뀝니다.'/></a>
|
||||
<input type='text' name='captcha_key'>
|
||||
<input type='submit'>
|
||||
</form>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="<?=$g4[path]?>/plugin/captcha/captcha.js" type="text/javascript"></script>
|
||||
<script>
|
||||
function change_captcha()
|
||||
{
|
||||
document.getElementById('captcha').setAttribute('src', g4_path+'/plugin/captcha/run.php?t='+(new Date).getTime());
|
||||
}
|
||||
|
||||
function form_submit(f)
|
||||
{
|
||||
if (f.captcha_key.value == '') {
|
||||
alert('왼쪽의 숫자를 입력하세요.');
|
||||
f.captcha_key.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!chk_captcha(f.captcha_key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
alert('축하합니다.\n\n올바로 입력 하셨습니다.');
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
4
plugin/captcha/fonts/.htaccess
Normal file
4
plugin/captcha/fonts/.htaccess
Normal file
@ -0,0 +1,4 @@
|
||||
<Files ~ "*">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
8
plugin/captcha/fonts/DAUM_FONTS_LICENSE.txt
Normal file
8
plugin/captcha/fonts/DAUM_FONTS_LICENSE.txt
Normal file
@ -0,0 +1,8 @@
|
||||
http://info.daum.net/Daum/info/introduceOfCI.do
|
||||
|
||||
다음체의 저작권은 Daum에 있습니다.
|
||||
다음체는 개인 및 기업 사용자에게 무료로 제공되며, 사용자들은 다른 이에게 자유롭게 배포할 수 있습니다.
|
||||
단, 이 과정에서 어떠한 이유로든 복사 및 배포의 대가로 요금을 부과할 수 없습니다.
|
||||
다음체는 어떠한 이유로도 지적 재산권자 이외의 사용자가 수정 및 판매할 수 없으며, 배포되는 형태 그대로 사용해야 합니다.
|
||||
다음체를 이용하여 출판물 및 제작물을 만들거나 기업의 BI, CI 및 상품에 사용하시려면 반드시 Daum의 명시적인 승인을 받으셔야 하며,
|
||||
협의 후 글꼴 출처를 표시해야 합니다. 이 외의 다음체 사용 관련된 문의는 jadeinrain@daumcorp.com로 해주시면 됩니다.
|
||||
112
plugin/captcha/fonts/NAVER_FONTS_LICENSE.txt
Normal file
112
plugin/captcha/fonts/NAVER_FONTS_LICENSE.txt
Normal file
@ -0,0 +1,112 @@
|
||||
http://help.naver.com/ops/step2/faq.nhn?faqId=15879
|
||||
|
||||
네이버 나눔글꼴의 지적 재산권은 NHN에 있습니다.
|
||||
네이버 나눔글꼴은 개인 및 기업 사용자를 포함한 모든 사용자에게
|
||||
무료로 제공되며 자유롭게 수정하고 재배포하실 수 있습니다.
|
||||
|
||||
단, 글꼴 자체를 유료로 판매하는 것은 금지하며,
|
||||
네이버 나눔글꼴은 본 저작권 안내와 라이선스 전문을 포함해서
|
||||
다른 소프트웨어와 번들하거나 재배포 또는 판매가 가능합니다.
|
||||
네이버 나눔글꼴 라이선스 전문을 포함하기 어려울 경우,
|
||||
나눔글꼴의 출처 표기를 권장합니다.
|
||||
예) 이 페이지에는 네이버에서 제공한 나눔글꼴이 적용되어 있습니다
|
||||
|
||||
네이버 나눔글꼴을 사용한 인쇄물, 광고물(온라인 포함)의 이미지는
|
||||
나눔글꼴 프로모션을 위해 활용될 수 있습니다.
|
||||
이를 원치 않는 사용자는 언제든지 당사에 요청하실 수 있습니다.
|
||||
정확한 사용 조건은 아래 네이버 나눔글꼴 라이선스 전문을 참고하시기 바랍니다.
|
||||
|
||||
|
||||
*나눔글꼴 라이선스 전문의 한글은 이용자의 이해를 돕기 위해 영문 원본을 번역해 서비스하고 있으며
|
||||
법적 효력은 영문에 한합니다. 이 점 참고하시기 바랍니다.
|
||||
|
||||
Copyright (c) 2010, NHN Corporation (http://www.nhncorp.com),
|
||||
with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
SIL OPEN FONT LICENSE
|
||||
Version 1.1 - 26 February 2007
|
||||
|
||||
‘나눔, 네이버 나눔, 나눔고딕, 네이버 나눔고딕, 나눔명조, 네이버 나눔명조, 나눔손글씨, 네이버 나눔손글씨, 나눔펜, 네이버 나눔펜, 네이버 나눔고딕에코, 나눔고딕에코, 네이버 나눔명조에코, 나눔명조에코, 네이버 나눔고딕라이트, 나눔고딕라이트’ 폰트명에 대해 NHN (http://www.nhncorp.com)이 저작권을 소유하고 있습니다.
|
||||
본 폰트 소프트웨어는 SIL 오픈 폰트 라이선스 버전 1.1에 따라 라이선스 취득을 하였습니다.
|
||||
본 라이선스는 하단에 복사되었고 http://scripts.sil.org/OFL의 FAQ란 에서도 열람가능 합니다.
|
||||
|
||||
SIL 오픈 폰트 라이선스
|
||||
버전 1.1 (2007년 2월 26일)
|
||||
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting, or substituting in part or in whole any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.‘
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
정의
|
||||
‘폰트 소프트웨어’는 본 라이선스에 입거해 저작권자가 배포하고 명확하게 같은 표시가 된 파일들의 집합을 뜻하며, 여기에는 소스 파일, 빌드 스크립트와 문서가 이에 포함됩니다.
|
||||
|
||||
‘저작권이 있는 폰트명’은 저작권 정책에 따라서 지정된 이름을 말합니다.
|
||||
|
||||
‘원본’은 저작권자가 배포한 폰트 소프트웨어 구성요소를 의미합니다.
|
||||
|
||||
‘수정본’은 포맷의 변경이나 폰트 소프트웨어를 새로운 환경에 포팅시켜, 원본의 일부 혹은 전체에 추가, 삭제 대체해 만든 파생 저작물을 의미합니다.
|
||||
|
||||
‘저자’는 폰트 소프트웨어에 기여한 디자이너, 엔지니어, 프로그래머, 기술 전문가 등을 의미합니다.
|
||||
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects,
|
||||
to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework
|
||||
in which fonts may be shared and improved in partnership with others.
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold
|
||||
by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works.
|
||||
The fonts and derivatives, however, cannot be released under any other type of license.
|
||||
The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
전문
|
||||
본 폰트 라이선스를 오픈 하는 것은(이하 OFL)는 전 세계 폰트 개발 프로젝트를 지원하고 학계와 언어 관련 학계의 폰트 개발을 위한 연구를 지지하기 위해서인 동시에, 폰트 제휴를 통해 폰트가 공유되고 개선될 수 있는 자유롭게 개방된 환경을 만들기 위해서 입니다.
|
||||
OFL은 라이선스를 취득한 폰트가 그 자체로 판매되지 않는 한 자유롭게 사용, 연구, 수정, 재배포 하는 것을 허가합니다. 수정된 폰트를 포함한 폰트는 저작권 명이 사용되지 않는 한 기타 소프트웨어와 함께 묶이거나 삽입, 재배포 할 수 있습니다. 단 폰트와 수정된 폰트는 기타 다른 라이선스에 포함되어 배포될 수는 없습니다. 이 라이선스 하에 있기 위한 폰트에 대한 요구사항은 본 폰트나 수정본을 사용하여 제작된 어떠한 문서에도 적용되지 않습니다.
|
||||
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
허가 및 조건
|
||||
본 폰트 소프트웨어를 사용하도록 허가 받은 개인/기업/단체 누구라도 다음 명시된 조건에 따라 폰트 소프트웨어의 수정 혹은 수정되지 않은 복사본을 무료로 사용, 연구, 복사, 통합, 삽입, 수정, 재배포할 수 있도록 허가합니다.
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,in Original or Modified Versions, may be sold by itself.
|
||||
원본이나 수정본의 폰트 소프트웨어 혹은 개별 구성요소인 폰트 자체가 판매되어서는 안됩니다.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
본 폰트 소프트웨어의 원본 혹은 수정본은 상기 저작권 안내와 본 라이선스에 대한 내용을 포함하는 경우에는 다른 소프트웨어와 함께 묶이거나 재배포 혹은 판매가 가능합니다. 이는 독립 텍스트 파일과 가독성이 있는 헤더 혹은 유저가 용이하게 열람 가능한 이상 텍스트파일 혹은 이진파일 내 기계가 읽을 수 있는 메타데이터 형태를 모두 의미 합니다.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written
|
||||
permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
본 폰트 소프트웨어의 어떠한 수정본도 동일한 저작권자가 명시적 허가서를 부여하지 않는 한 저작권이 있는 폰트명을 사용해서는 안 됩니다. 본 제한 사항은 유저들에게 제공된 기존 폰트명을 뜻합니다.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
본 폰트 소프트웨어의 저작권자 혹은 저자의 이름은 그들의 명시적 서면 허가가 있거나 또는 그들의 공헌을 인정하기 위한 경우를 제외하고는 수정본에 대한 사용을 유도,추천 혹은 광고하기 위한 목적으로 사용할 수 없습니다.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
본 폰트 소프트웨어는 전체나 부분, 혹은 수정 여부에 상관없이 본 라이선스 하에 배포가 되어야 하며 기타 다른 라이선스 하에서는 배포를 할 수 없습니다. 폰트에 대한 요구조건은 이 라이선스 하에서만 유효하며 이 라이선스 하에 있기 위한 폰트에 대한 요구사항은 본 폰트 소프트웨어를 사용해 제작한 어떠한 문서에도 적용되지 않습니다.
|
||||
|
||||
|
||||
TERMINATION 계약의 종료
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
본 라이선스는 상기 조건 중 일부라도 부합되지 않으면 무효가 될 수 있습니다.
|
||||
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
|
||||
면책조항
|
||||
본 폰트 소프트웨어는 저작권, 특허권, 상표권 및 기타 권리의 비침해성과 특정 목적에의 적합성 포함한 명시적, 묵시적인 어떠한 종류의 보증 없이 “있는 그대로” 제공됩니다. 어떠한 경우에도 저작권자는 본 폰트 소프트웨어의 사용 또는 이의 사용불가, 그밖에 폰트 소프트웨어의 취급과 관련하여 발생하는 모든 계약, 불법행위 혹은 다른 일로 하여금 발생하는 일반적, 특수적, 간접적, 부차적 혹은 필연적 손해를 포함하는 소송, 손해, 혹은 기타 책임에 대한 의무를 가지지 않습니다.
|
||||
BIN
plugin/captcha/fonts/NanumGothic.ttf
Normal file
BIN
plugin/captcha/fonts/NanumGothic.ttf
Normal file
Binary file not shown.
BIN
plugin/captcha/fonts/NanumMyeongjo.ttf
Normal file
BIN
plugin/captcha/fonts/NanumMyeongjo.ttf
Normal file
Binary file not shown.
18
plugin/captcha/get.php
Normal file
18
plugin/captcha/get.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
define('MAX_CAPTCHA_COUNT', 3);
|
||||
$captcha_cnt = (int)$_SESSION['ss_captcha_cnt'];
|
||||
|
||||
if ($captcha_cnt >= MAX_CAPTCHA_COUNT) {
|
||||
$_SESSION['ss_captcha_key'] = '';
|
||||
echo false;
|
||||
} else {
|
||||
if ($_POST['captcha_key'] == $_SESSION['ss_captcha_key']) {
|
||||
echo true;
|
||||
} else {
|
||||
$_SESSION['ss_captcha_cnt'] = $captcha_cnt + 1;
|
||||
echo false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
BIN
plugin/captcha/img/dot.gif
Normal file
BIN
plugin/captcha/img/dot.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
6
plugin/captcha/run.php
Normal file
6
plugin/captcha/run.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
include_once("./captcha.lib.php");
|
||||
$captcha = new captcha();
|
||||
$captcha->run();
|
||||
?>
|
||||
70
plugin/captcha/wav.php
Normal file
70
plugin/captcha/wav.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
// prepare an array of wavfiles
|
||||
$lc ='/home/tmp/g4s/plugin/captcha/wavs/';
|
||||
$number = (string)$_SESSION['ss_captcha_key'];
|
||||
$wavs = array();
|
||||
for($i=0;$i<strlen($number);$i++){
|
||||
$file = $lc.$number[$i].'.wav';
|
||||
//echo $file;
|
||||
if(!@file_exists($file)) {
|
||||
$file = $en.$code{$i}.'.wav';
|
||||
}
|
||||
$wavs[] = $file;
|
||||
for ($d=0;$d<rand(0,5);$d++) {
|
||||
$wavs[] = $lc.'delay'.rand(0,1).'.wav';
|
||||
}
|
||||
}
|
||||
|
||||
//print_r($wavs); exit;
|
||||
|
||||
header('Content-type: audio/x-wav');
|
||||
header('Content-Disposition: attachment;filename=captcha.wav');
|
||||
|
||||
echo joinwavs($wavs);
|
||||
|
||||
/**
|
||||
* Join multiple wav files
|
||||
*
|
||||
* All wave files need to have the same format and need to be uncompressed.
|
||||
* The headers of the last file will be used (with recalculated datasize
|
||||
* of course)
|
||||
*
|
||||
* @link http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/
|
||||
* @link http://www.thescripts.com/forum/thread3770.html
|
||||
*/
|
||||
function joinwavs($wavs)
|
||||
{
|
||||
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
|
||||
'H8Subchunk1ID', 'VSubchunk1Size',
|
||||
'vAudioFormat', 'vNumChannels', 'VSampleRate',
|
||||
'VByteRate', 'vBlockAlign', 'vBitsPerSample' ));
|
||||
|
||||
$data = '';
|
||||
foreach($wavs as $wav){
|
||||
$fp = fopen($wav,'rb');
|
||||
$header = fread($fp,36);
|
||||
$info = unpack($fields,$header);
|
||||
|
||||
// read optional extra stuff
|
||||
if($info['Subchunk1Size'] > 16){
|
||||
$header .= fread($fp,($info['Subchunk1Size']-16));
|
||||
}
|
||||
|
||||
// read SubChunk2ID
|
||||
$header .= fread($fp,4);
|
||||
|
||||
// read Subchunk2Size
|
||||
$size = unpack('vsize',fread($fp, 4));
|
||||
$size = $size['size'];
|
||||
|
||||
// read data
|
||||
$data .= fread($fp,$size);
|
||||
}
|
||||
|
||||
return $header.pack('V',strlen($data)).$data;
|
||||
}
|
||||
|
||||
exit;
|
||||
?>
|
||||
BIN
plugin/captcha/wavs/0.wav
Normal file
BIN
plugin/captcha/wavs/0.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/1.wav
Normal file
BIN
plugin/captcha/wavs/1.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/2.wav
Normal file
BIN
plugin/captcha/wavs/2.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/3.wav
Normal file
BIN
plugin/captcha/wavs/3.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/4.wav
Normal file
BIN
plugin/captcha/wavs/4.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/5.wav
Normal file
BIN
plugin/captcha/wavs/5.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/6.wav
Normal file
BIN
plugin/captcha/wavs/6.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/7.wav
Normal file
BIN
plugin/captcha/wavs/7.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/8.wav
Normal file
BIN
plugin/captcha/wavs/8.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/9.wav
Normal file
BIN
plugin/captcha/wavs/9.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/delay0.wav
Normal file
BIN
plugin/captcha/wavs/delay0.wav
Normal file
Binary file not shown.
BIN
plugin/captcha/wavs/delay1.wav
Normal file
BIN
plugin/captcha/wavs/delay1.wav
Normal file
Binary file not shown.
@ -1,20 +1,5 @@
|
||||
<?
|
||||
include_once("_common.php");
|
||||
|
||||
if (trim($reg_mb_email)=='') {
|
||||
echo "110"; // 입력이 없습니다.
|
||||
} else if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $reg_mb_email)) {
|
||||
echo "120"; // E-mail 주소 형식에 맞지 않음
|
||||
} else {
|
||||
$row = sql_fetch(" select count(*) as cnt from $g4[member_table] where mb_id <> '$reg_mb_id' and mb_email = '$reg_mb_email' ");
|
||||
if ($row[cnt]) {
|
||||
echo "130"; // 이미 존재하는 회원아이디
|
||||
} else {
|
||||
//if (preg_match("/[\,]?{$reg_mb_email}\,/i", $config[cf_prohibit_id].","))
|
||||
if (preg_match("/[\,]?{$reg_mb_email}/i", $config[cf_prohibit_id]))
|
||||
echo "140"; // 예약어로 금지된 회원아이디
|
||||
else
|
||||
echo "000"; // 정상
|
||||
}
|
||||
}
|
||||
echo check_mb_email($_POST['reg_mb_id'], $_POST['reg_mb_email']);
|
||||
?>
|
||||
@ -1,22 +1,5 @@
|
||||
<?
|
||||
include_once("_common.php");
|
||||
|
||||
// echo "한글"로 출력하지 않는 이유는 Ajax 는 euc_kr 에서 한글을 제대로 인식하지 못하기 때문
|
||||
// 여기에서 영문으로 echo 하여 Request 된 값을 Javascript 에서 한글로 메세지를 출력함
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $reg_mb_id)) {
|
||||
echo "110"; // 유효하지 않은 회원아이디
|
||||
} else if (strlen($reg_mb_id) < 3) {
|
||||
echo "120"; // 3보다 작은 회원아이디
|
||||
} else {
|
||||
$row = sql_fetch(" select count(*) as cnt from $g4[member_table] where mb_id = '$reg_mb_id' ");
|
||||
if ($row[cnt]) {
|
||||
echo "130"; // 이미 존재하는 회원아이디
|
||||
} else {
|
||||
if (preg_match("/[\,]?{$reg_mb_id}/i", $config[cf_prohibit_id]))
|
||||
echo "140"; // 예약어로 금지된 회원아이디
|
||||
else
|
||||
echo "000"; // 정상
|
||||
}
|
||||
}
|
||||
echo check_mb_id($_POST['reg_mb_id']);
|
||||
?>
|
||||
@ -1,40 +1,5 @@
|
||||
<?
|
||||
include_once("_common.php");
|
||||
|
||||
if (!function_exists('convert_charset')) {
|
||||
/*
|
||||
-----------------------------------------------------------
|
||||
Charset 을 변환하는 함수
|
||||
-----------------------------------------------------------
|
||||
iconv 함수가 있으면 iconv 로 변환하고
|
||||
없으면 mb_convert_encoding 함수를 사용한다.
|
||||
둘다 없으면 사용할 수 없다.
|
||||
*/
|
||||
function convert_charset($from_charset, $to_charset, $str) {
|
||||
|
||||
if( function_exists('iconv') )
|
||||
return iconv($from_charset, $to_charset, $str);
|
||||
elseif( function_exists('mb_convert_encoding') )
|
||||
return mb_convert_encoding($str, $to_charset, $from_charset);
|
||||
else
|
||||
die("Not found 'iconv' or 'mbstring' library in server.");
|
||||
}
|
||||
}
|
||||
|
||||
if (strtolower($g4[charset]) == 'euc-kr')
|
||||
$reg_mb_nick = convert_charset('UTF-8','CP949',$reg_mb_nick);
|
||||
|
||||
// 별명은 한글, 영문, 숫자만 가능
|
||||
if (!check_string($reg_mb_nick, _G4_HANGUL_ + _G4_ALPHABETIC_ + _G4_NUMERIC_)) {
|
||||
echo "110"; // 별명은 공백없이 한글, 영문, 숫자만 입력 가능합니다.
|
||||
} else if (strlen($reg_mb_nick) < 4) {
|
||||
echo "120"; // 4글자 이상 입력
|
||||
} else {
|
||||
$row = sql_fetch(" select count(*) as cnt from $g4[member_table] where mb_nick = '$reg_mb_nick' ");
|
||||
if ($row[cnt]) {
|
||||
echo "130"; // 이미 존재하는 별명
|
||||
} else {
|
||||
echo "000"; // 정상
|
||||
}
|
||||
}
|
||||
echo check_mb_nick($_POST['reg_mb_nick']);
|
||||
?>
|
||||
@ -1,51 +1,41 @@
|
||||
var reg_mb_id_check = function() {
|
||||
var result = "";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: member_skin_path+'/ajax_mb_id_check.php',
|
||||
type: "POST",
|
||||
url: member_skin_path+"/ajax_mb_id_check.php",
|
||||
data: {
|
||||
'reg_mb_id': encodeURIComponent($('#reg_mb_id').val())
|
||||
"reg_mb_id": encodeURIComponent($("#reg_mb_id").val())
|
||||
},
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(result) {
|
||||
var msg = $('#msg_mb_id');
|
||||
switch(result) {
|
||||
case '110' : msg.html('영문자, 숫자, _ 만 입력하세요.').css('color', 'red'); break;
|
||||
case '120' : msg.html('최소 3자이상 입력하세요.').css('color', 'red'); break;
|
||||
case '130' : msg.html('이미 사용중인 아이디 입니다.').css('color', 'red'); break;
|
||||
case '140' : msg.html('예약어로 사용할 수 없는 아이디 입니다.').css('color', 'red'); break;
|
||||
case '000' : msg.html('사용하셔도 좋은 아이디 입니다.').css('color', 'blue'); break;
|
||||
default : alert( '잘못된 접근입니다.\n\n' + result ); break;
|
||||
}
|
||||
$('#mb_id_enabled').val(result);
|
||||
success: function(data) {
|
||||
result = data;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
var reg_mb_nick_check = function() {
|
||||
var result = "";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: member_skin_path+'/ajax_mb_nick_check.php',
|
||||
type: "POST",
|
||||
url: member_skin_path+"/ajax_mb_nick_check.php",
|
||||
data: {
|
||||
'reg_mb_nick': ($('#reg_mb_nick').val())
|
||||
"reg_mb_nick": ($("#reg_mb_nick").val())
|
||||
},
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(result) {
|
||||
var msg = $('#msg_mb_nick');
|
||||
switch(result) {
|
||||
case '110' : msg.html('별명은 공백없이 한글, 영문, 숫자만 입력 가능합니다.').css('color', 'red'); break;
|
||||
case '120' : msg.html('한글 2글자, 영문 4글자 이상 입력 가능합니다.').css('color', 'red'); break;
|
||||
case '130' : msg.html('이미 존재하는 별명입니다.').css('color', 'red'); break;
|
||||
case '000' : msg.html('사용하셔도 좋은 별명 입니다.').css('color', 'blue'); break;
|
||||
default : alert( '잘못된 접근입니다.\n\n' + result ); break;
|
||||
}
|
||||
$('#mb_nick_enabled').val(result);
|
||||
success: function(data) {
|
||||
result = data;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
var reg_mb_email_check = function() {
|
||||
var result = "";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: member_skin_path+'/ajax_mb_email_check.php',
|
||||
@ -55,16 +45,9 @@ var reg_mb_email_check = function() {
|
||||
},
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(result) {
|
||||
var msg = $('#msg_mb_email');
|
||||
switch(result) {
|
||||
case '110' : msg.html('E-mail 주소를 입력하십시오.').css('color', 'red'); break;
|
||||
case '120' : msg.html('E-mail 주소가 형식에 맞지 않습니다.').css('color', 'red'); break;
|
||||
case '130' : msg.html('이미 존재하는 E-mail 주소입니다.').css('color', 'red'); break;
|
||||
case '000' : msg.html('사용하셔도 좋은 E-mail 주소입니다.').css('color', 'blue'); break;
|
||||
default : alert( '잘못된 접근입니다.\n\n' + result ); break;
|
||||
}
|
||||
$('#mb_email_enabled').val(result);
|
||||
success: function(data) {
|
||||
result = data;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@ -7,7 +7,7 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
</script>
|
||||
<script src="<?=$member_skin_path?>/ajax_register_form.jquery.js"></script>
|
||||
|
||||
<form id="fregisterform" name="fregisterform" method="post" onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
|
||||
<form id="fregisterform" name="fregisterform" method="post" action="<?=$register_action_url?>" onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?=$w?>">
|
||||
<input type="hidden" name="url" value="<?=$urlencode?>">
|
||||
<input type="hidden" name="mb_jumin" value="<?=$jumin?>">
|
||||
@ -26,18 +26,18 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_id">아이디</label></th>
|
||||
<td>
|
||||
<input type="text" id="reg_mb_id" name="mb_id" value="<?=$member['mb_id']?>" maxlength="20" <? if ($w=='u') { echo "readonly style='background-color:#dddddd;'"; } ?> <? if ($w=='') { echo "onblur='reg_mb_id_check();'"; } ?>>
|
||||
<input type="text" id="reg_mb_id" name="mb_id" value="<?=$member['mb_id']?>" maxlength="20" <? if ($w=='u') { echo "readonly style='background-color:#dddddd;'"; } ?> <? if ($w=='') { echo 'required="required"'; } ?> title="회원아이디">
|
||||
<span id="msg_mb_id"></span>
|
||||
<span>영문자, 숫자, _ 만 입력 가능. 최소 3자이상 입력하세요.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_password">패스워드</label></th>
|
||||
<td><input type="password" id="reg_mb_password" name="mb_password" maxlength="20" <?=($w=="")?"required":"";?>></td>
|
||||
<td><input type="password" id="reg_mb_password" name="mb_password" maxlength="20" <?=($w=='')?'required="required"':'';?> title="패스워드"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_password_re">패스워드 확인</label></th>
|
||||
<td><input type="password" id="reg_mb_password_re" name="mb_password_re" maxlength="20" <?=($w=="")?"required":"";?>></td>
|
||||
<td><input type="password" id="reg_mb_password_re" name="mb_password_re" maxlength="20" <?=($w=='')?'required="required"':'';?> title="패스워드 확인"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -46,16 +46,16 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_name">이름</label></th>
|
||||
<td>
|
||||
<input id="reg_mb_name" name="mb_name" value="<?=$member['mb_name']?>" <?=$member['mb_name']?"readonly2":"";?>>
|
||||
<input id="reg_mb_name" name="mb_name" value="<?=$member['mb_name']?>" <?=$member['mb_name']?"readonly2":"";?><?echo($w==''?'required="required"':'');?> title="이름">
|
||||
<? if ($w=='') { echo "(공백없이 한글만 입력 가능)"; } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<? if (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400))) { // 별명수정일이 지났다면 수정가능 ?>
|
||||
<? if ($req_nick) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_nick">별명</label></th>
|
||||
<td>
|
||||
<input type="hidden" name="mb_nick_default" value="<?=$member['mb_nick']?>">
|
||||
<input type="text" id="reg_mb_nick" name="mb_nick" maxlength="20" value="<?=$member['mb_nick']?>" onblur="reg_mb_nick_check();">
|
||||
<input type="hidden" name="mb_nick_default" value="<?=isset($member['mb_nick'])?$member['mb_nick']:'';?>">
|
||||
<input type="text" id="reg_mb_nick" name="mb_nick" maxlength="20" value="<?=isset($member['mb_nick'])?$member['mb_nick']:'';?>"<?echo($w==''?'required="required"':'');?> title="별명">
|
||||
<span id="msg_mb_nick"></span>
|
||||
<br>공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)
|
||||
<br>별명을 바꾸시면 앞으로 <?=(int)$config['cf_nick_modify']?>일 이내에는 변경 할 수 없습니다.
|
||||
@ -67,7 +67,7 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
<th scope="row"><label for="reg_mb_email">E-mail</label></th>
|
||||
<td>
|
||||
<input type="hidden" name="old_email" value="<?=$member['mb_email']?>">
|
||||
<input type="text" id="reg_mb_email" name="mb_email" maxlength="100" value='<?=isset($member['mb_email'])?$member['mb_email']:'';?>' onblur="reg_mb_email_check()">
|
||||
<input type="text" id="reg_mb_email" name="mb_email" maxlength="100" value='<?=isset($member['mb_email'])?$member['mb_email']:'';?>'>
|
||||
<span id="msg_mb_email"></span>
|
||||
<? if ($config['cf_use_email_certify']) { ?>
|
||||
<? if ($w=='') { echo "<br>e-mail 로 발송된 내용을 확인한 후 인증하셔야 회원가입이 완료됩니다."; } ?>
|
||||
@ -76,27 +76,6 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if ($w=="") { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_birth">생년월일</label></th>
|
||||
<td><input type="text" id="reg_mb_birth" name="mb_birth" maxlength="8" required value="<?=isset($member['mb_birth'])?$member['mb_birth']:'';?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if (!isset($member['mb_sex'])) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_sex">성별</label></th>
|
||||
<td>
|
||||
<select id="reg_mb_sex" name="mb_sex" required="required">
|
||||
<option value="">선택하세요</option>
|
||||
<option value="F">여자</option>
|
||||
<option value="M">남자</option>
|
||||
</select>
|
||||
<script>//document.getElementById('mb_sex').value='<?=$member[mb_sex]?>';</script>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($config['cf_use_homepage']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_homepage">홈페이지</label></th>
|
||||
@ -186,7 +165,7 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
<th scope="row">정보공개</th>
|
||||
<td>
|
||||
<input type="hidden" name="mb_open" value="<?=$member['mb_open']?>">
|
||||
정보공개는 수정후 <?=(int)$config['cf_open_modify']?>일 이내, <?=date("Y년 m월 j일", isset($member['mb_open_date']) ? strtotime("{$member['mb_open_date']} 00:00:00")+$config['cf_open_modify']*86400:0);?> 까지는 변경이 안됩니다.<br>
|
||||
정보공개는 수정후 <?=(int)$config['cf_open_modify']?>일 이내, <?=date("Y년 m월 j일", isset($member['mb_open_date']) ? strtotime("{$member['mb_open_date']} 00:00:00")+$config['cf_open_modify']*86400:$g4['server_time']+$config['cf_open_modify']*86400);?> 까지는 변경이 안됩니다.<br>
|
||||
이렇게 하는 이유는 잦은 정보공개 수정으로 인하여 쪽지를 보낸 후 받지 않는 경우를 막기 위해서 입니다.
|
||||
</td>
|
||||
</tr>
|
||||
@ -200,12 +179,7 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
<? } ?>
|
||||
</table>
|
||||
|
||||
<fieldset>
|
||||
<legend>자동등록방지</legend>
|
||||
<img id="kcaptcha_image">
|
||||
<input type="text" id="wr_key" name="wr_key" required>
|
||||
왼쪽의 글자를 입력하세요.
|
||||
</fieldset>
|
||||
<?=get_captcha('wr_key', 1);?>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="회원가입" accesskey="s">
|
||||
@ -214,17 +188,35 @@ var member_skin_path = "<?=$member_skin_path?>";
|
||||
|
||||
<script src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
$("#reg_mb_id").blur(function(){
|
||||
var msg = reg_mb_id_check();
|
||||
//$("#msg_mb_id").html(msg).css('color', 'red');
|
||||
if (msg) alert(msg);
|
||||
});
|
||||
|
||||
$("#reg_mb_nick").blur(function(){
|
||||
var msg = reg_mb_nick_check();
|
||||
//$("#msg_mb_nick").html(msg).css('color', 'red');
|
||||
if (msg) alert(msg);
|
||||
});
|
||||
|
||||
$("#reg_mb_email").blur(function(){
|
||||
var msg = reg_mb_email_check();
|
||||
if (msg) alert(msg);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// submit 최종 폼체크
|
||||
function fregisterform_submit(f)
|
||||
{
|
||||
// 회원아이디 검사
|
||||
if (f.w.value == "") {
|
||||
|
||||
reg_mb_id_check();
|
||||
|
||||
if (document.getElementById('mb_id_enabled').value!='000') {
|
||||
alert('회원아이디를 입력하지 않았거나 입력에 오류가 있습니다.');
|
||||
document.getElementById('reg_mb_id').select();
|
||||
var msg = reg_mb_id_check();
|
||||
if (msg) {
|
||||
alert(msg);
|
||||
f.mb_id.select();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -251,20 +243,6 @@ function fregisterform_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (f.mb_password_q.value.length < 1) {
|
||||
alert('패스워드 분실시 질문을 선택하거나 입력하십시오.');
|
||||
f.mb_password_q.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f.mb_password_a.value.length < 1) {
|
||||
alert('패스워드 분실시 답변을 입력하십시오.');
|
||||
f.mb_password_a.focus();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
// 이름 검사
|
||||
if (f.w.value=='') {
|
||||
if (f.mb_name.value.length < 1) {
|
||||
@ -276,66 +254,27 @@ function fregisterform_submit(f)
|
||||
var pattern = /([^가-힣\x20])/i;
|
||||
if (pattern.test(f.mb_name.value)) {
|
||||
alert('이름은 한글로 입력하십시오.');
|
||||
f.mb_name.focus();
|
||||
f.mb_name.select();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 별명 검사
|
||||
if ((f.w.value == "") ||
|
||||
(f.w.value == "u" && f.mb_nick.defaultValue != f.mb_nick.value)) {
|
||||
|
||||
reg_mb_nick_check();
|
||||
|
||||
if (document.getElementById('mb_nick_enabled').value!='000') {
|
||||
alert('별명을 입력하지 않았거나 입력에 오류가 있습니다.');
|
||||
document.getElementById('reg_mb_nick').select();
|
||||
if ((f.w.value == "") || (f.w.value == "u" && f.mb_nick.defaultValue != f.mb_nick.value)) {
|
||||
var msg = reg_mb_nick_check();
|
||||
if (msg) {
|
||||
alert(msg);
|
||||
f.reg_mb_nick.select();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// E-mail 검사
|
||||
if ((f.w.value == "") ||
|
||||
(f.w.value == "u" && f.mb_email.defaultValue != f.mb_email.value)) {
|
||||
|
||||
reg_mb_email_check();
|
||||
|
||||
if (document.getElementById('mb_email_enabled').value!='000') {
|
||||
alert('E-mail을 입력하지 않았거나 입력에 오류가 있습니다.');
|
||||
document.getElementById('reg_mb_email').select();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 사용할 수 없는 E-mail 도메인
|
||||
var domain = prohibit_email_check(f.mb_email.value);
|
||||
if (domain) {
|
||||
alert("'"+domain+"'은(는) 사용하실 수 없는 메일입니다.");
|
||||
document.getElementById('reg_mb_email').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.mb_birth) != 'undefined') {
|
||||
if (f.mb_birth.value.length < 1) {
|
||||
alert('달력 버튼을 클릭하여 생일을 입력하여 주십시오.');
|
||||
//f.mb_birth.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var todays = <?=date("Ymd", $g4['server_time']);?>;
|
||||
// 오늘날짜에서 생일을 빼고 거기서 140000 을 뺀다.
|
||||
// 결과가 0 이상의 양수이면 만 14세가 지난것임
|
||||
var n = todays - parseInt(f.mb_birth.value) - 140000;
|
||||
if (n < 0) {
|
||||
alert("만 14세가 지나지 않은 어린이는 정보통신망 이용촉진 및 정보보호 등에 관한 법률\n\n제 31조 1항의 규정에 의하여 법정대리인의 동의를 얻어야 하므로\n\n법정대리인의 이름과 연락처를 '자기소개'란에 별도로 입력하시기 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.mb_sex) != 'undefined') {
|
||||
if (f.mb_sex.value == '') {
|
||||
alert('성별을 선택하여 주십시오.');
|
||||
f.mb_sex.focus();
|
||||
if ((f.w.value == "") || (f.w.value == "u" && f.mb_email.defaultValue != f.mb_email.value)) {
|
||||
var msg = reg_mb_email_check();
|
||||
if (msg) {
|
||||
alert(mdg);
|
||||
f.reg_mb_email.select();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -358,37 +297,13 @@ function fregisterform_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
if (!check_kcaptcha(f.wr_key)) {
|
||||
if (!check_captcha(f.wr_key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
<?
|
||||
if ($g4[https_url])
|
||||
echo "f.action = '$g4[https_url]/$g4[bbs]/register_form_update.php';";
|
||||
else
|
||||
echo "f.action = './register_form_update.php';";
|
||||
?>
|
||||
|
||||
// 보안인증관련 코드로 반드시 포함되어야 합니다.
|
||||
set_cookie("<?=md5($token)?>", "<?=base64_encode($token)?>", 1, "<?=$g4['cookie_domain']?>");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 금지 메일 도메인 검사
|
||||
function prohibit_email_check(email)
|
||||
{
|
||||
email = email.toLowerCase();
|
||||
|
||||
var prohibit_email = "<?=trim(strtolower(preg_replace("/(\r\n|\r|\n)/", ",", $config[cf_prohibit_email])));?>";
|
||||
var s = prohibit_email.split(",");
|
||||
var tmp = email.split("@");
|
||||
var domain = tmp[tmp.length - 1]; // 메일 도메인만 얻는다
|
||||
|
||||
for (i=0; i<s.length; i++) {
|
||||
if (s[i] == domain)
|
||||
return domain;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user