/home/mjc1/public_html/manage/cusafter_xls.php


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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<? 
header
"Content-type: application/vnd.ms-excel" ); 
header"Content-Disposition: attachment; filename=ÁÖ¹®¸®½ºÆ®.xls" ); 
header"Content-Description: PHP4 Generated Data" ); 
?> 

<?

  
include("category/common.php");

            if(
$stx!=''){
                
$where .= " and {$sti} like '%{$stx}%' ";
            }

            if(
$st1!=''){
                
$where .= " and smtel = '{$st1}' ";
            }
            if(
$st2!=''){
                
$where .= " and smoption = '{$st2}' ";
            }
            if(
$st3!=''){
                
$where .= " and smemail = '{$st3}' ";
            }

            if((
$txtdate !== "") && ($txtdate2 !== ""))  $where "  and  reg_date between '$txtdate (00:00)' and '$txtdate2 (23:59)' "//±â°£Ãß°¡


    
$sql "select * from mBoard_cus_after a WHERE 1=1 {$where} order by uid desc";

    
$result mysql_query($sql) or die (mysql_error());

?>

<html> 
<head> 
<title>Excel´Ù¿î</title> 
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> 
</head> 
<body> 

<table width=100% cellpadding=0 cellspacing=0 border=1> 
<!--
<tr align=center height=20 bgcolor=#FFFF99> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»óÈ£¸í</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>¿¬¶ôó</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>À̸ÞÀÏ</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»ó´ãÀϽÃ</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»ó´ã¿ø</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»ç¿ëÁ¦Ç°</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»ó´ã°á°ú</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»ó´ã³»¿ë</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>ºÒ¸¸»çÀ¯</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>Àü´Þ»çÇ×</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>¾÷Á¾</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>Ç¥½Ã¿©ºÎ</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>¸ÞÀÎÇ¥½Ã³»¿ë</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>µî·ÏÀϽÃ</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>´ã´çÀÚ</b></td> 
</tr>
-->
<tr align=center height=20 bgcolor=#FFFF99> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»óÈ£¸í</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>°í°´¸í</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>ÀüÈ­¹øÈ£</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>»ó´ã³»¿ë</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>Àü´Þ»çÇ×</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>´ã´çÀÚ</b></td> 
    <td style=font-family:Tahoma;font-size:9pt;><b>µî·ÏÀϽÃ</b></td>
</tr>

<?
    
if($num mysql_num_rows($result)){
   
    
$i 1;
   
        while(
$row  mysql_fetch_array($result)) {

            
//À̸§<br>(ÀüÈ­¹øÈ£) ·Î µÇ¾îÀִ°ÍÀ» ºÐ¸®½ÃÅ´
            
$arr1 explode("<br>"$row['smname']);
            
$arr1_1 str_replace(" """$arr1[0]);
            
$arr1_2 preg_replace("/[()-]/i"""$arr1[1]);
?>

<tr align=center height=20 bgcolor=#FFFFFF> 
    <td style=font-family:Tahoma;font-size:9pt;><?=$row[smcompany];?></td> 
    <td style=font-family:Tahoma;font-size:9pt;><?=$arr1_1;?></td> 
    <td style=font-family:Tahoma;font-size:9pt;mso-number-format:'\@'><?=$arr1_2;?></td> 
    <td style=font-family:Tahoma;font-size:9pt;><?=$row[smdetail];?></td> 
    <td style=font-family:Tahoma;font-size:9pt;><?=$row[industry_type];?></td> 
    <td style=font-family:Tahoma;font-size:9pt;><?=$row[emp];?></td> 
    <td style=font-family:Tahoma;font-size:9pt;><?=$row[reg_date];?></td> 
</tr>

<?
        $i
++;
        } 
    }
?>