MINI MINI MANI MO

Path : /home/lhcar/www/mobile/
File Upload :
Current File : /home/lhcar/www/mobile/order_list.php

<?
require_once "./_common/common.php";
include $_SERVER['DOCUMENT_ROOT'].'/_config/global.php';
include $_SERVER['DOCUMENT_ROOT'].'/_config/_class/phpfun.class.php';
$phpfun = new phpfun();
$SID = session_id();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link href="css/scale.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/JavaScript">
	function change_step(step){
		document.cform.step.value=step;
		document.cform.submit();
	}
</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

</head>

<?
companyUpOnly();
	if($loginUsort != "superadmin" && $loginUsort != "admin" && $loginUsort != "company2"){
		movepage("/");
		exit;
	}
	$pw = mysql_fetch_array(mysql_query("SELECT * FROM woojung_member WHERE userId='".$_SESSION[login_id]."' and dTel !='Y' "));
	$sales_idx=$pw[team_code];
	$tb_name = "tow";

	$view_article = 15; // 한화면에 나타날 게시물의 총 개수  
	if (!$page) $page = 1; // 현재 페이지 지정되지 않았을 경우 1로 지정  
	$start = ($page-1)*$view_article; 

	$nowDate = date("Y-m-d");
	$YesterDate = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d")-1, date("Y") ));

	
	$arr_towresult=array('','대기','진행','종결');
	$exstart_date = $start_date;

	$href = "&gubun2=$gubun2&gubun2=$gubun2&wc_made=$wc_made&wc_model=$wc_model&calltype=$calltype&sear4=$sear4"; 
	$href .= "&start_date=$start_date&end_date=$end_date&car_cate=$car_cate";
	$href1 = "&page=$page".$href;
	$where = " sales_idx  = '$sales_idx' ";

	if($step){  		 
		$where .= " and step  = '$step'";  
	}
	if($sear4){
		$where .= " and ( car_num  like '%$sear4%' or car_name like '%$sear4%' or area  like '%$sear4%') ";  	

	}
	//echo $where;
	$query = "select count(*) from $tb_name where $where ";  
	//echo $query;
	$result = mysql_query($query);  
	//echo $result;
	$temp = mysql_fetch_array($result);  
	$total_article = $temp[0]; // 현재 쿼리한 게시물의 총 개수를 구함	
?>

<div id="top">
<? include "inc/sub_top.html"; ?>
</div>

<tr>	
			<td><? include "inc/customer_menu.php"; ?></td>
</tr>
<tr>
	<td>	
			<!-- navi start-->
							<table id="navi"  width="100%"  height="60"  border="0" cellpadding="0" cellspacing="0">
  <tr>	
									<td>
										<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
											<tr>
												<td><table width="100%" align="left">
                                                  <tr>
                                                    <td width="15%" align="center">&nbsp;</td>
                                                    <td align="center"><strong>오더등록</strong></td>
                                                    <td width="15%" align="right" style="padding-bottom:3px">
<?
	if($loginUsort == "superadmin" || $loginUsort == "admin" || $loginUsort == "company2"){
?>
													<a href="order.php"><img src="/img/order_bt.jpg" border="0" /></a>
<?
	}
?>
													</td>
                                                  </tr>
                                              </table></td>
												
											</tr>
                                            <tr><td height="1" bgcolor="#0066CC"></td></tr>
                                            <tr><td height="10" ></td></tr>
										</table>								  </td>
							    </tr>
							 </table>
	  <!-- navi end-->
	</td>
</tr>

<tr>
	<td>	
	<div align="center">
			<!-- contents start-->
			<table width="98%" border="0" cellspacing="0" cellpadding="0">
			
            
             
              <tr>
                <td height="5"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" style="border-top:1px solid #0066CC;">
                    <tr>
                      <td width="6%" height="30" align="center" bgcolor="#F6F6F6"><strong>no</strong></td>
                      <td width="30%" align="center" bgcolor="#F6F6F6"><strong>차량번호</strong></td>
                      <td width="32%" align="center" bgcolor="#F6F6F6"><strong>모델명</strong></td>
                      <td width="32%" align="center" bgcolor="#F6F6F6"><strong>운송(견인)</strong></td>
                  </tr>
                    <tr>
                    <td height="1" bgcolor="#CCCCCC" colspan="4"></td>
                    </tr>
<?
if($total_article>0){
	$Qry = "SELECT * FROM $tb_name WHERE $where order by idx desc LIMIT $start, $view_article";

	//echo $Qry;
	$arr = Fetch_string($Qry);
	
	
	for($i=0;$i<count($arr);$i++){

		$num = $total_article-$i-(($page-1)*$view_article);
		
		($i%2 == 0) ? $bgCol = "#ffffff" : $bgCol = "#ffffff";
			
		$row_sales = Row_string("SELECT * FROM salesperson WHERE idx='".$arr[$i][sales_idx]."'");
		$row_client = Row_string("SELECT * FROM client WHERE idx='".$arr[$i][client_idx]."'");
?>
                    <tr style="cursor:pointer">
                      <td height="30" align="center" bgcolor="#FFFFFF" onclick="location.href='order_view.php?idx=<?=$arr[$i][idx]?>';"><?=$num?></td>
                      <td align="center" bgcolor="#FFFFFF" style="padding-left:10px" onclick="location.href='order_view.php?idx=<?=$arr[$i][idx]?>';"><?=$arr[$i][car_num]?></td>
                      <td align="center" bgcolor="#FFFFFF" style="padding-left:10px" onclick="location.href='order_view.php?idx=<?=$arr[$i][idx]?>';"><?=$arr[$i][car_name]?></td>
                      <td align="center" bgcolor="#FFFFFF" style="padding-left:10px" onclick="location.href='order_view.php?idx=<?=$arr[$i][idx]?>';"><?=$arr_towresult[$arr[$i][tow_result]]?></td>
                  </tr>
                  
                    <tr>
                    <td height="1" bgcolor="#CCCCCC" colspan="4"></td>
                    </tr>
<?
	}
}
?>
                </table></td>
              </tr>
              <tr>
                <td height="5">&nbsp;</td>
              </tr>
              <tr>
                <td height="5" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="15%">&nbsp;</td>
                      <td align="center"><? include "../inc/page.php";?></td>
                      <td width="15%" align="right">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="5">&nbsp;</td>
              </tr>
            </table>
	  <!-- contents end-->	</div></td>
</tr>

<div id="btm">
<? include "inc/btm.html"; ?>
</div>
  


OHA YOOOO