join_dealer.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. ?>
  4. <? include("../include/inc_top.php") ?>
  5. <? include("../include/inc_header.php") ?>
  6. <?
  7. $cd_dealer = $_REQUEST["cd_dealer"];
  8. $cd_dealer_p = $_REQUEST["cd_dealer_p"];
  9. $sql ="SELECT
  10. *
  11. FROM dealer_master
  12. WHERE cd_dealer='$cd_dealer' AND ds_delind='N'";
  13. $mode = "Add";
  14. $col=mysql_fetch_array(mysql_query($sql));
  15. if (!empty($col[cd_dealer])){
  16. $cd_dealer = $col[cd_dealer];
  17. $cd_dealerid = $col[cd_dealerid];
  18. $cd_dealer_p = $col[cd_dealer_p];
  19. $nm_pass = $col[nm_pass];
  20. $ds_type = $col[ds_type];
  21. $ds_usertype = $col[ds_usertype];
  22. $ds_level = $col[ds_level];
  23. $nm_company = $col[nm_company];
  24. $nm_name = $col[nm_name];
  25. $nm_birth = $col[nm_birth];
  26. $nm_tel_01 = $col[nm_tel_01];
  27. $nm_tel_02 = $col[nm_tel_02];
  28. $nm_tel_03 = $col[nm_tel_03];
  29. $nm_hp_01 = $col[nm_hp_01];
  30. $nm_hp_02 = $col[nm_hp_02];
  31. $nm_hp_03 = $col[nm_hp_03];
  32. $nm_fax_01 = $col[nm_fax_01];
  33. $nm_fax_02 = $col[nm_fax_02];
  34. $nm_fax_03 = $col[nm_fax_03];
  35. $nm_email = $col[nm_email];
  36. $nm_zip = $col[nm_zip];
  37. $nm_addr = $col[nm_addr];
  38. $nm_addr_sub = $col[nm_addr_sub];
  39. $nm_etc_01 = $col[nm_etc_01];
  40. $nm_etc_02 = $col[nm_etc_02];
  41. $nm_etc_03 = $col[nm_etc_03];
  42. $ds_status = $col[ds_status];
  43. $nm_company_biz = $col[nm_company_biz];
  44. $nm_name_biz = $col[nm_name_biz];
  45. $nm_no_biz = $col[nm_no_biz];
  46. $nm_date_biz = $col[nm_date_biz];
  47. $nm_type_biz = $col[nm_type_biz];
  48. $nm_condition_biz = $col[nm_condition_biz];
  49. $nm_tel_biz_01 = $col[nm_tel_biz_01];
  50. $nm_tel_biz_02 = $col[nm_tel_biz_02];
  51. $nm_tel_biz_03 = $col[nm_tel_biz_03];
  52. $nm_hp_biz_01 = $col[nm_hp_biz_01];
  53. $nm_hp_biz_02 = $col[nm_hp_biz_02];
  54. $nm_hp_biz_03 = $col[nm_hp_biz_03];
  55. $nm_fax_biz_01 = $col[nm_fax_biz_01];
  56. $nm_fax_biz_02 = $col[nm_fax_biz_02];
  57. $nm_fax_biz_03 = $col[nm_fax_biz_03];
  58. $nm_email_biz = $col[nm_email_biz];
  59. $nm_zip_biz = $col[nm_zip_biz];
  60. $nm_addr_biz = $col[nm_addr_biz];
  61. $nm_addr_sub_biz = $col[nm_addr_sub_biz];
  62. $nm_area = $col[nm_area];
  63. $nm_title = $col[nm_title];
  64. $nm_file = $col[nm_file];
  65. $nm_etc = $col[nm_etc];
  66. $nm_deposit = $col[nm_deposit];
  67. $dt_insert = $col[dt_insert];
  68. $nm_insert = $col[nm_insert];
  69. $dt_update = $col[dt_update];
  70. $nm_update = $col[nm_update];
  71. $ds_delind = $col[ds_delind];
  72. /*
  73. $arr_nm_info1 = explode("-",$nm_info1);
  74. if(count($arr_nm_info1) == 3){
  75. $nm_info11 = $arr_nm_info1[0];
  76. $nm_info12 = $arr_nm_info1[1];
  77. $nm_info13 = $arr_nm_info1[2];
  78. }else{
  79. $nm_info11 = "";
  80. $nm_info12 = "";
  81. $nm_info13 = "";
  82. }
  83. $arr_nm_info3 = explode("@",$nm_info3);
  84. if(count($arr_nm_info3) == 2){
  85. $nm_info31 = $arr_nm_info3[0];
  86. $nm_info32 = $arr_nm_info3[1];
  87. }else{
  88. $nm_info31 = "";
  89. $nm_info32 = "";
  90. }
  91. $nm_info3 = $col[nm_info3];
  92. */
  93. $mode = "Update";
  94. }else{
  95. $ds_level = "1";
  96. }
  97. ?>
  98. <section id="wrap" class="bg_join">
  99. <section id="content">
  100. <h2>딜러 회원가입</h2>
  101. <p class="tit_sub">UPRO에 회원으로 가입하시고 UPRO만의 특별한 회원 혜택을 누리세요.</p>
  102. <div class="join">
  103. <h3>기본정보 (필수)</h3>
  104. <form id="frmMember" name="frmMember" method="post" action="dealer_proc.php" enctype="multipart/form-data">
  105. <input type="hidden" name="validate" id="validate" value=""/>
  106. <input type="hidden" name="ds_type" id="ds_type" value="D0"/>
  107. <input type="hidden" name="ds_usertype" id="ds_usertype" value=""/>
  108. <input type="hidden" name="ds_level" id="ds_level" value="<?=$ds_level?>"/>
  109. <input type="hidden" name="cd_dealer" id="cd_dealer" value="<?=$cd_dealer?>"/>
  110. <input type="hidden" name="cd_dealer_p" id="cd_dealer_p" value="<?=$cd_dealer_p?>"/>
  111. <input type="hidden" name="mode" id="mode" value="<?=$mode?>"/>
  112. <!--input type="hidden" name="PageNo" id="PageNo" value="<?=$PageNo?>"/-->
  113. <input type="hidden" name="nm_email" id="nm_email" value="<?=$nm_email?>"/>
  114. <input type="hidden" name="nm_hp_01" id="nm_hp_01" value="<?=$nm_hp_01?>"/>
  115. <input type="hidden" name="nm_tel_01" id="nm_tel_01" value="<?=$nm_tel_01?>"/>
  116. <input type="hidden" name="nm_fax_01" id="nm_fax_01" value="<?=$nm_fax_01?>"/>
  117. <input type="hidden" name="idchkresult" id="idchkresult" value="N"/>
  118. <table class="tbl_h">
  119. <colgroup>
  120. <col width="16%">
  121. <col width="*">
  122. </colgroup>
  123. <tr>
  124. <th>아이디</th>
  125. <td>
  126. <? if ($mode == "Add"){ ?>
  127. <input type="text" class="inp_txt" style="width:330px;" name="cd_dealerid" id="cd_dealerid">
  128. <input type="button" class="td_btn ty2" id="btn_idchk" title="아이디 확인" value="확인">
  129. <? }else{ ?>
  130. <?=$cd_dealerid?>
  131. <? } ?>
  132. </td>
  133. </tr>
  134. <tr>
  135. <th>비밀번호</th>
  136. <td><input type="password" class="inp_txt" style="width:330px;" name="nm_pass" id="nm_pass" maxlength="20"> <span class="td_txt">8자~15자 영문, 숫자, 특수문자 조합</span></td>
  137. </tr>
  138. <tr>
  139. <th>비밀번호 확인</th>
  140. <td><input type="password" class="inp_txt" style="width:330px;" name="nm_pass2" id="nm_pass2" maxlength="20"> <span class="td_txt">8자~15자 영문, 숫자, 특수문자 조합</span></td>
  141. </tr>
  142. <tr>
  143. <th>상호</th>
  144. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_company" id="nm_company" value="<?=$nm_company?>"></td>
  145. </tr>
  146. <tr>
  147. <th>이름</th>
  148. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_name" id="nm_name" value="<?=$nm_name?>" maxlength="20"></td>
  149. </tr>
  150. <tr>
  151. <th>휴대번호</th>
  152. <td>
  153. <span class="select" style="margin-right:5px;width:22%;" id="sel_nm_hp_01">
  154. <select>
  155. <option value="" >선택</option>
  156. <option value="010" <?if($nm_hp_01=="010"){?>selected="selected"<?}?> >010</option>
  157. <option value="011" <?if($nm_hp_01=="011"){?>selected="selected"<?}?> >011</option>
  158. <option value="016" <?if($nm_hp_01=="016"){?>selected="selected"<?}?> >016</option>
  159. <option value="017" <?if($nm_hp_01=="017"){?>selected="selected"<?}?> >017</option>
  160. <option value="018" <?if($nm_hp_01=="018"){?>selected="selected"<?}?> >018</option>
  161. <option value="019" <?if($nm_hp_01=="019"){?>selected="selected"<?}?> >019</option>
  162. <option value="070" <?if($nm_hp_01=="070"){?>selected="selected"<?}?> >070</option>
  163. </select>
  164. </span>
  165. <input type="text" class="inp_txt" style="width:22%;" name="nm_hp_02" id="nm_hp_02" value="<?=$nm_hp_02?>"> - <input type="text" class="inp_txt" style="width:22%;" name="nm_hp_03" id="nm_hp_03" value="<?=$nm_hp_03?>">
  166. <span class="td_txt">숫자만 입력</span>
  167. </td>
  168. </tr>
  169. <tr>
  170. <th>연락처</th>
  171. <td>
  172. <span class="select" style="margin-right:5px;width:22%;" id="sel_nm_tel_01">
  173. <select>
  174. <option>선택</option>
  175. <option value="02"<?if($nm_tel_01=="02"){?> selected="selected"<?}?>>02</option>
  176. <option value="031"<?if($nm_tel_01=="031"){?> selected="selected"<?}?>>031</option>
  177. <option value="032"<?if($nm_tel_01=="032"){?> selected="selected"<?}?>>032</option>
  178. <option value="033"<?if($nm_tel_01=="033"){?> selected="selected"<?}?>>033</option>
  179. <option value="041"<?if($nm_tel_01=="041"){?> selected="selected"<?}?>>041</option>
  180. <option value="042"<?if($nm_tel_01=="042"){?> selected="selected"<?}?>>042</option>
  181. <option value="043"<?if($nm_tel_01=="043"){?> selected="selected"<?}?>>043</option>
  182. <option value="044"<?if($nm_tel_01=="044"){?> selected="selected"<?}?>>044</option>
  183. <option value="051"<?if($nm_tel_01=="051"){?> selected="selected"<?}?>>051</option>
  184. <option value="052"<?if($nm_tel_01=="052"){?> selected="selected"<?}?>>052</option>
  185. <option value="053"<?if($nm_tel_01=="053"){?> selected="selected"<?}?>>053</option>
  186. <option value="054"<?if($nm_tel_01=="054"){?> selected="selected"<?}?>>054</option>
  187. <option value="055"<?if($nm_tel_01=="055"){?> selected="selected"<?}?>>055</option>
  188. <option value="061"<?if($nm_tel_01=="061"){?> selected="selected"<?}?>>061</option>
  189. <option value="062"<?if($nm_tel_01=="062"){?> selected="selected"<?}?>>062</option>
  190. <option value="063"<?if($nm_tel_01=="063"){?> selected="selected"<?}?>>063</option>
  191. <option value="064"<?if($nm_tel_01=="064"){?> selected="selected"<?}?>>064</option>
  192. </select>
  193. </span>
  194. <input type="text" class="inp_txt" style="width:22%;" name="nm_tel_02" id="nm_tel_02" value="<?=$nm_tel_02?>"> - <input type="text" class="inp_txt" style="width:22%;" name="nm_tel_03" id="nm_tel_03" value="<?=$nm_tel_03?>">
  195. <span class="td_txt">숫자만 입력</span>
  196. </td>
  197. </tr>
  198. </table>
  199. <h3>사업자 정보 (선택)</h3>
  200. <table class="tbl_h">
  201. <colgroup>
  202. <col width="16%">
  203. <col width="*">
  204. </colgroup>
  205. <tr>
  206. <th>상호</th>
  207. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_company_biz" id="nm_company_biz" value="<?=$nm_company_biz?>"></td>
  208. </tr>
  209. <tr>
  210. <th>사업자 정보</th>
  211. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_no_biz" id="nm_no_biz" value="<?=$nm_no_biz?>"></td>
  212. </tr>
  213. <tr>
  214. <th>대표자명</th>
  215. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_name_biz" id="nm_name_biz" value="<?=$nm_name_biz?>"></td>
  216. </tr>
  217. <tr>
  218. <th>종목</th>
  219. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_type_biz" id="nm_type_biz" value="<?=$nm_type_biz?>"></td>
  220. </tr>
  221. <tr>
  222. <th>업태</th>
  223. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_condition_biz" id="nm_condition_biz" value="<?=$nm_condition_biz?>"></td>
  224. </tr>
  225. <tr>
  226. <th>주소</th>
  227. <td>
  228. <input type="text" class="inp_txt" style="margin-right:5px;width:15%;" name="nm_zip_biz" id="nm_zip_biz" value="<?=$nm_zip_biz?>" readonly="readonly">
  229. <a href="#" class="rnd_btn ty3 gray" style="width:80px;" onClick="execDaumPostcode('_biz');">우편번호</a>
  230. <p><input type="text" class="inp_txt" style="width:85%;" name="nm_addr_biz" id="nm_addr_biz" value="<?=$nm_addr_biz?>" readonly="readonly"></p>
  231. <p><input type="text" class="inp_txt" style="width:85%;" name="nm_addr_sub_biz" id="nm_addr_sub_biz" value="<?=$nm_addr_sub_biz?>"></p>
  232. </td>
  233. </tr>
  234. </table>
  235. <h3>약관동의</h3>
  236. <div class="clause_chk_list">
  237. <p class="all"><span class="check_wrap"><input type="checkbox" name="agree_all" id="agree_all" value=""><i></i><label for="agree_all">전체 약관동의</label></span></p>
  238. <ul>
  239. <li>
  240. <span class="check_wrap"><input type="checkbox" name="ds_agree1" id="ds_agree1" value="Y"><i></i><label for="ds_agree1">[필수] 회원 이용약관</label></span>
  241. <div>
  242. <textarea cols="100" rows="10" readonly><? include("../include/clause_txt1.txt"); ?></textarea>
  243. </div>
  244. </li>
  245. <li>
  246. <span class="check_wrap"><input type="checkbox" name="ds_agree2" id="ds_agree2" value="Y"><i></i><label for="ds_agree2">[필수] 개인정보 수집이용</label></span>
  247. <div>
  248. <textarea cols="100" rows="10" readonly><? include("../include/clause_txt2.txt"); ?></textarea>
  249. </div>
  250. </li>
  251. <!-- <li>
  252. <span class="check_wrap"><input type="checkbox" name="ds_agree3" id="ds_agree3" value="Y"><i></i><label for="ds_agree3">[선택] 마케팅 목적 개인정보 수집/이용</label></span>
  253. <div>
  254. <textarea cols="100" rows="10"><? include("../include/clause_txt3.txt"); ?></textarea>
  255. </div>
  256. </li>
  257. <li>
  258. <span class="check_wrap"><input type="checkbox" name="ds_agree4" id="ds_agree4" value="Y"><i></i><label for="ds_agree4">[선택] 개인정보 제3자 제공</label></span>
  259. <div>
  260. <textarea cols="100" rows="10"><? include("../include/clause_txt4.txt"); ?></textarea>
  261. </div>
  262. </li>-->
  263. </ul>
  264. </div>
  265. </form>
  266. <div class="btn_center">
  267. <a href="#" class="button" id="btn_write">회원가입</a>
  268. </div>
  269. </div>
  270. </section>
  271. </section>
  272. <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
  273. <script>
  274. function execDaumPostcode(arg) {
  275. new daum.Postcode({
  276. oncomplete: function(data) {
  277. // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
  278. // 각 주소의 노출 규칙에 따라 주소를 조합한다.
  279. // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
  280. var fullAddr = ''; // 최종 주소 변수
  281. var extraAddr = ''; // 조합형 주소 변수
  282. // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
  283. if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
  284. fullAddr = data.roadAddress;
  285. } else { m
  286. fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
  287. }
  288. // 우편번호와 주소 정보를 해당 필드에 넣는다.
  289. document.getElementById('nm_zip'+arg).value = data.zonecode; //5자리 새우편번호 사용
  290. document.getElementById('nm_addr'+arg).value = fullAddr;
  291. // 커서를 상세주소 필드로 이동한다.
  292. document.getElementById('nm_addr_sub'+arg).focus();
  293. }
  294. }).open();
  295. }
  296. </script>
  297. <script laguage="javascript" type="text/javascript">
  298. $(document).ready(function() {
  299. setCodeSelect("listcode","ds_area", "dealer_master","ds_area","<?=$ds_area?>","선택하세요","");
  300. //$('select').jqTransSelectRefresh();
  301. // $("#sel_ds_area div.jq_sel span").html($("#sel_ds_area option:selected").text()); //select box 대신 보이는 span 에 select value의 텍스트를 setting
  302. /*
  303. $("#cd_dealerid").bind("keyup",function(){
  304. $("#idchkresult").val("N");
  305. });
  306. $("#nm_email3").on("change", function(){
  307. if($(this).val() == ""){
  308. $("#nm_email2").show();
  309. }else{
  310. $("#nm_email2").hide();
  311. }
  312. });
  313. $("#btn_delete").bind("click",function(){
  314. if(confirm("삭제하시겠습니까?")){
  315. $("#mode").val("Delete");
  316. $("#frmMember").submit();
  317. }
  318. });
  319. */
  320. $("#agree_all").bind("click",function(){
  321. agreeChkAll();
  322. });
  323. $("#agree_all").bind("keyup",function(){
  324. agreeChkAll();
  325. });
  326. $("#btn_idchk").bind("click",function(){
  327. if($("#cd_dealerid").val() == ""){
  328. alert("아이디를 입력하세요.");
  329. $("#cd_dealerid").focus();
  330. return false;
  331. }
  332. $.post("dealer_proc.php", { mode: "IdChk", cd_dealerid: $("#cd_dealerid").val()},function(data) {
  333. if(data=="Y"){
  334. if(confirm("이용가능합니다. 아이디를 사용하시겠습니까?")){
  335. $("#cd_dealerid").attr("readonly",true).css("background","#d2d3d5");
  336. $("#idchkresult").val("Y");
  337. return;
  338. }
  339. }else{
  340. alert("사용불가능한 아이디 입니다.");
  341. $("#idchkresult").val("N");
  342. return;
  343. }
  344. });
  345. return false;
  346. });
  347. $("#sel_nm_hp_01 div.jq_sel ul li a").bind("click",function(){
  348. $("#nm_hp_01").val($("#sel_nm_hp_01 option:selected").val());
  349. });
  350. $("#sel_nm_tel_01 div.jq_sel ul li a").bind("click",function(){
  351. $("#nm_tel_01").val($("#sel_nm_tel_01 option:selected").val());
  352. });
  353. $("#sel_nm_fax_01 div.jq_sel ul li a").bind("click",function(){
  354. $("#nm_fax_01").val($("#sel_nm_fax_01 option:selected").val());
  355. });
  356. $("#btn_write").bind("click",function(){
  357. <? if ($mode == "Add"){ ?>
  358. var fieldlist = [["cd_dealerid","아이디"],["nm_pass","비밀번호"],["nm_pass2","비밀번호"],["nm_name","이름"],["nm_hp_01","핸드폰"],["nm_hp_02","핸드폰"],["nm_hp_03","핸드폰"]]
  359. <? }else{ ?>
  360. var fieldlist = [["nm_name","이름"],["nm_hp_01","핸드폰"],["nm_hp_02","핸드폰"],["nm_hp_03","핸드폰"]]
  361. <? } ?>
  362. if (!fnCheckForm(fieldlist)){
  363. return false;
  364. }else{
  365. /*아이디 관련 처리*/
  366. var idReg1 = /[a-z]/g;
  367. var idReg2 = /[0-9]/g;
  368. /*
  369. if( !(idReg1.test( $("#cd_dealerid").val() )) || !(idReg2.test( $("#cd_dealerid").val() )) ) {
  370. alert("아이디는 영문/숫자 조합으로 이루어져야 합니다.");
  371. $("#cd_dealerid").focus();
  372. return false;
  373. }
  374. var idReg = /^[a-z]+[a-z0-9]{5,19}$/g;
  375. if( !idReg.test( $("#cd_dealerid").val() ) ) {
  376. alert("아이디는 영문자로 시작하는 6~20자 영문자 또는 숫자이어야 합니다.");
  377. $("#cd_dealerid").focus();
  378. return false;
  379. }
  380. if(!fnCheckAlphaNumber($("#cd_dealerid").val())){
  381. alert('아이디는 영문/숫자 조합으로 이루어져야 합니다.');
  382. return false;
  383. }
  384. if($("#cd_dealerid").val().length <6){
  385. alert("6글자 이상 아이디를 입력하세요");
  386. $("#cd_dealerid").focus();
  387. return false;
  388. }
  389. */
  390. if($("#idchkresult").val() != "Y"){
  391. alert("아이디 중복확인을 해 주세요.");
  392. $("#idchkresult").focus();
  393. return false;
  394. }
  395. <? if ($mode == "Add"){ ?>
  396. /*패스워드 처리*/
  397. // if($("#nm_pass").val().length == 0 || $("#nm_pass2").val().length == 0){
  398. // alert("패스워드를 입력하세요");
  399. // $("#nm_pass").focus();
  400. // return false;
  401. // }
  402. if($("#nm_pass").val().length > 0){
  403. if($("#cd_dealerid").val()==$("#nm_pass").val()){
  404. alert("아이디와 변경할 패스워드를 다르게입력하세요");
  405. $("#nm_pass").focus();
  406. return false;
  407. }
  408. if($("#nm_pass").val()!=$("#nm_pass2").val()){
  409. alert("입력하신 변경할 패스워드가 일치하지 않습니다.");
  410. $("#nm_pass").focus();
  411. return false;
  412. }
  413. /*
  414. if($("#nm_pass").val().length <6){
  415. alert("6글자 이상 변경할 패스워드를 입력하세요");
  416. $("#nm_pass").focus();
  417. return false;
  418. }
  419. */
  420. if(!isStrongValidFormPassword($("#nm_pass").val())){
  421. return false;
  422. }
  423. }
  424. <? } ?>
  425. /*
  426. if(!ChkNum($("#nm_hp").val())){
  427. alert("휴대폰 번호는 숫자만 입력하세요.");
  428. $("#nm_hp").focus();
  429. return false;
  430. }
  431. if($("#nm_hp_01").val() == ""){
  432. alert("휴대폰 번호를 입력하세요.");
  433. $("#nm_hp_01").focus();
  434. return false;
  435. }
  436. if($("#nm_hp_02").val() == ""){
  437. alert("휴대폰 번호를 입력하세요.");
  438. $("#nm_hp_02").focus();
  439. return false;
  440. }
  441. if($("#nm_hp_03").val() == ""){
  442. alert("휴대폰 번호를 입력하세요.");
  443. $("#nm_hp_03").focus();
  444. return false;
  445. }
  446. */
  447. /*
  448. $("#nm_hp").val($("#nm_hp_01").val()+"-"+$("#nm_hp_02").val()+"-"+$("#nm_hp_03").val());
  449. if($("#nm_email1").val() == ""){
  450. alert("이메일을 입력하세요.");
  451. $("#nm_email1").focus();
  452. return false;
  453. }
  454. if($("#nm_email3").val() == ""){
  455. if($("#nm_email2").val() == ""){
  456. alert("이메일을 입력하세요.");
  457. $("#nm_email2").focus();
  458. return false;
  459. }
  460. $("#nm_email").val($("#nm_email1").val()+"@"+$("#nm_email2").val());
  461. }else{
  462. $("#nm_email").val($("#nm_email1").val()+"@"+$("#nm_email3").val());
  463. }
  464. */
  465. <? if ($mode == "Add"){ ?>
  466. // $("#nm_email").val($("#nm_email1").val()+"@"+$("#nm_email2").val());
  467. <? } ?>
  468. /*
  469. if($("#nm_addr").val() == ""){
  470. alert("주소를 입력하세요.");
  471. $("#nm_addr").focus();
  472. return false;
  473. }
  474. if($("#nm_addr_sub").val() == ""){
  475. alert("주소를 입력하세요.");
  476. $("#nm_addr_sub").focus();
  477. return false;
  478. }
  479. */
  480. if(!document.getElementById("ds_agree1").checked){
  481. alert('[필수] 회원 이용약관에 동의해 주세요.');
  482. $("#ds_agree1").focus();
  483. return false;
  484. }
  485. if(!document.getElementById("ds_agree2").checked){
  486. alert('[필수] 개인정보 수집이용 에 동의해 주세요.');
  487. $("#ds_agree2").focus();
  488. return false;
  489. }
  490. var c=confirm("정보를 등록하시겠습니까?");
  491. if(c){
  492. $("#btn_write").hide();
  493. $("#frmMember").submit();
  494. }else{
  495. $("#btn_write").show();
  496. return false;
  497. }
  498. }
  499. });
  500. });
  501. function agreeChkAll(){
  502. if(document.getElementById("agree_all").checked){
  503. document.getElementById("ds_agree1").checked = true;
  504. document.getElementById("ds_agree2").checked = true;
  505. }else{
  506. document.getElementById("ds_agree1").checked = false;
  507. document.getElementById("ds_agree2").checked = false;
  508. }
  509. }
  510. </script>
  511. <script language="javascript">
  512. <!--
  513. function sel_1(sltObj)
  514. {
  515. document.getElementById("nm_email2").value = sltObj;
  516. if (sltObj == "")
  517. {
  518. document.getElementById("nm_email2").readOnly = false;
  519. }else{
  520. document.getElementById("nm_email2").readOnly = true;
  521. }
  522. }
  523. //-->
  524. </script>
  525. <? include("../include/inc_footer.php") ?>
  526. <? include("../include/inc_bottom.php") ?>
  527. <?
  528. mysql_close($connect);
  529. ?>