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
|
<?php $dir = "."; include_once($dir."/_common.php");
if($eid==''){ alert('e천년경영 로그인 후에 이용가능합니다.',"index.php"); exit; }
$order_key = "seq desc";
$where = ""; if($sms_cont_type!=''){ $where .= " and type = '{$sms_cont_type}' "; }
$sql = "select count(*) as cnt from sms_freq_cont a WHERE 1=1 $where "; $result = mysql_query($sql,$connect_e1000y); $row = mysql_fetch_array($result); $total_count = $row['cnt'];
$list_num = 15; if($_COOKIE['page_line']!=''){ $list_num = $_COOKIE['page_line']; } $total_page = ceil($total_count / $list_num); // 전체 페이지 계산 if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $list_num; // 시작 열을 구함
$sql = "select * from sms_freq_cont a WHERE 1=1 $where order by $order_key limit $from_record, $list_num"; $result = mysql_query($sql,$connect_e1000y);
//_pr($sql); while($cus_info=mysql_fetch_array($result)){ $list_array[] = $cus_info; }
$qstr = $_SERVER['QUERY_STRING']; //_pr($_GET); ?> <style> .container_wrap4 { font-size:0.9em; width:250px !important;} /*#sub-title { margin-top:0px; }*/ </style> <!--<div id="contents" style="background:#999"><img src="http://placehold.it/960x150" alt="롤링배너"></div>-->
<div id="wrap" class='container_wrap4'> <div id="sub-title" style='margin-top:5px;'> <h2>문자함 리스트</h2> </div> <form name='smscont_list_form' method='post'> <input type='hidden' name='sel_del' value='Y'> <input type='hidden' name='modetype' value='smscont_list'> <div class="div-list-area" style='margin-top:10px;'> <div class="sms_type" style='margin-bottom:10px;'> <a class="lignt-blue-btn sms_cont_my">내문자함</a><a class="blue-btn sms_cont_rec">최근문자함</a> </div> <div class="cust-list-area"> <table class="order-sheet2"> <caption class="screen_out">문자함 리스트<caption> <colgroup> <col style="width:20px;"> <col style="width:210px;"> <!--<col style="width:40px;">--> </colgroup>
<thead> <tr> <th scope="col"><input type='checkbox' name='ck_all' class='check_all_class2'></th> <th scope="col">문자함</th> <!--<th scope="col">관리</th>--> </tr> </thead> <tbody> <?php for($i=0;$i<count($list_array);$i++){ $info = $list_array[$i]; ?> <tr class='tr_select_customer'> <td class="tcenter "> <input type='checkbox' name='code_idx2[]' value='<?php echo $i;?>'> <input type='hidden' name='codes2[]' value='<?php echo $info['idx'];?>'> <textarea name='content' style='display:none;'><?php echo $info['content'];?></textarea> </td> <td class="linetxt click_edit2" style='margin:0px;padding:5px; background:lightyellow;border-radius:10px;line-height:20px;' alt='더블클릭' title='더블클릭'><?php echo nl2br($info['content']);?></td> <!--<td class="tcenter ">[삭제]</td>--> </tr> <?php } ?> </tbody> </table> </div> </div> </form>
<div class='pg_wrap' style='padding-top:0px;'> <?php echo get_paging2($list_num, $page, $total_page, "javascript:customer_sms_search('{$stx}',");?> </div>
<div class="sms_footer_btn" style='padding-left:75px;'> <a class="gray-btn sms_con_del_class">삭제</a> </div>
</div><!--//wrap--> <script> $(function(){ $(".check_all_class2").click(function(){ // 전체선택 전체선택 해제 if($(this).is(":checked")){ $("input[name='code_idx2[]']").prop("checked",true); } else { $("input[name='code_idx2[]']").prop("checked",false); } });
$(".sms_con_del_class").click(function(){ // 문자함 선택 삭제 if($("input[name='code_idx2[]']:checked").size()>0){ if(confirm('정말로 삭제하시겠습니까?')){ var form_data = $("form[name='smscont_list_form']").serialize(); $.ajax({ type:"post", url:"ajax.sms_freq_cont.php",data:form_data, dataType : "xml", success:function(xml){ var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); if(v_mode_ok=='Y'){ sms_cont_search(1); } else { alert(v_msg); }
}, error:function(rtn,status,error){
} }); } } else { alert('삭제하실 문자함을 선택하세요.'); } });
$(".click_edit2").dblclick(function(){ $tr_obj = $(this).closest("tr"); $("#send_content").val($tr_obj.find("textarea[name='content']").val()); $("#send_content").keyup(); });
$(".sms_cont_my").click(function(){ $("input[name='sms_cont_type']").val("my"); sms_cont_search(1); }); $(".sms_cont_rec").click(function(){ $("input[name='sms_cont_type']").val("rec"); sms_cont_search(1); }); }); </script>
|