/home/mjc1/public_html/html/millennium/customerprice_list.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<?php include_once("./_common2.php"); ?>
<?

$cm_nCount                
=    10;
$cm_item_nCount    =    30;     

function 
pageListing($cur_page$total_page$n$url$mode$SearchMdiv ,$SearchMup,$SearchMper,$searchCode ,$keyword ,$SearchMsw1 $cm_nCount$menu$sub  ) {

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

            
$retValue .= "<a href='" $url . ($cur_page-1) ."' class='page'><span class='next'>ÀÌÀü</span></a>";
        } 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 .= "<a href='" $url . ($start_page-1) . "' class='page'><span class='next10'>ÀÌÀü 10°³</span></a>";

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

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

        
$retValue .= "";

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

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

    
$retValue .= "</div>";
    return 
$retValue;
}
?>
    <a id="#list_view" name='list_view'></a>
    <div class="wrap">

        <div class="contents" style='margin-top:0px;margin-bottom:0px;'>

            <div class="subContents">
                <div class="section">
 
                    <div style="display:flex; justify-content:space-between">
                        <h2 style='font-size:17px;'>°ßÀû¿äû ¸®½ºÆ®</h2>
                        <p style='font-size:17px;'>°Ç¼ö : <b class="list_total_cnt"></b>°Ç</p>
                    </div>

                    <table class="faqTable mt10">
                        <tr> 
                            <th width="50">¹øÈ£</th>
                            <th width="50">±¸ºÐ</th>
                            <th width="160">»óÈ£¸í</th>
                            <!--<th width="150">¼º¸í</th>-->
                            <th width="160">Á¢¼ö±¸ºÐ</th>
                            <th width="110">µî·ÏÀϽÃ</th>
                            <th width="170">´ã´çÀÚ(ó¸®ÀϽÃ)</th>
                            <!--<th width="110">¿Ï·áÀϽÃ</th>-->
                        </tr>

<?

    
/* ·Î±×¾Æ¿ô ½Ã Àüü ±Û, ·Î±×ÀÎÇϸé Àڱ⠱۸¸ º¸ÀÓ */

            
$sql         =     " select * from 
                                        (select '°ßÀû' as opt, company, detail, admin, reg_date, product as  state_log, '' as smtitle, gubun as flag, mobile
                                            from mBoard_consult where 1=1
                                        union
                                        select '°ßÀû' as opt, smname as company, smdetail as detail, smoption as admin, reg_date, state_log, smtitle, proResult  as flag, come_from as mobile
                                            from mBoard_install_req where smtitle in('consult-pc','consult-mobile') 
                                        union
                                        select '»ó´ã' as opt, smname as company, smdetail as detail, smoption as admin, reg_date, state_log, smtitle, proResult  as flag, come_from as mobile
                                            from mBoard_install_req where smtitle in('pc','mobile','visit-pc','visit-mobile','shopping-pc','shopping-mobile') 
                                        union
                                        select '*ÀüÀÚ' as opt, smname as company, smdetail as detail, smoption as admin, reg_date, state_log, smtitle, proResult  as flag , come_from as mobile
                                            from mBoard_install_req where smtitle in ('mail-cs') 
                                        union
                                        select '*ÅØ½º' as opt, smname as company, smdetail as detail, smoption as admin, reg_date, state_log, smtitle, proResult  as flag , come_from as mobile
                                            from mBoard_install_req where smtitle in ('tax') 
                                        union
                                        select '*ºñÁî' as opt, smname as company, smdetail as detail, smoption as admin, reg_date, state_log, smtitle, proResult  as flag , come_from as mobile
                                            from mBoard_install_req where smtitle in ('biz') 
                                        union
                                        select '¼³Ä¡' as opt, smname as company, smdetail as detail, smoption as admin, reg_date, state_log, smtitle, proResult  as flag , come_from as mobile
                                            from mBoard_install_req where smtitle not in ('pc','mobile','visit-pc','visit-mobile','consult-pc','consult-mobile','mail-cs','tax','biz','shopping-pc','shopping-mobile') 
                                        union
                                        select '±³À°' as opt, e_company as company, 'Áýü±³À°½Åû' as detail, e_person as admin, reg_date, proc_date as  state_log, '' as smtitle, e_state as flag, mobile
                                            from mBoard_education 
                                        union
                                        SELECT '½Å±Ô' AS opt, custname AS company, 'µ¥¸ð¼³Ä¡' AS detail, '°ü¸®ÀÚ' AS admin, flow_date AS reg_date, flow_date AS state_log, flow_path AS smtitle, '7' AS flag, '' AS mobile
                                        FROM mBoard_file_download_setting
                                        where 1=1) aa
                                    where 1
                                    "
;
            
            if(
$_SERVER['REMOTE_ADDR']=='58.151.27.172'){ 
                
//echo $sql;
            
}

            
$result      mysql_query($sql) or die (mysql_error());
            
$nTotalCount mysql_num_rows($result);
            
$nPage       ceil($nTotalCount $cm_nCount);
  
            if (
$pg == ""$pg 1;
            
$nFrom = ($pg 1) * $cm_nCount;
            
            
$result      =       mysql_query($sql) or die (mysql_error());

            
$sql    $sql "  order by reg_date desc limit $nFrom$cm_nCount ";
 
            
$result mysql_query($sql) or die (mysql_error());


    if( 
mysql_num_rows($result) > ){ 
        
$cnt $nTotalCount-$nFrom;
        while (
$info =  mysql_fetch_array($result)){ 
            
$Rowlist[] = $info;

        }
    }
        
$cnt $nTotalCount-$nFrom;
        for(
$aa 0$aa count($Rowlist); $aa++) {
        

            
$Row $Rowlist[$aa];
            
            
$reg_date  $Row['reg_date'];

            
$today date("Y-m-d"strtotime($reg_date));
            
$ori_compName $Row['company'];

            
$complength strlen($Row['company']);
            
//$compName = mb_substr($Row['company'],0,2,"euckr");
            
$tmp "";
            if(
substr($Row['company'],0,4)=='(ÁÖ)'){ 
                
$Row['company'] = substr($Row['company'],4,strlen($Row['company']));
                
$tmp "(ÁÖ)";
            }
            
$compName $Row['company'];
            for(
$i=0;$i<($complength/2)+1;$i++){
                
//$compName.="*";
            
}

            
$Namelength mb_strlen($Row['name'],"euckr");
            
$Name mb_substr($Row['name'],0,2,"euckr");
            for(
$i=0;$i<$Namelength-2;$i++){
                
$Name.="*";
            }
            
$Row['detail'] = str_replace("°í°´¿äû : ","",$Row['detail']);

            
$main_flg 0;
            switch(
$Row['smtitle']) {
                case 
"õ³â°æ¿µERP µµÀÔ":
                    
$main_flg 1;
                    break;
                case 
"½º¸¶Æ®Æù(+PDA)¿µ¾÷°ü¸®":
                    
$main_flg 1;
                    break;
                case 
"½º¸¶Æ®Æù(+¿Â¶óÀÎ) ¼ö¹ßÁÖ°ü¸®":
                    
$main_flg 1;
                    break;
                case 
"µµ¸Å¸ô/°³Àθô/¿ÀǸ¶Äϰü¸®":
                    
$main_flg 1;
                    break;
                case 
"½º¸¶Æ®½ºÅä¾î(³×À̹ö) ÆÇ¸Å°ü¸®":
                    
$main_flg 1;
                    break;
                case 
"´ë¿©°ü¸®/POS/ÀÚ»ê°ü¸®":
                    
$main_flg 1;
                    break;
                case 
"¹°·ù(¹è¼Û)½Ã½ºÅÛ/SW°³¹ß»ó´ã":
                    
$main_flg 1;
                    break;
                default:
                    
$main_flg 0;
                    break;
            }

            if(
$Row['detail'] == "µ¥¸ð¼³Ä¡" && $Row['opt'] == "½Å±Ô") {
                if(
$Row['smtitle'] == "õ³â°æ¿µIII 2Á¾" || $Row['smtitle'] == "õ³â°æ¿µII 2Á¾") { // 2Á¾ÆäÀÌÁö¿¡¼­ ¼³Ä¡¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."2";
                } else if(
$Row['smtitle'] == "õ³â°æ¿µ3cs »ó¼¼" || $Row['smtitle'] == "õ³â°æ¿µ3 »ó¼¼" || $Row['smtitle'] == "õ³â°æ¿µ »ó¼¼") { // »ó¼¼ÆäÀÌÁö¿¡¼­ ¼³Ä¡¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."S";
                } else if(
$Row['smtitle'] == "õ³â3CS Á¦Á¶") { // Á¦Á¶ÆäÀÌÁö¿¡¼­ ¼³Ä¡¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."J";
                } else if(
$Row['smtitle'] == "õ³â°æ¿µIII cs" || $Row['smtitle'] == "õ³â°æ¿µcs") { // Ãµ³â°æ¿µ3cs µ¥¸ðÆäÀÌÁö¿¡¼­ ¼³Ä¡¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."H";
                } else if(
$Row['smtitle'] == "õ³â°æ¿µIII ¸ÞÀιè³Ê") { // ¸ÞÀιè³Ê¿¡¼­ ¼³Ä¡¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."D";
                } else if(
$Row['smtitle'] == "Á¤Ç° ¾÷µ¥ÀÌÆ®/3cs") { // Á¤Ç°´Ù¿î·Îµå¿¡¼­ Ãµ³â°æ¿µ3cs¸¦ ¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."U";
                } else if(
$Row['smtitle'] == "Á¤Ç° ¾÷µ¥ÀÌÆ®") { // Á¤Ç°´Ù¿î·Îµå¿¡¼­ ±× ¿Ü¸¦ ¹ÞÀ¸¸é
                    
$Row['opt'] = $Row['opt']."K";
                } else {
                    
$Row['opt'] = $Row['opt']."S";
                }
            } else if(
$Row['opt'] == "¼³Ä¡" && $main_flg 0) {
                
$Row['opt'] = $Row['opt']."Y";
            } else if(
$Row['opt'] == "¼³Ä¡" && $main_flg 1) {
                
$Row['opt'] = "»ó´ã";
            } else if(
$Row['smtitle'] == "shopping-pc" || $Row['smtitle'] == "shopping-mobile") {
                
$Row['opt'] = "D".$Row['opt'];
            }

            
$detail $Row['detail'];
            
/*if($Row['opt']=='°ßÀû'){
                $Row['detail'] = "[°ßÀû¿äû]";
            } else if($Row['opt']=='»ó´ã' && ($Row['smtitle']=='visit-pc' || $Row['smtitle']=='visit-mobile')){
                $Row['detail'] = "[¹æ¹®»ó´ã¿äû]";
            } else if($Row['opt']=='»ó´ã'){
                $Row['detail'] = "[±¸¸Å»ó´ã¿äû]";
            } else if($Row['opt']=='±³À°'){
                $Row['detail'] = "[±³À°¿äû]";
            } else if($Row['opt']=='¼³Ä¡'){
                $Row['detail'] = "[¼³Ä¡¿äû]";
            }
            if(substr($detail,0,1)=='*'){
                $Row['detail'] = "[*°ßÀû¿äû]";
            }*/
            
if($Row['flag']=='0' || $Row['flag']=='½Åû' || $Row['flag']==''){
                
$Row['detail'] = "<span style='color:blue'>[¿äûÁ¢¼ö]</span>";
            } else {
                
$Row['detail'] = "[󸮿Ϸá]";
            }
            
            if(
substr($detail,0,1)=='*'){
                if(
$Row['mobile']=='mobile' || strpos($Row['mobile'],"(m)") !== false || strpos($Row['smtitle'],"mobile") !== false){
                    
$Row['opt'] = "m".$Row['opt'];
                } else {
                    
$Row['opt'] = "*".$Row['opt'];
                }
            } 

            
$pos strpos($detail"(M)");
            if(
$pos !== false){ //¸ÞÀϷΠµé¾î¿Í¼­ ÀÛ¼ºÇÑ °æ¿ì
                
$Row['opt'] = "M".$Row['opt'];
            }

            if(
$Row['admin'] == "¹ÌÁöÁ¤") { $Row['admin'] = "°ü¸®ÀÚ"; }

            if(
substr($reg_date,0,10)==substr($Row['state_log'],0,10)){
                
$color "";
            } else {
                
$color "style='color:#6060CD;'";
            }
?>
                        <tr <? if(isset($_COOKIE['USERID']) && $Row[4] == $_COOKIE['USERID'] && $replyRow_0 !== "" && $Row[3] == "E"){ echo "onClick=\"asLink('y','$replyRow_0');\" style='cursor:pointer;' bgcolor=ffffff ";} ?>>
                            <td ><?=$cnt;?></td>
                            <td >[<?=$Row['opt'];?>]</td>
                            <td >
                                <?
                                    
if($compName == "¿¥Á¦À̼ÒÇÁÆ®" || strpos($compName"¿¥Á¦ÀÌ") !== false || strpos($compName"Å×½ºÆ®") !== false) {
                                        echo 
"»óÈ£¹ÌÁ¤";
                                    } else if(
$aa && $ori_compName == $Rowlist[$aa-1]['company']) {
                                        echo 
"»óÈ£¹ÌÁ¤";
                                    } else if(
$compName != "") {
                                        
$len mb_strlen($compName,'euc-kr');
                                        
$len1 round($len/2);
                                        
//echo $len." ".$len1." ".iconv_substr($info['custname'],$len1);
                                        
echo $tmp;
                                        echo 
iconv_substr($compName,0,$len1,'euc-kr');
                                        for(
$i=0;$i<$len-$len1;$i++){ echo "*"; }
                                    } else {
                                        echo 
"»óÈ£¹ÌÁ¤";
                                    }
                                
?>
                            </td>
                            <!--<td ><?=$Name;?></td>-->
                            <td ><?/*=mb_substr($Row['detail'],0,13,"euckr")."...";*/echo $Row['detail'];?></td>
                            <td><?=date("Y-m-d (H:i)",strtotime($reg_date));?></td>
                            <td ><? 
                                    
echo $Row[admin];
                                    if(
$Row['state_log']!=''){
                                        echo 
" <span {$color}> ".date("Y-m-d (H:i)",strtotime(substr(trim($Row['state_log']),0,19)))." </span>";
                                    }
                                    
?></td>
                            <!--<td></td>¿Ï·áÀϽÃ-->
                        </tr>
<?    
            $cnt
--;
    }  
?>

                    </table>


                <? echo pageListing($pg$nPage$cm_nCount"?pg=" $mode$chknotend$SearchMup$SearchMper$searchCode$keyword$SearchMsw1$cm_nCount$menu$sub)?> 

                </div><!-- //section -->

            </div><!-- //subContents -->
        </div><!-- //contents -->
    </div><!-- //wrap -->