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
|
<?php $navig['send_mail']="ร้องเรียนการทุจริต"; navigator($navig); echo"<br>"; bar_header("ร้องเรียนการทุจริต"); // Bar_Header fieldset_top("บริการ ร้องเรียนการทุจริต");
import_request_variables('pG', 'p_');
if($_SESSION['admin_web']=="admin" || $_SESSION['per']=="ok"){ $array_title = array(); $sel_title = "select * from cms_service_title"; $que_title = mysql_query($sel_title); while($obj_title = mysql_fetch_assoc($que_title)){ $array_title[$obj_title['title_id']] = $obj_title; } ?>
<form name="fm_title_new" method="post" action="index.php?mod=e_service_update&path=e_service" onsubmit="return check_new();" style="margin: 0;"> <table width="90%"> <tr> <td><img src="coremain/images/marker.gif" /> <b>ชื่อหัวข้อ</b></td> <td> <input type="text" name="title_name" size="40" /> <button type="submit" id="Submit" class="ui-button ui-widget ui-corner-all ui-state-focus" style="padding: 2px 5px; font-size: 12px;"><img src="coremain/images/bullet2.gif" /> เพิ่มหัวข้อ</button> <br/><br/> </td> </tr> </table> </form>
<table width="80%" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td> <table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse;" id="tb_title"> <?php foreach($array_title as $id => $data){ $selESv = "select * from cms_eservice where type_id = '$id'"; $queESv = mysql_query($selESv); $numEsv = mysql_num_rows($queESv); $chk_del = 1;// $numEsv > 0 ? 0 : 1; ?> <tr class="row_data"> <td> <?php if($p_title_edit == $id){ ?> <form name="fm_title_edit" method="post" action="index.php?mod=e_service_update&path=e_service" onsubmit="return check_edit();" style="margin: 0;"> <input type="hidden" name="title_id" value="<?= $id ?>" /> • <input type="text" name="title_edit" value="<?= $data['title_name'] ?>" size="40" /> <a href="javascript:void(0);" class="title_update"><img src='coremain/images/save.png' title='บันทึกข้อมูล' border='0'></a> <a href="index.php?mod=e_service&path=e_service"><img src='coremain/images/ban.png' title='ยกเลิก' border='0'></a> </form> <?php }else{ ?> • <?= $data['title_name'] ?> <div style="float: right;"> <?php if($data['title_status'] == '1'){ ?> <a href='index.php?mod=e_service_update&path=e_service&id=<?= $id ?>&status=0'><img src='coremain/images/show.gif' border='0'></a> <?php }else{ ?> <a href='index.php?mod=e_service_update&path=e_service&id=<?= $id ?>&status=1'><img src='coremain/images/hide.gif' border='0'></a> <?php } ?> <a href="index.php?mod=e_service&path=e_service&title_edit=<?= $id ?>"><img src='coremain/images/edit.gif' title='แก้ไขข้อมูล' border='0'></a> <?php if($chk_del){ ?> <a href="javascript:void(0)" class="del_data" id="<?= $id ?>"><img src='coremain/images/del1.gif' title='ลบข้อมูล' border='0'></a> <?php }else{ echo ' '; } ?> </div> <?php } ?> </td> </tr> <?php } ?> </table> </td> </tr> </table>
<br/><br/> <button type="button" onclick="window.location.href='index.php?mod=e_service_report&path=e_service'" class="ui-button ui-widget ui-corner-all ui-state-focus" style="padding: 5px 10px;">รายงาน ร้องเรียนการทุจริต</button> <br/><br/>
<script language="javascript"> function check_new(){ if(document.fm_title_new.title_name.value == ''){ alert('กรุณากรอกชื่อหัวข้อ !') document.fm_title_new.title_name.focus(); return false; }else{ return true; } } $('.title_update').on('click', function(){ $('form[name="fm_title_edit"]').submit(); }); function check_edit(){ if(document.fm_title_edit.title_edit.value == ''){ alert('กรุณากรอกชื่อหัวข้อ !') document.fm_title_edit.title_edit.focus(); return false; }else{ return true; } } $('.del_data').on('click', function(){ if(confirm("คุณต้องการลบหัวข้อนี้ ?")){ var id = $(this).attr('id'); window.location.href = "index.php?mod=e_service_update&path=e_service&del_id="+ id; } }); </script>
<?php }else{ $array_title = array(); $sel_title = "select * from cms_service_title where title_status = '1'"; $que_title = mysql_query($sel_title); while($obj_title = mysql_fetch_assoc($que_title)){ $array_title[$obj_title['title_id']] = $obj_title; } ?>
<label>ข้อมูลของท่านจะถูกเก็บรักษาเป็นความลับ</label>
<form action="index.php?mod=e_service_output&path=e_service" method="post" enctype="multipart/form-data" name="add"> <table width="98%" border="0" align="center" cellpadding="1" cellspacing="3"> <tr height="40"> <td width="25%" style="vertical-align: top;"><div align="left"><img src='coremain/images/marker.gif'> <strong>รายการติดต่อ</strong></div></td> <td> <?php foreach($array_title as $id => $value){ ?> <input type="radio" name="service_title" <?php if($p_e == $id) echo 'checked'; ?> value="<?= $id ?>" /> <?= $value['title_name'] ?><br/> <?php } ?> <!--<select name="service_title" style="width: 370px;"> <option value="">เลือกรายการติดต่อ</option> <?php /*foreach($array_title as $id => $value){ ?> <option value="<?= $id ?>" <?php if($p_e == $id) echo 'selected'; ?>><?= $value['title_name'] ?></option> <?php }*/ ?> </select>--> </td> </tr> <tr height="40"> <td width="25%"><div align="left"><img src='coremain/images/marker.gif'> <strong>เรื่อง</strong></div></td> <td><div align="left"><input name="topic" type="text" size="50"></div></td> </tr> <?php text_editor("445", "260", "รายละเอียด", 2, $data['fulltexts']); ?>
<tr height="40"> <td><div align="left"><img src='coremain/images/marker.gif'> <strong>ไฟล์แนบ</strong></div></td> <td><div align="left"><input name="file_send" type="file" size="46"></div></td> </tr>
<tr height="40"> <td><div align="left"><img src='coremain/images/marker.gif'> <strong>ชื่อผู้ติดต่อ</strong></div></td> <td><div align="left"><input name="sender_name" type="text" size="50"></div></td> </tr>
<tr height="40"> <td><div align="left"><img src='coremain/images/marker.gif'> <strong>โทรศัพท์</strong></div></td> <td><div align="left"><input name="sender_tel" type="text" size="50"></div></td> </tr>
<tr height="40"> <td><div align="left"><img src='coremain/images/marker.gif'> <strong>อีเมล์</strong></div></td> <td><div align="left"><input name="sender_mail" type="text" size="50"></div></td> </tr>
<tr height='40px'> <td ><div align="left"><img src='coremain/images/marker.gif'> <strong>รหัสลับ</strong></div></td> <td> <div class='iframe' valign=top> <iframe name='ifrm' id='ifrm' src='coremain/module/e_service/secure_image.php' frameborder='0' WIDTH='120' HEIGHT='20' SCROLLING='no'></iframe> <a href='javascript:void(0)' onclick="loadIframe('ifrm', 'coremain/module/e_service/secure_image.php')"><img src='coremain/module/question/img/view_refresh.png' border=0 title="เปลี่ยนรูปใหม่"></a> </div> </td> </tr> <tr height='30px'> <td><div align="left"><img src='coremain/images/marker.gif'> <strong>กรอกรหัสลับ</strong></div></td> <td><input name='secure_code'></td> </tr> <tr> <td colspan="2" align="center"> <button type="button" id="send_data" class="ui-button ui-widget ui-corner-all ui-state-focus" style="padding: 5px 10px;">ส่งข้อมูล</button> </td> </tr> </table> </form>
<script language="javascript"> function loadIframe(iframeName, url) { if (window.frames[iframeName]) { $('input[name="secure_code"]').val(''); window.frames[iframeName].location = url; return false; } return true; } function checkadd() { var ret = true; if(document.add.service_title.value == ''){ alert("กรุณาเลือกรายการติดต่อ !") ; document.add.service_title.focus() ; ret &= false ; }else if(document.add.topic.value=="") { alert("กรุณากรอกเรื่อง !") ; document.add.topic.focus() ; ret &= false ; }else if(document.add.sender_name.value==''){ alert('กรุณากรอกชื่อผู้ติดต่อ !'); document.add.sender_name.focus(); ret &= false; }else if(document.add.secure_code.value == ''){ alert('กรุณากรอกรหัสลับ !'); document.add.secure_code.focus(); ret &= false; }else{ $.ajax({ url: 'coremain/module/e_service/set_secure_code.php', type: 'post', async: false, data: {secure_code: $('input[name="secure_code"]').val()}, success: function(response){ if(response == 'OK'){ ret &= true; }else{ alert('รหัสลับไม่ถูกต้อง !'); $('input[name="secure_code"]').focus(); ret &= false; } } }); } return ret; } $('#send_data').on('click', function(){ var chk = checkadd(); if(chk){ $('form[name="add"]').submit(); } }); </script>
<?php }
echo fieldset_down(); ?>
|