MINI MINI MANI MO

Path : /home/lhcar/www/mobile/
File Upload :
Current File : /home/lhcar/www/mobile/sub03.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">
</head>
<style type="text/css">

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

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

<tr>	
			<td>
					</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 height="10" ></td></tr>
                                            <tr>
												<td align="center"><table align="center"><tr><td><strong>중고부품</strong></td>
												</tr></table></td>
										  </tr>
                                            <tr><td height="1" bgcolor="#0066CC"></td></tr>
                                            <tr><td height="10" ></td></tr>
											<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<form name="cform" method="get">
              <tr>
                <!--td style="padding-left:3px;">
          <select name="wc_made" onchange="document.cform.submit();">
            <option value="">::제조사::</option>
<?
	$sql="select * from cate2 where depth='1' order by name asc ";
	$result_made=mysql_query($sql);
	while($data_made=mysql_fetch_array($result_made)){
	?>
				<option value="<?=$data_made[idx]?>" <?if($wc_made==$data_made[idx]) echo "selected";?>><?=$data_made[name]?></option>
	<?
	}
?>
                </select></td>
                <td style="padding-left:3px;">
          <select name="wc_model" onchange="document.cform.submit();">
            <option value="">::모델명::</option>
<?
	if($wc_made){
		$sql="select * from cate2 where code='$wc_made' and depth='2' order by name asc";
		$result_made=mysql_query($sql);
		while($data_made=mysql_fetch_array($result_made)){
	?>
				<option value="<?=$data_made[name]?>" <?if($wc_model==$data_made[name]) {echo "selected";}?>><?=$data_made[name]?></option>
	<?
		}
	}
?>
                </select></td-->
                 <td style="padding-left:3px;">
          <select name="wc_made" onchange="document.cform.submit();">
            <option value="">::제조사::</option>
<?
	$sql="select * from cate2 where depth='1' order by name asc ";
	$result_made=mysql_query($sql);
	while($data_made=mysql_fetch_array($result_made)){
	?>
				<option value="<?=$data_made[idx]?>" <?if($wc_made==$data_made[idx]) echo "selected";?>><?=$data_made[name]?></option>
	<?
	}
?>
                </select></td>
                <td style="padding-left:3px;">
          <select name="wc_model" onchange="document.cform.submit();">
            <option value="">::모델명::</option>
<?
if($wc_made){
	$sql="select * from cate2 where code='$wc_made' order by name asc";
	$result_made=mysql_query($sql);
	while($data_made=mysql_fetch_array($result_made)){
?>
		<option value="<?=$data_made[name]?>" <?if($wc_model==$data_made[name]) echo "selected";?>><?=$data_made[name]?></option>
<?
	}
}
?>
                </select></td>
                <td style="padding-left:3px;">
          <select name="wc_trans" onchange="document.cform.submit();">
            <option value="">::부품명::</option>
<?
		$sql="select * from cate3 where depth='1' order by name asc";
		$result_made=mysql_query($sql);
		while($data_made=mysql_fetch_array($result_made)){
	?>
				<option value="<?=$data_made[idx]?>" <?if($wc_trans==$data_made[idx]) {echo "selected";}?>><?=$data_made[name]?></option>
	<?
		}
?>
                </select></td>
              </tr>
</form>
            </table>
</td>

										  </tr>
                                            <tr><td height="10" ></td></tr>
										</table></td>
							    </tr>
							 </table>
	  <!-- navi end-->
	</td>
</tr>

<tr>
	<td>	
			<!-- contents start-->
			<table width="100%" border="0" cellpadding="0" cellspacing="0" id="menu">
              <tr>
                <td width="10" align="center"></td>
          <?
				$view_article = 12; // 한화면에 나타날 게시물의 총 개수  
				if (!$page) $page = 1; // 현재 페이지 지정되지 않았을 경우 1로 지정  
				$start = ($page-1)*$view_article; 


				$nowDate = date("YmdHi");
				$where=" wc_gubun4='2' ";

	if($wc_made){
	   $where .= " and wc_made = '$wc_made' ";
	}
	if($wc_model){
		$where .= " and wc_model='$wc_model' ";	
	}
	if($wc_model2){
		$where .= " and wc_model2='$wc_model2' ";	
	}
	if($wc_trans){
	   $where .=" and wc_trans='$wc_trans' ";
	}
	if($wc_trans2){
	   $where .=" and wc_fual='$wc_trans2' ";
	}

				$qry_cnt = mysql_query("SELECT count(*) FROM woojung_part  WHERE  $where ");
				$temp = mysql_fetch_row($qry_cnt);  
				$total_article = $temp[0]; // 현재 쿼리한 게시물의 총 개수를 구함	

				$query = mysql_query("SELECT * FROM woojung_part   WHERE  $where order by wc_regdate desc LIMIT $start, $view_article");
				$kk=0;
				while($row = mysql_fetch_array($query)) {	
					$car_img_arr = explode('/',$row[wc_img_1]);
					$car_name=$row[wc_model];
					if($row[wc_model2]) $car_name.="/".$row[wc_model2];
					$year			= cutStr($row[wc_go_end_date],0,4);
					$month			= cutStr($row[wc_go_end_date],5,2);
					$day			= cutStr($row[wc_go_end_date],8,2);
					$hour			= $row[wc_go_end_hh];
					$min			= $row[wc_go_end_mm];
					$last_end_date = $month.'-'.$day.' '.$hour.':'.$min;
					$cate3=mysql_fetch_array(mysql_query("select * from cate3 where idx='".$row[wc_trans]."'"));
					if($cate3[name]&&$row[wc_fual]){
						$catename=$cate3[name]." I ".$row[wc_fual];
					}else{
						$catename=$cate3[name].$row[wc_fual];
					}
					$cate1=mysql_fetch_array(mysql_query("select * from cate2 where idx='".$row[wc_made]."'"));

					if($kk&&$kk%2==0){
				?>
              </tr>
              <tr>
                <td colspan="7">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="7" bgcolor="#CCCCCC" height="1"></td>
              </tr>
              <tr>
                <td colspan="7">&nbsp;</td>
              </tr>
              <tr>
                <td width="10" align="center"></td>
				<?
					}
			  ?>
                  <td width="45%" align="left" valign="top" style="line-height:130%;">
				  <a href="/sub03_view.php?idx=<?=$row[wc_idx]?>"><img src="http://jgn200101.woojungnet.co.kr/data/<?=$car_img_arr[0]?>" border="0"  width="100%"  height="150"/></a>
				  <br><b><?=$catename?></b>
                    <br>
				                                        제조 : 
                    
                                                        <strong><?=$cate1[name]?></strong><br />
                    차명 : 
                    <b><?=$row[wc_model]?></b>
                    <br />
                    년식 : 
                    <b><?=substr($row[wc_age],0,4)?></b><br />
		        가격 : <font color="#FF0000">
                        <b><? if($row[wc_cost]=="1"){echo "전화문의";}else{echo number($row[wc_keep_tel1])."원";} ?></b>
                        </font> </td>
                <td width="10"  align="left" valign="top" >&nbsp;</td>
			<?
					$kk++;
				}
			?>
              </tr>
              <tr>
                <td colspan="7">&nbsp;</td>
              </tr>
            </table>
            <table width="100%">
              <tr>
                <td colspan="7" align="center" style="border-top:1px solid #CCCCCC" height="80"><? include "../inc/page.php";?></td>
              </tr>
      </table>
  <!-- contents end-->	</td>
</tr>

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


OHA YOOOO