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
|
<?php include("./_common.php"); include("./include/admin_include_header.php");
if(isset($_SESSION['ADMINID']) && ($_SESSION['ADMINID'] == "lys")){ echo " <script> alert('Á¢±ÙÇÒ ¼ö ÀÖ´Â ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.'); history.go(-1); </script>"; }
$prog_list[] = '°øÅë'; $prog_list[] = 'õ³â°æ¿µ3CS'; $prog_list[] = 'õ³â°æ¿µ3'; $prog_list[] = 'õ³â°æ¿µ2CS'; $prog_list[] = 'õ³â°æ¿µ2'; $prog_list[] = 'Á¦Á¶°æ¿µ';
$table = "mBoard_guide"; $order_key = "idx DESC"; $where = "";
if($stp!=''){ $where .= " and subject = '{$stp}' "; }
if($stx!=''){ $where .= " and {$sti} like '%{$stx}%' "; }
$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> .memberTable td select {width: 100px; height: 24px;} .review_side_ul {left: 85px !important;} .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 bgp">õ³â°¡ÀÌµå °ü¸® ÆäÀÌÁöÀÔ´Ï´Ù.</span> </h3>
<form name='customer_search_form' method='get'> <input type='hidden' name='biztype' size='' value='<?php echo $biztype;?>'>
<div class="searchArea searchAreaPlus"> <span class="searchAreaL"></span> <span class="searchAreaR"></span> <dl class="search_tender requestSearchArea" style="width: 520px;"> <dd class="relative"> <p class="arrow"></p> <select name='stp' class="nonearrow"> <option value=''>Àüü ÇÁ·Î±×·¥</option> <?php foreach($prog_list as $key=>$val){ if($val==$stp){ $std = "selected"; } else { $std = ""; } echo "<option value='{$val}' {$std}>{$val}</option>"; } ?> </select> </dd> <dd class="relative"> <p class="arrow"></p> <select name='sti' class="nonearrow"> <option value='a.title' <?php if($sti=='a.title'){?>selected<?php }?>>Á¦¸ñ</option> <option value='a.content' <?php if($sti=='a.content'){?>selected<?php }?>>³»¿ë</option> <option value='a.pos' <?php if($sti=='a.pos'){?>selected<?php }?>>À§Ä¡</option> </select> </dd> <dd> <input type='text' id='stx' name='stx' size='' value='<?php echo $stx;?>' class="stx_class" style="width:143px;height:29px;"> </dd> <dd class="searchbtnarea"> <a href="#" class="searchBtn bgp" id='search_btn_press'>°Ë»ö</a> </dd> </dl><!--search_tender--> </div><!-- //searchArea1-->
<div class="btn1Warp mb5" style="text-align: right; display: inline-block; width: 990px;"> <!--<select name='order_key' class='order_key_class'> <option value='comp_name' <?php if($order_key=='comp_name'){?>selected<?php }?>>»óÈ£¸í¼ø</option> <option value='code1' <?php if($order_key=='code1'){?>selected<?php }?>>ÄÚµå¼ø</option> </select>--> <a class="insertbtn2" style="background-color:#586AB2;" id='btn_company_new'>½Å±Ôµî·Ï</a> <!--<a class="blue-btn">ÁÖ¹®º¹»ç</a><?php if($Orow['ordstate']==0){ ?><a class="black-btn">Àüü»èÁ¦</a><?php }?><a class="gray-btn" id='buy_print'>Àμâ</a><a class="gray-btn" id='xls_down'>¿¢¼¿</a>--> <a class="insertbtn2" style="border:1px solid #586AB2 !important; color:#586AB2 !important;" id='sel_delete'>¼±ÅûèÁ¦</a> </div> </form>
<!--<div class="item_tab"> <div class="item_tab_navi"> <a value='0'><span>¸ÅÀÔó °ü¸®</span></a> <a value='1' class="on"><span>¸ÅÃâó °ü¸®</span></a> </div> </div>--><!--//item_tab-->
<form name='company_list_form' id='company_list_form' method='post'> <input type='hidden' name='sel_del' value=''> <div class="borderWarp" style="margin:0 0 40px; border-bottom:0 none;"> <table class="borderTable requestarea"> <colgroup> <col style="width:30px;"> <col style="width:60px;"><col style="width:100px;"><col style="width:100px;"><col style="width:370px;"> <col style="width:80px;"><col style="width:100px;"> </colgroup>
<thead> <tr class="bgp"> <th scope="col"><input type='checkbox' name='ck_all' class='check_all_class'></th> <th scope="col">±Û¹øÈ£</th><th scope="col">ÇÁ·Î±×·¥</th><th scope="col">¸Þ´ºÀ§Ä¡</th><th scope="col">Á¦¸ñ</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> <td class="tcenter "> <input type='checkbox' name='code_idx[]' value='<?php echo $i;?>'> <input type='hidden' name='codes[]' value='<?php echo $info['idx'];?>'> </td> <td class="tcenter "><?php echo $info['idx'];?></td> <td class="linetxt"><?php echo $info['subject'];?></td> <td class="linetxt"><?php echo $info['pos'];?></td> <td class="linetxt click_edit"><?php echo $info['title'];?></td> <td class="tcenter "><?php echo $info['mName'];?></td> <td class="tcenter "><?php echo $info['reg_date'];?></td> </tr> <?php } ?> </tbody> </table><!-- //borderTable --> </div><!-- //borderWarp --> </form>
<div class='pg_wrap' style='padding-top:0px;'> <?php echo get_paging($list_num, $page, $total_page, "?$qstr");?> </div>
</div><!-- //admin_table -->
<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(){ $(".item_tab_navi a").click(function(){ //³×ºñ°ÔÀÌ¼Ç ÅÇ Ã³¸® v = $(this).attr("value"); vv = qstr_rmv(qstr,"biztype"); document.location.href="?"+vv+"&biztype="+v; });
$(".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(); });
$(".click_edit").css("cursor","pointer").click(function(){ // ±âŸÀÚ·á ¼öÁ¤ var code = $(this).closest("tr").find("input[name='codes[]']").val(); $.get("m_guide_reg.php?code="+code,function(rtn){ $("#modal_member_box").html(rtn).dialog({ resizable: true, height:800, width:1024, modal: true, title: "±âŸÀÚ·á [¼öÁ¤]", buttons: { ÀúÀå: function() { form_save(); }, ´Ý±â: function() { $( this ).dialog( "close" ); } } }); }); });
$("#btn_company_new").click(function(){ // ½Å±Ôµî·Ï $.get("m_guide_reg.php",function(rtn){ $("#modal_member_box").html(rtn).dialog({ resizable: true, height:800, width:1024, modal: true, title: "±âŸÀÚ·á [½Å±Ô]", buttons: { ÀúÀå: function() { form_save(); }, ´Ý±â: function() { $( this ).dialog( "close" ); } } }); }); });
$("#sel_delete").click(function(){ // ¼±ÅûèÁ¦ var ck_cnt = 0; var v = $("input[name='code_idx[]']").each(function(){ if($(this).is(":checked")){ ck_cnt++; } }); if(ck_cnt==0){ alert('»èÁ¦ÇÏ½Ç °Ô½Ã¹°À» ¼±ÅÃÇϼ¼¿ä.'); return; } if(confirm('Á¤¸»·Î ¼±ÅÃÇϽŠ'+ck_cnt+'°³ÀÇ °Ô½Ã¹°À» »èÁ¦ÇϽðڽÀ´Ï±î?')){ $("input[name='sel_del']").val("Y"); var form_data = $("form[name='company_list_form']").serialize(); $("#company_list_form").prop("action","m_guide_process.php"); $("#company_list_form").submit();
}
});
});
function form_save(){ // ÀúÀå/¼öÁ¤ ¹öư if($("#company_reg_form input[name='subject']").val()==''){ alert('Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä.'); return; } if($("#company_reg_form input[name='content']").val()==''){ alert('³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä.'); return; } if(confirm('ÀúÀåÇϽðڽÀ´Ï±î?')){ $("#company_reg_form input[name='qstr']").val('<?php echo $qstr;?>'); $("#company_reg_form").submit(); } } </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> <?php //_pr($_SERVER); ?>
|