/home/mjc1/public_html/html/millennium/_mypagepoint2.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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
<?php include_once("./_common2.php"); ?>
<?
    
if( $_COOKIE[USERID] == "" ) {
?>

<script>
    alert("ȸ¿ø ·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "intro.php";
</script>

<?
    
}
    include(
"../../manage/category/common.php");
    include(
'../../html/include/_Head.php');





    
mysql_close;
?>
<? 
if ($txtdate == "") { 
$txtdate = ($txtdate == "") ?  date("Y-m-d"strtotime("-7 Day")) : $txtdate
  }
if (
$txtdate2 == "") { 
 
$txtdate2 = ($txtdate2 == "") ? date("Y-m-d"time()) : $txtdate2
  }
?>
<script type="text/javascript" src="../../onlinecs/js/PopupCalendar.js"></script>



<script>
function Search(){
    
    searchFrm.submit();
    
}




function setDay(t){// ÀÏÂ÷¸¦ ÆÄ¶ó¸ÞÅͷΠ¹Þ´Â´Ù

 var now = new Date;

 if ((now.getMonth()+1) < 10){
  month = "0"+(now.getMonth()+1);
 }else{
  month = (now.getMonth()+1);
 }
 
 if (now.getDate() < 10){
  date = "0"+now.getDate();
 }else{
  date = now.getDate();
 }

 var today = now.getYear() + "-" + month + "-" + date;//ÇöÀ糯¥
 document.searchFrm.txtdate2.value = today; 
 document.searchFrm.txtdate.value = getThatday(today,t); //ÇöÀ糯¥¿Í ÀÏÂ÷¸¦ ÆÄ¶ó¹ÌÅͷΠº¸³»¼­ °á°ú¸®ÅÏÇÑ´Ù.
}

function getThatday(today,t){ //³¯Â¥, ÀÏÂ÷¸¦ ÆÄ¶ó¸ÞÅͷΠ¹Þ´Â´Ù.
 var pdate=new Array(); 
 var pday=today.split("-"); //³¯Â¥¸¦ ±¸ºÐÀڷΠ³ª´©¾î ¹è¿­·Î º¯È¯ÇÑ´Ù.
 var ptoday=new Date(pday[0],pday[1]-1,pday[2]); //µ¥ÀÌÆ®°´Ã¼ »ý¼ºÇÑ´Ù.
 var ptimestamp=ptoday.valueOf()+1000*60*60*24*t; //tÀÏÈÄÀǠŸÀÓ½ºÅÆÇÁ¸¦ ¾ò´Â´Ù. À½¼ö¶ó¸é ÀÌÀü³¯Â¥¸¦ ¾ò´Â´Ù.
 var thatday=new Date(ptimestamp); //tÀÏÈÄÀÇ ³¯Â¥°´Ã¼ »ý¼ºÇÑ´Ù.
 
 pdate[pdate.length]=thatday.getYear(); //³â
 
  if (thatday.getMonth()+1 < 10){
  pdate[pdate.length]="0"+(thatday.getMonth()+1); //¿ù
  }else{
  pdate[pdate.length]=thatday.getMonth()+1; //¿ù
  } 
 
     if (thatday.getDate() < 10){
  pdate[pdate.length]="0"+thatday.getDate(); //ÀÏ
  }else{
  pdate[pdate.length]=thatday.getDate(); //ÀÏ
  }

return pdate.join("-"); //¹è¿­À» / ±¸ºÐÀڷΠÇÕÃÄ ½ºÆ®¸µÀ¸·Î º¯È¯ÈÄ ¹Ýȯ
}
</SCRIPT> 

<script language='javascript'>
    function txtdatechange(date)
    {
    var fm = document.searchFrm;
    fm.searchFrm.value = date;
    }

    function Msg(t){
        alert(t);
    }
</script>
<!-- ÆäÀÌ¡ Ã³¸® ÀÛ¾÷ -->
<?    $cm_nCount    =      20;

    
$cm_item_nCount     =      30;


    include(
"../../manage/category/subpointcommon.php");                        
                
$userid $_COOKIE[USERID]; 

                

function 
pageListing($cur_page$total_page$n$url$mode$SearchMdiv ,$SearchMup,$SearchMper,$searchCode ,$searchid ,$SearchMsw1 $cm_nCount ,$txtdate$txtdate2 ) {

        
$retValue .= "<table width=600 border=0 cellspacing=0 cellpadding=0 height=40 align=center><tr><td align=center valign=middle>";
        if (
$cur_page 1) {

            
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($cur_page-1) ."&mode=".$mode."&SearchMdiv=".$SearchMdiv."&SearchMup=".$SearchMup."&SearchMper=".$SearchMper."&searchCode=".$searchCode."&searchid=".$searchid."&SearchMsw1=".$SearchMsw1."&SortCnt=".$cm_nCount."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>ÀÌÀü</a></font></span>";
        } else {
            
$retValue .= "&nbsp;";
            
$retValue .= "&nbsp;";
        }
        
$retValue .= "&nbsp;";
        
$start_page = ( ( (int)( ($cur_page ) / 10 ) ) * 10 ) + 1;
        
//echo (int)(($cur_page - 1) / 10);
        
$end_page $start_page 9;
        if (
$end_page >= $total_page$end_page $total_page;
        if (
$start_page 1$retValue .= " <span style=font-size:9pt;><font face=Verdana><a href='" $url . ($start_page-1) . "&mode=".$mode."&SearchMdiv=".$SearchMdiv."&SearchMup=".$SearchMup."&SearchMper=".$SearchMper."&searchCode=".$searchCode."&searchid=".$searchid."&SearchMsw1=".$SearchMsw1."&SortCnt=".$cm_nCount."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>...</a></font></span> ";
        if (
$total_page 1)
        for (
$k=$start_page;$k<=$end_page;$k++)
        if (
$cur_page != $k$retValue .= "&nbsp;<span style=font-size:9pt;><font face=Verdana><a href='$url$k&mode=".$mode."&SearchMdiv=".$SearchMdiv."&SearchMup=".$SearchMup."&SearchMper=".$SearchMper."&searchCode=".$searchCode."&searchid=".$searchid."&SearchMsw1=".$SearchMsw1."&SortCnt=".$cm_nCount."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>$k</a>&nbsp;</font></span>";
        else 
$retValue .= "&nbsp;<b>$k</b> ";
        if (
$total_page $end_page$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($end_page+1) . "&mode=".$mode."&SearchMdiv=".$SearchMdiv."&SearchMup=".$SearchMup."&SearchMper=".$SearchMper."&searchCode=".$searchCode."&searchid=".$searchid."&SearchMsw1=".$SearchMsw1."&SortCnt=".$cm_nCount."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>...</a></font></span> ";
        
$retValue .= "&nbsp;&nbsp;";
        if (
$cur_page $total_page) {
            
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='$url. ($cur_page+1) ."&mode=".$mode."&SearchMdiv=".$SearchMdiv."&SearchMup=".$SearchMup."&SearchMper=".$SearchMper."&searchCode=".$searchCode."&searchid=".$searchid."&SearchMsw1=".$SearchMsw1."&SortCnt=".$cm_nCount."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>´ÙÀ½</a></font></span>";

        } else {
            
$retValue .= "&nbsp;";
            
$retValue .= "&nbsp;";
        }
        
$retValue .= "</td></tr></table>";
        return 
$retValue;
    }
                        
$Dgubun =  " SELECT 0, f.idx, f.cust_id, f.rgst_dtm, f.price, f.addpoint, '' AS usepoint, '' AS use_type,  f.delkey, '' AS bigo, '' AS curpoint
                            FROM cash_fill AS f
                            WHERE f.rgst_dtm BETWEEN '
$txtdate 00:00:00' AND '$txtdate2 23:59:59' AND cust_id = '$userid' AND delkey = '0' AND addpoint > '0'
                            UNION ALL
                            SELECT 1, f.idx, f.cust_id, f.rgst_dtm, '' AS price, '' AS addpoint, f.usepoint, f.use_type, '' AS delkey, f.bigo, f.curpoint
                            FROM cash_use AS f
                            WHERE f.rgst_dtm BETWEEN '
$txtdate 00:00:00' AND '$txtdate2 23:59:59' AND cust_id = '$userid' AND usepoint > '0'";    //±âº» °Ë»öÄõ¸®

    
if ( isset($mode ) && $mode == "search"){  //°Ë»öÆû

        
if( isset($searchid) && $searchid !== ""){

            if(
$searchid !== "")  $Code =  " AND cust_id = '$searchid' ";


        }

        

            if( 
$searchCode == '1')  
                
$Dgubun =  " SELECT 0, f.idx, f.cust_id, f.rgst_dtm, f.price, f.addpoint, '' AS usepoint, '' AS use_type,  f.delkey, '' AS bigo, '' AS curpoint
                            FROM cash_fill AS f
                            WHERE f.rgst_dtm BETWEEN '
$txtdate 00:00:00' AND '$txtdate2 23:59:59' AND cust_id = '$userid' AND delkey = '0' AND addpoint > '0'
                            UNION ALL
                            SELECT 1, f.idx, f.cust_id, f.rgst_dtm, '' AS price, '' AS addpoint, f.usepoint, f.use_type, '' AS delkey, f.bigo, f.curpoint
                            FROM cash_use AS f
                            WHERE f.rgst_dtm BETWEEN '
$txtdate 00:00:00' AND '$txtdate2 23:59:59' AND cust_id = '$userid' AND usepoint > '0'";



            if( 
$searchCode == '2')  
                
$Dgubun =  " SELECT 0, f.idx, f.cust_id, f.rgst_dtm, f.price, f.addpoint, '' AS usepoint, '' AS use_type, '' AS bigo, '' AS curpoint
                            FROM cash_fill AS f
                            WHERE f.rgst_dtm BETWEEN '
$txtdate 00:00:00' AND '$txtdate2 23:59:59' AND cust_id = '$userid' AND delkey = '0' AND addpoint > '0' ";

            if( 
$searchCode == '3')  
                
$Dgubun =  "SELECT 1, f.idx, f.cust_id, f.rgst_dtm, '' AS price, '' AS addpoint, f.usepoint, f.use_type, f.bigo, f.curpoint
                            FROM cash_use AS f
                            WHERE f.rgst_dtm BETWEEN '
$txtdate 00:00:00' AND '$txtdate2 23:59:59' AND cust_id = '$userid' AND usepoint > '0' ";


    }
?>

<link href="./css/style.css" rel="stylesheet" type="text/css">
<script language='javascript' src='./js/left_menu.js'></script>
<script language='javascript' src='./js/img.js'></script>


<!-- ¹Ùµð ½ÃÀÛ ---------------------------->
<body topmargin="0" marginwidth="0" marginheight="0">


<!-- ·Ñ¿À¹ö ½ºÅ¸ÀÏ -->
                <style>
                    a.rollover img { border-width:0px; display:block; }
                    a.rollover img.rollover { display:none; }
                    a.rollover:hover { position:relative; }
                    a.rollover:hover img { display:none; }
                    a.rollover:hover img.rollover { display:block; }
                </style>
                <iframe name="Joinifm" width=0 height=0></iframe>

<table width="942" border="0" cellspacing="0" cellpadding="0" align="center" >
    
    <tr>
        <td>
        <!-- »ó´Ü Å¾¸Þ´º, Ç÷¡½Ã ¸Þ´º --------------  ½ÃÀÛ -->
            <table width="942" border="0" cellspacing="0" cellpadding="0">

              <tr>
                <td width="224"></td>
                 <td style="padding:0 0px 5px 0;" align="right" height="30"><? include('topmenu.php'); ?></td>
              </tr>
              <tr>   
                <td colspan="2" height="70">

                    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="942" height="70" id="FlashID" >
                      <param name="movie" value="../millennium/flash/mainnavi.swf" />
                      <param name="quality" value="high" />
                      <param name="wmode" value="opaque" />
                      <param name="swfversion" value="8.0.35.0" />
                      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don¡¯t want users to see the prompt. -->
                      <param name="expressinstall" value="Scripts/expressInstall.swf" />
                      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                      <!--[if !IE]>-->
                      <object type="application/x-shockwave-flash" data="../millennium/flash/mainnavi.swf" width="942" height="70">
                        <!--<![endif]-->
                        <param name="quality" value="high" />
                        <param name="wmode" value="opaque" />
                        <param name="swfversion" value="8.0.35.0" />
                        <param name="expressinstall" value="../millennium/Scripts/expressInstall.swf" />
                        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                        <div>
                          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                        </div>
                        <!--[if !IE]>-->
                      </object>
                      <!--<![endif]-->
                    </object>

            </td>
            </tr>
            </table>
         <!-- »ó´Ü Å¾¸Þ´º, Ç÷¡½Ã ¸Þ´º -------------- Á¾·á -->
        </td>
    </tr>

        <!-- »ó´Ü ¿©¹é -->
    <tr>
        <td height="15">
        </td>
    </tr>

    <tr>
        <td>
        <!-- ¸ÞÀΠ½ÃÀÛ --------------------------------->

            <table width="946" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td valign="top" >
            <!-- ÁÂÃø Ç÷¡½Ã ¸Þ´º ½ÃÀÛ --------------------------->
                    <table valign="top">
                        <tr>
                            <td width="212" height="193">
                                <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="212" height="193" id="leftmypage" align="middle">
                                    <param name="allowScriptAccess" value="sameDomain" />
                                    <param name="allowFullScreen" value="false" />
                                    <param name="movie" value="./flash/leftmypage.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="./flash/leftmypage.swf" quality="high" bgcolor="#ffffff" width="212" height="193" name="leftcomapny" align="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
                                    </object>
                            </td>
                        </tr>
                        <tr height="25">
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>

                    <!-- ÁÂÃø Á¦Ç° µµ¿ò ¸Þ´º ½ÃÀÛ -->
                        <? include('../millennium/left_banner.php'); ?>
                    <!-- ÁÂÃø Á¦Ç° µµ¿ò ¸Þ´º ³¡ -->
                    </td>
                </tr>
                </td>
            </tr>
            </table>
            <!-- ÁÂÃø Ç÷¡½Ã ¸Þ´º ³¡ --------------------------->
                </td>

            <!-- ¸Þ´º Æø ¿©¹é --------------------------->                
                <td width="12">
                </td>

                <td valign="top">


            <!-- »ó´Ü ¿©¹é¿ë Å×ÀÌºí ½ÃÀÛ----------------->
                <table cellspacing="0" cellpadding="0" border="0">
                    <tr>
                    <td height="7"></td>
                    </tr>
                    <tr>
                    <td valign="top">
                <!-- ¸ÞÀΠÅÇ ½ÃÀÛ --------------------------->
                            <table background="../millennium/img/titlebar/mypageedit.gif" width="718" height="35" >
                            <tr>
                                <td width="500">
                                </td>
                                <td>

                                    <table align="right">
                                        <tr>
                                            <td>
                                                <a href=intro.php ><img src="../millennium/img/common/home.gif" border="0">
                                            </td>
                                            <td  class="txt01"><font color="999999">
                                                < ¸¶ÀÌÆäÀÌÁö < <font color="494949">Æ÷ÀÎÆ® ³»¿ª
                                            </td>
                                            <td width="10">
                                            </td>
                                        </tr>
                                    </table>


                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                <!-- ¸ÞÀΠÅÇ ³¡ ------------------------->
                        </tr>
                        </td>
                <!-- ¸ÞÀΠÅÇ ³»¿ë »çÀÌ ¿©¹é------------->

    
                    <tr>
                        <td align="center" valign="top">
                <!-- ¸ÞÀΠ³»¿ë ½ÃÀÛ ------------->

                        <TABLE><TR><TD height="10"></TD></TR></TABLE> <!-- ¶ç¿ì±â -->
                        <? 
                        

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

    
$sql    $Dgubun "  order by rgst_dtm DESC, idx DESC limit $nFrom$cm_nCount ";    

                        
?>
<form name='searchFrm' method=post>
          
            <table width="680" border="0" cellpadding="3" cellspacing="1" bgcolor="d9d9d9" align="center">
                <tr bgcolor="#5076a9"> 
                    <td height="2"  width="940"></td>
                </tr>
                <tr bgcolor="#ffffff"> 
                    <td class="txt03" width="940" height="30" align="left" valign="middle">
                        &nbsp;&nbsp;&nbsp;<img src="../../onlinecs/img/common/search_tab.gif" align="absmiddle">
                        &nbsp;<font color="#00000"><b>°Ë»ö±¸ºÐ:</b>
                                    <select name='searchCode'>
                                        <option value=1 <?            if( $searchCode == 1){
                                        echo 
"selected"
                                    } ;
?> >Àüü</option>
                                        <option value=2 <?            if( $searchCode == 2){
                                        echo 
"selected"
                                    } ;
?>>̾˟</option>
                                        <option value=3 <?            if( $searchCode == 3){
                                        echo 
"selected"
                                    } ;
?>>»ç¿ë</option>
                                    </select>&nbsp;&nbsp;
                        <font color="#00000"><b> °Ë»ö±â°£:</b>                    
                        <img src="../../onlinecs/img/common/3month.gif" align="absmiddle" onclick="javascript:setDay(-90)" style="cursor:hand;">
                        <img src="../../onlinecs/img/common/month.gif" align="absmiddle" onclick="javascript:setDay(-30)" style="cursor:hand;">
                        <img src="../../onlinecs/img/common/week.gif" align="absmiddle" onclick="javascript:setDay(-7)" style="cursor:hand;">
                        <img src="../../onlinecs/img/common/today.gif" align="absmiddle" onclick="javascript:setDay(0)" style="cursor:hand;">

    
                    <input type='text' style='height:20px;' readonly name='txtdate' class="log" size=10 value='<?=$txtdate;?>'>
                    <img src="../../onlinecs/img/common/calendar.gif" style="cursor:hand;" align="absmiddle" border="0" onClick="popUpCalendar(this, txtdate, 'yyyy-mm-dd');"> ~
                    <input type='text' style='height:20px;' readonly name='txtdate2' class="log" size=10 value='<?=$txtdate2;?>'>
                    <img src="../../onlinecs/img/common/calendar.gif" style="cursor:hand;" align="absmiddle" border="0" onClick="popUpCalendar(this, txtdate2, 'yyyy-mm-dd');">
                    <a href='javascript:Search();'><img src="../../onlinecs/img/common/search_bt.gif" border="0" align="absmiddle" style="cursor:hand;"></a>
                    </td>
                </tr>
                <tr bgcolor="#ffffff"> 
                    <td height="30" class="txt03">
                    <?
                    
//    $Psql = " SELECT curpoint FROM cust_cash where id = '$userid'";
                            
$Psql "SELECT 0,curpoint, '' AS sumaddpoint, '' AS sumusepoint FROM cust_cash 
                            WHERE id = '
$userid
                            UNION ALL
                            SELECT 1,'' AS curpoint, SUM(addpoint) AS sumaddpoint, '' AS sumusepoint FROM cash_fill
                            WHERE cust_id = '
$userid' AND rgst_dtm BETWEEN '$txtdate 00:00:00' AND '$txtdate2 23:59:59'
                            UNION ALL
                            SELECT 2,'' AS curpoint, '' AS sumaddpoint, SUM(usepoint) AS sumusepoint FROM cash_use
                            WHERE cust_id = '
$userid' AND rgst_dtm BETWEEN '$txtdate 00:00:00' AND '$txtdate2 23:59:59'";

                        
$Presult mysql_query($Psql) or die (mysql_error());
                        while(
$Prow  mysql_fetch_array($Presult)){
                            if(
$Prow[0] == 0){
                                
$Ptotal $Prow[curpoint];
                            }
                            if(
$Prow[0] == 1){
                                
$Padd $Prow[sumaddpoint];
                            }
                            if(
$Prow[0] == 2){
                                
$Puse $Prow[sumusepoint];
                            }
                        }
                    
?>
                        &nbsp;&nbsp;&nbsp;<img src="../../onlinecs/img/common/search_tab.gif" align="absmiddle">&nbsp; <b>º¸À¯P: <font color="#ff3300"><?=number_format($Ptotal);?>
                        <img src="../millennium/img/common/pointicon.gif" valign="absmiddle">
                        &nbsp;&nbsp;<img src="../../onlinecs/img/common/search_tab.gif" align="absmiddle">&nbsp;<font color="#000000"> °Ë»ö±â°£³» [ ÃæÀüP: <font color="#ff3300"><?=number_format($Padd)?><font color="#000000"> ]
                        &nbsp; [ »ç¿ëP: <font color="#ff3300"><?=number_format($Puse)?><font color="#000000"> ]
                    </td>
                </tr>
             <input type=hidden name='mode' value='search'>
        </table>                    
</form>
        <!-- °Ë»ö¹Ú½º -------------------------- Á¾·á -->
<table align=center border=1 cellpadding=0 style='border-collapse: collapse' cellspacing=0  bordercolor='#BDBEBD' width="680" background="../millennium/img/common/pointbg.gif">
    <tr  width="680" height="25">
        <td align=center width="7%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">±¸ºÐ</font></span></p></td>
        <td align=center width="15%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">ÀÏÀÚ</font></span></p></td>
        <td align=center width="8%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">ÃæÀü±Ý¾×</font></span></p></td>
        <td align=center width="7%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">ÃæÀüP</font></span></p></td>
        <td align=center width="7%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">»ç¿ëP</font></span></p></td>
        <td align=center width="7%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">ÀÜ¿©P</font></span></p></td>
        <td align=center width="15%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">»ç¿ëÁ¤º¸</font></span></p></td>
        <td align=center width="15%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">¼ö½ÅÀÚ</font></span></p></td>
        <td align=center width="15%"><p><span style=font-size:9pt;><font face=Verdana COLOR="#696969">ÇÚµåÆù</font></span></p></td>

    </tr>
                    <?
                    
//    $Psql = " SELECT curpoint FROM cust_cash where id = '$userid'";
                            
$Esql "
                            SELECT 0,SUM(addpoint) AS sumaddpoint,SUM(price) AS sumaddprice, '' AS sumusepoint FROM cash_fill
                            WHERE cust_id = '
$userid' AND rgst_dtm < '$txtdate 00:00:00'
                            UNION ALL
                            SELECT 1,'' AS sumaddpoint, '' AS sumaddprice,SUM(usepoint) AS sumusepoint FROM cash_use
                            WHERE cust_id = '
$userid' AND rgst_dtm < '$txtdate 00:00:00'";

                        
$Eresult mysql_query($Esql) or die (mysql_error());
                        while(
$Erow  mysql_fetch_array($Eresult)){
                            if(
$Erow[0] == 0){
                                
$Epoint $Erow[sumaddpoint];
                                
$Eprice $Erow[sumaddprice];
                            }
                            if(
$Erow[0] == 1){
                                
$Eusepoint $Erow[sumusepoint];
                            }
                        }
                    
?>

    <tr  width="680" height="25">
        <td colspan ="2" align="center"><b><font color="#dd4e00">[ÀÌ¿ù±Ý¾×]</td>
        <td align=center><font color="#dd4e00"><?=number_format($Eprice)?></td>
        <td align=center><font color="#dd4e00"><?=number_format($Epoint)?></td>
        <td align=center><font color="#dd4e00"><?=number_format($sumusepoint)?></td>
        <td colspan="4"></td>
    </tr>
<?

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

    if(
$num mysql_num_rows($result)){

        while(
$row  mysql_fetch_array($result)) {


        
$usecode $row[use_type];

        
$usesql "select use_type_nam  from cash_price where use_type_cde = '$usecode'";
        
$coderesult mysql_query($usesql) or die (mysql_error());
        
$coderow    mysql_fetch_array($coderesult);

        
$usedetail $coderow[use_type_nam];

        if(
$row[0] == "1"){
            
$bgcolor "#f8f8f8";
            
$type "[»ç¿ë]";
        } ELSE {
            
$bgcolor "#e2f0f3";
            
$type "<b>[ÃæÀü]";
        }

?>

    <tr height="22" bgcolor="<?=$bgcolor?>">
         <td align="center">
            <?=$type;?>
        </td>
         <td align="center">
            <?=substr($row[rgst_dtm],0,16);?>
        </td>
        <td align="right" style="padding:0 5pt 0 0;">
            <? if($row[price] == ""){ } else { ?>
            <?=number_format($row[price]); } ?>&nbsp;
        </td>  
        <td align="right" style="padding:0 5pt 0 0;">
            <? if($row[addpoint] == ""){ } else { ?>
            <?=number_format($row[addpoint]); } ?>&nbsp;
        </td>
        <td align="right" style="padding:0 5pt 0 0;">
            <? if($row[usepoint] == ""){ } else { ?>
            <?=number_format($row[usepoint]); } ?>&nbsp;
        </td>
        <td align="right" style="padding:0 5pt 0 0;">
            <? if($row[usepoint] == ""){ } else { ?>
            <?=number_format($row[curpoint]); } ?>&nbsp;
        </td>
        <td align="center">
            <?=$usedetail;?>
        </td>
<? if((substr_count($row[bigo],"/")) > 0){
    
$bigoexplode explode("/",$row[bigo]);
?>
                <td>
                <div style="width:100; text-overflow:ellipsis; overflow:hidden;">
                <nobr>
                &nbsp;<?=$bigoexplode[0]?>
                </nobr>
                </div>
                    
                </td>
                <td>
                    &nbsp;<?=str_replace("SMS:","",$bigoexplode[1]);?>
                </td>
<? } else { ?>
                <td colspan="2" >
                    &nbsp;<?=$row[bigo]?>
                </td>

<? ?>
    </tr>
    <tr>
        <td colspan="9" height="1" bgcolor="#c7c7c7">
        </td>
    </tr>
<?}

    }
    else{

?>
    <tr align="center" bgcolor="#FFFFFF">
        <td height="100" align="cener" colspan="7" width="680"><span style=font-size:9pt;><font face=Verdana>µ¥ÀÌŸ°¡ ¾ø½À´Ï´Ù.</font></span></td>
    </tr>
<?
    
}
?>

</table>
<table>
<tr>
    <td align=center bgcolor=#ffffff colspan="13" width="680"><? echo pageListing($pg$nPage$cm_nCount"mypagepoint.php?pg=" $mode$SearchMdiv ,$SearchMup,$SearchMper,$searchCode ,$searchid ,$SearchMsw1 $cm_nCount$txtdate$txtdate2)?></td>

</tr>
</table>

                <!-- ¸ÞÀΠ³»¿ë ³¡ ------------->
                        </td>
                    </tr>
                </table>
            <!-- »ó´Ü ¿©¹é¿ë Å×ÀÌºí ³¡----------------->




                </td>
              </tr>
            </table>
            <input type=hidden name=mode value='update'>
        <!-- ¸ÞÀΠÁ¾·á --------------------------------->







        </td>
    </tr>

    <tr>
        <td height="20">
        <!-- ÇÏ´Ü¿©¹é -->
        </td>
    </tr>





    <tr>
        <td><? include('bottom.php'); ?></td>
    </tr>
</table>

</body>