diff --git a/adm/config_form.php b/adm/config_form.php index 11b3e003a..a80076f25 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -10,15 +10,19 @@ if ($is_admin != 'super') alert('최고관리자만 접근 가능합니다.'); // 쪽지보낼시 차감 포인트 필드 추가 : 061218 -sql_query(" ALTER TABLE '{$g4['config_table']}' ADD 'cf_memo_send_point' INT NOT NULL AFTER 'cf_login_point' ", FALSE); +sql_query(" ALTER TABLE {$g4['config_table']} ADD cf_memo_send_point INT NOT NULL AFTER cf_login_point ", FALSE); // 개인정보보호정책 필드 추가 : 061121 -$sql = " ALTER TABLE '{$g4['config_table']}' ADD 'cf_privacy' TEXT NOT NULL AFTER 'cf_stipulation' "; +$sql = " ALTER TABLE {$g4['config_table']} ADD cf_privacy TEXT NOT NULL AFTER cf_stipulation "; sql_query($sql, FALSE); if (!trim($config['cf_privacy'])) { $config['cf_privacy'] = '해당 홈페이지에 맞는 개인정보취급방침을 입력합니다.'; } +if (!isset($config['cf_email_admin'])) { + sql_query(" ALTER TABLE {$g4['config_table']} ADD cf_email_admin VARCHAR(255) NOT NULL DEFAULT '' AFTER cf_email_use ", FALSE); +} + $g4['title'] = '환경설정'; include_once ('./admin.head.php'); ?> @@ -394,6 +398,13 @@ include_once ('./admin.head.php'); > 회원만 사용 + + + + + + + diff --git a/adm/config_form_update.php b/adm/config_form_update.php index f9e7fdd15..da927fb14 100644 --- a/adm/config_form_update.php +++ b/adm/config_form_update.php @@ -66,6 +66,7 @@ $sql = " update {$g4['config_table']} cf_leave_day = '{$_POST['cf_leave_day']}', cf_search_part = '{$_POST['cf_search_part']}', cf_email_use = '{$_POST['cf_email_use']}', + cf_email_admin = '{$_POST['cf_email_admin']}', cf_email_wr_super_admin = '{$_POST['cf_email_wr_super_admin']}', cf_email_wr_group_admin = '{$_POST['cf_email_wr_group_admin']}', cf_email_wr_board_admin = '{$_POST['cf_email_wr_board_admin']}', diff --git a/adm/sendmail_test.php b/adm/sendmail_test.php index f39c328ad..a13b280fd 100644 --- a/adm/sendmail_test.php +++ b/adm/sendmail_test.php @@ -12,7 +12,7 @@ include_once($g4['path'].'/lib/mailer.lib.php'); $g4['title'] = '메일 테스트'; include_once('./admin.head.php'); -if ($mail) { +if (isset($_POST['mail'])) { check_token(); $from_name = '메일검사'; diff --git a/bbs/register_form.php b/bbs/register_form.php index 57b5eeb53..5e996d4c3 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -1,6 +1,7 @@ lib) include_once($captcha->lib); // 불법접근을 막도록 토큰생성 $token = md5(uniqid(rand(), true)); @@ -112,6 +113,11 @@ else $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))); +$required = ""; +$readonly = ""; +if ($w == '') $required = "required"; +else if ($w == 'u') $readonly = "readonly"; + include_once($member_skin_path.'/register_form.skin.php'); include_once('./_tail.php'); ?> \ No newline at end of file diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index 33c2d11d5..055848806 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -1,5 +1,6 @@ date("Y-m-d", $g4[server_time] - ($config[cf_nick_modify] * 86400))) - $mb_nick = $member[mb_nick]; + if ($member['mb_nick_date'] > date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400))) + $mb_nick = $member['mb_nick']; // 회원정보의 메일을 이전 메일로 옮기고 아래에서 비교함 - $old_email = $member[mb_email]; - - $sql = " select count(*) as cnt from {$g4[member_table]} where mb_nick = '{$mb_nick}' and mb_id <> '{$mb_id}' "; - $row = sql_fetch($sql); - if ($row[cnt]) - alert(''.$mb_nick.' 은(는) 이미 다른분이 사용중인 별명이므로 사용이 불가합니다.'); - - $sql = " select count(*) as cnt from {$g4[member_table]} where mb_email = '{$mb_email}' and mb_id <> '{$mb_id}' "; - $row = sql_fetch($sql); - if ($row[cnt]) - alert(''.$mb_email.' 은(는) 이미 다른분이 사용중인 E-mail이므로 사용이 불가합니다.'); + $old_email = $member['mb_email']; } + + if ($msg = exist_mb_nick($mb_nick, $mb_id)) alert($msg); + if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg); } $mb_dir = $g4['path'].'/data/member/'.substr($mb_id,0,2); // 아이콘 삭제 -if ($del_mb_icon) +if (isset($_POST['del_mb_icon'])) { @unlink($mb_dir.'/'.$mb_id.'.gif'); +} $msg = ""; // 아이콘 업로드 $mb_icon = ''; -if (is_uploaded_file($_FILES[mb_icon][tmp_name])) -{ - if (preg_match("/(\.gif)$/i", $_FILES[mb_icon][name])) - { +if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) { + if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) { // 아이콘 용량이 설정값보다 이하만 업로드 가능 - if ($_FILES[mb_icon][size] <= $config[cf_member_icon_size]) - { + if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) { @mkdir($mb_dir, 0707); @chmod($mb_dir, 0707); $dest_path = $mb_dir.'/'.$mb_id.'.gif'; - move_uploaded_file($_FILES[mb_icon][tmp_name], $dest_path); + move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path); chmod($dest_path, 0606); - if (file_exists($dest_path)) - { + if (file_exists($dest_path)) { //=================================================================\ // 090714 // gif 파일에 악성코드를 심어 업로드 하는 경우를 방지 @@ -128,14 +115,15 @@ if (is_uploaded_file($_FILES[mb_icon][tmp_name])) @unlink($dest_path); else // 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제 - if ($size[0] > $config[cf_member_icon_width] || $size[1] > $config[cf_member_icon_height]) + if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) @unlink($dest_path); //=================================================================\ } } + + } else { + $msg .= $_FILES['mb_icon']['name'].'은(는) gif 파일이 아닙니다.'; } - else - $msg .= $_FILES[mb_icon][name].'은(는) gif 파일이 아닙니다.'; } @@ -143,23 +131,16 @@ if (is_uploaded_file($_FILES[mb_icon][tmp_name])) $admin = get_admin('super'); -if ($w == '') -{ - $mb = get_member($mb_id); - if ($mb[mb_id]) - alert('이미 가입한 아이디입니다.'); +if ($w == '') { - $sql = " insert into {$g4[member_table]} + $sql = " insert into {$g4['member_table']} set mb_id = '{$mb_id}', mb_password = '".sql_password($mb_password)."', mb_name = '{$mb_name}', - mb_jumin = '{$mb_jumin}', mb_sex = '{$mb_sex}', mb_birth = '{$mb_birth}', mb_nick = '{$mb_nick}', - mb_nick_date = '{$g4[time_ymd]}', - mb_password_q = '{$mb_password_q}', - mb_password_a = '{$mb_password_a}', + mb_nick_date = '{$g4['time_ymd']}', mb_email = '{$mb_email}', mb_homepage = '{$mb_homepage}', mb_tel = '{$mb_tel}', @@ -170,16 +151,16 @@ if ($w == '') mb_addr2 = '{$mb_addr2}', mb_signature = '{$mb_signature}', mb_profile = '{$mb_profile}', - mb_today_login = '{$g4[time_ymdhis]}', - mb_datetime = '{$g4[time_ymdhis]}', - mb_ip = '{$_SERVER[REMOTE_ADDR]}', - mb_level = '{$config[cf_register_level]}', + mb_today_login = '{$g4['time_ymdhis']}', + mb_datetime = '{$g4['time_ymdhis']}', + mb_ip = '{$_SERVER['REMOTE_ADDR']}', + mb_level = '{$config['cf_register_level']}', mb_recommend = '{$mb_recommend}', - mb_login_ip = '{$_SERVER[REMOTE_ADDR]}', + mb_login_ip = '{$_SERVER['REMOTE_ADDR']}', mb_mailling = '{$mb_mailling}', mb_sms = '{$mb_sms}', mb_open = '{$mb_open}', - mb_open_date = '{$g4[time_ymd]}', + mb_open_date = '{$g4['time_ymd']}', mb_1 = '{$mb_1}', mb_2 = '{$mb_2}', mb_3 = '{$mb_3}', @@ -191,36 +172,34 @@ if ($w == '') mb_9 = '{$mb_9}', mb_10 = '{$mb_10}' "; // 이메일 인증을 사용하지 않는다면 이메일 인증시간을 바로 넣는다 - if (!$config[cf_use_email_certify]) + if (!$config['cf_use_email_certify']) $sql .= " , mb_email_certify = '{$g4[time_ymdhis]}' "; sql_query($sql); // 회원가입 포인트 부여 - insert_point($mb_id, $config[cf_register_point], '회원가입 축하', '{@member}', $mb_id, '회원가입'); + insert_point($mb_id, $config['cf_register_point'], '회원가입 축하', '{@member}', $mb_id, '회원가입'); // 추천인에게 포인트 부여 - if ($config[cf_use_recommend] && $mb_recommend) - insert_point($mb_recommend, $config[cf_recommend_point], '{$mb_id}의 추천인', '{@member}', $mb_recommend, '{$mb_id} 추천'); + if ($config['cf_use_recommend'] && $mb_recommend) + insert_point($mb_recommend, $config['cf_recommend_point'], '{$mb_id}의 추천인', '{@member}', $mb_recommend, '{$mb_id} 추천'); // 회원님께 메일 발송 - if ($config[cf_email_mb_member]) - { + if ($config['cf_email_mb_member']) { $subject = '회원가입을 축하드립니다.'; - $mb_md5 = md5($mb_id.$mb_email.$g4[time_ymdhis]); - $certify_href = $g4[url].'/'.$g4[bbs].'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5; + $mb_md5 = md5($mb_id.$mb_email.$g4['time_ymdhis']); + $certify_href = $g4['url'].'/'.$g4['bbs'].'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5; ob_start(); include_once ('./register_form_update_mail1.php'); $content = ob_get_contents(); ob_end_clean(); - mailer($admin[mb_nick], $admin[mb_email], $mb_email, $subject, $content, 1); + mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1); } // 최고관리자님께 메일 발송 - if ($config[cf_email_mb_super_admin]) - { + if ($config['cf_email_mb_super_admin']) { $subject = $mb_nick .' 님께서 회원으로 가입하셨습니다.'; ob_start(); @@ -228,22 +207,22 @@ if ($w == '') $content = ob_get_contents(); ob_end_clean(); - mailer($mb_nick, $mb_email, $admin[mb_email], $subject, $content, 1); + mailer($mb_nick, $mb_email, $admin['mb_email'], $subject, $content, 1); } // 메일인증 사용하지 않는 경우에만 로그인 - if (!$config[cf_use_email_certify]) + if (!$config['cf_use_email_certify']) set_session('ss_mb_id', $mb_id); set_session('ss_mb_reg', $mb_id); -} -else if ($w == 'u') -{ - if (!trim($_SESSION["ss_mb_id"])) + +} else if ($w == 'u') { + + if (!trim($_SESSION['ss_mb_id'])) alert('로그인 되어 있지 않습니다.'); - if ($_SESSION["ss_mb_id"] != $_POST[mb_id]) - alert('로그인된 정보와 수정하려는 정보가 틀리므로 수정할 수 없습니다.'.PHP_EOL.PHP_EOL.'만약 올바르지 않은 방법을 사용하신다면 바로 중지하여 주십시오.'); + if ($_SESSION['ss_mb_id'] != $mb_id) + alert("로그인된 정보와 수정하려는 정보가 틀리므로 수정할 수 없습니다.\\n만약 올바르지 않은 방법을 사용하신다면 바로 중지하여 주십시오."); $sql_password = ""; if ($mb_password) @@ -267,60 +246,57 @@ else if ($w == 'u') // 이전 메일주소와 수정한 메일주소가 틀리다면 인증을 다시 해야하므로 값을 삭제 $sql_email_certify = ''; - if ($old_email != $mb_email && $config[cf_use_email_certify]) + if ($old_email != $mb_email && $config['cf_use_email_certify']) $sql_email_certify = " , mb_email_certify = '' "; // set mb_name = '$mb_name', 제거 - $sql = " update {$g4[member_table]} + $sql = " update {$g4['member_table']} set mb_nick = '{$mb_nick}', - mb_password_q = '{$mb_password_q}', - mb_password_a = '{$mb_password_a}', - mb_mailling = '{$mb_mailling}', - mb_sms = '{$mb_sms}', - mb_open = '{$mb_open}', - mb_email = '{$mb_email}', - mb_homepage = '{$mb_homepage}', - mb_tel = '{$mb_tel}', - mb_hp = '{$mb_hp}', - mb_zip1 = '{$mb_zip1}', - mb_zip2 = '{$mb_zip2}', - mb_addr1 = '{$mb_addr1}', - mb_addr2 = '{$mb_addr2}', - mb_signature = '{$mb_signature}', - mb_profile = '{$mb_profile}', - mb_1 = '{$mb_1}', - mb_2 = '{$mb_2}', - mb_3 = '{$mb_3}', - mb_4 = '{$mb_4}', - mb_5 = '{$mb_5}', - mb_6 = '{$mb_6}', - mb_7 = '{$mb_7}', - mb_8 = '{$mb_8}', - mb_9 = '{$mb_9}', - mb_10 = '{$mb_10}' - {$sql_password} - {$sql_icon} - {$sql_nick_date} - {$sql_open_date} - {$sql_sex} - {$sql_email_certify} - where mb_id = '{$_POST[mb_id]}' "; + mb_mailling = '{$mb_mailling}', + mb_sms = '{$mb_sms}', + mb_open = '{$mb_open}', + mb_email = '{$mb_email}', + mb_homepage = '{$mb_homepage}', + mb_tel = '{$mb_tel}', + mb_hp = '{$mb_hp}', + mb_zip1 = '{$mb_zip1}', + mb_zip2 = '{$mb_zip2}', + mb_addr1 = '{$mb_addr1}', + mb_addr2 = '{$mb_addr2}', + mb_signature = '{$mb_signature}', + mb_profile = '{$mb_profile}', + mb_1 = '{$mb_1}', + mb_2 = '{$mb_2}', + mb_3 = '{$mb_3}', + mb_4 = '{$mb_4}', + mb_5 = '{$mb_5}', + mb_6 = '{$mb_6}', + mb_7 = '{$mb_7}', + mb_8 = '{$mb_8}', + mb_9 = '{$mb_9}', + mb_10 = '{$mb_10}' + {$sql_password} + {$sql_icon} + {$sql_nick_date} + {$sql_open_date} + {$sql_sex} + {$sql_email_certify} + where mb_id = '$mb_id' "; sql_query($sql); // 인증메일 발송 - if ($old_email != $mb_email && $config[cf_use_email_certify]) - { + if ($old_email != $mb_email && $config['cf_use_email_certify']) { $subject = '인증확인 메일입니다.'; - $mb_md5 = md5($mb_id.$mb_email.$member[mb_datetime]); - $certify_href = $g4[url].'/'.$g4[bbs].'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5; + $mb_md5 = md5($mb_id.$mb_email.$member['mb_datetime']); + $certify_href = $g4['url'].'/'.$g4['bbs'].'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5; ob_start(); include_once ('./register_form_update_mail3.php'); $content = ob_get_contents(); ob_end_clean(); - mailer($admin[mb_nick], $admin[mb_email], $mb_email, $subject, $content, 1); + mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1); } } @@ -332,23 +308,15 @@ else if ($w == 'u') if ($msg) echo ''; -/* -// 결과페이지는 https 에서 http 로 변경이 되어야 함 -if ($g4[https_url]) - $https_url = $g4[https_url].'/'.$g4[bbs]; -else - $https_url = '.'; -*/ - -$https_url = $g4[url].'/'.$g4[bbs]; +$https_url = $g4['url'].'/'.$g4['bbs']; if ($w == "") { goto_url($https_url.'/register_result.php'); } else if ($w == 'u') { - $row = sql_fetch(" select mb_password from {$g4[member_table]} where mb_id = '{$member[mb_id]}' "); + $row = sql_fetch(" select mb_password from {$g4['member_table']} where mb_id = '{$member[mb_id]}' "); $tmp_password = $row['mb_password']; - if ($old_email != $mb_email && $config[cf_use_email_certify]) { + if ($old_email != $mb_email && $config['cf_use_email_certify']) { set_session("ss_mb_id", ""); alert('회원 정보가 수정 되었습니다.\n\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.', $g4['path']); } else { @@ -361,7 +329,7 @@ if ($w == "") { diff --git a/bbs/register_result.php b/bbs/register_result.php index 2265ecd84..3751f6cc0 100644 --- a/bbs/register_result.php +++ b/bbs/register_result.php @@ -1,12 +1,14 @@ $g4['path']."/plugin/captcha/captcha.lib.php", + 'js' => $g4['path']."/plugin/captcha/captcha.js" +); +?> \ No newline at end of file diff --git a/extend/tcaptcha.extend.php b/extend/tcaptcha.extend.php deleted file mode 100644 index 1c778f019..000000000 --- a/extend/tcaptcha.extend.php +++ /dev/null @@ -1,8 +0,0 @@ - $g4['path']."/plugin/tcaptcha/tcaptcha.lib.php", - 'js' => $g4['path']."/plugin/tcaptcha/tcaptcha.js" -); -?> \ No newline at end of file diff --git a/head.php b/head.php index f1a230bbf..fbfcaa6ea 100644 --- a/head.php +++ b/head.php @@ -77,4 +77,4 @@ include_once($g4['path'].'/lib/popular.lib.php');
-

\ No newline at end of file +

\ No newline at end of file diff --git a/head.sub.php b/head.sub.php index cda00e67c..e33ea5aae 100644 --- a/head.sub.php +++ b/head.sub.php @@ -29,7 +29,7 @@ if (strstr($lo_url, "/$g4[admin]/") || $is_admin == 'super') $lo_url = ''; // 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면 // 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음 -header("Content-Type: text/html; charset=$g4[charset]"); +header("Content-Type: text/html; charset={$g4['charset']}"); $gmnow = gmdate("D, d M Y H:i:s") . " GMT"; header("Expires: 0"); // rfc2616 - Section 14.21 header("Last-Modified: " . $gmnow); @@ -73,7 +73,9 @@ var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1; + $value) { diff --git a/img/wrapper_bg.jpg b/img/wrapper_bg.jpg new file mode 100644 index 000000000..3208f357b Binary files /dev/null and b/img/wrapper_bg.jpg differ diff --git a/js/wrest.js b/js/wrest.js index c33c2ec0f..32e38169f 100644 --- a/js/wrest.js +++ b/js/wrest.js @@ -13,9 +13,7 @@ function wrestItemname(fld) function wrestTrim(fld) { var pattern = /(^\s+)|(\s+$)/g; // \s 공백 문자 - //(/^\s+|\s+$/g,""); - var str = fld.value.replace(pattern, ""); - return str; + return fld.value.replace(pattern, ""); } // 필수 입력 검사 @@ -60,7 +58,7 @@ function wrestEmail(fld) } } -// 한글인지 검사 (자음, 모음만 있는 한글은 불가) +// 한글인지 검사 (자음, 모음 조합된 한글만 가능) function wrestHangul(fld) { if (!wrestTrim(fld)) return; @@ -69,7 +67,7 @@ function wrestHangul(fld) if (pattern.test(fld.value)) { if (wrestFld == null) { - wrestMsg = wrestItemname(fld) + ' : 한글이 아닙니다. (자음, 모음만 있는 한글은 처리하지 않습니다.)\n'; + wrestMsg = wrestItemname(fld) + ' : 한글이 아닙니다. (자음, 모음 조합된 한글만 가능)\n'; wrestFld = fld; } } @@ -186,7 +184,7 @@ function wrestMinLength(fld, css) { if (!wrestTrim(fld)) return; - var str = css.split('='); // minlength=?? <-- str[1] + var str = css.split('_'); // minlength_?? <-- str[1] if (wrestFld == null) { if (fld.value.length < parseInt(str[1])) { @@ -283,8 +281,8 @@ function wrestSubmit() case "telnum" : wrestTelNum(el); break; // 김선용 2006.3 - 전화번호 형식 검사 case "imgext" : wrestImgExt(el); break; default : - // css 가 minlength= 로 시작한다면 = 뒤의 숫자는 최소길이값 - if (/^minlength\=/.test(css)) { + // css 가 minlength_ 로 시작한다면 _ 뒤의 숫자는 최소길이값 + if (/^minlength\_/.test(css)) { wrestMinLength(el, css); break; } else if (/^extension\=/.test(css)) { wrestExtension(el, css); break; diff --git a/lib/common.lib.php b/lib/common.lib.php index a6e5e65d5..3551bfc7c 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -377,7 +377,7 @@ function get_list($write_row, $board, $skin_path, $subject_len=40) $list['file'] = get_file($board['bo_table'], $list['wr_id']); if ($list['file']['count']) - $list['icon_file'] = '관련링크'; + $list['icon_file'] = '첨부파일'; return $list; } @@ -911,7 +911,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='') //$height = $size['1']; $width = $config['cf_member_icon_width']; $height = $config['cf_member_icon_height']; - $tmp_name = '첨부파일'; + $tmp_name = ''; if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름 $tmp_name = $tmp_name . ' '.$name.''; @@ -1562,69 +1562,9 @@ function convert_charset($from_charset, $to_charset, $str) } -// 회원가입시 회원아이디 오류 검사 -function check_mb_id($reg_mb_id, $length=3) +// mysql_real_escape_string 의 alias 기능을 한다. +function escape_trim($field) { - 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 ""; + return mysql_real_escape_string(htmlentities(trim($field))); } ?> \ No newline at end of file diff --git a/lib/mailer.lib.php b/lib/mailer.lib.php index 2e268dd12..d7229fbb1 100644 --- a/lib/mailer.lib.php +++ b/lib/mailer.lib.php @@ -9,7 +9,7 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file='', $cc= global $g4; // 메일발송 사용을 하지 않는다면 - if (!$config[cf_email_use]) return; + if (!$config['cf_email_use']) return; $fname = "=?$g4[charset]?B?" . base64_encode($fname) . "?="; $subject = "=?$g4[charset]?B?" . base64_encode($subject) . "?="; diff --git a/lib/register.lib.php b/lib/register.lib.php new file mode 100644 index 000000000..c4795fbef --- /dev/null +++ b/lib/register.lib.php @@ -0,0 +1,200 @@ + '$reg_mb_id' "); + if ($row['cnt']) + return "이미 존재하는 별명입니다."; + else + return ""; +} + +function reserve_mb_nick($reg_mb_nick) +{ + global $config; + if (preg_match("/[\,]?{$reg_mb_nick}/i", $config['cf_prohibit_id'])) + return "이미 예약된 단어로 사용할 수 없는 별명 입니다."; + else + return ""; +} + +function empty_mb_email($reg_mb_email) +{ + if (!trim($reg_mb_email)) + return "E-mail 주소를 입력해 주십시오."; + else + return ""; +} + +function valid_mb_email($reg_mb_email) +{ + if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $reg_mb_email)) + return "E-mail 주소가 형식에 맞지 않습니다."; + else + return ""; +} + +function exist_mb_email($reg_mb_email, $reg_mb_id) +{ + global $g4; + $row = sql_fetch(" select count(*) as cnt from `{$g4['member_table']}` where mb_email = '$reg_mb_email' and mb_id <> '$reg_mb_id' "); + if ($row['cnt']) + return "이미 사용중인 E-mail 주소입니다."; + else + return ""; +} + +function empty_mb_name($reg_mb_name) +{ + if (!trim($reg_mb_name)) + return "이름을 입력해 주십시오."; + else + return ""; +} + +function valid_mb_name($mb_name) +{ + if (!check_string($mb_name, _G4_HANGUL_)) + return "이름은 공백없이 한글만 입력 가능합니다."; + else + return ""; +} + +return; +?> + + +// 회원가입시 회원아이디 오류 검사 +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, $reg_mb_id) +{ + 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' and mb_id <> '$reg_mb_id' "); + if ($row['cnt']) { + return "이미 존재하는 별명입니다."; + } + } + return ""; // 사용해도 좋은 별명 +} + + +function check_mb_email($reg_mb_email, $reg_mb_id) +{ + 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_email = '$reg_mb_email' and mb_id <> '$reg_mb_id' "); + if ($row['cnt']) { + return "이미 사용중인 E-mail 주소입니다."; + } + } + return ""; +} diff --git a/plugin/captcha/captcha.js b/plugin/captcha/captcha.js index 6289dfc7b..244995d5d 100644 --- a/plugin/captcha/captcha.js +++ b/plugin/captcha/captcha.js @@ -1,4 +1,4 @@ -function chk_captcha(input_key) +function check_captcha(input_key) { if (typeof(input_key) != "undefined") { var captcha_result = false; @@ -21,56 +21,14 @@ function chk_captcha(input_key) return true; } -function l_PlaySound(url, placeholderId) { - if (document.getElementById) { - var soundUrl = url; - var placeholder = document.getElementById(placeholderId); - - placeholder.innerHTML = ""; - - document.body.style.cursor = 'wait'; - var html5SoundPlayed = false; - var browserCompatibilityCheck = document.createElement('audio'); - if (!!(browserCompatibilityCheck.canPlayType) && - !!(browserCompatibilityCheck.canPlayType("audio/wav")) && - !l_DetectFirefox3()) { - sound = new Audio(soundUrl); - sound.id = 'LBD_CaptchaSoundAudio'; - sound.autoplay = true; - sound.controls = false; - sound.autobuffer = false; - sound.loop = false; - - placeholder.appendChild(sound); - html5SoundPlayed = true; - } - - if (!html5SoundPlayed) { - var objectSrc = ""; - - placeholder.innerHTML = objectSrc; - } - - document.body.style.cursor = 'default'; - } -} - -function l_DetectFirefox3() { - var detected = false; - if (navigator && navigator.userAgent) { - var matches = navigator.userAgent.match(/(Firefox)\/(3\.6\.[^;\+,\/\s]+)/); - if (matches) { - detected = true; - } - } - return detected; -} - $(function() { - $("#captcha").click(function() { + $("#captcha").click(function(e) { this.setAttribute("src", g4_path+"/plugin/captcha/run.php?t="+(new Date).getTime()); - //$("#captcha_key").focus();//이미지 새로고침 후 입력박스에 포커스 : 지운아빠 2012-07-13 - //캡챠 클릭 시에 포커스 줘야 하는데 페이지 새로 고침되면 포커스를 줘서 주석처리 : 지운아빠 2012-08-03 + var keycode = (e.keyCode ? e.keyCode : e.which); + // 첫 실행에서는 포커스를 주지 않음 + if (typeof(keycode) != "undefined") { + $("#captcha_key").focus();//이미지 새로고침 후 입력박스에 포커스 : 지운아빠 2012-07-13 + } }) .css("cursor", "pointer") .trigger("click"); diff --git a/plugin/captcha/captcha.lib.php b/plugin/captcha/captcha.lib.php index 487fc1354..27ea46418 100644 --- a/plugin/captcha/captcha.lib.php +++ b/plugin/captcha/captcha.lib.php @@ -80,10 +80,6 @@ class captcha // 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); @@ -149,16 +145,17 @@ function get_captcha($input_name, $captcha_no) set_session('ss_captcha_use', true); $captcha_class = str_pad($captcha_no,2,'0',STR_PAD_LEFT);// 캡챠 클래스를 선택할 수 있도록 지운아빠 2012-07-24 - $s = ""; - $s .= "
\n"; - $s .= "자동등록방지\n"; - $s .= "\"자동등록방지\n"; - $s .= "wav\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "

이미지의 숫자를 순서대로 입력하세요. 이미지를 클릭하시면 새로운 숫자가 나타납니다.

\n"; - $s .= "
\n"; - return $s; + $code = '
'; + $code .= '자동등록방지'; + //$code .= '자동등록방지 이미지'; + $code .= ''; + $code .= '새로고침'; + $code .= 'wav'; + $code .= ''; + $code .= ''; + $code .= '

이미지의 숫자를 순서대로 입력하세요. 새로고침을 클릭하시면 새로운 숫자가 나타납니다.

'; + $code .= '
'; + return $code; } diff --git a/plugin/tcaptcha/_common.php b/plugin/tcaptcha/_common.php deleted file mode 100644 index d82224eec..000000000 --- a/plugin/tcaptcha/_common.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/plugin/tcaptcha/chk_answer.ajax.php b/plugin/tcaptcha/chk_answer.ajax.php deleted file mode 100644 index a032cddb0..000000000 --- a/plugin/tcaptcha/chk_answer.ajax.php +++ /dev/null @@ -1,32 +0,0 @@ -= _ANSWER_COUNT_) { - die("{\"error\":\"입력하신 답변 횟수가 "._ANSWER_COUNT_."회를 넘었습니다.\n\n문제를 클릭하신후 다시 답변해 주십시오.\"}"); -} - -$user_answer = $_POST['user_answer']; -$is_answer = (get_session("ss_tcaptcha_answer") == $user_answer); -if ($is_answer == false) { - $tcaptcha_error_count++; - set_session("ss_tcaptcha_error_count", $tcaptcha_error_count); - // 토큰을 다시 생성 - $token = _token(); - set_session("ss_tcaptcha_token", $token); - die("{\"error\":\"입력하신 답이 틀렸습니다.\",\"token\":\"$token\"}"); -} - -die("{\"error\":\"\"}"); -?> \ No newline at end of file diff --git a/plugin/tcaptcha/run.php b/plugin/tcaptcha/run.php deleted file mode 100644 index 61517fc16..000000000 --- a/plugin/tcaptcha/run.php +++ /dev/null @@ -1,8 +0,0 @@ -run(); -die("{\"tcaptcha\":\"{$tcaptcha->question}\",\"token\":\"{$tcaptcha->token}\"}"); -?> \ No newline at end of file diff --git a/plugin/tcaptcha/sample.php b/plugin/tcaptcha/sample.php deleted file mode 100644 index 5541ca2ce..000000000 --- a/plugin/tcaptcha/sample.php +++ /dev/null @@ -1,33 +0,0 @@ - - - -

텍스트 캡챠 샘플 페이지

-
-
-
-
-

문)

-
- 답) 반드시 숫자로 입력하세요. - - -
- - - - - \ No newline at end of file diff --git a/plugin/tcaptcha/tcaptcha.js b/plugin/tcaptcha/tcaptcha.js deleted file mode 100644 index 8a0245d8b..000000000 --- a/plugin/tcaptcha/tcaptcha.js +++ /dev/null @@ -1,44 +0,0 @@ -function chk_tcaptcha(user_answer, user_token) -{ - if (typeof(user_answer) == "undefined") return false; - if (typeof(user_token ) == "undefined") return false; - - var error = false; - $.ajax({ - type: "POST", - url: g4_path+"/plugin/tcaptcha/chk_answer.ajax.php", - async: false, - data: { - "user_answer": user_answer.value, - "user_token" : user_token.value - }, - dataType: "json", - success: function(data, textStatus, jqXHR) { - error = data.error; - if (data.token) { - $("#user_token").val(data.token); - } - } - }); - - if (error) { - alert(error); - user_answer.select(); - return false; - } - return true; -} - -$(function() { - $("#tcaptcha").click(function() { - $.ajax({ - url: g4_path+"/plugin/tcaptcha/run.php?t="+(new Date).getTime(), - dataType: "json", - success: function(data, textStatus, jqXHR) { - $("#tcaptcha").html(data.tcaptcha); - $("#user_token").val(data.token); - } - }) - }) - .css("cursor", "pointer"); -}); \ No newline at end of file diff --git a/plugin/tcaptcha/tcaptcha.lib.php b/plugin/tcaptcha/tcaptcha.lib.php deleted file mode 100644 index db510ec5a..000000000 --- a/plugin/tcaptcha/tcaptcha.lib.php +++ /dev/null @@ -1,360 +0,0 @@ -kr = new stdClass; -$text_number->en = new stdClass; - -//$text_number->kr = (object)array('a'=>1); - -// 기수 cardinal (양을 나타낼때 사용하는 수) -$text_number->kr = (object)array( - 'number' => array( - array("영","일","이","삼","사","오","육","칠","팔","구","십"), - array("영","하나","둘","셋","넷","다섯","여섯","일곱","여덟","아홉","열") - ), - // 서수 ordinal (순서를 나타낼때 사용하는 수) - 'ordinal' => array("영","첫번째","두번째","세번째","네번째","다섯번째","여섯번째","일곱번째","여덟번째","아홉번째","열번째"), - 'high' => array("다음 중 가장 큰 수는? %s.", "%s 중에서 가장 큰 수는?"), - 'low' => array("다음 중 가장 작은 수는? %s.", "%s 중에서 가장 작은 수는?"), - 'position0' => array("다음 중 %s 숫자는? %s."), // 인수가 두개 있으며 첫번째에 위치가, 두번째 인수에 질문이 나열된다. - 'position1' => array("%s 중 %s 숫자는?"), // 인수가 두개 있으며 첫번째에 인수가 두반째에 위치에 대한 질문이 나열된다. - 'add' => array("%s 더하기 %s ?", "%s + %s = ?"), - 'subtract' => array("%s 빼기 %s ?", "%s - %s = ?"), - 'multiply' => array("%s 곱하기 %s ?"), - //'multiply' => array("%s 곱하기 %s ?", "%s 의 %s 배는 ?"), - 'and' => "그리고", -); -/* -// 서수 ordinal (순서를 나타낼때 사용하는 수) -$text_number->kr->ordinal = array("영","첫번째","두번째","세번째","네번째","다섯번째","여섯번째","일곱번째","여덟번째","아홉번째","열번째"); -$text_number->kr->plus = array("+","+","더하기"); -$text_number->kr->minus = array("-","-","빼기"); -$text_number->kr->multiply = array("x","×","*","곱하기"); -$text_number->kr->high = array("다음 중 가장 큰 수는? %s.", "%s 중에서 가장 큰 수는?"); -$text_number->kr->low = array("다음 중 가장 작은 수는? %s.", "%s 중에서 가장 작은 수는?"); -$text_number->kr->position0 =array("다음 중 %s 숫자는? %s."); // 인수가 두개 있으며 첫번째에 위치가, 두번째 인수에 질문이 나열된다. -$text_number->kr->position1 =array("%s 중 %s 숫자는?"); // 인수가 두개 있으며 첫번째에 인수가 두반째에 위치에 대한 질문이 나열된다. -$text_number->kr->add = array("%s 더하기 %s ?", "%s + %s = ?"); -$text_number->kr->subtract = array("%s 빼기 %s ?", "%s - %s = ?"); -$text_number->kr->and = "그리고"; -*/ - -$text_number->en = (object)array( - 'number' => array( - array("zero","one","two","three","four","five","six","seven","eight","nine","ten"), - array("zero","first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth") - ), - 'ordinal' => array("zero","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th"), - 'high' => array("%s : which of these is the largest?"), - 'low' => array("%s : which of these is the smallest?"), - 'position0' => array("lists %s postion number ? %s."), // 인수가 두개 있으며 첫번째에 위치가, 두번째 인수에 질문이 나열된다. - 'position1' => array("%s lists %s postion number ?"), // 인수가 두개 있으며 첫번째에 인수가 두반째에 위치에 대한 질문이 나열된다. - 'add' => array("%s add %s ?", "%s plus %s ?", "%s + %s = ?"), - 'subtract' => array("%s subtract %s ?", "%s minus %s ?", "%s - %s = ?"), - 'multiply' => array("%s multiply %s ?"), - 'and' => "and" -); - -class tcaptcha -{ - var $language; - var $tnum; // text number 의 약어 - var $min_count = 3; // 최소 문제 갯수 - var $max_count = 4; // 최대 문제 갯수 - var $select; // 결과값 배열 - var $arabia; // 결과값 아라비아 숫자 배열 - var $count; // 결과값 수 - var $high; // 결과값 배열 중 가장 큰 값 - var $low; // 결과값 배열 중 가장 작은 값 - var $position; // 몇번째 숫자는 값이 얼마인가? - var $question; // 문제 - var $answer; // 더하기, 빼기 시에 답 - - function tcaptcha($language='') { - if (trim($language) == '') - $language = 'kr'; - $this->set_language($language); - } - - function set_language($language) { - $this->language = $language; - } - - function set_min_count($min_count) { - $this->min_count = $min_count; - } - - function set_max_count($max_count) { - $this->max_count = $max_count; - } - - function random_question() { - $this->count = $count = rand($this->min_count, $this->max_count); // 숫자를 몇개 뿌려줄것인지? - $select = array(); // 선택된 값들 - $arabia = array(); // 선택된 값들의 아라비아 숫자 - $high = 0; - $low = 9999; - while ($count != count($select)) { - $choice = rand(0, count($this->tnum->number)-1); // 여러개의 숫자 형식중 하나를 선택한다. - $number = $this->tnum->number[$choice]; - $index = rand(1, count($number)-1); // 영은 빼고 - if (in_array($index, $arabia)) continue; - if (rand(0, 3) < 3) { // 아라비아 숫자도 들어가도록 한다. - array_push($select, $number[$index]); - } else { - array_push($select, $index); - } - array_push($arabia, $index); - if ($index > $high) { - $high = $index; - } - if ($index < $low) { - $low = $index; - } - } - - $this->select = $select; - $this->arabia = $arabia; - $this->high = $high; // 배열중 가장 큰 값 - $this->low = $low; // 배열중 가장 작은 값 - - return $select; - } - - // 숫자의 중간에 , 나 and 를 넣는다. - function comma_question($question) { - $str = ""; - $and = false; - $comma = ""; - for ($qi=0; $qi" . $question[$qi] . "" . $comma; - } - return $str . "" . $question[$qi] . ""; - } - - // 가장 큰수나 가장 작은수의 질문을 만든다. - function series_question($question, $highlow) { - $question = $this->comma_question($question); - $highlow_array = $this->tnum->$highlow; - return sprintf($highlow_array[rand(0, count($highlow_array)-1)], $question); - } - - // 몇번째 어떤수가 있는지의 질문을 만든다. - function position_question($question) { - $question = $this->comma_question($question); - $position = rand(0, $this->count-1); - $ordinal = $this->get_ordinal_value($position+1); - $this->position = $this->arabia[$position]; // 몇번째 숫자는?의 답 - // 포지션 배열에 따라 인수의 위치가 다르다. - if (rand(0,1) == 0) { - $position_array = $this->tnum->position0; - return sprintf($position_array[rand(0, count($position_array)-1)], $ordinal, $question); - } else { - $position_array = $this->tnum->position1; - return sprintf($position_array[rand(0, count($position_array)-1)], $question, $ordinal); - } - } - - // 더하기 계산 문제 - function add_question($question) { - $add_array = $this->tnum->add; - $rand = rand(0, count($add_array)-1); - $first_number = $this->arabia[0]; - $second_number = $this->arabia[1]; - $this->answer = $first_number + $second_number; - return sprintf($add_array[rand(0, count($add_array)-1)], $question[0], $question[1] ); - } - - // a, b 변수값을 바꾼다. - function swap(&$a, &$b) - { - $temp = $a; - $a = $b; - $b = $temp; - } - - // 빼기 계산 문제 - function subtract_question($question) { - $subtract_array = $this->tnum->subtract; - $rand = rand(0, count($subtract_array)-1); - $first_number = $this->arabia[0]; - $second_number = $this->arabia[1]; - if ($first_number < $second_number) { - $this->swap($first_number, $second_number); - $this->swap($question[0], $question[1]); - } - $this->answer = $first_number - $second_number; - return sprintf($subtract_array[$rand], $question[0], $question[1] ); - } - - // 곱하기 계산 문제 - function multiply_question($question) { - $multiply_array = $this->tnum->multiply; - $rand = rand(0, count($multiply_array)-1); - $first_number = $this->arabia[0]; - $second_number = $this->arabia[1]; - $this->answer = $first_number * $second_number; - return sprintf($multiply_array[$rand], $question[0], $question[1] ); - } - - // 서수값을 반환 - function get_ordinal_value($index) { - return $this->tnum->ordinal[$index]; - } - - // ajax 비교를 위한 코드 : 답을 저장해 놓는다. - function set_session($answer) { - $this->token = _token(); - set_session("ss_tcaptcha_token", $this->token); - set_session("ss_tcaptcha_answer", $answer); - set_session("ss_tcaptcha_error_count", 0); - } - - function run() { - global $text_number; - $this->tnum = $text_number->{$this->language}; - $random_question = $this->random_question(); - switch (rand(0,5)) { - case 0 : - $question = $this->series_question( $random_question, 'high' ); - $this->set_session($this->high); - break; - case 1 : - $question = $this->series_question( $random_question, 'low' ); - $this->set_session($this->low); - break; - case 2 : - $question = $this->add_question( $random_question ); - $this->set_session($this->answer); - break; - case 3 : - $question = $this->subtract_question( $random_question ); - $this->set_session($this->answer); - break; - case 4 : - $question = $this->multiply_question( $random_question ); - $this->set_session($this->answer); - break; - default : - $question = $this->position_question( $random_question ); - $this->set_session($this->position); - break; - } - $this->question = $question; - return $question; - } -} - - -function html_unicode($unicode) -{ - return "&#".$unicode.";"; -} - - -function utf8_to_unicode( $str ) -{ - $unicode = array(); - $values = array(); - $lookingFor = 1; - - for ($i = 0; $i < strlen( $str ); $i++ ) { - - $thisValue = ord( $str[ $i ] ); - - if ( $thisValue < 128 ) $unicode[] = $thisValue; - else { - - if ( count( $values ) == 0 ) $lookingFor = ( $thisValue < 224 ) ? 2 : 3; - - $values[] = $thisValue; - - if ( count( $values ) == $lookingFor ) { - - $number = ( $lookingFor == 3 ) ? - ( ( $values[0] % 16 ) * 4096 ) + ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ): - ( ( $values[0] % 32 ) * 64 ) + ( $values[1] % 64 ); - - $unicode[] = $number; - $values = array(); - $lookingFor = 1; - - } // if - - } // if - - } // for - - return $unicode; - -} - -function unicode_to_utf8($dec) -{ - $unicode_hex = dechex($dec); - $unicode = hexdec($unicode_hex); - - $utf8 = ""; - - if ($unicode < 128) { - $utf8 = chr($unicode); - } elseif ( $unicode < 2048 ) { - $utf8 .= chr( 192 + ( ( $unicode - ( $unicode % 64 ) ) / 64 ) ); - $utf8 .= chr( 128 + ( $unicode % 64 ) ); - } else { - $utf8 .= chr( 224 + ( ( $unicode - ( $unicode % 4096 ) ) / 4096 ) ); - $utf8 .= chr( 128 + ( ( ( $unicode % 4096 ) - ( $unicode % 64 ) ) / 64 ) ); - $utf8 .= chr( 128 + ( $unicode % 64 ) ); - } - return $utf8; -} - - -function chk_captcha() -{ - $token = get_session("ss_tcaptcha_token"); - if ($token && $token == $_POST['user_token']) { - $answer = get_session("ss_tcaptcha_answer"); - if ($answer && $answer == $_POST['user_answer']) { - return true; - } - } - set_session("ss_tcaptcha_token", ""); - return false; -} - - -function chk_js_captcha() -{ - return "if (!chk_tcaptcha(f.user_answer, f.user_token)) { return false; }\n"; - -} - - -function run_captcha($encoding='kr') -{ - $captcha = new tcaptcha($encoding); - - $str = "
\n"; - $str .= "자동등록방지\n"; - $str .= "
".$captcha->run()."
\n"; - $str .= "답은 반드시 숫자로 입력하세요.\n"; - $str .= "\n"; - $str .= "token}\" />"; - $str .= "
\n"; - return $str; -} -?> \ No newline at end of file diff --git a/skin/board/neo/list.skin.php b/skin/board/neo/list.skin.php index ba07d160d..a45b330c2 100644 --- a/skin/board/neo/list.skin.php +++ b/skin/board/neo/list.skin.php @@ -11,26 +11,26 @@ if ($is_nogood) $colspan++;

- + -
- -
+
+
+ 게시물 분류 및 검색 + + + - - + + -
- - -
- 게시물 검색 - Total 건 중 - - + + Total + - - + - -
- -
+ + - - - + + + + + +
@@ -65,7 +65,7 @@ if ($is_nogood) $colspan++; -
+
@@ -83,8 +83,8 @@ if ($is_nogood) $colspan++; - - - - - - - - + + + + + '; } ?> @@ -133,25 +133,25 @@ for ($i=0; $i -
- + - - + +
+

관련링크

+ +
+ - +

+ + + +

+ + + + + + + + + + +
+

+
@@ -20,34 +22,34 @@ var char_max = parseInt(); // 최대 -
목록
+> + + '.$list[$i]['ca_name'].''; - } + ?> + + - if ($list[$i]['is_notice']) - echo ''.$list[$i]['subject'].''; - else - echo ''.$list[$i]['subject'].''; + - if ($list[$i]['comment_cnt']) - echo ''.$list[$i]['comment_cnt'].''; + + + + '; } @@ -121,11 +121,11 @@ for ($i=0; $i
게시물이 없습니다.
+
- + - + - + - + @@ -57,27 +59,27 @@ $option_hidden = ''; if ($is_notice || $is_html || $is_secret || $is_mail) { $option = ''; if ($is_notice) { - $option .= PHP_EOL.''; + $option .= PHP_EOL.''.PHP_EOL.''; } if ($is_html) { if ($is_dhtml_editor) { $option_hidden .= ''; } else { - $option .= PHP_EOL.''; + $option .= PHP_EOL.''.PHP_EOL.''; } } if ($is_secret) { if ($is_admin || $is_secret==1) { - $option .= PHP_EOL.''; + $option .= PHP_EOL.''.PHP_EOL.''; } else { $option_hidden .= ''; } } if ($is_mail) { - $option .= PHP_EOL.''; + $option .= PHP_EOL.''.PHP_EOL.''; } } @@ -94,7 +96,7 @@ if ($option) { - + @@ -120,72 +122,45 @@ if ($option) { - + - + - - + + + + + + + + + + + + + diff --git a/skin/latest/neo/latest.skin.php b/skin/latest/neo/latest.skin.php index 0a2a37de4..74331f58e 100644 --- a/skin/latest/neo/latest.skin.php +++ b/skin/latest/neo/latest.skin.php @@ -2,7 +2,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> -
+
- 더보기 -
\ No newline at end of file + +

게시물이 없습니다.

+ +
더보기
+
diff --git a/skin/member/neo/ajax_mb_email_check.php b/skin/member/neo/ajax_mb_email_check.php index dc3c30c70..9d255f106 100644 --- a/skin/member/neo/ajax_mb_email_check.php +++ b/skin/member/neo/ajax_mb_email_check.php @@ -1,5 +1,11 @@ \ No newline at end of file diff --git a/skin/member/neo/ajax_mb_id_check.php b/skin/member/neo/ajax_mb_id_check.php index a62ed0816..8fa3f02f0 100644 --- a/skin/member/neo/ajax_mb_id_check.php +++ b/skin/member/neo/ajax_mb_id_check.php @@ -1,5 +1,12 @@ \ No newline at end of file diff --git a/skin/member/neo/ajax_mb_nick_check.php b/skin/member/neo/ajax_mb_nick_check.php index 9b7d0ae84..c47659321 100644 --- a/skin/member/neo/ajax_mb_nick_check.php +++ b/skin/member/neo/ajax_mb_nick_check.php @@ -1,5 +1,12 @@ \ No newline at end of file diff --git a/skin/member/neo/ajax_register_form.jquery.js b/skin/member/neo/ajax_register_form.jquery.js index 83ee0edc7..788260ccc 100644 --- a/skin/member/neo/ajax_register_form.jquery.js +++ b/skin/member/neo/ajax_register_form.jquery.js @@ -22,7 +22,8 @@ var reg_mb_nick_check = function() { 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()), + 'reg_mb_id': encodeURIComponent($('#reg_mb_id').val()) }, cache: false, async: false, @@ -40,8 +41,8 @@ var reg_mb_email_check = function() { type: 'POST', url: member_skin_path+'/ajax_mb_email_check.php', data: { - 'reg_mb_id': encodeURIComponent($('#reg_mb_id').val()), - 'reg_mb_email': $('#reg_mb_email').val() + 'reg_mb_email': $('#reg_mb_email').val(), + 'reg_mb_id': encodeURIComponent($('#reg_mb_id').val()) }, cache: false, async: false, diff --git a/skin/member/neo/formmail.skin.php b/skin/member/neo/formmail.skin.php index d976162c6..380dfbf04 100644 --- a/skin/member/neo/formmail.skin.php +++ b/skin/member/neo/formmail.skin.php @@ -1,72 +1,73 @@ -
-

님께 메일보내기

- - - - - - - - -
title="패스워드">>
- @@ -104,7 +106,7 @@ if ($option) {
">">
파일 #1 -
- + +
- 파일증가 - 파일감소 + 파일 #2 + + +
파일 #3 + + +
파일 #4 + + +
파일 #5 + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
메일쓰기
형식 - - - -
+
+

님께 메일보내기

-
- 자동등록방지 - - - 왼쪽의 글자를 입력하세요. -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
메일쓰기
형식 + + + +
-
- - 창닫기 +
+ 자동등록방지 + + + 왼쪽의 글자를 입력하세요. +
+ +
+ + 창닫기 +
+ +
- - - diff --git a/skin/member/neo/memo_view.skin.php b/skin/member/neo/memo_view.skin.php index 401188447..1cc3e69a9 100644 --- a/skin/member/neo/memo_view.skin.php +++ b/skin/member/neo/memo_view.skin.php @@ -2,22 +2,28 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> -
-
-

- -

-
-

- -

+
+

+ +

+ +
+

쪽지내용

+

+ +

+
이전쪽지 다음쪽지 diff --git a/skin/member/neo/password.skin.php b/skin/member/neo/password.skin.php index 5184d3e90..ed770538f 100644 --- a/skin/member/neo/password.skin.php +++ b/skin/member/neo/password.skin.php @@ -11,12 +11,12 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 -
+
패스워드 확인 -

비밀글 기능으로 보호된 글입니다. 작성자와 관리자만 열람하실 수 있습니다. 작성자 본인이시라면 패스워드를 입력하세요.

+

비밀글 기능으로 보호된 글입니다. 작성자와 관리자만 열람하실 수 있습니다.
작성자 본인이시라면 패스워드를 입력하세요.

- - + +
diff --git a/skin/member/neo/profile.skin.php b/skin/member/neo/profile.skin.php index c36e6f8d8..cafceba27 100644 --- a/skin/member/neo/profile.skin.php +++ b/skin/member/neo/profile.skin.php @@ -2,40 +2,42 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> -

님의 프로필

+
+

님의 프로필

- - - - - - - - - - - - - - - - - - - - - - - - - -
회원권한
포인트
홈페이지
회원가입일= $mb[mb_level]) ? substr($mb[mb_datetime],0,10) ." (".$mb_reg_after." 일)" : "알 수 없음"; ?>
최종접속일= $mb[mb_level]) ? $mb[mb_today_login] : "알 수 없음";?>
+ + + + + + + + + + + + + + + + + + + + + + + + + +
회원권한
포인트
홈페이지
회원가입일= $mb[mb_level]) ? substr($mb[mb_datetime],0,10) ." (".$mb_reg_after." 일)" : "알 수 없음"; ?>
최종접속일= $mb[mb_level]) ? $mb[mb_today_login] : "알 수 없음";?>
-
-

님의 자기소개

-

-
+
+

님의 자기소개

+

+
- diff --git a/skin/member/neo/register_form.skin.php b/skin/member/neo/register_form.skin.php index 7ebb293b1..491d21969 100644 --- a/skin/member/neo/register_form.skin.php +++ b/skin/member/neo/register_form.skin.php @@ -1,9 +1,5 @@