MINI MINI MANI MO

Path : /home/lhcar/www/admin/sub02/
File Upload :
Current File : /home/lhcar/www/admin/sub02/write01.php

<? include "$DOCUMENT_ROOT/admin/inc/header.php"; ?>
<?
if($idx){
	$row = mysql_fetch_array(mysql_query("SELECT * FROM tow WHERE idx='$idx'"));
	$phone1=explode("-", $row[phone1]);
	$phone2=explode("-", $row[phone2]);
	$tow_mod="modify";
	$row_agent = Row_string("SELECT * FROM client_agent WHERE idx='".$row[agent_idx]."'");
	$agent_txt=$row_agent[a_phone]." | ".$row_agent[a_etc];
}else{
	$tow_mod="regist";
}
?>
<script language="JavaScript" type="text/javascript">
function si_chk(z){ 
	var tmp = z.options[z.selectedIndex].value; 
	document.cform.client_idx.options[0].selected="true";
	gufrm.location.href = "/admin/inc/tow1.php?tmp="+tmp;  
} 
function si_chk2(z){ 
	var tmp = z.options[z.selectedIndex].value;
	document.cform.agent_idx.options[0].selected="true";
	gufrm.location.href = "/admin/inc/tow2.php?tmp="+tmp;  
} 
function si_chk3(z){ 
	var tmp = z.options[z.selectedIndex].value;
	gufrm.location.href = "/admin/inc/tow3.php?tmp="+tmp;  
} 
</script>

<iframe name="gufrm" style="display:none;" src=""></iframe>

<table width="100%" border="0" cellpadding="0" cellspacing="0" height='100%'>
	<tr>
		<td width='150' height='100%' valign='top'  bgcolor="#ededed">
			<!--레프트메뉴--><? include "$DOCUMENT_ROOT/admin/inc/sub02.php"; ?>
			<!--/레프트메뉴-->		</td>
		<td width='1' bgcolor='#78858c'></td>
		<td align="left" valign='top'><? include "$DOCUMENT_ROOT/admin/inc/qna.php"; ?>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="left" style="margin:20px;">
  <tr> 
    <td height="20" align="left" class="title" style="border-bottom:1px solid #000000"><img src="/admin/img/icon_1.jpg" ALIGN=absmiddle> 
     오더(견인)현황 > <strong>등록페이지</strong></td>
    <td align="right" class="title"style="border-bottom:1px solid #000000"><a href="/admin/sub02/list01.php"><font color="#0066CC">목록보기</font></a></td>
  </tr>
  <tr> 
    <td height="10" colspan="2"></td>
  </tr>
<? if($idx){ ?>
  <tr>
          <td height="20" colspan="2"><?=$row[tow_date]?>/<?=$row[type]?>/<?=$row[start]?>/<?=$row[area]?>/<?=$row[car_num]?>/<?=$row[car_name]?></td>
  </tr>
  <? } ?>
    <tr> 
      <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<form name="cform" method="post" action="write_save.php" enctype="multipart/form-data" >
<input type="hidden" name="mode" value="<?=$tow_mod?>">
<input type="hidden" name="idx" value="<?=$idx?>">
        <tr>
          <td height="5"><table width="100%"  style="border-collapse:collapse;" border="1" bordercolor="c6d0dd"  cellspacing="0" cellpadding="0">
              <tr>
                <td width='14%' height="40" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>등록일</strong></td>
                <td height="30"  align="left" style="padding-left:10px;"><?=substr($row[regdate],0,10)?></td>
                <td width="14%" height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>진행상태</strong></td>
                <td width="36%" height="30"  align="left" style="padding-left:10px;">
				<input name="tow_result" type="radio" value="1" <? if($row[tow_result]=="1") echo "checked"; ?>> 대기 
				<input name="tow_result" type="radio" value="2" <? if($row[tow_result]=="2") echo "checked"; ?>> 진행 
				<input name="tow_result" type="radio" value="3" <? if($row[tow_result]=="3") echo "checked"; ?>> 종결
				</td>
              </tr>
                 <tr>
                <td width='14%' height="40" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>견인일시</strong></td>
                <td height="30"  align="left" style="padding-left:10px;"><table border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><input name="tow_date" id="sdate" style="width:100px; height:30px;  font-weight:bold; border:1px solid #5e7ea2" value="<?=$row[tow_date]?$row[tow_date]:date("Y-m-d");?>" /></td>
          <td height="30" style="border:0px solid #5e7ea2;border-left:0px solid #FFFFFF;padding-left:5px; height:30px;"><img src="/admin/image/icon_data.gif" /></td>
          <td style="padding-left:5px"> / 비고 <input type="text" name="tow_target" style="width:30%;width:150px;" value="<?=$row[tow_target]?>"/></td>
        </tr></table>                  </td>
                <td width="14%" height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>운송(견인)</strong></td>
                <td width="36%" height="30"  align="left" style="padding-left:10px;">
				<input name="step" type="radio" value="1"  <? if($row[step]=="1") echo "checked"; ?>/> 접수 
				<input name="step" type="radio" value="2"  <? if($row[step]=="2") echo "checked"; ?>/> 출발
                <input name="step" type="radio" value="3"  <? if($row[step]=="3") echo "checked"; ?>/> 탁송
				<input name="step" type="radio" value="4"  <? if($row[step]=="4") echo "checked"; ?>/> 타렉카
				<input name="step" type="radio" value="5"  <? if($row[step]=="5") echo "checked"; ?>/> 완료
				<input name="step" type="radio" value="6"  <? if($row[step]=="6") echo "checked"; ?>/> 보류
				</td>
              </tr>
              <tr>
                <td width='14%'  height="40" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>구분</strong></td>
                <td width="36%" height="30"  align="left" style="padding-left:10px;"><input name="type" type="radio" value="일반" style='vertical-align:middle; border:0px' <? if($row[type]=="일반") echo "checked"; ?>/>
                일반
                <input name="type" type="radio" value="차령" style='vertical-align:middle; border:0px'  <? if($row[type]=="차령") echo "checked"; ?>/>
차령
<input name="type" type="radio" value="조기" style='vertical-align:middle; border:0px' <? if($row[type]=="조기") echo "checked"; ?>/>
조기 <input name="type" type="radio" value="조기(개인)" style='vertical-align:middle; border:0px' <? if($row[type]=="조기(개인)") echo "checked"; ?>/>
조기(개인)</td>
                <td height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>운행(시동)</strong></td>
                <td height="30"  align="left" style="padding-left:10px;"><input name="start" type="radio" value="시동가능" style='vertical-align:middle; border:0px'  <? if($row[start]=="시동가능") echo "checked"; ?>/>
시동가능
  <input name="start" type="radio" value="시동불능" style='vertical-align:middle; border:0px'  <? if($row[start]=="시동불능") echo "checked"; ?>/>
시동불능</td>
              </tr>
              <tr>
                <td width='14%'  height="40" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>견인위치</strong></td>
                <td height="30" colspan="3"  align="left" style="padding:0 10px 0 10px;"><input type="text" name="area" style="width:100%" value="<?=$row[area]?>"/></td>
              </tr>
              <tr>
                <td width='14%'  height="40" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>차량번호</strong></td>
                <td width="36%" height="30"  align="left" style="padding-left:10px;"><input type="text" name="car_num" style="width:90%" value="<?=$row[car_num]?>"/></td>
                <td width='14%'  height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>차주Tel</strong></td>
                <td height="30"  align="left" style="padding-left:10px;"><input name="phone1" type="text" size="30" maxlength="15" value="<?=$row[phone1]?>"/></td>
              </tr>
              <tr>
                <td height="40" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>차명(모델명)</strong></td>
                <td height="30"  align="left" style="padding-left:10px;"><input type="text" name="car_name" style="width:90%" value="<?=$row[car_name]?>"/></td>
                <td  height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>년식</strong></td>
                <td height="30"  align="left" style="padding-left:10px;"><input name="car_year" type="text" size="15" maxlength="15" value="<?=$row[car_year]?>"/></td>
              </tr>
              <tr>
                <td  height="40" align="right" bgcolor="#F6F6F6" style='color:#5e7ea2; padding-right:10px;'><strong>영업사원<span style="padding-left:5px;">
                  <input name="button3" type="button" class="btn_red" value="등록"  onclick="window.open('/inc/popup_04.php','auction','width=900, height=600, scrollbars=yes');"/>
                </span></strong></td>
                <td height="30" align="left" style="padding-left:10px;"><table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><select name="sales_idx"  style="height:28px;" onchange="si_chk(this);">
      <option value="">::영업사원::</option>
<?
$sql_s=mysql_query("select * from salesperson where s_del!='Y'");
while($data_s=mysql_fetch_array($sql_s)){
?>
              <option value="<?=$data_s[idx]?>" <? if($data_s[idx]==$row[sales_idx]) echo "selected"; ?>><?=$data_s[s_name]?></option>
<?
}
?>
    </select></td>
    <td style="padding-left:5px;">/</td>
    <td style="padding-left:5px;"><input type="text" name="textfield" id="textfield" /></td>
  </tr>
</table></td>
                <td width="14%" height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>상담(등록)자</strong></td>
                <td width="36%" height="30"  align="left" style="padding-left:10px;">
				<?=$_SESSION["login_name"]?></td>
              </tr>
            
              <tr>
                <td  height="40" align="right" bgcolor="#F6F6F6" style='color:#5e7ea2; padding-right:5px;'><strong>거래처<span style="padding-left:5px;">
                  <input name="button4" type="button" class="btn_red" value="등록"   onclick="window.open('/inc/popup_05.php','auction','width=900, height=600, scrollbars=yes');"/>
                </span></strong></td>
                <td height="30" colspan="3" align="left" style="padding:10px 10px 10px 10px;"><table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="220">
					  <select name="client_idx"  style="height:28px;" onchange="si_chk2(this);">
                        <option value="">::거래처::</option>
<?
if($row[sales_idx]){
	$sql_s=mysql_query("select * from client where sales_idx='$row[sales_idx]' and c_del!='Y'");
	while($data_s=mysql_fetch_array($sql_s)){
?>
              <option value="<?=$data_s[idx]?>" <? if($data_s[idx]==$row[client_idx]) echo "selected"; ?>><?=$data_s[c_name]?></option>
<?
	}
}
?>
                      </select>
					  <select name="agent_idx" style="height:28px;" onchange="si_chk3(this);">
                        <option value="">::담당자::</option>
<?
if($row[client_idx]){
	$sql_s=mysql_query("select * from client_agent where client_idx='$row[client_idx]' and a_del!='Y'");
	while($data_s=mysql_fetch_array($sql_s)){
?>
              <option value="<?=$data_s[idx]?>" <? if($data_s[idx]==$row[agent_idx]) echo "selected"; ?>><?=$data_s[a_name]?></option>
<?
	}
}
?>
                      </select></td>
                      <td align="left" id="agent_txt" style="padding-left:5px;text-align:left;"><?=$agent_txt?></td>
                    </tr>
					<tr>
					  <td colspan="3" style="padding-top:5px;">
                        <input type="text" name="custom" style="width:800px" value="<?=$row[custom]?>" />
                      </td>
					</tr>
                  </table></td>
                </tr>
              <tr>
                <td  height="30" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>세부사항</strong></td>
                <td height="30" colspan="3"  align="left" style="padding:5px 10px 5px 10px;"><textarea name="memo" style="width:100%; height:160px;"><?=$row[memo]?></textarea></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="2">&nbsp;</td>
        </tr>
        <tr>
          <td height="5" align="center"> <input name="button2" type="button" class="btn_blue" value="목록보기"  onclick="location.href='list01.php'"/> <input name="button" type="button" class="btn_red" value="등록하기"   onclick="document.cform.submit()"/></td>
        </tr>
      </table></td>
    </tr>
</form>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
</table>
</td></tr></table>
<? include "$DOCUMENT_ROOT/admin/inc/footer.php"; ?>

OHA YOOOO