Fix: 연간회원 엑셀 내보내기 기능 수정 - 버튼 경로 수정 및 연간회원 테이블 쿼리 적용
This commit is contained in:
62
manager/annual_member/annual_member_list.excel.php
Normal file
62
manager/annual_member/annual_member_list.excel.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
//if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once('_common.php');
|
||||
include_once('../config.php');
|
||||
|
||||
$sql_common = "SELECT * FROM {$fg['annual_member_table']} AS a LEFT JOIN {$fg['annual_category_table']} AS b ON a.ca_id = b.ca_id";
|
||||
$result = sql_query($sql_common);
|
||||
|
||||
$file_name = "annual_member_list_".date("ymd")."_".date("His")."xls"; // 파일명지정
|
||||
|
||||
header("Content-Type: application/vnd.ms-excel");
|
||||
header('Content-Type: application/vnd.ms-excel; charset=utf-8');
|
||||
header("Content-Disposition: attachment; filename=$file_name");
|
||||
header("Content-Description: PHP Generated Data");
|
||||
|
||||
?>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<style type="text/css">
|
||||
.tit {background-color:#C0C0C0; height:30px; }
|
||||
.no-text {mso-number-format:'\@'; text-align:center;}
|
||||
</style>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tit">회원번호</th>
|
||||
<th class="tit">권종구분</th>
|
||||
<th class="tit">상태</th>
|
||||
<th class="tit">성명</th>
|
||||
<th class="tit">연락처</th>
|
||||
<th class="tit">생년월일</th>
|
||||
<th class="tit">메모</th>
|
||||
<th class="tit">시작일</th>
|
||||
<th class="tit">종료일</th>
|
||||
<th class="tit">이메일</th>
|
||||
<th class="tit">주소</th>
|
||||
<th class="tit">최종이용일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) { // 반복문 시작
|
||||
?>
|
||||
<tr>
|
||||
<td class="no-text"><?php echo $row['mem_no']; ?> </td>
|
||||
<td class="no-text"><?php echo $row['ca_name']?> </td>
|
||||
<td class="no-text"><?php echo $row['status']?> </td>
|
||||
<td style="text-align:center"> <?php echo $row['name']?> </td>
|
||||
<td class="no-text"><?php echo $row['tel']; ?></td>
|
||||
<td style="text-align:center"> <?php echo $row['birth']?> </td>
|
||||
<td style="text-align:center"> <?php echo $row['memo'];?> </td>
|
||||
<td style="text-align:center"> <?php echo $row['sdate'];?> </td>
|
||||
<td style="text-align:center"> <?php echo $row['edate']?> </td>
|
||||
<td class="no-text"><?php echo $row['email']; ?> </td>
|
||||
<td class="no-text"><?php echo $row['addr']; ?> </td>
|
||||
<td class="no-text"><?php echo ($row['last_ent_date'] == '0000-00-00 00:00:00') ? '미이용' : date('Y-m-d', strtotime($row['last_ent_date'])); ?> </td>
|
||||
</tr>
|
||||
<?php } // 반복문 종료 ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user