join_kcar.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  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="B0"/>
  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. <tr>
  199. <th>지점선택</th>
  200. <td>
  201. <input type="hidden" name="ds_company_bp1" id="ds_company_bp1" value="A0"/>
  202. 선인모터스
  203. <select style="width:130px;" name="ds_branch1" id="ds_branch1"></select>
  204. <span style="display:inline-block;width:30px;">&nbsp;</span>
  205. <input type="hidden" name="ds_company_bp2" id="ds_company_bp2" value="B0"/>
  206. 고진모터스
  207. <select style="width:130px;" name="ds_branch2" id="ds_branch2"></select>
  208. <span style="display:inline-block;width:30px;">&nbsp;</span>
  209. <input type="hidden" name="ds_company_bp3" id="ds_company_bp3" value="C0"/>
  210. 선진모터스
  211. <select style="width:130px;" name="ds_branch3" id="ds_branch3"></select>
  212. </td>
  213. </tr>
  214. </table>
  215. <h3>사업자 정보 (선택)</h3>
  216. <table class="tbl_h">
  217. <colgroup>
  218. <col width="16%">
  219. <col width="*">
  220. </colgroup>
  221. <tr>
  222. <th>상호</th>
  223. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_company_biz" id="nm_company_biz" value="<?=$nm_company_biz?>"></td>
  224. </tr>
  225. <tr>
  226. <th>사업자 정보</th>
  227. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_no_biz" id="nm_no_biz" value="<?=$nm_no_biz?>"></td>
  228. </tr>
  229. <tr>
  230. <th>대표자명</th>
  231. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_name_biz" id="nm_name_biz" value="<?=$nm_name_biz?>"></td>
  232. </tr>
  233. <tr>
  234. <th>종목</th>
  235. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_type_biz" id="nm_type_biz" value="<?=$nm_type_biz?>"></td>
  236. </tr>
  237. <tr>
  238. <th>업태</th>
  239. <td><input type="text" class="inp_txt" style="width:330px;" name="nm_condition_biz" id="nm_condition_biz" value="<?=$nm_condition_biz?>"></td>
  240. </tr>
  241. <tr>
  242. <th>주소</th>
  243. <td>
  244. <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">
  245. <a href="#" class="rnd_btn ty3 gray" style="width:80px;" onClick="execDaumPostcode('_biz');">우편번호</a>
  246. <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>
  247. <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>
  248. </td>
  249. </tr>
  250. </table>
  251. <h3>약관동의</h3>
  252. <div class="clause_chk_list">
  253. <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>
  254. <ul>
  255. <li>
  256. <span class="check_wrap"><input type="checkbox" name="ds_agree1" id="ds_agree1" value="Y"><i></i><label for="ds_agree1">[필수] 회원 이용약관</label></span>
  257. <div>
  258. <textarea cols="100" rows="10" readonly><? include("../include/clause_txt1.txt"); ?></textarea>
  259. </div>
  260. </li>
  261. <li>
  262. <span class="check_wrap"><input type="checkbox" name="ds_agree2" id="ds_agree2" value="Y"><i></i><label for="ds_agree2">[필수] 개인정보 수집이용</label></span>
  263. <div>
  264. <textarea cols="100" rows="10" readonly><? include("../include/clause_txt2.txt"); ?></textarea>
  265. </div>
  266. </li>
  267. <!-- <li>
  268. <span class="check_wrap"><input type="checkbox" name="ds_agree3" id="ds_agree3" value="Y"><i></i><label for="ds_agree3">[선택] 마케팅 목적 개인정보 수집/이용</label></span>
  269. <div>
  270. <textarea cols="100" rows="10"><? include("../include/clause_txt3.txt"); ?></textarea>
  271. </div>
  272. </li>
  273. <li>
  274. <span class="check_wrap"><input type="checkbox" name="ds_agree4" id="ds_agree4" value="Y"><i></i><label for="ds_agree4">[선택] 개인정보 제3자 제공</label></span>
  275. <div>
  276. <textarea cols="100" rows="10"><? include("../include/clause_txt4.txt"); ?></textarea>
  277. </div>
  278. </li>-->
  279. </ul>
  280. </div>
  281. </form>
  282. <div class="btn_center">
  283. <a href="#" class="button" id="btn_write">회원가입</a>
  284. </div>
  285. </div>
  286. </section>
  287. </section>
  288. <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
  289. <script>
  290. function execDaumPostcode(arg) {
  291. new daum.Postcode({
  292. oncomplete: function(data) {
  293. // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
  294. // 각 주소의 노출 규칙에 따라 주소를 조합한다.
  295. // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
  296. var fullAddr = ''; // 최종 주소 변수
  297. var extraAddr = ''; // 조합형 주소 변수
  298. // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
  299. if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
  300. fullAddr = data.roadAddress;
  301. } else { m
  302. fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
  303. }
  304. // 우편번호와 주소 정보를 해당 필드에 넣는다.
  305. document.getElementById('nm_zip'+arg).value = data.zonecode; //5자리 새우편번호 사용
  306. document.getElementById('nm_addr'+arg).value = fullAddr;
  307. // 커서를 상세주소 필드로 이동한다.
  308. document.getElementById('nm_addr_sub'+arg).focus();
  309. }
  310. }).open();
  311. }
  312. </script>
  313. <script laguage="javascript" type="text/javascript">
  314. $(document).ready(function() {
  315. setCodeSelect("listcode","ds_area", "dealer_master","ds_area","<?=$ds_area?>","선택하세요","");
  316. setCodeSelect("listcode","ds_branch1", "member_master","ds_branch","<?=$ds_branch1?>","선택하세요","A0");
  317. setCodeSelect("listcode","ds_branch2", "member_master","ds_branch","<?=$ds_branch2?>","선택하세요","B0");
  318. setCodeSelect("listcode","ds_branch3", "member_master","ds_branch","<?=$ds_branch3?>","선택하세요","C0");
  319. //$('select').jqTransSelectRefresh();
  320. // $("#sel_ds_area div.jq_sel span").html($("#sel_ds_area option:selected").text()); //select box 대신 보이는 span 에 select value의 텍스트를 setting
  321. /*
  322. $("#cd_dealerid").bind("keyup",function(){
  323. $("#idchkresult").val("N");
  324. });
  325. $("#nm_email3").on("change", function(){
  326. if($(this).val() == ""){
  327. $("#nm_email2").show();
  328. }else{
  329. $("#nm_email2").hide();
  330. }
  331. });
  332. $("#btn_delete").bind("click",function(){
  333. if(confirm("삭제하시겠습니까?")){
  334. $("#mode").val("Delete");
  335. $("#frmMember").submit();
  336. }
  337. });
  338. */
  339. $("#agree_all").bind("click",function(){
  340. agreeChkAll();
  341. });
  342. $("#agree_all").bind("keyup",function(){
  343. agreeChkAll();
  344. });
  345. $("#btn_idchk").bind("click",function(){
  346. if($("#cd_dealerid").val() == ""){
  347. alert("아이디를 입력하세요.");
  348. $("#cd_dealerid").focus();
  349. return false;
  350. }
  351. $.post("dealer_proc.php", { mode: "IdChk", cd_dealerid: $("#cd_dealerid").val()},function(data) {
  352. if(data=="Y"){
  353. if(confirm("이용가능합니다. 아이디를 사용하시겠습니까?")){
  354. $("#cd_dealerid").attr("readonly",true).css("background","#d2d3d5");
  355. $("#idchkresult").val("Y");
  356. return;
  357. }
  358. }else{
  359. alert("사용불가능한 아이디 입니다.");
  360. $("#idchkresult").val("N");
  361. return;
  362. }
  363. });
  364. return false;
  365. });
  366. $("#sel_nm_hp_01 div.jq_sel ul li a").bind("click",function(){
  367. $("#nm_hp_01").val($("#sel_nm_hp_01 option:selected").val());
  368. });
  369. $("#sel_nm_tel_01 div.jq_sel ul li a").bind("click",function(){
  370. $("#nm_tel_01").val($("#sel_nm_tel_01 option:selected").val());
  371. });
  372. $("#sel_nm_fax_01 div.jq_sel ul li a").bind("click",function(){
  373. $("#nm_fax_01").val($("#sel_nm_fax_01 option:selected").val());
  374. });
  375. $("#btn_write").bind("click",function(){
  376. <? if ($mode == "Add"){ ?>
  377. var fieldlist = [["cd_dealerid","아이디"],["nm_pass","비밀번호"],["nm_pass2","비밀번호"],["nm_name","이름"],["nm_hp_01","핸드폰"],["nm_hp_02","핸드폰"],["nm_hp_03","핸드폰"]]
  378. <? }else{ ?>
  379. var fieldlist = [["nm_name","이름"],["nm_hp_01","핸드폰"],["nm_hp_02","핸드폰"],["nm_hp_03","핸드폰"]]
  380. <? } ?>
  381. if (!fnCheckForm(fieldlist)){
  382. return false;
  383. }else{
  384. /*아이디 관련 처리*/
  385. var idReg1 = /[a-z]/g;
  386. var idReg2 = /[0-9]/g;
  387. /*
  388. if( !(idReg1.test( $("#cd_dealerid").val() )) || !(idReg2.test( $("#cd_dealerid").val() )) ) {
  389. alert("아이디는 영문/숫자 조합으로 이루어져야 합니다.");
  390. $("#cd_dealerid").focus();
  391. return false;
  392. }
  393. var idReg = /^[a-z]+[a-z0-9]{5,19}$/g;
  394. if( !idReg.test( $("#cd_dealerid").val() ) ) {
  395. alert("아이디는 영문자로 시작하는 6~20자 영문자 또는 숫자이어야 합니다.");
  396. $("#cd_dealerid").focus();
  397. return false;
  398. }
  399. if(!fnCheckAlphaNumber($("#cd_dealerid").val())){
  400. alert('아이디는 영문/숫자 조합으로 이루어져야 합니다.');
  401. return false;
  402. }
  403. if($("#cd_dealerid").val().length <6){
  404. alert("6글자 이상 아이디를 입력하세요");
  405. $("#cd_dealerid").focus();
  406. return false;
  407. }
  408. */
  409. if($("#idchkresult").val() != "Y"){
  410. alert("아이디 중복확인을 해 주세요.");
  411. $("#idchkresult").focus();
  412. return false;
  413. }
  414. <? if ($mode == "Add"){ ?>
  415. /*패스워드 처리*/
  416. // if($("#nm_pass").val().length == 0 || $("#nm_pass2").val().length == 0){
  417. // alert("패스워드를 입력하세요");
  418. // $("#nm_pass").focus();
  419. // return false;
  420. // }
  421. if($("#nm_pass").val().length > 0){
  422. if($("#cd_dealerid").val()==$("#nm_pass").val()){
  423. alert("아이디와 변경할 패스워드를 다르게입력하세요");
  424. $("#nm_pass").focus();
  425. return false;
  426. }
  427. if($("#nm_pass").val()!=$("#nm_pass2").val()){
  428. alert("입력하신 변경할 패스워드가 일치하지 않습니다.");
  429. $("#nm_pass").focus();
  430. return false;
  431. }
  432. /*
  433. if($("#nm_pass").val().length <6){
  434. alert("6글자 이상 변경할 패스워드를 입력하세요");
  435. $("#nm_pass").focus();
  436. return false;
  437. }
  438. */
  439. if(!isStrongValidFormPassword($("#nm_pass").val())){
  440. return false;
  441. }
  442. }
  443. <? } ?>
  444. /*
  445. if(!ChkNum($("#nm_hp").val())){
  446. alert("휴대폰 번호는 숫자만 입력하세요.");
  447. $("#nm_hp").focus();
  448. return false;
  449. }
  450. if($("#nm_hp_01").val() == ""){
  451. alert("휴대폰 번호를 입력하세요.");
  452. $("#nm_hp_01").focus();
  453. return false;
  454. }
  455. if($("#nm_hp_02").val() == ""){
  456. alert("휴대폰 번호를 입력하세요.");
  457. $("#nm_hp_02").focus();
  458. return false;
  459. }
  460. if($("#nm_hp_03").val() == ""){
  461. alert("휴대폰 번호를 입력하세요.");
  462. $("#nm_hp_03").focus();
  463. return false;
  464. }
  465. */
  466. /*
  467. $("#nm_hp").val($("#nm_hp_01").val()+"-"+$("#nm_hp_02").val()+"-"+$("#nm_hp_03").val());
  468. if($("#nm_email1").val() == ""){
  469. alert("이메일을 입력하세요.");
  470. $("#nm_email1").focus();
  471. return false;
  472. }
  473. if($("#nm_email3").val() == ""){
  474. if($("#nm_email2").val() == ""){
  475. alert("이메일을 입력하세요.");
  476. $("#nm_email2").focus();
  477. return false;
  478. }
  479. $("#nm_email").val($("#nm_email1").val()+"@"+$("#nm_email2").val());
  480. }else{
  481. $("#nm_email").val($("#nm_email1").val()+"@"+$("#nm_email3").val());
  482. }
  483. */
  484. <? if ($mode == "Add"){ ?>
  485. // $("#nm_email").val($("#nm_email1").val()+"@"+$("#nm_email2").val());
  486. <? } ?>
  487. <? if ($mode == "Add"){ ?>
  488. if($("#ds_branch1").val() == "" && $("#ds_branch2").val() == "" && $("#ds_branch3").val() == ""){
  489. alert("지점은 하나 이상 선택해 주세요.");
  490. return false;
  491. }
  492. <? } ?>
  493. /*
  494. if($("#nm_addr").val() == ""){
  495. alert("주소를 입력하세요.");
  496. $("#nm_addr").focus();
  497. return false;
  498. }
  499. if($("#nm_addr_sub").val() == ""){
  500. alert("주소를 입력하세요.");
  501. $("#nm_addr_sub").focus();
  502. return false;
  503. }
  504. */
  505. if(!document.getElementById("ds_agree1").checked){
  506. alert('[필수] 회원 이용약관에 동의해 주세요.');
  507. $("#ds_agree1").focus();
  508. return false;
  509. }
  510. if(!document.getElementById("ds_agree2").checked){
  511. alert('[필수] 개인정보 수집이용 에 동의해 주세요.');
  512. $("#ds_agree2").focus();
  513. return false;
  514. }
  515. var c=confirm("정보를 등록하시겠습니까?");
  516. if(c){
  517. $("#btn_write").hide();
  518. $("#frmMember").submit();
  519. }else{
  520. $("#btn_write").show();
  521. return false;
  522. }
  523. }
  524. });
  525. });
  526. function agreeChkAll(){
  527. if(document.getElementById("agree_all").checked){
  528. document.getElementById("ds_agree1").checked = true;
  529. document.getElementById("ds_agree2").checked = true;
  530. }else{
  531. document.getElementById("ds_agree1").checked = false;
  532. document.getElementById("ds_agree2").checked = false;
  533. }
  534. }
  535. </script>
  536. <script language="javascript">
  537. <!--
  538. function sel_1(sltObj)
  539. {
  540. document.getElementById("nm_email2").value = sltObj;
  541. if (sltObj == "")
  542. {
  543. document.getElementById("nm_email2").readOnly = false;
  544. }else{
  545. document.getElementById("nm_email2").readOnly = true;
  546. }
  547. }
  548. //-->
  549. </script>
  550. <? include("../include/inc_footer.php") ?>
  551. <? include("../include/inc_bottom.php") ?>
  552. <?
  553. mysql_close($connect);
  554. ?>