MINI MINI MANI MO

Path : /home/lhcar/www/sub05/
File Upload :
Current File : /home/lhcar/www/sub05/order.php

<? include "$DOCUMENT_ROOT/inc/header.php";?>
<? include "$DOCUMENT_ROOT/inc/top_menu.php";?>
<? include "$DOCUMENT_ROOT/inc/cus_vs.php";?>
<?
companyUpOnly();
	if($loginUsort != "superadmin" && $loginUsort != "admin" && $loginUsort != "company2"){
		movepage("/");
		exit;
	}

$pw = Row_string("SELECT * FROM woojung_member WHERE userId='".$_SESSION[login_id]."' and dTel !='Y' ");
if($idx){
	$row = mysql_fetch_array(mysql_query("SELECT * FROM tow WHERE idx='$idx' and user_id='".$_SESSION[login_id]."' and step='1' "));
	if(!$row[idx]){ 
		err_msg("수정 불가능 합니다.");
		exit;
	}
	$phone1=explode("-", $row[phone1]);
	$phone2=explode("-", $row[phone2]);
	if($row[idx]){
		$tow_mod="modify";
	}
}else{
	$tow_mod="regist";
}
?>
<script language="JavaScript" type="text/javascript">
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>

<style type="text/css">
<!--
.style1 {font-weight: bold}
.div_con { width:759px; height:130px; overflow-y:scroll; text-align:left; white-space:pre-line; padding:10px; margin:0px;	border:1px solid #959595; line-height:150%;float:center; }
.confirm_area { margin:15px 0; }
.div_title { text-align:left; margin-bottom:5px;margin-left:5px; }
-->
</style>

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

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
    <td align="center">
<? include "$DOCUMENT_ROOT/inc/cus_menu.php";?>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:20px 100px 100px 100px;">
      <tr>
        <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td class="title">오더등록</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="20" align="right"></td>
                  </tr>
                  <tr>
                    <td height="3"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" >
                        
                        <tr>
                          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
<form name="cform" method="post" action="write02_save.php" enctype="multipart/form-data" >
<input type="hidden" name="mode" value="<?=$tow_mod?>">
<input type="hidden" name="idx" value="<?=$idx?>">
<input type="hidden" name="sales_idx" value="<?=$pw[team_code]?>">
                                <td height="5"><table width="100%"  style="border-collapse:collapse;" border="1" bordercolor="c6d0dd"  cellspacing="0" cellpadding="0">
                              <tr>
                <td width='15%' height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>등록일</strong></td>
                <td width="35%" align="left" style="padding-left:10px;"><?=$row[regdate]?substr($row[regdate],0,10):date("Y-m-d")?></td>
                <td width="15%" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>진행상태</strong></td>
                <td width="35%" align="left" style="padding-left:10px;"><input name="tow_result" type="radio" style='vertical-align:middle; border:0px' value="1" checked> 대기 </td>
              </tr>
                                  <tr>
                                    <td width='14%' height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>견인일시</strong></td>
                                    <td height="50"  align="left" style="padding-left:10px;"><table border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><input type="text" name="tow_date" style="width:90px" value="<?=$row[tow_date]?$row[tow_date]:date("Y-m-d");?>"/> </td>
          <td height="30" style="border:0px solid #333333;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:170px;" value="<?=$row[tow_target]?>"/></td>
        </tr></table></td>
                                    <td width="14%" height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>운송(견인)</strong></td>
                                    <td width="36%" height="50"  align="left" style="padding-left:10px;"><input name="step" type="radio" style='vertical-align:middle; border:0px' checked/> 접수</td>
                                  </tr>
                                  <tr>
                                    <td width='14%'  height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>구분</strong></td>
                                    <td width="36%" height="50"  align="left" style="padding-left:10px;"><input name="type" type="radio" value="일반" style='vertical-align:middle' <? if($row[type]=="일반") echo "checked"; ?>/>
                                      일반
                                      <input name="type" type="radio" value="차령" style='vertical-align:middle'  <? if($row[type]=="차령") echo "checked"; ?>/>
                                      차령
                                      <input name="type" type="radio" value="조기" style='vertical-align:middle'  <? if($row[type]=="조기") echo "checked"; ?>/>
                                      조기 <input name="type" type="radio" value="조기(개인)" style='vertical-align:middle' <? if($row[type]=="조기(개인)") echo "checked"; ?>/> 조기(개인)</td>
                                    <td height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>운행(시동)</strong></td>
                                    <td height="50"  align="left" style="padding-left:10px;"><input name="start" type="radio" value="시동가능" style='vertical-align:middle'  <? if($row[start]=="시동가능") echo "checked"; ?>/>
                                      시동가능
                                      <input name="start" type="radio" value="시동불능" style='vertical-align:middle'  <? if($row[start]=="시동불능") echo "checked"; ?>/>
                                      시동불능</td>
                                  </tr>
                                  <tr>
                                    <td width='14%'  height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>견인위치</strong></td>
                                    <td height="50" 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="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>차량번호</strong></td>
                                    <td width="36%" height="50"  align="left" style="padding-left:10px;"><input type="text" name="car_num" style="width:90%" value="<?=$row[car_num]?>"/></td>
                                    <td width='14%'  height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>차주Tel</strong></td>
                                    <td height="50"  align="left" style="padding-left:10px;"><input name="phone1_1" type="text" size="5" maxlength="5" value="<?=$phone1[0]?>"/>
                                      -
                                      <input name="phone1_2" type="text" size="5" maxlength="5"  value="<?=$phone1[1]?>"/>
                                      -
                                      <input name="phone1_3" type="text" size="5" maxlength="5"  value="<?=$phone1[2]?>"/></td>
                                  </tr>
                                  <tr>
                                    <td height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>차명(모델명)</strong></td>
                                    <td height="50"  align="left" style="padding-left:10px;"><input type="text" name="car_name" style="width:90%" value="<?=$row[car_name]?>"/></td>
                                    <td  height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>년식</strong></td>
                                    <td height="50"  align="left" style="padding-left:10px;"><input type="text" name="car_year" style="width:40%" value="<?=$row[car_year]?>"/></td>
                                  </tr>
              <tr>
                <td  height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2;'><strong>영업사원</strong></td>
                <td height="30" align="left" style="padding-left:10px;"><?=$_SESSION["login_name"]?> <?=$pw[pcs]?></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="75" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2; '><strong>거래처<br />
(둘중선택)</strong></td>
                <td height="30" colspan="3" align="left" style="padding:0 10px 0 10px;"><input name="tow_step" type="radio" style='vertical-align:middle; border:0px' value="1" <? if($row[tow_step]=="1") echo "checked"; ?>> <select name="client_idx" onchange="si_chk2(this);" style="height:28px;">
                        <option value="">::거래처::</option>
<?
	$sql_s=mysql_query("select * from client where sales_idx='$pw[team_code]' 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;">
                        <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><br />
 <input name="tow_step" type="radio" style='vertical-align:middle; border:0px' value="2" <? if(!$idx||$row[tow_step]=="2") echo "checked"; ?>> <input type="text" name="custom" style="width:90%; margin-top:3px" value="<?=$row[custom]?>"/></td>
                </tr>
                                  <tr>
                                    <td  height="50" align="center" bgcolor="#F6F6F6" style='color:#5e7ea2'><strong>세부사항</strong></td>
                                    <td height="50" 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"><table border="0" cellspacing="0" cellpadding="3">
            <tr>
              <td><a href="order_list.php"><img src="/images/list_bt.jpg" border="0" /></a></td>
              <td><img src="/images/w_bt.jpg" onclick="document.cform.submit()"/></td>
            </tr>
          </table>            
            </td>
</form>
                              </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>

                    </table></td>
                  </tr>
                  <tr>
                    <td height="5">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="5" align="center"><a href="write.php"></a></td>
                  </tr>
                  <tr>
                    <td height="5">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
      </tr>
    </table>
</td>
      </tr>
    </table>
<? include "$DOCUMENT_ROOT/inc/bottom.php";?> 

OHA YOOOO