<?php
	include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
//	include $_SERVER['DOCUMENT_ROOT'].'/common/auth_chk.php';

?>
<? include("../include/inc_top.php") ?>
<? include("../include/inc_header.php") ?>

<section id="wrap">
	<section id="visual" class="visual_sell">
		<h2>내차팔기</h2>
		<p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
	</section>

	<section id="content">
		<ul class="location">
			<li><a href="/" class="home">홈</a></li>
			<li><span class="depth1">내차팔기</span></li>
			<li><span class="depth2">입찰하기</span></li>
		</ul>

		<h3>정보확인</h3>

		<form id="frmMember" name="frmMember" method="post" action="proc.php" enctype="multipart/form-data">
        <input type="hidden" name="mode" id="mode" value="sellNoMember"/>

		<table class="tbl_h">
			<colgroup>
				<col width="18%">
				<col width="*">
			</colgroup>
			<tr>
				<th>이름</th>
				<td><input type="text" class="inp_txt" style="width:330px;" name="nm_name" id="nm_name" value="조현수"></td>
			</tr>
			<tr>
				<th>핸드폰</th>
				<td><input type="text" class="inp_txt" style="width:330px;" name="nm_hp" id="nm_hp" value="0116842772"> <span class="td_txt">숫자만 입력</span></td>
			</tr>
			<tr>
				<th>차량번호</th>
				<td><input type="text" class="inp_txt" style="width:330px;" name="nm_number" id="nm_number" value="13루2623"></td>
			</tr>
			<tr>
				<th>지역</th>
				<td>
					<select name="ds_area" id="ds_area" class="select" style="width:330px;"></select>
				</td>
			</tr>
		</table>

		<ul class="clause_list">
			<li>
				<span class="check_wrap"><input type="checkbox" name="ds_agree1" id="ds_agree1" value="Y" checked><i></i><label for="agree1">[필수] 회원 이용약관</label></span>
				<span class="btn_open">자세히 보기</span>
				<div>
					<textarea cols="100" rows="10" readonly><? include("../include/clause_txt1.txt"); ?></textarea>
				</div>
			</li>
			<li>
				<span class="check_wrap"><input type="checkbox" name="ds_agree2" id="ds_agree2" value="Y" checked><i></i><label for="agree2">[필수] 개인정보 수집이용</label></span>
				<span class="btn_open">자세히 보기</span>
				<div>
					<textarea cols="100" rows="10" readonly><? include("../include/clause_txt2.txt"); ?></textarea>
				</div>
			</li>
			<!--li>
				<span class="check_wrap"><input type="checkbox" id="agree3"><i></i><label for="agree3">[선택] 마케팅 목적 개인정보 수집/이용</label></span>
				<span class="btn_open">자세히 보기</span>
				<div>
					<textarea cols="100" rows="10"><? include("../include/clause_txt3.txt"); ?></textarea>
				</div>
			</li>
			<li>
				<span class="check_wrap"><input type="checkbox" id="agree4"><i></i><label for="agree4">[선택] 개인정보 제3자 제공</label></span>
				<span class="btn_open">자세히 보기</span>
				<div>
					<textarea cols="100" rows="10"><? include("../include/clause_txt4.txt"); ?></textarea>
				</div>
			</li-->
		</ul>

		<div class="btn_center">
			<input type="submit" class="button" title="비회원 차량등록" value="비회원 차량등록" id="btn_write">
		</div>
		
		</form>

	</section>
</section>

<script laguage="javascript" type="text/javascript">
    $(document).ready(function() {
        
        setCodeSelect("listcode","ds_area", "member_master","ds_area","A0","선택하세요","");
    
        $("#btn_write").bind("click",function(){
            
            var fieldlist = [["nm_name","이름"],["nm_hp","휴대번호"],["nm_number","차량번호"],["ds_area","지역"]]
			
            if (!fnCheckForm(fieldlist)){
                return false;
            }else{

                if(!ChkNum($("#nm_hp").val())){
                    alert("휴대폰 번호는 숫자만 입력하세요.");
                    $("#nm_hp").focus();
                    return false;
                }

				if(!document.getElementById("ds_agree1").checked){
					alert('[필수] 회원 이용약관에 동의해 주세요.');
                    $("#ds_agree1").focus();
					return false;
				}
				
				if(!document.getElementById("ds_agree2").checked){
					alert('[필수] 개인정보 수집이용 에 동의해 주세요.');
                    $("#ds_agree2").focus();
					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);
?>
