/home/banprang/domains/plai.go.th/public_html/coremain/module/first_page/first_page.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
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<?php
navigator
($navig);
//#5.3#//if($p_status_data_other!="")        {         $status_data_other=trim($p_status_data_other);        }
$status_data_other = isset($p_status_data_other) ? $p_status_data_other '';
//#5.3#//if($p_status_news_out!="")        {         $status_news_out=trim($p_status_news_out);            }
$status_news_out = isset($p_status_data_other) ? $p_status_data_other '';
//#5.3#//if($p_status_news!="")                {         $status_news=trim($p_status_news);                            }
$status_news = isset($p_status_news) ? $p_status_news '';
//#5.3#//if($p_status_news_tender_out!="")        {         $status_news_tender_out=trim($p_status_news_tender_out);        }
$status_news_tender_out = isset($p_status_news_tender_out) ? $p_status_news_tender_out '';
//#5.3#//if($p_status_news_tender!="")                {         $status_news_tender=trim($p_status_news_tender);                        }
$status_news_tender = isset($p_status_news_tender) ? $p_status_news_tender '';

//#5.3#//if($p_status_first_page!="")        {         $status_first_page=trim($p_status_first_page);        }
$status_first_page = isset($p_status_first_page) ? $p_status_first_page '';
//#5.3#//if($p_status_webboard!="")        {         $status_webboard=trim($p_status_webboard);            }
$status_webboard = isset($p_status_webboard) ? $p_status_webboard '';

// ############################## กิจกรรมทั่วไป ###############################        
$status_module=select_query("status_module","cms_status_module","id","7");
if(
$status_module[0]==1)    {    // สถานะตาม PACKAGE 
// update status
if($_SESSION['admin_web']=="admin" || (id_top_permission("data_other"))){
  if(
$status_data_other=="1"){
    
$sq="UPDATE cms_status_module set status='1' WHERE id='7'";
    
$re=mysql_query($sq);
  }else if(
$status_data_other=="0"){
    
$sq="UPDATE cms_status_module set status='0' WHERE id='7'";
    
$re=mysql_query($sq);    
  }
}

# เช็คสถานะของ status
$x=select_query("status","cms_status_module","id","7");
if(
$_SESSION['admin_web']=="admin" || (id_top_permission("data_other"))){
?>
  <br/>
  <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='index.php?mod=first_page&path=first_page&status_data_other=1' title='แสดงข้อมูล'> แสดงข้อมูลกิจกรรมทั่วไป</a></td>
      <?php }else{ ?>
        <td><img src='coremain/images/show.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_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>
        <?php  include('coremain/module/page_others/page_others.php'); ?>
      </td>
    </tr>
  </table>
<?php }
}

# ภาพกิจกรรม ?>
  <table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
      <td>&nbsp;
      <?php include('coremain/module/freerss/freerss.php'); ?>
      </td>
    </tr>
  </table>
  
<?php
####################### ข่าวประชาสัมพันธ์ภายในหน่วยงาน #####################
$status_module=select_query("status_module","cms_status_module","id","2");
$id_sub=99999;
if(
$status_module[0]==1){  // สถานะตาม PACKAGE 
  // update status
  
if($_SESSION['admin_web']=="admin" || (id_top_permission("news"))){
    if(
$status_news=="1"){
      
$sq="UPDATE cms_status_module set status='1' WHERE id='2'";
      
$re=mysql_query($sq);
    }else if(
$status_news=="0"){
      
$sq="UPDATE cms_status_module set status='0' WHERE id='2'";
      
$re=mysql_query($sq);    
    }
  }
  
  
# เช็คสถานะของ status
  
$x=select_query("status","cms_status_module","id","2");    
  if(
$_SESSION[admin_web]=="admin" || (id_top_permission("news"))){ ?>
  <br/>
  <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='index.php?mod=first_page&path=first_page&status_news=1' title='แสดงข้อมูล'> แสดงข้อมูลข่าวประชาสัมพันธ์ (ภายในหน่วยงาน)</a></td>
      <?php }else{ ?>
        <td><img src='coremain/images/show.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_news=0' title='ซ่อนข้อมูล'> ซ่อนข้อมูลข่าวประชาสัมพันธ์ (ภายในหน่วยงาน)</a>&nbsp;</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 }
  
  
# แสดงข้อมูล
  
if($x[0]==1){
    
bar_header("ข่าวประชาสัมพันธ์ (ภายในหน่วยงาน)");
    if(!(
$_SESSION['admin_web']=="admin" || (id_top_permission("news")))){ echo "";}
  
?>
    <table width='100%' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td>
          <?php include('coremain/module/news/news.php'); ?>
        </td>
      </tr>
      <tr height='3'><td></td></tr>
    </table>
  <?php }
}


// ############################ ข่าวประชาสัมพันธ์ภายนอก ###############################        
$status_module=select_query("status_module","cms_status_module","id","4");
if(
$status_module[0]==1){  // สถานะตาม PACKAGE 
// update status
  
if($_SESSION['admin_web']=="admin" || (id_top_permission("news_out"))){
    if(
$status_news_out=="1"){
      
$sq="UPDATE cms_status_module set status='1' WHERE id='4'";
      
$re=mysql_query($sq);
    }else if(
$status_news_out=="0"){
      
$sq="UPDATE cms_status_module set status='0' WHERE id='4'";
      
$re=mysql_query($sq);    
    }
  }
  
  
# เช็คสถานะของ status
  
$x=select_query("status","cms_status_module","id","4");
  if(
$_SESSION['admin_web']=="admin" || (id_top_permission("news_out"))){
?>
  <br/>
  <table align='center'>
    <tr bgcolor='ffcc00' height='1'>
      <?php if($x[0]=="0"){ ?>
        <td><img src='coremain/images/hide.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_news_out=1' title='แสดงข้อมูล'> แสดงข้อมูลข่าวประชาสัมพันธ์ (ภายนอกหน่วยงาน)</a></td>
      <?php }else{ ?>
        <td><img src='coremain/images/show.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_news_out=0' title='ซ่อนข้อมูล'> ซ่อนข้อมูลข่าวประชาสัมพันธ์ (ภายนอกหน่วยงาน)</a></td>
      <?php ?>
    </tr>
  </table>
<?php }

  
# แสดงข้อมูล
  
if($x[0]==1){
    if(!(
$_SESSION['admin_web']=="admin" || (id_top_permission("news_out")))){ echo "<br/>";}
    
bar_header("ข่าวประชาสัมพันธ์ (ภายนอกหน่วยงาน)"); ?>
  <table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
      <td><?php include('coremain/module/news_out/news.php'); ?></td>
    </tr>
  </table>
<?php }
}


//####### ข่าวบริหารงานบุคคลเฉพาะอัน ##################
if($_SESSION['dbname']=="chonburi_14"){
  if(
$_SESSION['admin_web']=="admin"){
?>
  <br/>
  <table align='center'>
    <tr bgcolor='ffcc00' height='1'>
      <td><img src='coremain/images/add.gif'> <a href='index.php?mod=news_add&path=news_persion&id_type=3&id_sub=<?=$id_sub?>' title='เพิ่มข้อมูลข่าวบริหารงานบุคคล'>เพิ่มข้อมูลข่าวบริหารงานบุคคล</a></td>
    </tr>
  </table>
<?php }
  
bar_header("ข่าวบริหารงานบุคคล");
?>
  <table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
      <td>
        <?php include('coremain/module/news_persion/news.php'); ?>
      </td>
    </tr>
  </table>
<?php
}

if(
$_SESSION['dbname'] !="chonburi_26"){
####################### ข่าวประกวดราคาภายใน #####################
  
$status_module=select_query("status_module","cms_status_module","id","3");
  if(
$status_module[0]==1){  // สถานะตาม PACKAGE 
    # update status
    
if($_SESSION['admin_web']=="admin" || (id_top_permission("news_tender"))){
      if(
$status_news_tender=="1"){
        
$sq="UPDATE cms_status_module set status='1' WHERE id='3'";
        
$re=mysql_query($sq);
      }else if(
$status_news_tender=="0"){
        
$sq="UPDATE cms_status_module set status='0' WHERE id='3'";
        
$re=mysql_query($sq);    
      }
    }
    
# เช็คสถานะของ status
    
$x=select_query("status","cms_status_module","id","3");
    if(
$_SESSION['admin_web']=="admin" || (id_top_permission("news_tender"))){
?>
  <br/>
  <table align='center'>
    <tr bgcolor='ffcc00'>
      <?php if($x[0]=="0"){ ?>
        <td colspan="2"><img src='coremain/images/hide.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_news_tender=1' title='แสดงข้อมูล'> แสดงข้อมูลข่าวจัดซื้อจัดจ้าง (ภายในหน่วยงาน)</a></td>
      <?php }else{ ?>
        <td><img src='coremain/images/show.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_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 }
    
// แสดงข้อมูล
  
if($x[0]==1){
    if(!(
$_SESSION['admin_web']=="admin" || (id_top_permission("news_tender")))){ echo "<br>"; }
    
bar_header("ข่าวจัดซื้อจัดจ้าง (ภายในหน่วยงาน)");
?>
  <table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
      <td>&nbsp;<?php include('coremain/module/news_tender/news_tender.php'); ?></td>
    </tr>
  </table>
<?php
  
}
}


####################### ข่าวประกวดราคาภายนอก #####################
$status_module=select_query("status_module","cms_status_module","id","5");
  if(
$status_module[0]==1){  // สถานะตาม PACKAGE 
    # update status
    
if($_SESSION['admin_web']=="admin" || (id_top_permission("news_tender_out"))){
      if(
$status_news_tender_out=="1"){
        
$sq="UPDATE cms_status_module set status='1' WHERE id='5'";
        
$re=mysql_query($sq);
      }else if(
$status_news_tender_out=="0"){
        
$sq="UPDATE cms_status_module set status='0' WHERE id='5'";
        
$re=mysql_query($sq);    
      }
    }
    
# เช็คสถานะของ status
    
$x=select_query("status","cms_status_module","id","5");    
    if(
$_SESSION['admin_web']=="admin" || (id_top_permission("news_tender_out"))){
?>
  <br/>
  <table align='center'>
    <tr bgcolor='ffcc00' height='1'>
    <?php if($x[0]=="0"){ ?>
      <td><img src='coremain/images/hide.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_news_tender_out=1' title='แสดงข้อมูล'> แสดงข้อมูลข่าวจัดซื้อจัดจ้าง (ภายนอกหน่วยงาน)</a></td>
    <?php }else{ ?>
      <td><img src='coremain/images/show.gif' border=0><a href='index.php?mod=first_page&path=first_page&status_news_tender_out=0' title='ซ่อนข้อมูล'>  ซ่อนข้อมูลข่าวจัดซื้อจัดจ้าง (ภายนอกหน่วยงาน)</a></td>
    <?php ?>
    </tr>
  </table>
<?php }
    
# แสดงข้อมูล
    
if($x[0]==1){
      if(!(
$_SESSION['admin_web']=="admin" || (id_top_permission("news_tender_out")))){ echo "<br/>";}
      
bar_header("ข่าวจัดซื้อจัดจ้าง (ภายนอกหน่วยงาน)");
?>
  <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
    
}
  }

}



// ###### กระดานสนทนา ################
if($_SESSION['dbname']=="abttumbon_44"){
  echo 
"<br/>";
  
bar_header("กระดานสนทนา");
?>
  <table width='100%' border='0' cellspacing='1' cellpadding='4' align=center>
    <tr>
      <td width='100%' align='right'>
      <?php
        
include('coremain/module/webboard/show10.php');
        
showTop($_SESSION['dbname'],7);
      
?>
        <br/>
        <a href='index.php?mod=webboard&path=webboard'>ประเด็นทั้งหมด</a> | <a href='index.php?mod=postq&path=webboard'>ตั้งประเด็นใหม่</a>
      </td>
    </tr>
  </table>
<?php
}

// จังหวัดชัยภูมิ
if($_SESSION['name_province']=="chaiyaphoom"){
?>
  <br/>
  <table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
      <td align=center>
        <a href='http://www.cpmlocal.org' target='_blank'><img src='coremain/images/ch.gif' width='520' border=0></a>
      </td>
    </tr>
  </table>
<?php
}

//############## ข่าวอิสระ #############
if($_SESSION['admin_web']=="admin"){
?>
  <br/>
  <table align='center'>
    <tr bgcolor='ffcc00'>
      <td>
        <img src='coremain/images/add.gif'> <a href='index.php?mod=home_add_page&path=home' title='เพิ่มข้อมูล'>เพิ่มข้อมูลหน้าแรก</a>
      </td>
    </tr>
  </table>
<?php ?>
  
  <table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
      <td>&nbsp;
        <?php  // include('coremain/module/home/home.php'); ?>
      </td>
    </tr>
  </table>