Files
2026-07-23 16:15:57 +09:00

848 lines
36 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
?>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-STZ2R5Q7HG"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-STZ2R5Q7HG');
</script>
<meta charset="utf-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FAQ - 문의작성하기</title>
<!-- 그누보드 작성 -->
<link rel="stylesheet" href="../theme/basic/css/default.css?ver=2303229">
<link rel="stylesheet" href="../js/font-awesome/css/font-awesome.min.css?ver=2303229">
<link rel="stylesheet" href="../theme/basic/skin/connect/basic/style.css?ver=2303229">
<link rel="stylesheet" href="../theme/basic/skin/popular/basic/style.css?ver=2303229">
<link rel="stylesheet" href="../theme/basic/skin/qa/basic/style.css?ver=2303229">
<link rel="stylesheet" href="../theme/basic/skin/outlogin/basic/style.css?ver=2303229">
<link rel="stylesheet" href="../theme/basic/skin/latest/notice/style.css?ver=2303229">
<link rel="stylesheet" href="../theme/basic/skin/visit/basic/style.css?ver=2303229">
<link rel="stylesheet" href="../js/owlcarousel/owl.carousel.min.css?ver=2303229">
<!--[if lte IE 8]>
<script src="http://localhost/tova/js/html5.js"></script>
<![endif]-->
<script>
// // 자바스크립트에서 사용하는 전역변수 선언
// var g5_url = "http://localhost/tova";
// var g5_bbs_url = "http://localhost/tova/bbs";
// var g5_is_member = "1";
// var g5_is_admin = "";
// var g5_is_mobile = "";
// var g5_bo_table = "";
// var g5_sca = "";
// var g5_editor = "";
// var g5_cookie_domain = "";
// var g5_theme_shop_url = "theme/basic/shop";
// var g5_shop_url = "shop";
</script>
<script src="../js/jquery-1.12.4.min.js?ver=2304171"></script>
<script src="../js/jquery-migrate-1.4.1.min.js?ver=2304171"></script>
<script src="../js/jquery.menu.js?ver=2304171"></script>
<!-- <script src="../js/common.js?ver=2304171"></script> -->
<script src="../js/wrest.js?ver=2304171"></script>
<script src="../js/placeholders.min.js?ver=2304171"></script>
<script src="../js/owlcarousel/owl.carousel.min.js?ver=2304171"></script>
<script src="../js/jquery.bxslider.js?ver=2304171"></script>
<!-- //그누보드 작성 -->
<!-- 디자인팀 작성 -->
<script type="text/javascript" src="../js/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../js/jquery.mousewheel.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/ScrollTrigger.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/ScrollToPlugin.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/aos@2.3.1/dist/aos.css" type="text/css"/>
<link rel="stylesheet" href="https://unpkg.com/lenis@1.1.9/dist/lenis.css">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://unpkg.com/lenis@1.1.9/dist/lenis.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="../js/popup.js"></script>
<link rel="stylesheet" href="../css/reset.css"/>
<link rel="stylesheet" href="../css/font.css"/>
<link rel="stylesheet" href="../css/style.css"/>
<!-- //디자인팀 작성 -->
</head>
<body>
<div class="wrapper">
<input id="hid_mb_id" type="hidden" value="<?echo $_SESSION['session_id'];?>"></input>
<!-- HEADER -->
<header class="js__header">
<?php include_once($member_skin_path.'/main_header.skin.php'); ?>
</header>
<!-- //Header -->
<!-- floating_menu -->
<div class="floating_menu">
<ul>
<li class="floating_faq"><a href="<?php echo G5_BBS_URL ?>/faq.php">
<i></i>
<span>FAQ</span>
</a></li>
<li class="floating_buy"><a href="<?php echo G5_BBS_URL ?>/buy.php">
<i></i>
<span>구매하기</span>
</a></li>
</ul>
</div>
<!-- //floating_menu -->
<!-- 모든 팝업페이지 경로 -->
<?php
include_once($member_skin_path.'/login.skin.php');
include_once($member_skin_path.'/mypage01.skin.php');
include_once($member_skin_path.'/register.skin.php');
include_once($member_skin_path.'/register_form.skin.php');
include_once($member_skin_path.'/mypage02.skin.php');
include_once($member_skin_path.'/mypage03.skin.php');
include_once($member_skin_path.'/sitemap.skin.php');
include_once($member_skin_path.'/privacy.skin.php');
include_once($member_skin_path.'/password_lost.skin.php');
?>
<!-- 모든 팝업페이지 경로 -->
<div class="container faq">
<section class="intro">
<div class="top">
<h2 class="js__reveal rTB">FAQ</h2>
<span>EG-BIM 관련 문의하기</span>
</div>
<ul class="sub_tab">
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">자주하는 질문</a></li>
<li class="on"><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1 문의하기</a></li>
</ul>
</section>
<span class="sub_tit">1:1 문의하기</span>
<!-- 그누보드 시작 --- FAQ : 문의작성하기 -->
<!-- <div id="hd_login_msg">송대일님 로그인 중 <a href="http://localhost/tova/bbs/logout.php">로그아웃</a></div> -->
<hr>
<!-- 콘텐츠 시작 { -->
<div id="wrapper">
<div id="container_wr">
<div id="container">
<h2 id="container_title"><span title="1:1문의">1:1문의</span></h2>
<section id="bo_w">
<h2>1:1문의 작성</h2>
<!-- 게시물 작성/수정 시작 { -->
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="qa_id" value="<?php echo $qa_id ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
$option = '';
if ($is_dhtml_editor) {
$option_hidden .= '<input type="hidden" name="qa_html" value="1">';
} else {
$option .= "\n".'<input type="checkbox" id="qa_html" name="qa_html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="qa_html">html</label>';
}
echo $option_hidden;
?>
<div class="form_01">
<ul>
<?php if ($category_option) { ?>
<li class="bo_w_select write_div">
<label for="qa_category" class="sound_only">분류<strong>필수</strong></label>
<select name="qa_category" id="qa_category" required >
<option value="">분류를 선택하세요</option>
<?php echo $category_option ?>
</select>
</li>
<?php } ?>
<?php if ($is_email) { ?>
<li class="bo_w_mail chk_box">
<label for="qa_email" class="sound_only">이메일</label>
<input type="text" name="qa_email" value="<?php echo get_text($write['qa_email']); ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input full_input email" size="50" maxlength="100" placeholder="이메일" readonly>
<input type="checkbox" name="qa_email_recv" id="qa_email_recv" value="1" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?> class="selec_chk">
<label for="qa_email_recv" class="frm_info"><span></span>댓글 답변받기</label>
</li>
<?php } ?>
<?php if ($is_hp) { ?>
<li class="bo_w_hp chk_box">
<label for="qa_hp" class="sound_only">휴대폰</label>
<input type="text" name="qa_hp" value="<?php echo get_text($write['qa_hp']); ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input full_input" size="30" placeholder="휴대폰" readonly>
<?php if($qaconfig['qa_use_sms']) { ?>
<input type="checkbox" name="qa_sms_recv" id="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?> class="selec_chk">
<label for="qa_sms_recv" class="frm_info"><span></span>답변등록 SMS알림 수신</label>
<?php } ?>
</li>
<?php } ?>
<li class="bo_w_sbj">
<label for="qa_subject" class="sound_only">제목<strong class="sound_only">필수</strong></label>
<input type="text" name="qa_subject" value="<?php echo get_text($write['qa_subject']); ?>" id="qa_subject" required class="frm_input full_input required" size="50" maxlength="255" placeholder="제목">
</li>
<li class="qa_content_wrap <?php echo $is_dhtml_editor ? $config['cf_editor'] : ''; ?>">
<label for="qa_content" class="sound_only">내용<strong class="sound_only">필수</strong></label>
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
</li>
<?php if ($option) { ?>
<li>
옵션
<?php echo $option; ?>
</li>
<?php } ?>
<li class="bo_w_flie">
<div class="file_wr">
<label for="bf_file_1" class="lb_icon"><i class="fa fa-download" aria-hidden="true"></i><span class="sound_only"> </span></label>
<input type="file" name="bf_file[1]" id="bf_file_1" title="파일첨부 1 : 용량 <?php echo $upload_max_filesize; ?> 이하만 업로드 가능" class="frm_file">
<?php if($w == 'u' && $write['qa_file1']) { ?>
<input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="1"> <label for="bf_file_del1"><?php echo $write['qa_source1']; ?> 파일 삭제</label>
<?php } ?>
</div>
</li>
<li class="bo_w_flie">
<div class="file_wr">
<label for="bf_file_2" class="lb_icon"><i class="fa fa-download" aria-hidden="true"></i><span class="sound_only"> </span></label>
<input type="file" name="bf_file[2]" id="bf_file_2" title="파일첨부 2 : 용량 <?php echo $upload_max_filesize; ?> 이하만 업로드 가능" class="frm_file">
<?php if($w == 'u' && $write['qa_file2']) { ?>
<input type="checkbox" id="bf_file_del2" name="bf_file_del[2]" value="1"> <label for="bf_file_del2"><?php echo $write['qa_source2']; ?> 파일 삭제</label>
<?php } ?>
</div>
</li>
</ul>
</div>
<div class="btn_confirm write_div">
<a href="<?php echo $list_href; ?>" class="btn_cancel btn">취소</a>
<button type="submit" id="btn_submit" accesskey="s" class="btn_submit btn">작성완료</button>
</div>
</form>
<script>
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "2";
else
obj.value = "1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = "";
var content = "";
$.ajax({
url: g5_bbs_url+"/ajax.filter.php",
type: "POST",
data: {
"subject": f.qa_subject.value,
"content": f.qa_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (subject) {
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
f.qa_subject.focus();
return false;
}
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_qa_content) != "undefined")
ed_qa_content.returnFalse();
else
f.qa_content.focus();
return false;
}
<?php if ($is_hp) { ?>
var hp = f.qa_hp.value.replace(/[0-9\-]/g, "");
if(hp.length > 0) {
alert("휴대폰번호는 숫자, - 으로만 입력해 주십시오.");
return false;
}
<?php } ?>
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
}
</script>
</section>
<!-- } 게시물 작성/수정 끝 -->
</div>
</div>
</div>
<!-- } 콘텐츠 끝 -->
<hr>
<script>
$(function() {
// 폰트 리사이즈 쿠키있으면 실행
font_resize("container", get_cookie("ck_font_resize_rmv_class"), get_cookie("ck_font_resize_add_class"));
});
</script>
<!-- //그누보드 끝 --- FAQ : 문의작성하기 -->
</div>
<!-- FOOTER -->
<button class="btn_top js__top" onclick="window.scrollTo(0,0);"><div class="arrow"></div></button>
<footer class="footer_off">
<?php include_once($member_skin_path.'/main_footer.skin.php'); ?>
</footer>
<!-- //FOOTER -->
<script>
AOS.init();
const lenis = new Lenis()
lenis.on('scroll', (e) => {
// console.log(e)
})
lenis.on('scroll', ScrollTrigger.update)
gsap.ticker.add((time)=>{
lenis.raf(time * 1000)
})
gsap.ticker.lagSmoothing(0)
</script>
</div>
</body>
<!-- 상단(헤더) 스크립트 구문 -->
<script>
// 회원 탈퇴
function member_leave() {
if (confirm("회원에서 탈퇴 하시겠습니까?"))
location.href = '<?php echo G5_BBS_URL ?>/member_leave.php';
}
// 회원 탈퇴
if($('#hid_mb_id').val()==''){
document.getElementById('my_join2').style.display = 'none';
document.getElementById('my_login2').style.display = 'none';
document.getElementById('my_join').style.display = '';
document.getElementById('my_login').style.display = '';
}else{
document.getElementById('my_join2').style.display = '';
document.getElementById('my_login2').style.display = '';
document.getElementById('my_join').style.display = 'none';
document.getElementById('my_login').style.display = 'none';
}
let x = document.cookie;
if(x.includes("tmp_1=John")){
deleteCookie("tmp_1");
$('#pop_mypage02').show();
}
function deleteCookie(name) {
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/egbim;";
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/egbim/bbs;";
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/egbim/faq;";
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/egbim/qa;";
}
function getCookie(cname) {
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i <ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
//alert(getCookie("tmp_1"));
//로그인
$('#flogin button[type=submit]').click(function(e){
e.preventDefault();
let mb_id = $('#login_id').val();
let mb_password = $('#login_pw').val();
//alert('<?php echo G5_URL ?>/bbs/login.php');
$.ajax({
url : '<?php echo G5_URL ?>/bbs/login_check_tova.php',
data : {
'mb_id' : mb_id,
'mb_password' : mb_password
},
type : "POST",
datatype : "json",
success : function(data){
var ss='';
for(i=0; i<data.length; i++){
ss=ss + data[i];
}
//alert(ss.replace('"','').replace('"',''));
if(ss.replace('"','').replace('"','') == "success" || ss.replace('"','').replace('"','') == "super"){
//$(".popup_wrap").show();
// $('.btn_close').hide();
// $('#pop_login').hide();
// ------유나 추가
$('.popup_wrap').hide();
$('body').css('overflow', ''); // 기본 스크롤 상태로 복귀
lenis.start();
console.log('로그인 완료 및 lenis 재시작/유나 추가')
$('#hid_mb_id').val(mb_id);
document.getElementById('my_join2').style.display = '';
document.getElementById('my_login2').style.display = '';
document.getElementById('my_join').style.display = 'none';
document.getElementById('my_login').style.display = 'none';
//location.href="<?php echo G5_URL ?>/bbs/session.php?id="+mb_id;
if(ss.replace('"','').replace('"','') == "super"){
$('#my_join2').html("<a href='http://eg-bim.com/egbim/adm/index.php' target='_blank'>관리페이지</a>");
}else{
$('#my_join2').html("<a href='javascript:mypage01();'>마이페이지</a>");
}
}else
{
alert(trim(ss));
}
},
error : function(err){
//alert(err);
alert(err.status);
alert(err.statusText);
}
});
});
//회원가입 약관동의
$('#fregister button[type=submit]').click(function(e){
e.preventDefault();
let agree11 = $('#agree11').val();
let agree21 = $('#agree21').val();
$.ajax({
url : '<?php echo G5_URL ?>/bbs/register_form.php',
type : "POST",
datatype : "json",
contentType: 'application/json; charset=utf-8',
data : {
'agree11' : agree11,
'agree21' : agree21
},
success : function(data){
var ss='';
for(i=0; i<data.length; i++){
ss=ss + data[i];
}
},
error : function(err){
alert(err);
}
});
});
//회원가입 정보입력
$('#fregisterform button[type=submit]').click(function(e){
e.preventDefault();
let mb_id = $('#reg_mb_id').val();
let mb_password = $('#reg_mb_password').val();
let mb_password_re = $('#reg_mb_password_re').val();
let mb_name = $('#reg_mb_name').val();
let mb_email1 = $('#reg_mb_email1').val();
let mb_email2 = $('#mb_email2').val();
let reg_domain2 = $('#register_domain2').val();
let mb_hp = $('#reg_mb_hp').val();
let mb_comp = $('#reg_mb_comp').val();
let mb_comp_team = $('#reg_mb_comp_team').val();
//alert(mb_password+' '+mb_password_re+' '+mb_name+' '+mb_email1+' '+mb_email2+' '+mb_hp+' '+mb_comp+' '+mb_comp_team);
if (mb_id.length < 4) {
alert("아이디를 4글자 이상 입력하십시오.");
mb_id.focus();
return false;
}
var special_pattern = /[`~!@#$%^&*|\\\'\";:\/?]/gi
if (special_pattern.test(mb_id) == true) {
alert("아이디는 특수문자를 사용할수 없습니다.");
mb_id.focus();
return false;
}
// 비밀번호 검사
if(!/^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,25}$/.test(mb_password)){
alert('비밀번호는 숫자+영문자+특수문자 조합으로 8자리 이상 사용해야 합니다.');
mb_password.focus();
return false;
}
// if (mb_password_re.length < 8 || mb_password.length < 8) {
// alert("비밀번호를 8글자 이상 입력하십시오.");
// mb_password.focus();
// return false;
// }
// 비밀번호 & 2차비밀번호 검사
if (mb_password != mb_password_re) {
alert("비밀번호가 같지 않습니다.");
mb_password_re.focus();
return false;
}
// 이름 검사
if (mb_name == "") {
if (mb_name.length < 1) {
alert("이름을 입력하십시오.");
mb_name.focus();
return false;
}
}
// 메일 검사
if (mb_email1 == "") {
if (mb_email1.length < 1) {
alert("메일 주소를 입력하십시오.");
mb_email1.focus();
return false;
}
}
if (mb_email2 == "type"){
mb_email2 = '@' + reg_domain2;
}
// 핸드폰 번호 검사
if (mb_hp.length < 11) {
alert("휴대전화번호 11자리를 입력하십시오.");
mb_hp.focus();
return false;
}
if(isNaN(mb_hp)){
alert("휴대전화번호는 숫자만 입력가능합니다.");
mb_hp.focus();
return false;
}
// 회사명 검사
if (mb_comp == "") {
if (mb_comp.length < 1) {
alert("회사명을 입력하십시오");
mb_comp.focus();
return false;
}
}
// 팀명 검사
if (mb_comp_team == "") {
if (mb_comp_team.length < 1) {
alert("팀명을 입력하십시오");
mb_comp_team.focus();
return false;
}
}
$.ajax({
url : '<?php echo G5_URL ?>/bbs/register_form_update.php',
data : {
'mb_id' : mb_id,
'mb_password' : mb_password,
'mb_password_re' : mb_password_re,
'mb_name' : mb_name,
'mb_email1' : mb_email1,
'mb_email2' : mb_email2,
'mb_hp' : mb_hp,
'mb_comp' : mb_comp,
'mb_comp_team' : mb_comp_team,
},
type : "POST",
datatype : "json",
success : function(data){
var ss='';
for(i=0; i<data.length; i++){
ss=ss + data[i];
}
if(ss){
// $(".popup_wrap").show();
// $('.btn_close').hide();
// $('#pop_login').hide();
// $('#pop_agreement').hide();
// $('#pop_join').hide();
// $('#pop_mypage01').hide();
// $('#pop_search').hide();
// $('#pop_mypage02').hide();
// $('#pop_mypage03').hide();
// $('#pop_privacy').hide();
// $('.register_fs').hide();
// $('.join_progress .join_step').removeClass('on');
// $('.join_progress .join_step').eq(2).addClass('on');
// $('.messages').show();
alert('회원가입이 완료됐습니다.\n다시 로그인 해주세요');
$('#reg_mb_id').val('');
$('#reg_mb_password').val('');
$('#reg_mb_password_re').val('');
$('#reg_mb_name').val('');
$('#reg_mb_email1').val('');
$('#reg_mb_hp').val('');
$('#reg_mb_comp').val('');
$('#reg_mb_comp_team').val('');
$('#dupl_check_yn').val('N');
// ------유나 추가
$('.popup_wrap').hide();
$('body').css('overflow', ''); // 기본 스크롤 상태로 복귀
lenis.start();
console.log('로그인 완료 및 lenis 재시작/유나 추가')
}else{
alert('실패했습니다.');
}
},
error : function(err){
alert('에러');
alert(err);
alert(err.status);
alert(err.statusText);
}
});
// $.removeCookie(mb_id,{path:'<?php //echo G5_URL ?>/bbs/register_form_update.php'});
});
//회원정보 수정
$('#fregisterform_up button[type=submit]').click(function(e){
e.preventDefault();
let mb_id = $('#update_mb_id').val();
let mb_password = $('#update_mb_password').val();
let mb_password_re = $('#update_mb_password_re').val();
let mb_name = $('#update_mb_name').val();
let mb_email1 = $('#update_mb_email1').val();
let mb_email2 = $('#update_mb_email2').val();
let update_domain2 = $('#update_domain2').val();
if (mb_email2 == "type"){
mb_email2 = '@' + update_domain2;
}
let mb_hp = $('#update_mb_hp').val();
let mb_comp = $('#update_mb_comp').val();
let mb_comp_team = $('#update_mb_comp_team').val();
//alert(mb_password+' '+mb_password_re+' '+mb_name+' '+mb_email1+' '+mb_email2+' '+mb_hp+' '+mb_comp+' '+mb_comp_team);
if (mb_id.length < 4) {
alert('1');
alert("아이디를 4글자 이상 입력하십시오.");
mb_id.focus();
return false;
}
var special_pattern = /[`~!@#$%^&*|\\\'\";:\/?]/gi
if (special_pattern.test(mb_id) == true) {
alert("아이디는 특수문자를 사용할수 없습니다.");
mb_id.focus();
return false;
}
// 비밀번호 검사
if(!/^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,25}$/.test(mb_password)){
alert('비밀번호는 숫자+영문자+특수문자 조합으로 8자리 이상 사용해야 합니다.');
mb_password.focus();
return false;
}
// if (mb_password_re.length < 8 || mb_password.length < 8) {
// alert("비밀번호를 8글자 이상 입력하십시오.");
// mb_password.focus();
// return false;
// }
// 비밀번호 & 2차비밀번호 검사
if (mb_password != mb_password_re) {
alert(mb_password_re);
alert("비밀번호가 같지 않습니다.");
mb_password_re.focus();
return false;
}
// 이름 검사
if (mb_name == "") {
if (mb_name.length < 1) {
alert("이름을 입력하십시오.");
mb_name.focus();
return false;
}
}
// 메일 검사
if (mb_email1 == "") {
if (mb_email1.length < 1) {
alert("메일 주소를 입력하십시오.");
mb_email1.focus();
return false;
}
}
// 핸드폰 번호 검사
if (mb_hp.length < 11) {
alert("휴대전화번호 11자리를 입력하십시오.");
mb_hp.focus();
return false;
}
if(isNaN(mb_hp)){
alert("휴대전화번호는 숫자만 입력가능합니다.");
mb_hp.focus();
return false;
}
// 회사명 검사
if (mb_comp == "") {
if (mb_comp.length < 1) {
alert("회사명을 입력하십시오");
mb_comp.focus();
return false;
}
}
// 팀명 검사
if (mb_comp_team == "") {
if (mb_comp_team.length < 1) {
alert("팀명을 입력하십시오");
mb_comp_team.focus();
return false;
}
}
$.ajax({
url : '<?php echo G5_URL ?>/bbs/mypage03.php',
data : {
'mb_id' : mb_id,
'mb_password' : mb_password,
'mb_password_re' : mb_password_re,
'mb_name' : mb_name,
'mb_email1' : mb_email1,
'mb_email2' : mb_email2,
'mb_hp' : mb_hp,
'mb_comp' : mb_comp,
'mb_comp_team' : mb_comp_team,
},
type : "POST",
datatype : "json",
success : function(data){
var ss='';
for(i=0; i<data.length; i++){
ss=ss + data[i];
}
if(ss.replace('"','').replace('"','') == "success"){
// $(".popup_wrap").show();
$('.btn_close').show();
$('#pop_login').hide();
$('#pop_agreement').hide();
$('#pop_join').hide();
$('#pop_mypage01').hide();
$('#pop_search').hide();
$('#pop_mypage02').show();
$('#pop_mypage03').hide();
$('#pop_privacy').hide();
// $('.register_fs').hide();
// $('.join_progress .join_step').removeClass('on');
// $('.join_progress .join_step').eq(2).addClass('on');
// $('.messages').show();
alert('회원정보 수정이 완료됐습니다.');
document.getElementById("span_email").innerText=mb_email1+mb_email2;
document.getElementById("span_hp").innerText=mb_hp;
document.getElementById("span_comp").innerText=mb_comp;
document.getElementById("span_comp_team").innerText=mb_comp_team;
// $('#update_mb_id').val('');
// $('#update_mb_password').val('');
// $('#update_mb_password_re').val('');
// $('#update_mb_name').val('');
// $('#update_mb_email1').val('');
// $('#update_mb_hp').val('');
// $('#update_mb_comp').val('');
// $('#update_mb_comp_team').val('');
// $('#dupl_check_yn').val('N');
}else{
alert('실패했습니다.');
}
},
error : function(err){
alert('에러');
alert(err);
alert(err.status);
alert(err.statusText);
}
});
});
$('#fmyconfirmpw button[type=submit]').click(function(e){
e.preventDefault();
let l_mb_password = $('#password_mypage').val();
let l_mb_id = $('#hid_mb_id').val();
$.ajax({
url : '<?php echo G5_URL ?>/bbs/mypage02.php',
data : {
'mb_id' : l_mb_id,
'mb_password' : l_mb_password,
},
type : "POST",
datatype : "json",
success : function(data){
var ss='';
for(i=0; i<data.length; i++){
ss=ss + data[i];
}
//alert(ss.replace('"','').replace('"',''));
if(ss.replace('"','').replace('"','') == "success"){
$('#password_mypage').val('');
//mypage02();
document.cookie = "tmp_1=John";
location.href="<?php echo G5_URL ?>/bbs/qawrite.php";
}else
{
alert(trim(ss));
$('#password_mypage').select();
}
},
error : function(err){
alert(err);
alert(err.status);
alert(err.statusText);
}
});
});
</script>