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
|
<?php include_once("./_common2.php"); ?> <?php include("./Page/common/header.php"); ?> <?php set_session("nomem_hash".date("H",time()), $_SERVER['REMOTE_ADDR']); ?>
<style> .mt30{margin:0;} .searchSection select{width: 140px;height: 32px;line-height: 32px;padding:0 10px;} .searchSection .result_sch_input{width: 290px;padding:0 10px;height: 32px !important;line-height: 32px !important;} .result_sch_btn{width:80px;height:32px;color:#fff !important;background:#0084ff;border-radius:5px;display:inline-block;line-height: 32px;font-weight:600;cursor:pointer;} .searchSection {/* width: 520px; */ width: 560px !important;margin: 0 auto;padding:15px 10px;} .resultTable {/* width: 710px; */width: 900px;border-top: 2px solid #627aaf; margin-top:1px} .resultTable td.proFamily {color: #0048ce;} .resultTable tr{height:42px; line-height:1.5; border-bottom:1px solid #eee;} .resultTable tr th {text-align:center; font-weight:600} .resultTable tr td {text-align:center} .resultTable tr td:last-child {text-align:left; padding:10px 0;} .resultSearch {/* width: 708px; */width: 900px;height: 60px;text-align: center;box-sizing: border-box;border: 1px solid #dcdcdc;background: #f8f8f8;} .exel_dwbtn {position:relative; margin:10px 0;} .exel_dwbtn a {font-family:Pretendard; font-size:14px; line-height:1; color:#666;font-weight:400; padding:5px 10px; box-sizing:border-box; border:1px solid #ddd; float:right; } .exel_dwbtn a img {width:20px} </style>
<?php $qstr = $_SERVER['QUERY_STRING'];
function pageListing($cur_page, $total_page, $url) { $v = explode("&",substr($url,1,strlen($url)));
$new_url = "?"; foreach($v as $key=>$val){ $vv = explode("=",$val); if($vv[0]!='pg'){ $new_url .= "{$vv[0]}={$vv[1]}&"; } } $url = substr($new_url,0,strlen($new_url)-1); if($url==''){ $url = "?pg="; } else { $url = preg_replace('#&pg=[0-9]*#', '', $url) . '&pg='; }
$retValue = "<div class='paging'>"; if ($cur_page > 1) { $retValue .= "<a href='" . $url . ($cur_page-1) ."' class='page'><span class='next'>ÀÌÀü</span></a>"; } else { $retValue .= ""; }
$start_page = ( ( (int)( ($cur_page - 1 ) / 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($sc != "" && $sc != "all") { $where .= " and channel = {$sc}"; } else if($sc != "" && $sc == "all") { $where .= " and channel in (0,1)"; }
if($st != "") { $where .= " and (result_code like '%{$st}%' or result_msg like '%{$st}%')"; }
$sql = "SELECT COUNT(*) as cnt FROM mBoard_error_code WHERE 1=1 $where"; $res = mysql_query($sql); $info = mysql_fetch_array($res); $nTotalCount = $info['cnt'];
$cm_nCount = 50; $nPage = ceil($nTotalCount / $cm_nCount); if($pg == "") { $pg = 1; } $nFrom = ($pg - 1) * $cm_nCount; $cnt = $nTotalCount - $nFrom;
$sql = "SELECT * FROM mBoard_error_code WHERE 1=1 $where ORDER BY idx ASC LIMIT $nFrom, $cm_nCount"; $res = mysql_query($sql); while($info = mysql_fetch_assoc($res)) { $errors[] = $info; } ?>
<div class="wrap"> <div class="contents"> <div class="asideMenu"> <?php include("./Page/customer/leftNavi.html"); ?> </div><!-- //leftNavi -->
<div class="subContents"> <h1> <img src="./img/titlebar/customerresultcd.jpg" alt="°á°úÄÚµå Á¶È¸"> <p> <span class="home"><a href="intro.php">Home</a></span> <span class="depth">></span> <span class="depth1">°í°´Áö¿ø</span> <span class="depth">></span> <span class="depth2">°á°úÄÚµå Á¶È¸</span> </p> </h1>
<div class="section"> <!--<h2><img src="./img/customer/computer_top.jpg" alt="±âÁ¸Å¸ÀÌÆ²"></h2>--> <h2><img src="./img/customer/board_title/resultcdlist_top.png" alt="°á°úÄÚµåÁ¶È¸ ŸÀÌÆ²" usemap="#cu_as_top"/></h2>
<div class="resultSearch"> <form name="searchFrm" method="get"> <div class="searchSection"> <!--<p><img src="./img/mypage/division.jpg" valign="middle" alt="±¸ºÐ"></p>--> <select name="sc"> <option value = "0" <?php if($sc == "0"){ echo "selected"; } ?>>SMS(´Ü¹®)</option> <option value = "1" <?php if($sc == "1"){ echo "selected"; } ?>>MMS(Àå¹®)</option> <option value = "all" <?php if($sc == "all"){ echo "selected"; } ?>>Àüü</option> </select> <p> <input type="text" name="st" size="20" value="<?php echo $st; ?>" autocomplete="off" class="result_sch_input"> <a class="result_sch_btn">°Ë»ö</a> </p> </div> </form> </div><!-- //resultSearch -->
<div class="exel_dwbtn"> <a href="./download/RESULT_CD_LIST.xlsx" download="SMS/MMS_°á°úÄÚµå.xlsx"><img src="./img/customer/exel_down.png" alt="¿À·ùÄÚµå´Ù¿î·Îµå">´Ù¿î·Îµå</a> </div> <table class="resultTable mt30"> <tr style="border-bottom:1px solid #666"> <th width="90">ä³Î</th> <th width="200">°á°úÄÚµå</th> <th width="420">Äڵ弳¸í</th> </tr> <!-- ´Ü¹®¿À·ùÄÚµå --> <?php for($i = 0; $i < count($errors); $i++) { $err = $errors[$i];
if($err['channel'] == "0") { $ch = "SMS(´Ü¹®)"; } else if($err['channel'] == "1") { $ch = "MMS(Àå¹®)"; } else { $ch = "±× ¿Ü"; } ?> <tr> <td><?php echo $ch; ?></td> <td><?php echo $err['result_code']; ?></td> <td><p><?php echo nl2br($err['result_msg']); ?></p></td> </tr> <?php $cnt --; } ?> </table>
<div><?php echo pageListing($pg, $nPage, "?$qstr"); ?></div>
</div><!-- //section -->
</div><!-- //subContents --> </div><!-- //contents --> </div><!-- //wrap -->
<script> $(function(){ $(".result_sch_btn").click(function(){ $form_obj = $(this).closest("form"); $form_obj.submit(); });
$(".st").keypress(function(){ // °Ë»ö¿¡¼ ¿£Åͽà if(event.keyCode==13){ $(".result_sch_btn").click(); } }); }); </script>
<?php include("./Page/common/footer.php"); ?>
|