Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ltms.eemo.co.kr
/
public_html
/
super
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/ltms.eemo.co.kr/public_html/super/farm_car_list_print.php
<?php header( "Content-type: application/vnd.ms-excel; charset=UTF-8" ); header( "Content-Disposition: attachment; filename=filename.xls" ); header( "Content-Description: PHP4 Generated Data" ); print("<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"); ?> <?php include_once("inc_header.php"); $farm_no = $_REQUEST['farm_no']; $start_date = $_REQUEST['start_date']; $end_date = $_REQUEST['end_date']; if(!empty($start_date) && !empty($searchEnd)){ $addDateQuery = "AND regdate BETWEEN '$start_date' AND '$end_date'"; }else { $addDateQuery = "AND regdate BETWEEN '$start_date' AND '$end_date'"; } $query = mysql_query("SELECT * FROM farm_lpr_log WHERE 1 AND farm_no = '$farm_no' $addDateQuery $addCarQuery ORDER BY regdate DESC"); // array_reverse($tmpArr); $EXCEL_STR = ' <table class="table table-sm table-hover table-inverse text-center" style="cursor:pointer"> <thead class="thead-inverse"> <tr> <th>등록여부</th> <th>차량번호</th> <th>차량구분</th> <th>운전자명</th> <th>방문일자</th> <th>방문목적</th> </tr> </thead> <tbody>'; while($rs = mysql_fetch_assoc($query)) { $EXCEL_STR .=' <tr class="car-info"> <td scope="row">'.$rs[is_auth].'</td> <td class="car-info-number">'.$rs[lpr_num].'</td> <td>'.$rs[car_gubun].'</td> <td>'.$rs[driver_name].'</td> <td>'.$rs[car_reason].'</td> <td>'.$rs[regdate].'</td> </tr>'; } $EXCEL_STR .= ' </tbody> '; $EXCEL_STR .="</table>"; echo "<meta content=\"application/vnd.ms-excel; charset=UTF-8\" name=\"Content-type\"> "; echo $EXCEL_STR; ?>