dealer_view2_back.php 25 KB

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