403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.22.217.190
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/t02/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/template/t02/center_block.php
<?php
if($_SESSION['admin_web'] == ''){
  $sql_left = "SELECT id_top, name, position, left_right, status, module_type FROM cms_menu_top WHERE left_right='1' and status='1' and permission != 'admin' and module_type != 'other' and `lock`='1' and position = '1' 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;
  $chk_right = $num_right > 0 ? 1 : 0;
  $chk_side = $chk_left + $chk_right;
  $width_center = $chk_side == 2 ? '60%' : ($chk_side == 1 ? '80%' : '100%');
}else{
  $chk_left = 1;
  $chk_right = 1;
  $width_center = '60%';
}
?>
<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="<?= $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] == 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>

<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();
      }
    });
    
  });
  
  $( "#tabs_news, #tabs_tender" ).tabs();
  
</script>




Youez - 2016 - github.com/yon3zu
LinuXploit