/home/mjc1/public_html/manage/psnchlogBoard.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
 <?
    
include("./include/admin_include_header.php");

    
$adm_info admin_member_info();
    if(!(
$adm_info['admin_id']=='csh' || $adm_info['admin_id']=='osm' || $adm_info['admin_id']=='psw' || $adm_info['admin_id']=='mijin' || $adm_info['admin_id']=='hjw')){
        echo 
"<script>alert('Á¢±ÙÇϽǠ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.'); window.history.go(-1);</script>"; exit;
    }


    
$cm_nCount          =      20;
    
$cm_item_nCount     =      30;  

    if(
$sdate==''){ $sdate date("Y-m-d",time()-(60*60*24*30)); }
    if(
$edate==''){ $edate date("Y-m-d",time()); }


    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;
    }
    
    
$where "";
    if(
$sdate!='' && $edate!=''){
        
$where .= " and psn_reg_date between '$sdate 00:00:00' and '$edate 23:59:59' ";
    }
    if( isset(
$keyword) && $keyword !== ""){
    
        if( 
$searchCode == '1')  $Code =  " and psn_admin like  '%$keyword%' ";
        if( 
$searchCode == '2')  $Code =  " and psn_auth_id like '%$keyword%' ";
    
    }

    
$search_where "&sdate=$sdate&edate=$edate&inner_exp=$inner_exp&refer_exp=$refer_exp";
 
    
$total_sql  =   "select count(*) as cnt from psn_ch_log where 1=1 $where $Code ";
    
    
$result      mysql_query($total_sql) or die (mysql_error());
    
$info mysql_fetch_array($result);
    
$nTotalCount $info['cnt'];

    
$nPage       ceil($nTotalCount $cm_nCount);
    
    if (
$pg == ""$pg 1;
    
    if (
$_POST['search_mode'] == "Y"){ // °Ë»ö ½Ã ÆäÀÌ¡³Ñ¹ö ³¯¸®±â À§ÇØ ¾Æ·§ÂÊ hidden °ª Æ÷ÇÔÇÏ¿© ¼±¾ð 2013.12.02 by.jyh
        
$pg 1;      
    }  
    
    
$nFrom = ($pg 1) * $cm_nCount;
    
$sql    " select * from psn_ch_log where 1=1 $where $Code order by idx DESC limit $nFrom$cm_nCount ";
    
//_pr($sql);
    
$result mysql_query($sql) or die (mysql_error());
?>

<script> 
    
function Search(){
    document.getElementById('search_mode').value = "Y"; 
    searchFrm.submit();
}
 
function develWrite(){
    location.href = "eventWrite.php?menu=4&sub=8";

   
function CheckAll() {
 
    if( document.develFrm.all.value == 1){
        document.chkImg.src = "bt_allcheck_not.gif";
    
    
        for (var i=0;i<document.develFrm.elements.length;i++){
            if (document.develFrm.elements[i].name == 'develForm[]'){
                document.develFrm.elements[i].checked = true;
            }
        }
        
        document.develFrm.all.value = '0'; 
        
    } else {
        document.chkImg.src = "bt_allcheck.gif";
    
        for (var i=0;i<document.develFrm.elements.length;i++){
            if (document.develFrm.elements[i].name == 'develForm[]'){
                document.develFrm.elements[i].checked = false;
            }
        }

        document.develFrm.all.value = '1'; 
    }



function allDel(){
    var cnt=0;
    
    for (var i=0;i<document.develFrm.elements.length;i++){
        if (document.develFrm.elements[i].name == 'develForm[]'){
                if( document.develFrm.elements[i].checked == true ) cnt++;
            }
        }
        
        if(cnt>0){ 
        
            if(confirm("¼±ÅÃÇϽŠ"+ cnt +" °³ÀÇ °Ô½Ã¹° Á¤º¸¸¦ »èÁ¦ÇϽðڽÀ´Ï±î?") ){
                document.develFrm.action = "eventBoardProcess.php" ;
                document.getElementById("develFrm").target="hidden_frame_mijin";           
                document.develFrm.submit();
            }
            
        } else {
        alert("»èÁ¦ÇÒ Ç׸ñÀ» ¼±ÅÃÇϼ¼¿ä.")
        return;
    }   
}     

$(function(){
    $("#status").change(function(){
        var v_status = $(this).val();
        var tr_obj = $(this).closest('tr');
        var v_uid = $(tr_obj).find("#develForm_uid").val();

        if(confirm('ÇØ´ç ¶óÀÎÀÇ »óŰªÀ» º¯°æÇϽðڽÀ´Ï±î?')){
            $("#status_change_form input[name='uid']").val(v_uid);
            $("#status_change_form input[name='status']").val(v_status);
            
            $("#status_change_form").submit();
        }

    });
    $("#searchCode1").change(function(){
        $("#searchFrm").submit();
    });
});
</script>

        <div class="container">
            <div class="border_contents">

                <div class="admin_table">
                    <h3>
                        <img src="../img/admin/cscenter_title15.jpg" alt="Á¢¼Ó·Î±×">
                        <span>°ü¸®ÀÚ °³ÀÎÁ¤º¸±ÇÇÑ º¯°æ ·Î±×¸¦ È®ÀÎÇϴ ÆäÀÌÁöÀÔ´Ï´Ù.</span>
                    </h3>

                    <form name='searchFrm' id='searchFrm' method=get>
                    <input type="hidden" name="search_mode" id="search_mode">
                    <input type="hidden" name="menu" value='<?php echo $menu;?>'>
                    <input type="hidden" name="sub" value='<?php echo $sub;?>'>
                        <div class="searchArea1">
                            <span class="searchAreaL1"></span>
                            <span class="searchAreaR1"></span>
                            <dl class="search_tender" style="width:640px;">
                                <dt>°Ë»ö Ç׸ñ</dt>
                                <dd><input type='text' name='sdate' id='sdate' value='<?=$sdate?>'></dd>
                                <dd>~</dd>
                                <dd><input type='text' name='edate' id='edate' value='<?=$edate?>'></dd>
                                <dd>
                                    <select name='searchCode' style='width:100px;'>
                                        <option value=1  <? if($searchCode == '1'){ echo "selected"; } ?>>Àû¿ë¾ÆÀ̵ð</option>
                                        <option value=2  <? if($searchCode == '2'){ echo "selected"; } ?>>ºÎ¿©ÇѾÆÀ̵ð</option>
                                    </select>
                                </dd>
                                <dd>
                                    <input type='text' name='keyword' size=20 value='<?=$keyword;?>' onKeyDown="javascript:if(event.keyCode == 13) Search();">
                                </dd>
                                <dd>
                                    <a href='javascript:Search();' class="searchBtn">°Ë»ö</a>
                                    <input type="hidden" name='mode' value='search'>
                                </dd>
                            </dl><!--search_tender-->
                        </div><!-- //searchArea1-->
                    </form>
                    <!-- //°Ë»ö¹Ú½º -->
<script>
    $(function(){
        $( "#sdate" ).datepicker({
            showOn: "button",
            buttonImage: "./images/common/icon_calendar.png",
            buttonImageOnly: true,
            buttonText: "Select date",
            dateFormat: "yy-mm-dd",
            changeMonth: true,
            changeYear: true,
            prevText: 'ÀÌÀü ´Þ',
            nextText: '´ÙÀ½ ´Þ',
            monthNames: ['1¿ù','2¿ù','3¿ù','4¿ù','5¿ù','6¿ù','7¿ù','8¿ù','9¿ù','10¿ù','11¿ù','12¿ù'],
            monthNamesShort: ['1¿ù','2¿ù','3¿ù','4¿ù','5¿ù','6¿ù','7¿ù','8¿ù','9¿ù','10¿ù','11¿ù','12¿ù'],
            dayNames: ['ÀÏ','¿ù','È­','¼ö','¸ñ','±Ý','Åä'],
            dayNamesShort: ['ÀÏ','¿ù','È­','¼ö','¸ñ','±Ý','Åä'],
            dayNamesMin: ['ÀÏ','¿ù','È­','¼ö','¸ñ','±Ý','Åä'],
            showMonthAfterYear: true,
            yearSuffix: '³â'
        });

        $( "#edate" ).datepicker({
            showOn: "button",
            buttonImage: "./images/common/icon_calendar.png",
            buttonImageOnly: true,
            buttonText: "Select date",
            dateFormat: "yy-mm-dd",
            changeMonth: true,
            changeYear: true,
            monthNames: ['1¿ù','2¿ù','3¿ù','4¿ù','5¿ù','6¿ù','7¿ù','8¿ù','9¿ù','10¿ù','11¿ù','12¿ù'],
            monthNamesShort: ['1¿ù','2¿ù','3¿ù','4¿ù','5¿ù','6¿ù','7¿ù','8¿ù','9¿ù','10¿ù','11¿ù','12¿ù'],
            dayNames: ['ÀÏ','¿ù','È­','¼ö','¸ñ','±Ý','Åä'],
            dayNamesShort: ['ÀÏ','¿ù','È­','¼ö','¸ñ','±Ý','Åä'],
            dayNamesMin: ['ÀÏ','¿ù','È­','¼ö','¸ñ','±Ý','Åä'],
            showMonthAfterYear: true,
            yearSuffix: '³â'
        });
    });
</script>
                    <form name='develFrm' id='develFrm'>
                    <input type=hidden name=all value=1>
                    <input type=hidden name=exCode value=alldel>
                    <input type="hidden" name="menu" value="<?=$menu?>">
                    <input type="hidden" name="sub" value="<?=$sub?>">
                        <div class="borderWarp">
                        <table class="borderTable">
                            <tr>
                                <!--<th><img src="./images/common/bt_allcheck_all.gif" alt="¸ðµÎ¼±ÅÃ" style="cursor:pointer;" name='chkImg' onClick="CheckAll();"></th>-->
                                <th>¹øÈ£</th>
                                <th>Àû¿ë¾ÆÀ̵ð</th>
                                <th>ÀÌÀü ±ÇÇÑ</th>
                                <th>»õ·Î¿î ±ÇÇÑ</th>
                                <th>ºÎ¿©ÇÑ ¾ÆÀ̵ð</th>
                                <th class="last">Àû¿ëÀϽÃ</th>
                            </tr>
<?
     
if($num mysql_num_rows($result)){
         
$id_cnt $nTotalCount-$nFrom;
         while(
$row  mysql_fetch_array($result)) {
    
?>
                            <tr>
                                <!--<td><input name="develForm[]" id='develForm_uid' type="checkbox" value="<?=$row['uid'];?>"></td>-->
                                <td><?=$id_cnt;?></td>
                                <td class="family"><?=$row['psn_admin'];?></td>
                                <td class="family"><?=$row['psn_old_auth'];?></td>
                                <td ><?php echo $row['psn_new_auth']; ?></td>
                                <td><?php echo $row['psn_auth_id']; ?></td>
                                <td class="family last"><?php echo $row['psn_reg_date'?></td>
                            </tr>  
<? 
            $id_cnt
--;
        } 
    } else {  
?>
                            <tr>
                                <td colspan="7">µ¥ÀÌÅͰ¡ ¾ø½À´Ï´Ù.</td>
                            </tr>
<? 
    

?>
                            <tr>
                                <td colspan="2" class="bottom" style="padding:5px 0;"><!--<a href='javascript:allDel();' class="allDelBtn">Àϰý»èÁ¦</a>--></td>
                                <td colspan="6" class="bottom last"></td>
                            </tr>
                        </table><!-- //borderTable -->
                        </div><!-- //borderWarp -->
                        
                         <div class="btn1Warp" style='width:100%'>
                            ¡Ø ±ÇÇÑ / ¾ÕÂÊ 1:±ÇÇѺο© 0:±ÇÇѸ»¼Ò, / µÚÂÊ ¼¼ºÎ±ÇÇÑ 0000 °¢ ÀÚ¸®¼ö¸¶´Ù Àбâ,ÀÛ¼º,¼öÁ¤,»èÁ¦
                           <!--<a href="javascript:develWrite();"><span class="btn1">±Ûµî·Ï</span></a>-->
                        </div>
                    </form>

                     <? echo pageListing($pg$nPage$cm_nCount"?menu=4&sub=9&search_mode=$search_mode&searchCode=$searchCode&keyword=$keyword&mode=$mode$search_where&pg=" $mode$SearchMdiv ,$SearchMup,$SearchMper,$searchCode ,$keyword ,$SearchMsw1 $cm_nCount$menu$sub)?>
                    <?//print_r($_REQUEST)?>

                    <iframe id='hidden_frame_mijin' name='hidden_frame_mijin' style="display:none;"></iframe>

                </div><!-- //admin_table -->
                <p class="navi">°ü¸®ÀÚ¸ðµå > ÀÏ¹Ý°Ô½ÃÆÇ > °³¹ßÇöȲ</p>

                <div class="footer">
                    <?    include("./include/admin_include_footer.php"); ?>
                </div><!-- //footer -->
<form name='status_change_form' id='status_change_form' method='get' action='eventBoardStatus.php'>
    <input type='hidden2' name='mode' value='mod'>
    <input type='hidden2' name='pg' value='<?php echo $pg;?>'>
    <input type='hidden2' name='menu' value='<?php echo $menu;?>'>
    <input type='hidden2' name='sub' value='<?php echo $sub;?>'>

    <input type='hidden2' name='uid' value=''>
    <input type='hidden2' name='status' value=''>
</form>

            </div><!-- //border_contents -->
        </div><!-- //container -->
    </div><!-- //wrap -->

</body>
</html>