/home/mjc1/public_html/manage/m_cusafter_messenger.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
 <?php

$sql 
"select admin_name from admin where (admin_team like '°í°´Áö¿ø%' or admin_team like '¿µ¾÷%') order by admin_name";
$result mysql_query($sql,$connect_web);

$table "mBoard_cus_after";
$order_key "uid DESC";
$where "";

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(
$mname!='') {
    
$mname iconv("utf8","euckr",$mname);
    
$where .= " and emp = '{$mname}'";
}

$sql  =   "select count(*) as cnt from {$table} a WHERE 1=1 {$where} ";
$result      =    mysql_query($sql,$connect_web);
$row mysql_fetch_array($result);
$total_count $row['cnt'];

$list_num 15;
$total_page  ceil($total_count $list_num);  // Àüü ÆäÀÌÁö °è»ê
if ($page 1) { $page 1; } // ÆäÀÌÁö°¡ ¾øÀ¸¸é Ã¹ ÆäÀÌÁö (1 ÆäÀÌÁö)
$from_record = ($page 1) * $list_num// ½ÃÀÛ ¿­À» ±¸ÇÔ

$sql "select * from {$table} a WHERE 1=1 {$where} order by {$order_key} limit {$from_record}{$list_num}";
$result      =    mysql_query($sql,$connect_web);

//_pr($sql);
while($cus_info=mysql_fetch_array($result)){
    
$list_array[] = $cus_info;
}

$qstr $_SERVER['QUERY_STRING'];

?>
<link rel='stylesheet' type='text/css' href='./css/base_add.css'>
<link rel='stylesheet' type='text/css' href='./css/new.css'>

<style>
.review_side_ul {left: 85px !important;}
.mark_flg, .show_top {width: 25px; height: 25px;}
.memberTable th {line-height:23px;}
.pg_wrap {width: 100% !important;}
.pg_page {background-color: #fff;}
.pg_next, .pg_end {
    width: 40px;
    height: 25px;
    line-height: 25px;
    border: 1px solid #ccc !important;
}
.pg_next:hover, .pg_end:hover { background:#f3f3f3;}
</style>
<div class="container">
    <div class="border_contents">
        <div class="admin_table">
            <h3 class="list_ttl">
                »ó´ãÈı⠸®½ºÆ®
                <span class="list_sub_ttl bgg">°í°´´ÔµéÀÇ »ó´ãÈıâÀÔ´Ï´Ù.</span>
            </h3>

                <input type='hidden' name='sel_del' value=''>
                <table class="memberTable requestarea" style="width: 1200px;margin-left: -100px;">
                    <tr class="bgg">
                        <th style="width:30px;"><input type='checkbox' name='ck_all' class='check_all_class'></th>
                        <th style="width:130px;">»óÈ£¸í(¼º¸í)</th>
                        <th style="width:100px;">¾÷Á¾</th>
                        <th style="width:100px;">»ç¿ëÁ¦Ç°</th>
                        <th style="width:100px;">°í°´¸í(ÀüÈ­¹øÈ£)</th>
                        <th style="width:290px;">»ó´ã³»¿ë</th>
                        <th style="width:70px;">»ó´ã°á°ú<br/>(¸¸Á·/ºÒ¸¸)</th>
                        <th style="width:70px;">µî·ÏÀÏÀÚ</th>
                        <th style="width:90px;">»ó´ã°á°ú</th>
                        <th style="width:90px;" class="last">´ã´çÀÚ</th>
                    </tr>
                    <?php 
                        
for($i=0;$i<count($list_array);$i++){ 
                            
$info $list_array[$i];
                            if(
$info['state']=='1'){
                                
$state_txt "È®ÀÎ";
                            } else {
                                
$state_txt "¹ÌÈ®ÀÎ";
                            }
                            if(
$i%2==1){ $bgcolor1 "background-color:#f0f0f0;"; } else { $bgcolor1 ";"; }
                    
?>
                    <tr style='<?php echo $bgcolor1;?> height:120px;'>
                        <td class="lh30">
                            <input type='checkbox' name='code_idx[]' value='<?php echo $i;?>'>
                            <input type='hidden' name='codes[]' value='<?php echo $info['uid'];?>'>
                        </td>
                        <td class="family lh30"><?php echo $info['smcompany'];?></td>
                        <td class="lh30"><?php echo $info['industry_type'];?></td>
                        <td class="lh30"><?php echo $info['smtel'];?></td>
                        <td class="lh30" style='width:60px;word-wrap:break-all;'><?php echo $info['smname'];?></td>
                        <td class="alignL lh30 click_edit">
                            <?php 
                                
if($info['smoption']!=''){
                                    echo 
cut_str($info['smoption'],125);
                                } else {
                                    echo 
cut_str($info['smdetail'],125);
                                }
                            
?>
                        </td>
                        <td class="lh30"><?php echo str_replace(" ","<br>",$info['smemail']);?></td>
                        <td class="lh30"><?php echo $info['reg_date'];?></td>
                        <td class="lh30"><?php echo $state_txt?></td>
                        <td class="lh30"><?php echo $info['emp']; ?></td>
                    </tr>
                    <?php 
                        

                    
?>
                </table><!-- //memberTable -->
                        
                 <div class="btn1Warp">
                    <!--<a href="javascript:asWrite();"><span class="insertbtn2 bgg">±Ûµî·Ï</span></a>-->
                </div>

            ¡Ø Ãß°¡³»¿ë È®ÀÎÇϽǷÁ¸é »ó´ãÀÏÀÚ³ª »ç¿ëÁ¦Ç°À» Å¬¸¯Çϼ¼¿ä.
            <br>
            <div class='pg_wrap' style='padding-top:0px;'>
                <?php echo get_paging($list_num$page$total_page"?$qstr");?>
            </div>
        </div><!-- //admin_table -->

        <p class="navi">°ü¸®ÀÚ¸ðµå > ¼­ºñ½º°Ô½ÃÆÇ > »ó´ãÈıâ</p>

        <div class="footer">
            <?php include("./include/admin_include_footer.php"); ?>
        </div><!-- //footer -->

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

<script>
var qstr = '<?php echo $qstr;?>';
$(function(){

    $(".check_all_class").click(function(){ // Àüü¼±ÅàÀüü¼±ÅÃ ÇØÁ¦
        if($(this).is(":checked")){
            $("input[name='code_idx[]']").prop("checked",true);
        } else {
            $("input[name='code_idx[]']").prop("checked",false);            
        }
    });

    $("#search_btn_press").click(function(){ // °Ë»ö¹öư
        $form_obj = $(this).closest("form");
        $form_obj.submit();
    });

    $("#stx").keypress(function(){ // °Ë»ö¿¡¼­ ¿£ÅͽÃ
        if(event.keyCode==13){
            $("#search_btn_press").click();
        }
    });

    $(".click_edit").css("cursor","pointer").click(function(){ // »ó¿ë¹®±¸ ¼öÁ¤
        var code = $(this).closest("tr").find("input[name='codes[]']").val();
        $.get("m_cusafter_reg.php?code="+code+"&flg=messenger",function(rtn){
            $("#modal_member_box").html(rtn).dialog({
                resizable: true, height:630, width:740, modal: true, title: "»ó¿ë¹®±¸ [¼öÁ¤]",
                buttons: {
                    ´Ý±â: function() {
                        $( this ).dialog( "close" );
                    }
                }
            });
        });
    });

});
</script>

</body>
</html>
<div id="modal_member_box" title="°Å·¡Ã³¼öÁ¤" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div>