/home/mjc1/public_html/html/millennium/freebies_inc.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<?php
include_once("./_common.php");

if(isset(
$_GET["page"])){
    
$page $_GET["page"];
}else{
    
$page 1;
}
//24.03.13±âÁØ °í°´id ¾È³ª¿À°Ô º¯°æ, ³²»óº¹¼öÁ¤, È«Àç¿øÆÀÀå´Ô ¿äû
?>
<style>
#freebies {width:900px;padding:20px;box-sizing:border-box;border-top:1px dotted #707070;margin:auto;margin-top:30px;}
#freebies h1 {text-align:center;font-family:'gs',sans-serif;font-size:24px;font-weight:bold;margin-bottom:20px;padding-top:30px;}
#freebies > ul > li {/* display:flex;justify-content: space-between; */padding:10px;box-sizing:border-box;}
.freeb_cont {background-color:#F1F4FF;margin-bottom:2px;}
.freeb_cont:last-child {margin-bottom:0px;}
.freeb_item {font-size:12px;font-family:'¸¼Àº °íµñ';text-align:center;line-height:20px;}
.freeb_h .freeb_item {font-weight:bold;}
.fb_date {width:3em;}
.fb_id {width:3.5em;}
.fb_region {min-width:4em;}
.fb_name {/* text-align:left; */width:5em;}
.freeb_h .fb_name {text-align:center;}
.fb_gift {min-width:67px;}
.fb_icon {width:90px;}
.fb_icon img {float:left;}
/*¸ñ·Ï ÆäÀÌ¡*/
#freebies nav {text-align:center;margin-top:20px;width:900px;}
.pagingul {display:flex;justify-content:center;}
.pagingul li {min-width:36px;height:36px;border:1px solid #ccc;border-right:0px;text-align:center;padding:8px;box-sizing:border-box;}
.pagingul li:last-child{border-right:1px solid #ccc;}
.pagingul li a {display:block;font-size:14px;}
.pagingul li.on {background:#FD7921;}
.pagingul li.on a {color:#ffffff;}
.change_back{
    background:#FD7921;
    color:#ffffff;
}

/* 23.02.16 ³²»óº¹ ¼öÁ¤ */
.freeb_h > div, .freeb_cont > div{float: left;height: 20px;}
.freeb_h::after, .freeb_cont::after{content:'';display: block;clear: both;}
/*.freeb_item:first-child{width: 40px;}
.freeb_item:nth-child(2){width: 130px;}
.freeb_item:nth-child(3){width: 130px;}
.freeb_item:nth-child(4){width: 130px;}
.freeb_item:nth-child(5){width: 140px;}
.freeb_item:nth-child(6){width: 140px;}
.freeb_item:last-child{display:flex;justify-content: center;width: 130px;} */
.freeb_item:first-child{width: 80px;}
.freeb_item:nth-child(2){width: 150px;}
.freeb_item:nth-child(3){width: 150px;}
.freeb_item:nth-child(4){width: 150px;}
.freeb_item:nth-child(5){width: 160px;}
.freeb_item:last-child{display:flex;justify-content: center;width: 150px;}

.fb_content{width: 96px;}

</style>
<div id="freebies_inc">
<br><br>
<section id="freebies">
    <h1 style="border: 0px;line-height: 24px;margin-bottom: 40px;">
        »çÀºÇ° ¹ß¼Û ¸®½ºÆ®
        <!-- <br><span style="text-align: center;font-size: 16px;line-height: 24px;display: inline-block;padding-top: 10px;margin-bottom: 20px;font-weight: bold;font-family: 'gs',sans-serif;">(¸¸Á·µµ, Èıâ, ¼Ò°³)</span> -->
    </h1>
    
    <ul>
        <!--Ç׸ñÇì´õ-->
        <li class="freeb_h">
            <div class="freeb_item fb_date">¹ß¼Û¿ù</div>
            <!-- <div class="freeb_item fb_id">°í°´ID</div> -->
            <div class="freeb_item fb_name">¾÷ü¸í</div>
            <div class="freeb_item fb_region">Áö¿ª</div>
            <div class="freeb_item fb_gift">»çÀºÇ°³»¿ë</div>
            <div class="freeb_item fb_ship">¹ß¼Û°á°ú</div>
            <div class="freeb_item fb_icon">¹ß¼Û¹æ½Ä</div>
        </li>
        <!---->

<?php

    
//µ¥ÀÌÅÍ Ãëµæ
    
mysql_query("set session character_set_connection=utf8;");
    
mysql_query("set session character_set_results=utf8;");
    
mysql_query("set session character_set_client=utf8;");

    
$sql "select COUNT(*) as cnt from delBoard WHERE del_result = '1' order by reg_date DESC";
    
$res mysql_query($sql,$connect_web);
    
$arr mysql_fetch_array($res);
    
$total_record $arr["cnt"];

    
$cm_nCount 30;
    
$cm_item_nCount 30;          

    function 
pageListing($cur_page$total_page$n$url) {

        
//$retValue = "<div class='paging'>";
        
if ($cur_page 1) {

            
$retValue .= "<li><a href='" $url . ($cur_page-1) ."' class='page'><span class='next'>ÀÌÀü</span></a></li>";
        } else {
            
$retValue .= "";
            
$retValue .= "";
        }

        
$retValue .= "";

        
$start_page = ( ( (int)( ($cur_page ) / 10 ) ) * 10 ) + 1;

        
$end_page $start_page 9;
        if (
$end_page >= $total_page$end_page $total_page;
            
//if ($start_page > 1) $retValue .= "<li><a href='" . $url . ($start_page-1) . "' class='page'><span class='next10'>ÀÌÀü 10°³</span></a></li>";

                
if ($total_page 1)
                    for (
$k=$start_page;$k<=$end_page;$k++)
                if (
$cur_page != $k$retValue .= "<li><a href='$url$k'>$k</a></li>";
                    else 
$retValue .= "<li class='change_back'><a disabled>$k</a></li>";

        
//if ($total_page > $end_page) $retValue .= "<li><a href='" . $url . ($end_page+1) . "' class='page'><span class='pro10'>´ÙÀ½ 10°³</span></a></li>";

        
$retValue .= "";

        if (
$cur_page $total_page) {
            
$retValue .= "<li><a href='$url. ($cur_page+1) ."' class='page'><span class='pro'>´ÙÀ½</span></a></li>";

        } else {
            
$retValue .= "";
            
$retValue .= "";
        }

        
//$retValue .= "</div>";
        
return $retValue;
    }

    
$nPage ceil($total_record $cm_nCount);
    if (
$pg == ""$pg 1;
    
$nFrom = ($pg 1) * $cm_nCount;




    
$sql "select * from delBoard WHERE del_result = '1' order by DATE_FORMAT(reg_date,'%y-%m') desc, gift desc limit $nFrom$cm_nCount";
    
$res mysql_query($sql,$connect_web);

    if(!
$res){die("error");}
    while(
$row=mysql_fetch_array($res)){
        
$list_array[] = $row;
    }
    for(
$i=0;$i<count($list_array);$i++){

    
$info $list_array[$i];

    
//³¯Â¥¼öÁ¤
    
$datetime $info['reg_date'];
    
$rep str_replace('-','/'$datetime);
    
$date = ((int)iconv_substr($rep52))."¿ù";

    
//id(ÃÖ´ë 6±ÛÀÚÇ¥½Ã)
    //$id = $info['user_id'];
    //$id_star = substr($id, 0, 3).str_repeat('*',3);

    //ȸ»çÀ̸§(ÃÖ´ë 4±ÛÀÚÇ¥½Ã)
    //$company = iconv("EUC-KR", "UTF-8", $info['company']);
    //$company_star = substr($company, 0, 2).str_repeat('*',2);
    
$company iconv("UTF-8""EUC-KR"$info['company']);
    
$company_star iconv_substr($company03"EUC-KR").str_repeat('*',3);

    
//Áö¿ªs
    
$area iconv("UTF-8""EUC-KR"$info['user_area']);
    
//$area = $info['user_area'];

    //»çÀºÇ°
    
$gift $info['gift'];
    if(
$gift == 0) {$gift_txt "»óǰ±Ç/À½·á±Ç";} 
    else if(
$gift == 1) {$gift_txt "»óǰ±Ç/À½·á±Ç";}
    else if(
$gift == 2) {$gift_txt "»óǰ±Ç/À½·á±Ç";}
    else if(
$gift == 3) {$gift_txt "»óǰ±Ç/À½·á±Ç";}

    
//¹ß¼Û
    
$result $info['del_result'];
    if(
$result == 0) {$result_txt "¹Ì¹ß¼Û"; } else {$result_txt "¹ß¼Û¿Ï·á";}

    
//¹è¼Û¹æ½Ä
    
$method $info['del_met'];
    if(
$method == 0) {$img "./images/freebies/kpost.png"; } else {$img "./images/freebies/kakao.png";}
    if(
$method == 0) {$method_txt "¿ìü±¹"; } else {$method_txt "īī¿ÀÅå";}
?>
        <li class="freeb_cont">
            <div class="freeb_item fb_date"><?php echo $date?></div>
            <!-- <div class="freeb_item fb_id"><?php echo $id_star?></div> -->
            <div class="freeb_item fb_name"><?php echo $company_star?></div>
            <div class="freeb_item fb_region"><?php echo $area?></div>
            <div class="freeb_item fb_gift"><?php echo $gift_txt?></div>
            <div class="freeb_item fb_ship"><?php echo $result_txt?></div>
            <div class="freeb_item fb_icon"><div class="fb_content"><img src="<?php echo $img?>" alt="¹ß¼Û ¾ÆÀÌÄÜ"><?php echo $method_txt?></div></div>
        </li>
<?php ?>
        <!--
        <li class="freeb_cont">
            <div class="freeb_item fb_date">12/30</div>
            <div class="freeb_item fb_id">abc***</div>
            <div class="freeb_item fb_name">¿¡ÀÌ**</div>
            <div class="freeb_item fb_region">´ë±¸</div>
            <div class="freeb_item fb_gift">À½·á2ÀÜ</div>
            <div class="freeb_item fb_ship">¹ß¼Û</div>
            <div class="freeb_item fb_icon"><img src="./images/freebies/kakao.png" alt="īī¿ÀÅå"></div>
        </li>
        <li class="freeb_cont">
            <div class="freeb_item fb_date">1/19</div>
            <div class="freeb_item fb_id">abc***</div>
            <div class="freeb_item fb_name">¿¡ÀÌ**</div>
            <div class="freeb_item fb_region">ºÎ»ê</div>
            <div class="freeb_item fb_gift">»óǰ±Ç5¸¸¿ø</div>
            <div class="freeb_item fb_ship">¹ß¼Û</div>
            <div class="freeb_item fb_icon"><img src="./images/freebies/kpost.png" alt="¿ìü±¹"></div>
        </li>
        -->
    </ul>
    <nav>
        <ul class="pagingul">
            <?php
            
//customer_recommend.php,review_event.php Âü°í
            //ÇØ´ç ÆäÀÌÁö¿¡ Çش纯¼ö°¡ Á¸ÀçÇÒ °æ¿ì '¼Ò°³À̺¥Æ®' ÆäÀÌÁö ¾È¿¡¼­ À̵¿, '¸®ºäÀ̺¥Æ®' ÆäÀÌÁö ¾È¿¡¼­ À̵¿, ¾Æ´Ò °æ¿ì, '¸¸Á·µµÁ¶»ç' ÆäÀÌÁö ¾È¿¡¼­ À̵¿
            //Æ÷ÇԵȠ°¢ ÆäÀÌÁö¿¡ Çش纯¼ö ÀÖ´ÂÁö È®ÀÎÇÊ¿ä
            
if(isset($recommend)){
                
$url "customer_recommend.php?pg=";
            } else if(isset(
$review_event)){
                
$url "review_event.php?pg=";
            } else if(isset(
$mypageevent3)){
                
$url "mypageevent3.php?ev_code=undefined&pg=";
            } else{
                
$url "customer_satisfaction.php?pg=";
            }
            echo 
pageListing($pg$nPage$cm_nCount$url); 
            
?>
        </ul>
    </nav>
    
</section>
</div>