1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<? session_start();
if(trim($_SESSION['ADMINID'])==''){ echo "<script> alert('·Î±×ÀÎ ÇÏ¼Å¾ß À̿밡´ÉÇÕ´Ï´Ù.'); document.location.href='index.php'; </script>"; exit; }
include("category/common.php"); $currentDay = date("Y-m-d",time()); header( "Content-type: application/vnd.ms-excel" ); header( "Content-Disposition: attachment; filename=¼¼±Ý°è»ê¼$currentDay.xls" ); header( "Content-Description: PHP4 Generated Data" );
$subject = "¼¼±Ý°è»ê¼¸®½ºÆ®" . $currentDay;
$COUNT_DATA = mysql_query( "SELECT count(*) FROM member" ); $COUNT_ARRAY = mysql_fetch_array($COUNT_DATA); $DATA_NUM = $COUNT_ARRAY[0];
$LIST_QUERY = "SELECT * FROM bill_publish ORDER BY idx desc"; $TABLE_DATA = mysql_query($LIST_QUERY); ?> <HTML> <HEAD> <TITLE><?ECHO"$subject";?></TITLE> <meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> </HEAD>
<TABLE BORDER=1 WIDTH=100% CELLSPACING=1 CELLPADDING=1> <TR ALIGN=CENTER HEIGHT=24 BGCOLOR=C8D696> <TD>¹øÈ£</TD> <TD>»ç¾÷ÀÚ¹øÈ£</TD> <TD>»óÈ£</TD> <TD>¼º¸í</TD> <td>»ç¾÷ÀåÁÖ¼Ò</td> <td>¾÷ÅÂ</td> <td>Á¾¸ñ</td> <td>°ø±Þ°¡¾×</td> <td>¼¼¾×</td> <td>ÇÕ°è±Ý¾×</td> <td>³¯Â¥</td>
</TR> <? $i = 1;
while( $LIST = mysql_fetch_array( $TABLE_DATA ) ) {
?> <TR ALIGN=CENTER HEIGHT=24 BGCOLOR=EFEFEF> <TD><?=$i;?></TD> <TD><?=$LIST[companyNum];?></TD> <TD><?=$LIST[companyName];?></TD> <TD><?=$LIST[chiefName];?></TD> <TD><?=$LIST[companyAddr];?></TD> <TD><?=$LIST[opt_1];?></TD> <TD><?=$LIST[opt_2];?></TD> <TD><?=number_format($LIST[offerPrice]);?></TD> <TD><?=number_format($LIST[billPrice]);?></TD> <TD><?=number_format($LIST[totalPrice]);?></TD> <TD><?=$LIST[year]."-".$LIST[MONTH]."-".$LIST[DAY];?></TD>
</TR> <? $i++; } ?> </TABLE> </BODY> </HTML>
|