| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- include $_SERVER['DOCUMENT_ROOT'].'/common/dealer_chk.php';
- ?>
- <? include("../include/inc_top.php") ?>
- <? include("../include/inc_header.php") ?>
- <section id="wrap">
- <section id="visual" class="visual_mypage">
- <h2>마이페이지</h2>
- <p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
- </section>
- <section id="content">
- <ul class="location">
- <li><a href="/" class="home">홈</a></li>
- <li><span class="depth1">마이페이지</span>
- <ul class="sub_depth">
- <li><a href="#">마이페이지</a></li>
- <li><a href="#">입찰정보</a></li>
- <li><a href="#">차량정보</a></li>
- <li><a href="#">문의내역</a></li>
- </ul>
- </li>
- <li><span class="depth2">딜러</span></li>
- </ul>
- <? include("./inc_menu_dealer.php") ?>
- <?
- // $_SESSION['s_cd_dealer']
- // $_SESSION['s_cd_dealer_p']
- $cd_dealer = $_SESSION['s_cd_dealer'];
- $s_ds_usertype = $_SESSION['s_ds_usertype'];
- $sql ="SELECT
- *
- , getCode('member_master','ds_company_bp',ds_company_bp1) as nm_company_bp1
- , getCode('member_master','ds_branch',ds_branch1) as nm_branch1
- , getCode('member_master','ds_company_bp',ds_company_bp2) as nm_company_bp2
- , getCode('member_master','ds_branch',ds_branch2) as nm_branch2
- , getCode('member_master','ds_company_bp',ds_company_bp3) as nm_company_bp3
- , getCode('member_master','ds_branch',ds_branch3) as nm_branch3
- FROM dealer_master
- WHERE cd_dealer='$cd_dealer' AND ds_delind='N'";
-
- $mode = "AddDealer";
- $col=mysql_fetch_array(mysql_query($sql));
- if (!empty($col[cd_dealer])){
- $cd_dealer = $col[cd_dealer];
- $cd_dealerid = $col[cd_dealerid];
- $cd_dealer_p = $col[cd_dealer_p];
- $nm_pass = $col[nm_pass];
- $ds_type = $col[ds_type];
- $ds_level = $col[ds_level];
- $nm_company = $col[nm_company];
- $nm_name = $col[nm_name];
- $nm_birth = $col[nm_birth];
- $nm_tel_01 = $col[nm_tel_01];
- $nm_tel_02 = $col[nm_tel_02];
- $nm_tel_03 = $col[nm_tel_03];
- $nm_hp_01 = $col[nm_hp_01];
- $nm_hp_02 = $col[nm_hp_02];
- $nm_hp_03 = $col[nm_hp_03];
- $nm_fax_01 = $col[nm_fax_01];
- $nm_fax_02 = $col[nm_fax_02];
- $nm_fax_03 = $col[nm_fax_03];
- $nm_email = $col[nm_email];
- $nm_zip = $col[nm_zip];
- $nm_addr = $col[nm_addr];
- $nm_addr_sub = $col[nm_addr_sub];
- $nm_etc_01 = $col[nm_etc_01];
- $nm_etc_02 = $col[nm_etc_02];
- $nm_etc_03 = $col[nm_etc_03];
- $ds_status = $col[ds_status];
- $nm_company_biz = $col[nm_company_biz];
- $nm_name_biz = $col[nm_name_biz];
- $nm_no_biz = $col[nm_no_biz];
- $nm_date_biz = $col[nm_date_biz];
- $nm_type_biz = $col[nm_type_biz];
- $nm_condition_biz = $col[nm_condition_biz];
- $nm_tel_biz_01 = $col[nm_tel_biz_01];
- $nm_tel_biz_02 = $col[nm_tel_biz_02];
- $nm_tel_biz_03 = $col[nm_tel_biz_03];
- $nm_hp_biz_01 = $col[nm_hp_biz_01];
- $nm_hp_biz_02 = $col[nm_hp_biz_02];
- $nm_hp_biz_03 = $col[nm_hp_biz_03];
- $nm_fax_biz_01 = $col[nm_fax_biz_01];
- $nm_fax_biz_02 = $col[nm_fax_biz_02];
- $nm_fax_biz_03 = $col[nm_fax_biz_03];
- $nm_email_biz = $col[nm_email_biz];
- $nm_zip_biz = $col[nm_zip_biz];
- $nm_addr_biz = $col[nm_addr_biz];
- $nm_addr_sub_biz = $col[nm_addr_sub_biz];
- $nm_company_bp1 = $col[nm_company_bp1];
- $nm_branch1 = $col[nm_branch1];
- $nm_company_bp2 = $col[nm_company_bp2];
- $nm_branch2 = $col[nm_branch2];
- $nm_company_bp3 = $col[nm_company_bp3];
- $nm_branch3 = $col[nm_branch3];
- $nm_area = $col[nm_area];
- $nm_title = $col[nm_title];
- $nm_file = $col[nm_file];
- $nm_etc = $col[nm_etc];
- $nm_deposit = $col[nm_deposit];
- $dt_insert = $col[dt_insert];
- $nm_insert = $col[nm_insert];
- $dt_update = $col[dt_update];
- $nm_update = $col[nm_update];
- $ds_delind = $col[ds_delind];
- $mode = "UpdateDealer";
- }else{
- AlertBack("지정되지 않은 요청입니다.");
- }
- ?>
- <h3>정보수정</h3>
- <form id="frmMember" name="frmMember" method="post" action="dealer_proc.php" enctype="multipart/form-data">
- <input type="hidden" name="validate" id="validate" value=""/>
- <input type="hidden" name="ds_type" id="ds_type" value="D0"/>
- <input type="hidden" name="ds_level" id="ds_level" value="<?=$ds_level?>"/>
- <input type="hidden" name="cd_dealer" id="cd_dealer" value="<?=$cd_dealer?>"/>
- <input type="hidden" name="mode" id="mode" value="<?=$mode?>"/>
- <input type="hidden" name="nm_email" id="nm_email" value="<?=$nm_email?>"/>
- <input type="hidden" name="nm_hp_01" id="nm_hp_01" value="<?=$nm_hp_01?>"/>
- <input type="hidden" name="nm_tel_01" id="nm_tel_01" value="<?=$nm_tel_01?>"/>
- <input type="hidden" name="nm_fax_01" id="nm_fax_01" value="<?=$nm_fax_01?>"/>
- <table class="tbl_h">
- <colgroup>
- <col width="16%">
- <col width="34%">
- <col width="16%">
- <col width="*">
- </colgroup>
- <tr>
- <th>아이디</th>
- <td>
- <? if ($mode == "AddDealer"){ ?>
- <input type="text" class="inp_txt" style="width:330px;" name="cd_dealerid" id="cd_dealerid">
- <? }else{ ?>
- <?=$cd_dealerid?>
- <? } ?>
- </td>
- <th>비밀번호</th>
- <td><input type="password" class="inp_txt" style="width:330px;" name="nm_pass" id="nm_pass"></td>
- </tr>
- <tr>
- <th>이름</th>
- <td><input type="text" class="inp_txt" style="width:330px;" name="nm_name" id="nm_name" value="<?=$nm_name?>"></td>
- <th>핸드폰</th>
- <td>
- <span class="select" style="margin-right:5px;width:22%;" id="sel_nm_hp_01">
- <select>
- <option value="" >선택</option>
- <option value="010" <?if($nm_hp_01=="010"){?>selected="selected"<?}?> >010</option>
- <option value="011" <?if($nm_hp_01=="011"){?>selected="selected"<?}?> >011</option>
- <option value="016" <?if($nm_hp_01=="016"){?>selected="selected"<?}?> >016</option>
- <option value="017" <?if($nm_hp_01=="017"){?>selected="selected"<?}?> >017</option>
- <option value="018" <?if($nm_hp_01=="018"){?>selected="selected"<?}?> >018</option>
- <option value="019" <?if($nm_hp_01=="019"){?>selected="selected"<?}?> >019</option>
- <option value="070" <?if($nm_hp_01=="070"){?>selected="selected"<?}?> >070</option>
- </select>
- </span>
- <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?>">
- </td>
- </tr>
- <tr>
- <th>상호</th>
- <td><input type="text" class="inp_txt" style="width:330px;" name="nm_company" id="nm_company" value="<?=$nm_company?>"></td>
- <th>연락처</th>
- <td>
- <span class="select" style="margin-right:5px;width:22%;" id="sel_nm_tel_01">
- <select>
- <option value="" >선택</option>
- <option value="02" <?if($nm_tel_01=="02"){?> selected="selected"<?}?> >02</option>
- <option value="031" <?if($nm_tel_01=="031"){?> selected="selected"<?}?> >031</option>
- <option value="032" <?if($nm_tel_01=="032"){?> selected="selected"<?}?> >032</option>
- <option value="033" <?if($nm_tel_01=="033"){?> selected="selected"<?}?> >033</option>
- <option value="041" <?if($nm_tel_01=="041"){?> selected="selected"<?}?> >041</option>
- <option value="042" <?if($nm_tel_01=="042"){?> selected="selected"<?}?> >042</option>
- <option value="043" <?if($nm_tel_01=="043"){?> selected="selected"<?}?> >043</option>
- <option value="044" <?if($nm_tel_01=="044"){?> selected="selected"<?}?> >044</option>
- <option value="051" <?if($nm_tel_01=="051"){?> selected="selected"<?}?> >051</option>
- <option value="052" <?if($nm_tel_01=="052"){?> selected="selected"<?}?> >052</option>
- <option value="053" <?if($nm_tel_01=="053"){?> selected="selected"<?}?> >053</option>
- <option value="054" <?if($nm_tel_01=="054"){?> selected="selected"<?}?> >054</option>
- <option value="055" <?if($nm_tel_01=="055"){?> selected="selected"<?}?> >055</option>
- <option value="061" <?if($nm_tel_01=="061"){?> selected="selected"<?}?> >061</option>
- <option value="062" <?if($nm_tel_01=="062"){?> selected="selected"<?}?> >062</option>
- <option value="063" <?if($nm_tel_01=="063"){?> selected="selected"<?}?> >063</option>
- <option value="064" <?if($nm_tel_01=="064"){?> selected="selected"<?}?> >064</option>
- </select>
- </span>
- <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?>">
- </td>
- </tr>
- <tr>
- <th>팩스번호</th>
- <td colspan="3">
- <span class="select" style="margin-right:5px;width:12%;" id="sel_nm_fax_01">
- <select>
- <option value="" >선택</option>
- <option value="02"<?if($nm_fax_01=="02"){?> selected="selected"<?}?>>02</option>
- <option value="031"<?if($nm_fax_01=="031"){?> selected="selected"<?}?>>031</option>
- <option value="032"<?if($nm_faxl_01=="032"){?> selected="selected"<?}?>>032</option>
- <option value="033"<?if($nm_fax_01=="033"){?> selected="selected"<?}?>>033</option>
- <option value="041"<?if($nm_fax_01=="041"){?> selected="selected"<?}?>>041</option>
- <option value="042"<?if($nm_fax_01=="042"){?> selected="selected"<?}?>>042</option>
- <option value="043"<?if($nm_fax_01=="043"){?> selected="selected"<?}?>>043</option>
- <option value="044"<?if($nm_fax_01=="044"){?> selected="selected"<?}?>>044</option>
- <option value="051"<?if($nm_fax_01=="051"){?> selected="selected"<?}?>>051</option>
- <option value="052"<?if($nm_fax_01=="052"){?> selected="selected"<?}?>>052</option>
- <option value="053"<?if($nm_fax_01=="053"){?> selected="selected"<?}?>>053</option>
- <option value="054"<?if($nm_fax_01=="054"){?> selected="selected"<?}?>>054</option>
- <option value="055"<?if($nm_fax_01=="055"){?> selected="selected"<?}?>>055</option>
- <option value="061"<?if($nm_fax_01=="061"){?> selected="selected"<?}?>>061</option>
- <option value="062"<?if($nm_fax_01=="062"){?> selected="selected"<?}?>>062</option>
- <option value="063"<?if($nm_fax_01=="063"){?> selected="selected"<?}?>>063</option>
- <option value="064"<?if($nm_fax_01=="064"){?> selected="selected"<?}?>>064</option>
- </select>
- </span>
- <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_03" id="nm_fax_03" value="<?=$nm_fax_03?>">
- </td>
- </tr>
- <tr>
- <th>주소</th>
- <td colspan="3" class="address">
- <input type="text" class="inp_txt" style="width:255px;" name="nm_zip" id="nm_zip" value="<?=$nm_zip?>" readonly="readonly"> <a href="#" class="td_btn ty2" onClick="execDaumPostcode('');">우편번호</a>
- <p><input type="text" class="inp_txt" style="width:100%;" name="nm_addr" id="nm_addr" value="<?=$nm_addr?>" readonly="readonly"></p>
- <p><input type="text" class="inp_txt" style="width:100%;" name="nm_addr_sub" id="nm_addr_sub" value="<?=$nm_addr_sub?>"></p>
- </td>
- </tr>
- <tr>
- <th>사진(필수입력)</th>
- <td colspan="3">
- <div class="filebox">
- <label for="nm_file">찾아보기</label>
- <input class="upload-name" value="">
- <input type="file" class="upload-hidden" name="nm_file" id="nm_file">
- </div>
- <? if(!empty($nm_file)){ ?>
- <span class="thumb"><img src="<?=UPLOAD_PATH?>dealer/nm_file/<?=$nm_file?>" alt="" width="100"></span>
- <? } ?>
- </td>
- </tr>
- </table>
- <h3>사업자정보</h3>
- <table class="tbl_h">
- <colgroup>
- <col width="16%">
- <col width="34%">
- <col width="16%">
- <col width="*">
- </colgroup>
- <tr>
- <th>상호</th>
- <td><input type="text" class="inp_txt" style="width:330px;" name="nm_company_biz" id="nm_company_biz" value="<?=$nm_company_biz?>"></td>
- <th>사업자번호</th>
- <td><input type="password" class="inp_txt" style="width:330px;" name="nm_no_biz" id="nm_no_biz" value="<?=$nm_no_biz?>"></td>
- </tr>
- <tr>
- <th>대표자명</th>
- <td><input type="text" class="inp_txt" style="width:330px;" name="nm_name_biz" id="nm_name_biz" value="<?=$nm_name_biz?>"></td>
- <th>종목</th>
- <td><input type="text" class="inp_txt" style="width:330px;" name="nm_type_biz" id="nm_type_biz" value="<?=$nm_type_biz?>"></td>
- </tr>
- <tr>
- <th>업태</th>
- <td colspan="3"><input type="text" class="inp_txt" style="width:330px;" name="nm_condition_biz" id="nm_condition_biz" value="<?=$nm_condition_biz?>"></td>
- </tr>
- <tr>
- <th>주소</th>
- <td colspan="3" class="address">
- <input type="text" class="inp_txt" style="width:255px;" name="nm_zip_biz" id="nm_zip_biz" value="<?=$nm_zip_biz?>" readonly="readonly"> <a href="#" class="td_btn ty2" onClick="execDaumPostcode('_biz');">우편번호</a>
- <p><input type="text" class="inp_txt" style="width:100%;" name="nm_addr_biz" id="nm_addr_biz" value="<?=$nm_addr_biz?>" readonly="readonly"></p>
- <p><input type="text" class="inp_txt" style="width:100%;" name="nm_addr_sub_biz" id="nm_addr_sub_biz" value="<?=$nm_addr_sub_biz?>"></p>
- </td>
- </tr>
- <? if($s_ds_usertype == "B0"){ ?>
- <tr>
- <th>지점</th>
- <td colspan="3">
- <? if($nm_branch1 != ""){ ?>
- 선인모터스 :
- <?=$nm_branch1?>
-
- <? } ?>
- <? if($nm_branch2 != ""){ ?>
- 고진모터스 :
- <?=$nm_branch2?>
-
- <? } ?>
- <? if($nm_branch3 != ""){ ?>
- 선진모터스 :
- <?=$nm_branch3?>
-
- <? } ?>
- </td>
- </tr>
- <? } ?>
- <tr>
- <th>지역</th>
- <td colspan="3" class="address">
- <?
- $sql = "SELECT cd_seq as seq, nm_code as code , nm_name as name , nm_pcode as pcode , nm_etc_01 as etc
- FROM code_master WHERE nm_table ='member_master' AND nm_column='ds_area' and ds_delind = 'N' order by name ";
-
- $rows = mysql_query($sql);
-
- $i=1;
- while($row = mysql_fetch_array($rows)) {
- ?>
- <span class="check_wrap" style="width:220px;"><input type="checkbox" name="nm_area[]" id="nm_area<?=$i?>" value="<?=$row[code]?>"<?if(strpos($nm_area,$row[code]) !== false){?> checked="checked"<?}?>><i></i><label for="nm_area<?=$i?>"><?=$row[name]?></label></span>
- <?
- $i++;
- }
- ?>
- </td>
- </tr>
- </table>
- </form>
- <div class="btn_right">
- <a href="#" class="button" id="btn_write">수정하기</a>
- </div>
- </section>
- </section>
- <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
- <script>
- function execDaumPostcode(arg) {
- new daum.Postcode({
- oncomplete: function(data) {
- // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
- // 각 주소의 노출 규칙에 따라 주소를 조합한다.
- // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
- var fullAddr = ''; // 최종 주소 변수
- var extraAddr = ''; // 조합형 주소 변수
- // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
- if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
- fullAddr = data.roadAddress;
- } else { m
- fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
- }
- // 우편번호와 주소 정보를 해당 필드에 넣는다.
- document.getElementById('nm_zip'+arg).value = data.zonecode; //5자리 새우편번호 사용
- document.getElementById('nm_addr'+arg).value = fullAddr;
- // 커서를 상세주소 필드로 이동한다.
- document.getElementById('nm_addr_sub'+arg).focus();
- }
- }).open();
- }
- </script>
- <script laguage="javascript" type="text/javascript">
- $(document).ready(function() {
-
- $("#sel_nm_hp_01 div.jq_sel ul li a").bind("click",function(){
- $("#nm_hp_01").val($("#sel_nm_hp_01 option:selected").val());
- });
- $("#sel_nm_tel_01 div.jq_sel ul li a").bind("click",function(){
- $("#nm_tel_01").val($("#sel_nm_tel_01 option:selected").val());
- });
- $("#sel_nm_fax_01 div.jq_sel ul li a").bind("click",function(){
- $("#nm_fax_01").val($("#sel_nm_fax_01 option:selected").val());
- });
- $("#btn_write").bind("click",function(){
-
- <? if ($mode == "AddDealer"){ ?>
- var fieldlist = [["cd_dealerid","아이디"],["nm_pass","비밀번호"],["nm_name","이름"],["nm_hp_01","핸드폰"],["nm_hp_02","핸드폰"],["nm_hp_03","핸드폰"]]
- <? }else{ ?>
- var fieldlist = [["nm_name","이름"],["nm_hp_01","핸드폰"],["nm_hp_02","핸드폰"],["nm_hp_03","핸드폰"]]
- <? } ?>
-
- if (!fnCheckForm(fieldlist)){
- return false;
- }else{
- /*패스워드 처리*/
- if($("#nm_pass").val().length > 0){
- if($("#cd_dealerid").val()==$("#nm_pass").val()){
- alert("아이디와 변경할 패스워드를 다르게입력하세요");
- $("#nm_pass").focus();
- return false;
- }
- if($("#nm_pass").val().length <8){
- alert("8글자 이상 변경할 패스워드를 입력하세요");
- $("#nm_pass").focus();
- return false;
- }
- if(!isStrongValidFormPassword($("#nm_pass").val())){
- return false;
- }
- }
- var c=confirm("정보를 등록하시겠습니까?");
- if(c){
- $("#btn_write").hide();
- $("#frmMember").submit();
- }else{
- $("#btn_write").show();
- return false;
- }
- }
- });
- });
- </script>
- <? include("../include/inc_footer.php") ?>
- <? include("../include/inc_bottom.php") ?>
- <?
- mysql_close($connect);
- ?>
|