Server IP : 119.59.102.212 / Your IP : 216.73.216.74 Web Server : Apache/2 System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64 User : yangkam ( 1022) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/yangkam/domains/yangkam.go.th/public_html/coremain/template/t08/ |
Upload File : |
<?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' order by position asc"; $que_right = mysql_query($sql_right); $num_right = mysql_num_rows($que_right); $chk_right = $num_right > 0 ? 1 : 0; $width_center = $chk_right == 1 ? '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" 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> </tr> <tr> <td> <fieldset class="canvas-corner"> <?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="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 } # แสดงข้อมูล if ($x[0] == 1) { bar_header("ข่าวประชาสัมพันธ์ (ภายในหน่วยงาน)"); ?> <div style="width: 100%; height: 200px; overflow: auto;"> <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> </div> <?php if (!($_SESSION['admin_web'] == "admin" || (id_top_permission("news_out")))) { echo "<br/>"; } } } // ############################ ข่าวประชาสัมพันธ์ภายนอก ############################### $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="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 } # แสดงข้อมูล if ($x[0] == 1) { bar_header("ข่าวประชาสัมพันธ์ (ภายนอกหน่วยงาน)"); ?> <div style="width: 100%; height: 200px; overflow: auto;"> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td><?php include('coremain/module/news_out/news.php'); ?></td> </tr> </table> </div> <?php if (!($_SESSION['admin_web'] == "admin" || (id_top_permission("news_out")))) { echo "<br/>"; } } } ?> </fieldset> </td> </tr> <tr> <td> <fieldset class="canvas-corner"> <?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="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 } // แสดงข้อมูล if ($x[0] == 1) { bar_header("ข่าวจัดซื้อจัดจ้าง (ภายในหน่วยงาน)"); ?> <div style="width: 100%; height: 200px; overflow: auto;"> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td> <?php include('coremain/module/news_tender/news_tender.php'); ?></td> </tr> </table> </div> <?php if (!($_SESSION['admin_web'] == "admin" || (id_top_permission("news_out")))) { echo "<br/>"; } } } ####################### ข่าวประกวดราคาภายนอก ##################### $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="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 } # แสดงข้อมูล if ($x[0] == 1) { bar_header("ข่าวจัดซื้อจัดจ้าง (ภายนอกหน่วยงาน)"); ?> <div style="width: 100%; height: 200px; overflow: auto;"> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td> <?php include('coremain/module/news_tender_out/news_tender.php'); ?> </td> </tr> </table> </div> <?php if (!($_SESSION['admin_web'] == "admin" || (id_top_permission("news_out")))) { echo "<br/>"; } } } // } ?> </fieldset> </td> </tr> </table> </td> <?php if($chk_right == '1'){ ?> <td width="20%" align="center" valign="top"> <?php include('right_block.php'); ?> </td> <?php } ?> </tr> </table> <script> $('.update_status').click(function(){ var arr = $(this).attr('id').split('-'); var type = arr[0]; var status = arr[1]; var arrData = [ { name: 'module', value: arr[0] }, { name: 'status', value: arr[1] } ]; $.ajax({ type: 'post', url: 'coremain/index_status.php', data: arrData, success: function(result){ location.reload(); } }); }); </script>