/home/banprang/domains/plai.go.th/public_html/coremain/template/t06/center_top.php


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
<?php
if($_SESSION['admin_web'] == ''){
  
$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_right $num_right 0;
  
$width_center $chk_right == '80%' '100%';
}else{
  
$chk_right 1;
  
$width_center '80%';
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="<?= $width_center ?>" 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>
    <?php if($chk_right == '1'){ ?>
    <td width="20%" align="center" valign="top">
      <?php include('right_top.php'); ?>
    </td>
    <?php ?>
  </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] == && $module_news[1] == 0) + ($module_news_out[0] == && $module_news_out[1] == 0);
$chk_tender = ($module_tender[0] == && $module_tender[1] == 0) + ($module_tender_out[0] == && $module_tender_out[1] == 0);
$module_width $chk_news == || $chk_tender == ? ($_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 || $_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 || $_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>