MINI MINI MANI MO

Path : /home/lhcar/www/admin/sub04/
File Upload :
Current File : /home/lhcar/www/admin/sub04/exldown.php

<?
header("Content-type: application/vnd.ms-excel; charset=euc-kr"); 	
header("Content-Disposition: attachment; filename=exel_".date("Y-m-d").".xls"); 
header("Expires: 0"); 
header("Content-Description: PHP4 Generated Data"); 
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
header("Pragma: public");

@ini_set('memory_limit',-1);

@session_start();

function dbconn(){ 	
	$connect = mysql_connect("localhost","autoweb","q1w2e3r4") or die("¿¡·¯ : µðºñ ¿¬°á ¿À·ù ÀÔ´Ï´Ù."); 
	mysql_select_db("autoweb",$connect) or die("¿¡·¯ : µ¥ÀÌÅÍ º£À̽º ¼±Åà ¿À·ù ÀÔ´Ï´Ù."); 
	return $connect; 
}

function dbclose(){
	mysql_close();
}

function Row_string($str){
	global $connect;
	//echo $str;
	$result = mysql_query($str, $connect);
	$row = mysql_fetch_assoc($result);
	return $row;
}
function Query_string($str){
	global $connect;
	//echo $str;
	$result = mysql_query($str, $connect);
	return $result;
}
function Fetch_string($str){
	global $connect;
	//echo $str;
	$result = mysql_query($str, $connect);
	for($i=0;$i<=$arr=mysql_fetch_array($result);$i++){		
		$ret_file[$i] = $arr;
	}		
	return $ret_file;
}
include_once ($_SERVER['DOCUMENT_ROOT']."/lib/code.php");
$connect = dbconn();


	$tb_name = "woojung_part";

	$view_article = 15; // ÇÑÈ­¸é¿¡ ³ªÅ¸³¯ °Ô½Ã¹°ÀÇ ÃÑ °³¼ö  
	if (!$page) $page = 1; // ÇöÀç ÆäÀÌÁö ÁöÁ¤µÇÁö ¾Ê¾ÒÀ» °æ¿ì 1·Î ÁöÁ¤  
	$start = ($page-1)*$view_article; 

	$nowDate = date("YmdHi");

	$href = "&wc_made=$wc_made&wc_model=$wc_model&wc_model2=$wc_model2&wc_trans=$wc_trans&wc_trans2=$wc_trans2&gubun4=$gubun4&sear4=$sear4"; 

	$where=" 1 ";
	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' ";
	}
	if($gubun4){
	   $where .=" and wc_gubun4='$gubun4' ";
	}
	if($sear4){
		$where .= " and ( wc_no  like '%$sear4%' or wc_mem_name like '%$sear4%' or wc_model  like '%$sear4%') ";	
	}

	$qry_cnt = mysql_query("SELECT count(*) FROM woojung_part  WHERE  $where ");
	$temp = mysql_fetch_row($qry_cnt);  
	$total_article = $temp[0]; // ÇöÀç Äõ¸®ÇÑ °Ô½Ã¹°ÀÇ ÃÑ °³¼ö¸¦ ±¸ÇÔ	
	
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" style="border-top:1px solid #0066CC;">
      <tr align="center" class="sbtitle">
		    <td width="5%" height="28" bgcolor="#F6F6F6" >NO</td>
            <td width="9%" bgcolor="#F6F6F6" >µî·ÏÀÏ</td>
            <td width="10%" bgcolor="#F6F6F6" >°íÀ¯¹øÈ£</td>
            <td width="9%" bgcolor="#F6F6F6">Á¦Á¶»ç</td>
            <td width="7%" bgcolor="#F6F6F6">Â÷¸í</td>
            <td width="8%" bgcolor="#F6F6F6">Â÷¸í2</td>
			<td width="9%" bgcolor="#F6F6F6">³â½Ä</td>
			<td width="8%" bgcolor="#F6F6F6">ºÎǰ1</td>
			<td width="8%" bgcolor="#F6F6F6">ºÎǰ2</td>
			<td width="9%" bgcolor="#F6F6F6">ÆÇ¸Å°¡°Ý</td>
			<td width="8%" bgcolor="#F6F6F6">Àç°í·®</td>
			<td width="6%" bgcolor="#F6F6F6">»óÅÂ</td>
      </tr>
<?
				$kk=1;
				$num=$total_article-(($page-1)*$view_article)+1;
				$query = mysql_query("SELECT * FROM woojung_part  WHERE  $where order by wc_regdate desc ");
				while($row = mysql_fetch_array($query)) {	
					$car_img_arr = explode('/',$row[wc_img_1]);
					$cate1=mysql_fetch_array(mysql_query("select * from cate2 where idx='".$row[wc_made]."'"));
					$cate3=mysql_fetch_array(mysql_query("select * from cate3 where idx='".$row[wc_trans]."'"));
?>
		  <tr align="center"  style="cursor: hand; padding:3 0 0 0;" onmouseover="this.bgColor='#d9f3fb'" onmouseout="this.bgColor='#FFFFFF'" bgcolor="#FFFFFF"> 
            <td height="25"><?=$num-$kk?></td>
            <td height="25" ><?=substr($row[wc_regdate],0,10)?></td>
            <td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_orderno]?></td>
            <td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$cate1[name]?></td>
            <td class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_model]?></td>
            <td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_model2]?></td>
       
			<td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_age]?></td>
    
			<td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$cate3[name]?></td>
            
			<td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_fual]?></td>
			<td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_keep_tel1]?number($row[wc_keep_tel1])."¿ø":"°¡°Ý»ó´ã¿äû"?></td>
			<td  class="hand" onclick="location.href='./view.php?wc_idx=<?=$row[wc_idx]?><?=$href1?>';"><?=$row[wc_cc]?></td>
            
			<td  valign="middle" class="hand" ><?=$ArrPartGubun4[$row[wc_gubun4]]?></td>
          </tr>
<?
					$kk++;
				}
?>
          <!-- ¹Ýº¹µÇ´Â ÁÙ ³¡ -->
    </table>

OHA YOOOO