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
|
<?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>
|