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
|
<?php if($_SESSION['admin_web'] == ''){ $sql_left = "SELECT id_top, name, position, left_right, status, module_type FROM cms_menu_top WHERE left_right='2' and status='1' and permission != 'admin' and module_type != 'other' and `lock`='1' and position = '2' order by position asc"; $que_left = mysql_query($sql_left); $num_left = mysql_num_rows($que_left); $sql_right = "SELECT id_top, name, position, left_right, status, module_type FROM cms_menu_top WHERE left_right='2' and status='1' and permission != 'admin' and module_type != 'other' and `lock`='1' and position = '1' order by position asc"; $que_right = mysql_query($sql_right); $num_right = mysql_num_rows($que_right); $chk_left = $num_left > 0 ? 1 : 0; $center_1 = $chk_left == 1 ? '80%' : '100%'; $chk_right = $num_right > 0 ? 1 : 0; $center_2 = $chk_right == 1 ? '80%' : '100%'; }else{ $chk_left = 1; $chk_right = 1; $center_1 = '80%'; $center_2 = '80%'; } ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="<?= $center_2 ?>" align="center" valign="top"> <fieldset class="canvas-corner" style="margin-left: 5px; margin-right: 5px;"> <?php //############## ข้อมูลทั่วไป ############# $x=select_query("status","cms_status_module","id","7"); if($_SESSION['admin_web']=="admin" || (id_top_permission("data_other"))){ ?> <table align="center"> <tr bgcolor='ffcc00' height='1'> <?php if($x[0]=="0"){ ?> <td colspan="2"><img src='coremain/images/hide.gif' border=0><a href='javascript:void(0);' class="update_status" id="data_other-1" title='แสดงข้อมูล'> แสดงข้อมูลกิจกรรมทั่วไป</a></td> <?php }else{ ?> <td colspan="2"><img src='coremain/images/show.gif' border=0><a href='javascript:void(0);' class="update_status" id="data_other-0" title='ซ่อนข้อมูล'> ซ่อนกิจกรรมทั่วไป</a></td> <td><img src='coremain/images/edit.gif'> <a href='index.php?mod=page_others_update&path=page_others' title='แก้ไขข้อมูล'>แก้ไขข้อมูล</a></td> <?php } ?> </tr> </table> <?php }
# แสดงข้อมูล if($x[0]==1){ if($_SESSION['id_tumbon']=="dankhun2_n23") { bar_header("แหล่งท่องเที่ยวภายในตำบลหนองจะบก"); } else{ bar_header("กิจกรรมทั่วไป"); }
if(!($_SESSION['admin_web']=="admin" || (id_top_permission("data_other")))){ echo "<br/>"; } ?> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td id="page_others_detail"> <?php include('coremain/module/page_others/page_others.php'); ?> </td> </tr> </table> <?php } ?> </fieldset> </td> <?php if($chk_right == '1'){ ?> <td width="20%" align="center" valign="top"> <?php include('right_top.php'); ?> </td> <?php } ?> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <?php if($chk_left == '1'){ ?> <td width="20%" align="center" valign="top"> <?php include('left_top.php'); ?> </td> <?php } ?> <td width="<?= $center_1 ?>" align="center" valign="top"> <!-- ภาพกิจกรรม --> <table width='100%' border='0' cellpadding='5' cellspacing='0'> <tr> <td> <fieldset class="canvas-corner"> <?php include('coremain/module/freerss/freerss.php'); ?> </fieldset> </td> </tr> </table> </td> </tr> </table>
<?php ####################### ข่าวประชาสัมพันธ์ภายในหน่วยงาน ##################### $module_news = select_query("status_module, status", "cms_status_module", "id", "2"); // ############################ ข่าวประชาสัมพันธ์ภายนอก ############################### $module_news_out = select_query("status_module, status", "cms_status_module", "id", "4");
####################### ข่าวประกวดราคาภายใน ##################### $module_tender = select_query("status_module, status", "cms_status_module", "id", "3"); ####################### ข่าวประกวดราคาภายนอก ##################### $module_tender_out = select_query("status_module, status", "cms_status_module", "id", "5");
$news = $module_news[0] + $module_news_out[0]; $tender = $module_tender[0] + $module_tender_out[0]; $chk_news = ($module_news[0] == 1 && $module_news[1] == 1 ? 1 : 0) + ($module_news_out[0] == 1 && $module_news_out[1] == 1 ? 1 : 0); $chk_tender = ($module_tender[0] == 1 && $module_tender[1] == 1 ? 1 : 0) + ($module_tender_out[0] == 1 && $module_tender_out[1] == 1 ? 1 : 0); $module_width = $chk_news == 0 || $chk_tender == 0 ? ($_SESSION['admin_web'] == "admin" || (id_top_permission("news")) ? '50%' : '100%') : '50%'; ?> <table width="100%" border="0" cellpadding="5" cellspacing="0"> <tr bgcolor="<?= $_SESSION['bg_menu'] ?>"> <?php if($chk_news > 0 || $_SESSION['admin_web'] == "admin" || (id_top_permission("news"))){ ?> <td width="<?= $module_width ?>" valign='top'> <fieldset class="canvas-corner"> <?php bar_header("ข่าวประชาสัมพันธ์"); ?> <div id="tabs_news"> <ul> <?php if ($module_news['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news"))) { ?> <li><a href="#tabs-1">ภายในหน่วยงาน</a></li> <?php } ?> <?php if ($module_news_out['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news"))) { ?> <li><a href="#tabs-2">ภายนอกหน่วยงาน</a></li> <?php } ?> </ul> <?php if ($module_news['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news"))) { ?> <div id="tabs-1" style="padding: 0;"> <?php if ($_SESSION['admin_web'] == "admin" || (id_top_permission("news"))) { $id_sub = 99999; ?> <table align='center'> <tr bgcolor='ffcc00' height="25"> <?php if ($module_news['status'] == "0") { ?> <td colspan="2"><img src='coremain/images/hide.gif' border=0><a href="javascript:void(0);" class="update_status" id="news-1" title='แสดงข้อมูล'> แสดงข้อมูล</a></td> <?php } else { ?> <td><img src='coremain/images/show.gif' border=0><a href="javascript:void(0);" class="update_status" id="news-0" title='ซ่อนข้อมูล'> ซ่อนข้อมูล</a> </td> <td><img src='coremain/images/add.gif'> <a href='index.php?mod=news_add&path=news&id_type=1&id_sub=$id_sub' title='เพิ่มข้อมูล'> เพิ่มข้อมูล</a></td> <?php } ?> </tr> </table> <?php } ?> <div style="width: 100%; height: 300px; overflow: auto;"> <?php # แสดงข้อมูล if ($module_news['status'] == '1') { ?> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><?php include('coremain/module/news/news.php'); ?></td> </tr> </table> <?php } ?> </div> </div> <?php } ?> <?php if ($module_news_out['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news_out"))) { ?> <div id="tabs-2" style="padding: 0;"> <?php if ($_SESSION['admin_web'] == "admin" || (id_top_permission("news_out"))) { ?> <table align='center'> <tr bgcolor='ffcc00' height="25"> <?php if ($module_news_out['status'] == "0") { ?> <td><img src='coremain/images/hide.gif' border=0><a href="javascript:void(0);" class="update_status" id="news_out-1" title='แสดงข้อมูล'> แสดงข้อมูล</a></td> <?php } else { ?> <td><img src='coremain/images/show.gif' border=0><a href="javascript:void(0);" class="update_status" id="news_out-0" title='ซ่อนข้อมูล'> ซ่อนข้อมูล</a></td> <?php } ?> </tr> </table> <?php } ?> <div style="width: 100%; height: 300px; overflow: auto;"> <?php # แสดงข้อมูล if ($module_news_out['status'] == 1) { ?> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><br/><?php include('coremain/module/news_out/news.php'); ?></td> </tr> </table> <?php } ?> </div> </div> <?php } ?> </div> </fieldset> </td> <?php } ?> <?php if($chk_tender > 0 || $_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender"))){ ?> <td width="<?= $module_width ?>" valign='top'> <fieldset class="canvas-corner"> <?php bar_header("ข่าวจัดซื้อจัดจ้าง"); ?> <div id="tabs_tender"> <ul> <?php if($module_tender['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender"))){ ?> <li><a href="#tender-1">ภายในหน่วยงาน</a></li> <?php } ?> <?php if($module_tender_out['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender"))){ ?> <li><a href="#tender-2">ภายนอกหน่วยงาน</a></li> <?php } ?> </ul> <?php if($module_tender['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender"))){ ?> <div id="tender-1" style="padding: 0"> <?php if($_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender"))){ ?> <table align='center'> <tr bgcolor='ffcc00' height="25"> <?php if ($module_tender['status'] == "0") { ?> <td colspan="2"><img src='coremain/images/hide.gif' border=0><a href="javascript:void(0);" class="update_status" id="news_tender-1" title='แสดงข้อมูล'> แสดงข้อมูล</a></td> <?php } else { ?> <td><img src='coremain/images/show.gif' border=0><a href="javascript:void(0);" class="update_status" id="news_tender-0" title='ซ่อนข้อมูล'> ซ่อนข้อมูล</a></td> <td><img src='coremain/images/add.gif'> <a href='index.php?mod=news_tender_add&path=news_tender' title='เพิ่มข้อมูล'>เพิ่มข้อมูล</a></td> <?php } ?> </tr> </table> <?php } ?> <div style="width: 100%; height: 300px; overflow: auto;"> <?php # แสดงข้อมูล if ($module_tender['status'] == 1) { ?> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><?php include('coremain/module/news_tender/news_tender.php'); ?></td> </tr> </table> <?php } ?> </div> </div> <?php } ?> <?php if($module_tender_out['status'] == '1' || $_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender_out"))){ ?> <div id="tender-2" style="padding: 0"> <?php if($_SESSION['admin_web'] == "admin" || (id_top_permission("news_tender_out"))){ ?> <table align='center'> <tr bgcolor='ffcc00' height="25"> <?php if ($module_tender_out['status'] == "0") { ?> <td><img src='coremain/images/hide.gif' border=0><a href="javascript:void(0);" class="update_status" id="news_tender_out-1" title='แสดงข้อมูล'> แสดงข้อมูล</a></td> <?php } else { ?> <td><img src='coremain/images/show.gif' border=0><a href="javascript:void(0);" class="update_status" id="news_tender_out-0" title='ซ่อนข้อมูล'> ซ่อนข้อมูล</a></td> <?php } ?> </tr> </table> <?php } ?> <div style="width: 100%; height: 300px; overflow: auto;"> <?php # แสดงข้อมูล if($module_tender_out['status'] == 1){ ?> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><?php include('coremain/module/news_tender_out/news_tender.php'); ?></td> </tr> </table> <?php } ?> </div> </div> <?php } ?> </div> </fieldset> </td> <?php } ?> </tr> </table>
|