Merge branch 'g4s'

This commit is contained in:
chicpro
2013-04-29 16:25:51 +09:00
21 changed files with 188 additions and 97 deletions

View File

@ -18,7 +18,7 @@ function print_menu2($key, $no)
{
global $menu, $auth_menu, $is_admin, $auth, $g4;
$str .= "<ul class=\"gnb_sub_ul\">";
$str .= "<ul class=\"gnb_2dul\">";
for($i=1; $i<count($menu[$key]); $i++)
{
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
@ -31,7 +31,7 @@ function print_menu2($key, $no)
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
else $gnb_grp_style = '';
$str .= '<li class="gnb_2depth"><a href="'.$menu[$key][$i][2].'" class="'.$gnb_grp_style.' '.$gnb_grp_div.'">'.$menu[$key][$i][1].'</a></li>';
$str .= '<li class="gnb_2dli"><a href="'.$menu[$key][$i][2].'" class="gnb_2da '.$gnb_grp_style.' '.$gnb_grp_div.'">'.$menu[$key][$i][1].'</a></li>';
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
}
@ -105,19 +105,19 @@ function imageview(id, w, h)
<h2>관리자 주메뉴</h2>
<script>$('#gnb').addClass('gnb_js');</script>
<?php
$gnb_str = "<ul id=\"gnb_ul\">";
$gnb_str = "<ul id=\"gnb_1dul\">";
foreach($amenu as $key=>$value) {
$href1 = $href2 = '';
if ($menu['menu'.$key][0][2]) {
$href1 = '<a href="'.$menu['menu'.$key][0][2].'">';
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
$href2 = '</a>';
} else {
continue;
}
$current_class = "";
if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)))
$current_class = " gnb_1depth_air";
$gnb_str .= "<li class=\"gnb_1depth".$current_class."\">";
$current_class = " gnb_1dli_air";
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
$gnb_str .= print_menu1('menu'.$key, 1);
$gnb_str .= "</li>";
@ -186,4 +186,4 @@ function imageview(id, w, h)
<button class="no_text_resize" onclick="font_default('container');">기본</button>
<button class="no_text_resize" onclick="font_resize('container', 'increase');">크게</button>
</div>
<h1><?php echo $g4['title'] ?></h1>
<h1><?php echo $g4['title'] ?></h1>

View File

@ -40,11 +40,12 @@ $(function(){
});
// 주메뉴
var $gnb = $('.gnb_1depth > a');
var $gnb = $(".gnb_1dli > a");
$gnb.mouseover(function() {
if(mouse_event) {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
$(this).parent().addClass('gnb_1depth_over gnb_1depth_on');
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).parent());
hide_menu = false;
}
});
@ -53,17 +54,18 @@ $(function(){
hide_menu = true;
});
$('.gnb_1depth li').mouseover(function() {
$(".gnb_2dli").mouseover(function() {
hide_menu = false;
});
$('.gnb_1depth li').mouseout(function() {
$(".gnb_2dli").mouseout(function() {
hide_menu = true;
});
$gnb.focusin(function() {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
$(this).parent().addClass('gnb_1depth_over gnb_1depth_on');
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).parent());
hide_menu = false;
});
@ -71,29 +73,63 @@ $(function(){
hide_menu = true;
});
$('.gnb_1depth ul a').focusin(function() {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
var $gnb_li = $(this).closest('.gnb_1depth').addClass('gnb_1depth_over gnb_1depth_on');
$(".gnb_2da").focusin(function() {
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).closest(".gnb_1dli"));
hide_menu = false;
});
$('.gnb_1depth ul a').focusout(function() {
$(".gnb_2da").focusout(function() {
hide_menu = true;
});
$(document).click(function() {
$('#gnb_1dul>li').bind('mouseleave',function(){
submenu_hide();
});
$(document).bind('click focusin',function(){
if(hide_menu) {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
submenu_hide();
}
});
$(document).focusin(function() {
if(hide_menu) {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
}
});
function submenu_hide() {
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
}
// 텍스트 리사이즈 카운트 쿠키있으면 실행
var resize_act;
var text_resize_count = parseInt(get_cookie("ck_font_resize_count"));
if(!isNaN(text_resize_count)) {
if(text_resize_count > 0)
resize_act = "increase";
else if(text_resize_count < 0)
resize_act = "decrease";
if(Math.abs(text_resize_count) > 0)
font_resize2("container", resize_act, Math.abs(text_resize_count));
}
});
function menu_rearrange(el)
{
var width = $("#gnb_1dul").width();
var left = w1 = w2 = 0;
var idx = $(".gnb_1dli").index(el);
for(i=0; i<=idx; i++) {
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
if((left + w2) > width) {
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
}
left += w1;
}
}
</script>
<?php

View File

@ -122,7 +122,7 @@ include_once('./admin.head.php');
</tr>
<tr>
<th scope="row"><label for="mb_name">이름(실명)<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required hangul frm_input minlength=2" size="15" maxlength="20"></td>
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required frm_input minlength=2" size="15" maxlength="20"></td>
<th scope="row"><label for="mb_nick">별명<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="mb_nick" value="<?php echo $mb['mb_nick'] ?>" id="mb_nick" required class="required frm_input minlength=2" size="15" maxlength="20"></td>
</tr>
@ -141,7 +141,7 @@ include_once('./admin.head.php');
<tr>
<th scope="row"><label for="mb_tel">전화번호</label></th>
<td><input type="text" name="mb_tel" value="<?php echo $mb['mb_tel'] ?>" id="mb_tel" class="frm_input" size="15" maxlength="20"></td>
<th scope="row"><label for="mb_hp">핸드폰번호</label></th>
<th scope="row"><label for="mb_hp">휴대폰번호</label></th>
<td><input type="text" name="mb_hp" value="<?php echo $mb['mb_hp'] ?>" id="mb_hp" class="frm_input" size="15" maxlength="20"></td>
</tr>
<tr>

View File

@ -16,7 +16,7 @@ if ($member['mb_password'] != sql_password($_POST['admin_password'])) {
$mb_id = escape_trim($_POST['mb_id']);
// 핸드폰번호 체크
// 휴대폰번호 체크
$mb_hp = $_POST['mb_hp'];
if($mb_hp) {
$result = exist_mb_hp($mb_hp, $mb_id);

View File

@ -85,7 +85,7 @@ $colspan = 15;
<option value="mb_level"<?php echo get_selected($_GET['sfl'], "mb_level"); ?>>권한</option>
<option value="mb_email"<?php echo get_selected($_GET['sfl'], "mb_email"); ?>>E-MAIL</option>
<option value="mb_tel"<?php echo get_selected($_GET['sfl'], "mb_tel"); ?>>전화번호</option>
<option value="mb_hp"<?php echo get_selected($_GET['sfl'], "mb_hp"); ?>>핸드폰번호</option>
<option value="mb_hp"<?php echo get_selected($_GET['sfl'], "mb_hp"); ?>>휴대폰번호</option>
<option value="mb_point"<?php echo get_selected($_GET['sfl'], "mb_point"); ?>>포인트</option>
<option value="mb_datetime"<?php echo get_selected($_GET['sfl'], "mb_datetime"); ?>>가입일시</option>
<option value="mb_ip"<?php echo get_selected($_GET['sfl'], "mb_ip"); ?>>IP</option>

View File

@ -53,21 +53,18 @@ if (isset($wr_id) && $wr_id) {
}
// 휴대폰 본인확인을 사용한다면
if ($config['cf_kcpcert_use'] != '') {
if ($config['cf_kcpcert_use'] != '' && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '') {
if ($is_guest) {
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글 읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
}
if ($board['bo_use_cert'] != '' && $is_guest) {
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
}
$hp_certify = substr($member['mb_hp_certify'],0,1) == '0' ? false : true;
if ($hp_certify == false) {
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글 읽기가 가능합니다.\\n\\n회원정보 수정에서 휴대폰 본인확인을 해주시기 바랍니다.', G4_URL);
}
if ($board['bo_use_cert'] == 'cert' && hp_certify($member) != 'Y') {
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원정보 수정에서 휴대폰 본인확인을 해주시기 바랍니다.', G4_URL);
}
if ($member['mb_adult'] != 'Y') {
alert('이 게시판은 휴대폰 성인인증 하신 회원님만 글 읽기가 가능합니다.\\n\\n성인인데 글읽기가 안된다면 회원정보 수정에서 휴대폰 본인확인을\\n다시 해주시기 바랍니다.', G4_URL);
}
if ($board['bo_use_cert'] == 'adult' && $member['mb_adult'] != 'Y') {
alert('이 게시판은 휴대폰 본인확인으로 성인 인증 회원님만 글읽기가 가능합니다.\\n\\n성인인데 글읽기가 안된다면 회원정보 수정에서 휴대폰 본인확인을\\n다시 해주시기 바랍니다.', G4_URL);
}
}

View File

@ -176,6 +176,22 @@ if (!empty($group['gr_use_access'])) {
}
}
// 휴대폰 본인확인을 사용한다면
if ($config['cf_kcpcert_use'] != '' && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '' && $is_guest) {
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글쓰기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', 'login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
}
if ($board['bo_use_cert'] == 'cert' && hp_certify($member) != 'Y') {
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글쓰기가 가능합니다.\\n\\n회원정보 수정에서 휴대폰 본인확인을 해주시기 바랍니다.', G4_URL);
}
if ($board['bo_use_cert'] == 'adult' && $member['mb_adult'] != 'Y') {
alert('이 게시판은 휴대폰 본인확인으로 성인 인증된 회원님만 글쓰기가 가능합니다.\\n\\n성인인데 글읽기가 안된다면 회원정보 수정에서 휴대폰 본인확인을\\n다시 해주시기 바랍니다.', G4_URL);
}
}
$g4['title'] = $board['bo_subject']." ".$title_msg;
$is_notice = false;

View File

@ -8,7 +8,7 @@ $msg = array();
$wr_subject = '';
if (isset($_POST['wr_subject'])) {
$wr_subject = trim($_POST['wr_subject']);
$wr_subject = substr(escape_trim($_POST['wr_subject']),0,255);
}
if ($wr_subject == '') {
$msg[] = '<strong>제목</strong>을 입력하세요.';
@ -16,12 +16,22 @@ if ($wr_subject == '') {
$wr_content = '';
if (isset($_POST['wr_content'])) {
$wr_content = trim($_POST['wr_content']);
$wr_content = escape_trim($_POST['wr_content']);
}
if ($wr_content == '') {
$msg[] = '<strong>내용</strong>을 입력하세요.';
}
$wr_link1 = '';
if (isset($_POST['wr_link1'])) {
$wr_link1 = substr(escape_trim($_POST['wr_link1']),0,1000);
}
$wr_link2 = '';
if (isset($_POST['wr_link2'])) {
$wr_link2 = substr(escape_trim($_POST['wr_link2']),0,1000);
}
$msg = implode('<br>', $msg);
if ($msg) {
alert($msg);

View File

@ -184,7 +184,7 @@ textarea {width:90%}
select {border:1px solid #ced9de}
button {padding:3px;border:1px solid #ced9de;background:#f6f9fa;cursor:pointer}
fieldset {margin-bottom:20px}
legend {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;border:0;overflow:hidden}
legend {position:absolute;font-size:0;line-height:0;border:0;overflow:hidden}
fieldset span {display:block;margin-bottom:10px}
fieldset p {color:#4c5f67}
fieldset button, .fieldset_submit {padding:0 15px;height:23px;border:0;background:#617d46;color:#fff;font-size:1em;line-height:2.1em;vertical-align:middle;cursor:pointer}
@ -514,4 +514,4 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
#anc_pricecompare_engine dt a {font-weight:bold}
#anc_pricecompare_engine dd {margin:0 0 30px}
#anc_pricecompare_engine li {margin:5px 0}
#anc_pricecompare_engine li {margin:5px 0}

View File

@ -28,7 +28,7 @@ a:active {color:#000;text-decoration:underline}
.msg_sound_only,
.sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
/* 본문 바로가기 */
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
#to_content a {z-index:100000;position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#to_content a:focus,
#to_content a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em}

View File

@ -132,21 +132,21 @@ if ($config['cf_include_head']) {
<nav id="gnb">
<script>$('#gnb').addClass('gnb_js');</script>
<h2>홈페이지 메인메뉴</h2>
<ul id="gnb_ul">
<ul id="gnb_1dul">
<?php
$sql = " select * from {$g4['group_table']} where gr_show_menu = '1' and gr_device <> 'mobile' order by gr_order ";
$result = sql_query($sql);
for ($gi=0; $row=sql_fetch_array($result); $gi++) { // gi 는 group index
?>
<li class="gnb_1depth">
<a href="<?php echo G4_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?></a>
<ul class="gnb_sub_ul">
<li class="gnb_1dli">
<a href="<?php echo G4_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>" class="gnb_1da"><?php echo $row['gr_subject'] ?></a>
<ul class="gnb_2dul">
<?php
$sql2 = " select * from {$g4['board_table']} where gr_id = '{$row['gr_id']}' and bo_show_menu = '1' and bo_device <> 'mobile' order by bo_order ";
$result2 = sql_query($sql2);
for ($bi=0; $row2=sql_fetch_array($result2); $bi++) { // bi 는 board index
?>
<li class="gnb_2depth"><a href="<?php echo G4_BBS_URL ?>/board.php?bo_table=<?php echo $row2['bo_table'] ?>"><?php echo $row2['bo_subject'] ?></a></li>
<li class="gnb_2dli"><a href="<?php echo G4_BBS_URL ?>/board.php?bo_table=<?php echo $row2['bo_table'] ?>" class="gnb_2da"><?php echo $row2['bo_subject'] ?></a></li>
<?php } ?>
</ul>
</li>

View File

@ -531,48 +531,48 @@ function save_default_font_size($el)
$(function(){
$('.win_point').click(function() {
$(".win_point").click(function() {
win_point(this.href);
return false;
});
$('.win_memo').click(function() {
$(".win_memo").click(function() {
win_memo(this.href);
return false;
});
$('.win_email').click(function() {
$(".win_email").click(function() {
win_email(this.ref);
return false;
});
$('.win_scrap').click(function() {
$(".win_scrap").click(function() {
win_scrap(this.href);
return false;
});
$('.win_profile').click(function() {
$(".win_profile").click(function() {
win_profile(this.ref);
return false;
});
$('.win_homepage').click(function() {
$(".win_homepage").click(function() {
win_homepage(this.ref);
return false;
});
$('.win_zip_find').click(function() {
$(".win_zip_find").click(function() {
win_zip(this.href);
return false;
});
$('.win_password_lost').click(function() {
$(".win_password_lost").click(function() {
win_password_lost(this.href);
return false;
});
/*
$('.win_poll').click(function() {
$(".win_poll").click(function() {
win_poll(this.href);
return false;
});
@ -580,12 +580,12 @@ $(function(){
// 사이드뷰
var sv_hide = false;
$('.sv_member, .sv_guest').click(function() {
$('.sv').removeClass('sv_on');
$(this).closest('.sv_wrap').find('.sv').addClass('sv_on');
$(".sv_member, .sv_guest").click(function() {
$(".sv").removeClass("sv_on");
$(this).closest(".sv_wrap").find(".sv").addClass("sv_on");
});
$('.sv, .sv_wrap').hover(
$(".sv, .sv_wrap").hover(
function() {
sv_hide = false;
},
@ -594,29 +594,38 @@ $(function(){
}
);
$('.sv_member, .sv_guest').focusin(function() {
$(".sv_member, .sv_guest").focusin(function() {
sv_hide = false;
$('.sv').removeClass('sv_on');
$(this).closest('.sv_wrap').find('.sv').addClass('sv_on');
$(".sv").removeClass("sv_on");
$(this).closest(".sv_wrap").find(".sv").addClass("sv_on");
});
$('.sv a').focusin(function() {
$(".sv a").focusin(function() {
sv_hide = false;
});
$('.sv a').focusout(function() {
$(".sv a").focusout(function() {
sv_hide = true;
});
$(document).click(function() {
if(sv_hide) {
$('.sv').removeClass('sv_on');
$(".sv").removeClass("sv_on");
}
});
$(document).focusin(function() {
if(sv_hide) {
$('.sv').removeClass('sv_on');
$(".sv").removeClass("sv_on");
}
});
$("textarea#wr_content[maxlength]").live("keyup change", function() {
var str = $(this).val()
var mx = parseInt($(this).attr("maxlength"))
if (str.length > mx) {
$(this).val(str.substr(0, mx));
return false;
}
});
});

View File

@ -1967,7 +1967,12 @@ function html_end()
$stylesheet .= $link;
$buffer = preg_replace('#'.$link.'#', '', $buffer);
}
return preg_replace('#(</title>)#', "$1$stylesheet", $buffer);
/*
</title>
<link rel="stylesheet" href="default.css">
밑으로 스킨의 스타일시트가 위치하도록 하게 한다.
*/
return preg_replace('#(</title>[^<]*<link[^>]+>)#', "$1$stylesheet", $buffer);
}
@ -1977,4 +1982,11 @@ function hyphen_hp_number($hp)
$hp = preg_replace("/[^0-9]/", "", $hp);
return preg_replace("/([0-9]{3})([0-9]{3,4})([0-9]{4})$/", "\\1-\\2-\\3", $hp);
}
// 휴대폰 본인확인을 받은 회원인지를 가린다.
function hp_certify($member)
{
return substr($member['mb_hp_certify'],0,1) == '0' ? 'N' : 'Y';
}
?>

View File

@ -147,7 +147,7 @@ function valid_mb_hp($reg_mb_hp)
{
$reg_mb_hp = preg_replace("/[^0-9]/", "", $reg_mb_hp);
if(!$reg_mb_hp)
return "핸드폰번호를 입력해 주십시오.";
return "휴대폰번호를 입력해 주십시오.";
else {
if(preg_match("/^01[0-9]{8,9}$/", $reg_mb_hp))
return "";
@ -160,13 +160,15 @@ function exist_mb_hp($reg_mb_hp, $reg_mb_id)
{
global $g4;
if (!trim($reg_mb_hp)) return "";
$reg_mb_hp = hyphen_hp_number($reg_mb_hp);
$sql = "select count(*) as cnt from {$g4['member_table']} where mb_hp = '$reg_mb_hp' and mb_id <> '$reg_mb_id' ";
$row = sql_fetch($sql);
if($row['cnt'])
return "이미 사용 중인 핸드폰번호입니다.";
return " 이미 사용 중인 휴대폰번호입니다. ".$reg_mb_hp;
else
return "";
}

View File

@ -179,7 +179,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<th scope="row"><label for="reg_mb_sms">SMS 수신여부</label></th>
<td>
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo ($w=='' || $member['mb_sms'])?'checked':''; ?>>
핸드폰 문자메세지를 받겠습니다.
휴대폰 문자메세지를 받겠습니다.
</td>
</tr>
<?php } ?>

View File

@ -36,7 +36,7 @@ function editor_html($id, $content, $ckeditor=true, $class="")
}
$ckeditor_class = $ckeditor ? "ckeditor" : "";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class\" style=\"width:100%;\">$content</textarea>";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class\" style=\"width:100%;\" maxlength=\"65536\">$content</textarea>";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
return $html;
}

View File

@ -1,23 +1,24 @@
<?php
include_once('./_common.php');
$w = trim($_POST['mb_hp']);
$w = trim($_POST['w']);
$reg_hp = preg_replace("/[^0-9]/", "", trim($_POST['mb_hp'])); // 숫자외에 문자는 제거
$old_hp = preg_replace("/[^0-9]/", "", trim($_POST['old_mb_hp']));
if ($w=='' || ($w=='u' && $reg_hp != $old_hp)) {
// 본인인증체크
//$kcpcert_no = trim($_POST['kcpcert_no']);
$kcpcert_no = get_session('ss_kcpcert_no');
if(!$kcpcert_no)
die("{\"error\":\"휴대폰인증이 되지 않았습니다. 휴대폰인증을 해주세요.\"}");
if ($w!='' && $w!='u') die("{\"error\":\"w 작업구분 오류\"}");
// 본인인증 hash 체크
$reg_name = trim($_POST['mb_name']);
$reg_hash = md5($reg_hp.$reg_name.$kcpcert_no);
$ss_hash = get_session('ss_kcpcert_hash');
if(get_session('ss_kcpcert_hash') != $reg_hash)
die("{\"error\":\"이름 또는 휴대폰번호가 올바르지 않습니다. 정상적인 방법으로 이용해 주세요.\"}");
if ($w=='' || ($w=='u' && $reg_hp != $old_hp)) {
// 본인인증체크
$kcpcert_no = get_session('ss_kcpcert_no');
if(!$kcpcert_no)
die("{\"error\":\"휴대폰인증이 되지 않았습니다. 휴대폰인증을 해주세요.\"}");
// 본인인증 hash 체크
$reg_name = trim($_POST['mb_name']);
$reg_hash = md5($reg_hp.$reg_name.$kcpcert_no);
$ss_hash = get_session('ss_kcpcert_hash');
if(get_session('ss_kcpcert_hash') != $reg_hash)
die("{\"error\":\"이름 또는 휴대폰번호가 올바르지 않습니다.\\n\\n정상적인 방법으로 이용해 주세요.\"}");
}
die("{\"error\":\"\"}"); // 정상

View File

@ -1,11 +1,11 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 핸드폰번호 체크
// 휴대폰번호 체크
if ($msg = valid_mb_hp($mb_hp)) alert($msg, "", true, true);
if ($msg = exist_mb_hp($mb_hp, $mb_id)) alert($msg, "", true, true);
$reg_hp = hyphen_hp_number($mb_hp);
$reg_hp = preg_replace("/[^0-9]/", "", trim($_POST['mb_hp']));
/* ======================================================================================================= */
/* = 휴대폰인증 및 성인인증 = */
@ -23,7 +23,7 @@ if($w == '') {
} else if($w == 'u') {
// 휴대폰번호 변경체크
$old_hp = preg_replace("/[^0-9]/", "", $_POST['old_mb_hp']);
$old_hp = preg_replace("/[^0-9]/", "", trim($_POST['old_mb_hp']));
if($old_hp !== $reg_hp) {
// 본인인증체크

View File

@ -141,7 +141,6 @@ if( $cert_enc_use == "Y" )
set_session("ss_kcpcert_no", $md5_cert_no);
set_session("ss_kcpcert_time", G4_TIME_YMDHIS);
set_session("ss_kcpcert_hash", $hash_data);
//alert_close($phone_no.$user_name.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G4_SERVER_TIME));
@ -173,8 +172,7 @@ $(function() {
// 인증정보
$opener.$("input[name=mb_hp]").val("<?php echo $phone_no ?>");
$opener.$("input[name=mb_name]").val("<?php echo $user_name ?>");
//$opener.$("input[name=kcpcert_no]").val("<?php echo $md5_cert_no ?>");
//$opener.$("input[name=kcpcert_time]").val("<?php echo G4_TIME_YMDHIS ?>");
alert("본인의 휴대폰번호로 확인 되었습니다.");
window.close();
});
</script>

View File

@ -117,9 +117,19 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
<th scope="row">내용</th>
<td>
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
<textarea id="wr_content" name="wr_content" required class="required"
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required"
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
<script>
$("textarea#wr_content[maxlength]").live("keyup change", function() {
var str = $(this).val()
var mx = parseInt($(this).attr("maxlength"))
if (str.length > mx) {
$(this).val(str.substr(0, mx));
return false;
}
});
</script>
</td>
</tr>
</tbody>

View File

@ -118,7 +118,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
<th scope="row">내용</th>
<td>
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
<textarea name="wr_content" id="wr_content" required class="required"
<textarea name="wr_content" id="wr_content" maxlength="10000" required class="required"
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
</td>