<?php

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

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

<?
	$cd_dealer = $_REQUEST["cd_dealer"];

	$sql ="SELECT 
				* 
				FROM dealer_master 
				WHERE cd_dealer='$cd_dealer' AND ds_delind='N'";
	
	$mode = "Add";

	$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];
		$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];
/*
		$arr_nm_info1 = explode("-",$nm_info1);
		if(count($arr_nm_info1) == 3){
			$nm_info11 = $arr_nm_info1[0];
			$nm_info12 = $arr_nm_info1[1];
			$nm_info13 = $arr_nm_info1[2];
		}else{
			$nm_info11 = "";
			$nm_info12 = "";
			$nm_info13 = "";
		}

		$arr_nm_info3 = explode("@",$nm_info3);
		if(count($arr_nm_info3) == 2){
			$nm_info31 = $arr_nm_info3[0];
			$nm_info32 = $arr_nm_info3[1];
		}else{
			$nm_info31 = "";
			$nm_info32 = "";
		}
		$nm_info3 = $col[nm_info3];
*/
		$mode = "Update";
	}else{
		$ds_level = "1";
	}

?>

<section id="contents">
	<!-- 제조사 -->
	<h2>제조사</h2>
	<div class="tbl_wrap">
		<table class="tbl_list2 ty2">
			<colgroup>
				<col width="20%">
				<col width="*">
			</colgroup>
			<tr>
				<th>구분</th>
				<td>
					<div class="radio_chk">
						<span class="check_wrap"><input type="radio" name="radiobutton" id="domestic"><i></i><label for="domestic">국내</label></span>
						<span class="check_wrap"><input type="radio" name="radiobutton" id="overseas"><i></i><label for="overseas">해외</label></span>
					</div>
				</td>
			</tr>
			<tr>
				<th>제조사</th>
				<td><input type="text" class="inp_txt" style="width:60%;"></td>
			</tr>
		</table>
	</div>

	<!-- 모델 -->
	<h2>모델</h2>
	<div class="tbl_wrap">
		<table class="tbl_list2 ty2">
			<colgroup>
				<col width="20%">
				<col width="*">
			</colgroup>
			<tr>
				<th>구분</th>
				<td>
					<div class="radio_chk">
						<span class="check_wrap"><input type="radio" name="radiobutton" id="domestic2"><i></i><label for="domestic2">국내</label></span>
						<span class="check_wrap"><input type="radio" name="radiobutton" id="overseas2"><i></i><label for="overseas2">해외</label></span>
					</div>
				</td>
			</tr>
			<tr>
				<th>제조사</th>
				<td>
					<span class="select ty2" style="width:60%;">
						<select>
							<option value="">현대</option>
							<option value="">기아</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<th>모델</th>
				<td><input type="text" class="inp_txt" style="width:60%;"></td>
			</tr>
		</table>
	</div>

	<!-- 세부모델 -->
	<h2>세부모델</h2>
	<div class="tbl_wrap">
		<table class="tbl_list2 ty2">
			<colgroup>
				<col width="20%">
				<col width="*">
			</colgroup>
			<tr>
				<th>구분</th>
				<td>
					<div class="radio_chk">
						<span class="check_wrap"><input type="radio" name="radiobutton" id="domestic3"><i></i><label for="domestic3">국내</label></span>
						<span class="check_wrap"><input type="radio" name="radiobutton" id="overseas3"><i></i><label for="overseas3">해외</label></span>
					</div>
				</td>
			</tr>
			<tr>
				<th>제조사</th>
				<td>
					<span class="select ty2" style="width:60%;">
						<select>
							<option value="">현대</option>
							<option value="">기아</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<th>모델</th>
				<td>
					<span class="select ty2" style="width:60%;">
						<select>
							<option value="">K3</option>
							<option value="">K5</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<th>세부모델</th>
				<td><input type="text" class="inp_txt" style="width:60%;"></td>
			</tr>
		</table>
	</div>

	<!-- 등급 -->
	<h2>등급</h2>
	<div class="tbl_wrap">
		<table class="tbl_list2 ty2">
			<colgroup>
				<col width="20%">
				<col width="*">
			</colgroup>
			<tr>
				<th>구분</th>
				<td>
					<div class="radio_chk">
						<span class="check_wrap"><input type="radio" name="radiobutton" id="domestic3"><i></i><label for="domestic3">국내</label></span>
						<span class="check_wrap"><input type="radio" name="radiobutton" id="overseas3"><i></i><label for="overseas3">해외</label></span>
					</div>
				</td>
			</tr>
			<tr>
				<th>제조사</th>
				<td>
					<span class="select ty2" style="width:60%;">
						<select>
							<option value="">현대</option>
							<option value="">기아</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<th>모델</th>
				<td>
					<span class="select ty2" style="width:60%;">
						<select>
							<option value="">K3</option>
							<option value="">K5</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<th>세부모델</th>
				<td>
					<span class="select ty2" style="width:60%;">
						<select>
							<option value="">3시리즈 (F30) (12년~현재)</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<th>등급</th>
				<td><input type="text" class="inp_txt" style="width:60%;"></td>
			</tr>
		</table>
	</div>

	<!-- 변속기 -->
	<h2>변속기</h2>
	<div class="tbl_wrap">
		<table class="tbl_list2 ty2">
			<colgroup>
				<col width="20%">
				<col width="*">
			</colgroup>
			<tr>
				<th>변속기</th>
				<td><input type="text" class="inp_txt" style="width:60%;"></td>
			</tr>
		</table>
	</div>

	<!-- 연료 -->
	<h2>연료</h2>
	<div class="tbl_wrap">
		<table class="tbl_list2 ty2">
			<colgroup>
				<col width="20%">
				<col width="*">
			</colgroup>
			<tr>
				<th>연료</th>
				<td><input type="text" class="inp_txt" style="width:60%;"></td>
			</tr>
		</table>
	</div>

	<div class="btn_right">
		<a href="#" class="rnd_btn ty2 black">등록</a>
	</div>
</section>

<? include("../inc/inc_footer.php") ?>
<? include("../inc/inc_bottom.php") ?>
<?
mysql_close($connect);
?>
