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/t07/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/template/t07/center_block.php
<?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='5' cellspacing='0'>
  <tr>
    <td>
<?php include('coremain/module/home/home.php'); ?>
    </td>
  </tr>
</table>
  

<?php
$array_module = array();
$sel_module = "select type_module from cms_main_module";
$que_module = mysql_query($sel_module);
$obj_module = mysql_fetch_assoc($que_module);
foreach($obj_module as $module){
  $array_module[$module] = $module;
}

  $array_center_bottom = array();
  $where = ($_SESSION['admin_web']=="admin") ? "" : " and status = '1'";
  $sql = "SELECT * FROM cms_menu_top WHERE left_right = '3' and module_type!='other' and `lock`='1' $where ORDER BY position";
  $que = mysql_query($sql);
  while($obj = mysql_fetch_assoc($que)){
    $obj['td_width'] = '25%';
    $array_center_bottom[$obj['id_top']] = $obj;
  }
  $count_module = count($array_center_bottom);
?>
<table width='100%' align=center border='0' cellspacing='0' cellpadding='5' bgcolor='<?= $_SESSION['bg_menu'] // สี่พื้นเมนู ซ้ายและขวา ?>'>
  <?php
    $num_col = 0;
    foreach($array_center_bottom as $id_top => $list){
      $new_row = $num_col % 3;
      if($new_row == 0){
        echo '<tr>';
      }
      $menu_name = strpos($list['name'], '.gif') > -1 || strpos($list['name'], '.jpg') > -1 || strpos($list['name'], '.png') > -1 ? '' : $list['name'];
      $menu_bg = $menu_name == '' ? $list['name'] : 'menu_bg.jpg';
  ?>
  <td width="<?= $list['td_width'] ?>" valign="top" align="center">
    <div style="background: url(coremain/images/menu/<?= $_SESSION['themes_'] ?>/1/<?= $menu_bg ?>) no-repeat; background-size: 100%;" class="<?= $_SESSION['themes_'] ?>" align="center" id="<?= $id_top ?>"><?= $menu_name ?></div>
  <?php
//    bar_header($list['name'], "style='background: #FFF;' class='title-corner'");
    $module_type = $list['module_type'];
    if($_SESSION['admin_web']=="admin"){
      $status_module=select_query("status_module","cms_status_module","id","11");
      if($status_module[0]==1){
        # Left
        $left_slide = $new_row == 0 ? 'up' : 'left';
        $title_left = $new_row == 0 ? 'เลื่อนขึ้นแถวบน' : 'เลื่อนไปทางซ้าย';
        echo $list['position'] > 1 ? 
          "<a href='index.php?id_=$id_top&tables=cms_menu_top&id_order=1&left_right=3'><img src='coremain/images/$left_slide.gif' border='0' title='$title_left'></a> " : '';
        # Right
        $right_slide = $new_row == 2 ? 'down' : 'right';
        $title_right = $new_row == 2 ? 'เลื่อนลงแถวล่าง' : 'เลื่อนไปทางขวา';
        echo $list['position'] < $count_module ? 
          "<a href='index.php?id_=$id_top&tables=cms_menu_top&id_order=2&left_right=3'><img src='coremain/images/$right_slide.gif' border='0' title='$title_right'></a> "
           : "";
        # To Right Block
        echo "<a href='index.php?id_=$id_top&tables=cms_menu_top&move_right=2'><img src='coremain/images/top1.gif' border='0' title='ย้ายไปเมนูด้านขวา'></a> ";
        
        # show - hide
        if($list['status']=="1"){
          echo "<a href='index.php?id_=$id_top&id_show=1&tables=cms_menu_top&fields=id_top' title='ซ่อนข้อมูล'><img src='coremain/images/show.gif' border='0'></a> ";
        }else{
          echo "<a href='index.php?id_=$id_top&id_show=2&tables=cms_menu_top&fields=id_top' title='แสดงข้อมูล'><img src='coremain/images/hide.gif' border='0'></a> ";
        }
      }
      # Edit
      if(in_array($module_type, $array_module)){
        echo '<a href="javascript:void(0);" class="edit_manage_header" id="'.$id_top.'#@#'.$module_type.'"><img src="coremain/images/edit.gif" border="0" title="แก้ไขข้อมูล"></a>';
      }

      # Del TOP_MENU 
      if($id_top > 5 && $id_top != 98 && $id_top != 99){
        $sql="SELECT id_top  FROM cms_menu_sub WHERE id_top='$id_top'";
        $re=mysql_query($sql);
        $data=mysql_num_rows($re);
        if($data==0){
          echo " <a href='index.php?id_del_top=$id_top&module=$module_type'><img src='coremain/images/del1.gif' border='0' title='ลบข้อมูล'  onclick='return goURLdel();'></a>";
        }
      }
    }
    
  // ###################### Module ย่อย  ของ Link#################
  if($module_type=="link" && $list['status'] == '1'){ ?>
    <div class="menu_center">
  <?php
    $sql_sub="select id_sub,id_type,name,url from cms_menu_sub WHERE id_top='$id_top' and $list[status]='1' and status='1' order by position asc";
    $result_sub=mysql_query($sql_sub);
    while($data_sub=mysql_fetch_array($result_sub)){ ?>
      <ul><li>
        <?php
        $len_msg = mb_strlen($data_sub['name'], 'utf-8');
        $name_link = $data_sub['name'];//$len_msg > 30 ? mb_substr($data_sub['name'], 0, 30, 'utf-8').'...' : $data_sub['name'];
          if($data_sub['id_type']=="1"){ // inside website
            echo "<a href='$data_sub[url]&id_type=$data_sub[id_type]' title='".$data_sub['name']."'><img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[image_menu]' border=0>&nbsp;".$name_link."</a>";
          }else if($data_sub['id_type']=="2"){ // outside website
            echo "<a href='http://$data_sub[url]' target='_blank' title='".$data_sub['name']."'><img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[image_menu]' border=0>&nbsp;".$name_link."</a>";						
          }
        ?>
      </li></ul>
<?php } ?>
    </div>
<?php
  }
  // ##################### Module การบริการ ##########################
  else if($module_type == 'service' && $list['status'] == '1'){ ?>
    <div id='<?= $_SESSION['menu'] ?>'>
      <ul>
    <?php
      $sql_sub="select id_sub,id_type,name,url from cms_menu_sub WHERE id_top='$id_top' and $list[status]='1' and status='1' order by position asc";
      $result_sub=mysql_query($sql_sub);
      while($data_sub=mysql_fetch_array($result_sub)){ ?>
        <li>
          <a href='<?= $data_sub['url'] ?>&id_type=<?= $data_sub['id_type'] ?>' style="text-decoration: none; text-align: center; text-shadow: 0 0; box-shadow: 0 0;" class="<?= $_SESSION['themes_'] ?>">
            <?= $data_sub['name'] ?>
          </a>
        </li>
    <?php } ?>
      </ul>
    </div>
<?php }
  // ###################### Module ย่อย  ของ Poll #################
  else if($module_type=="poll" && $list['status']==1){ ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td align="center">
          <?php include('coremain/module/poll/poll.php'); ?>
        </td>
      </tr>
    </table>
<?php }
  // ###################### Module ย่อย  ของ Counter #################
  else if($module_type=="counter" && $list['status']==1){ ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td align="center">
          <?php include('coremain/module/counter/counter.php'); ?>
        </td>
      </tr>
    </table>
  <?php
  }
  // ###################### Module ย่อย  ของ Other #################
  else if($module_type=="web_link" && $list['status']==1){
  ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('coremain/module/web_link/web_link.php'); ?>
        </td>
      </tr>
    </table>
  <?php
  }
  // ###################### Module ย่อย  ของ Code#################
  else if($module_type=="code" && $list['status']==1){
  ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('coremain/module/code/code.php'); ?>
        </td>
      </tr>
    </table>
  <?php
  }
  // ###################### Module ย่อย  ของ calendar #################
  else if($module_type=="calendar" && $list['status']==1){
  ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('coremain/module/calendar/calendar.php'); ?>
        </td>
      </tr>
    </table>
  <?php
  }
  // ##################### Module ย่อย OTOP ##########################		
  else if($module_type=="picture" && $list['status']==1){
    if(id_top_permission('id_top_permission')){
      $sql_sub="select * from cms_link_picture WHERE id_top='$id_top' order by position desc";
    }else{
      $sql_sub="select * from cms_link_picture WHERE id_top='$id_top' and status=1 order by position desc";
    }
    $result_sub=mysql_query($sql_sub);
    while($data_sub=mysql_fetch_array($result_sub)){	 // ส่วน display รูป และ ส่ง link
    ?>
      <div height='24' align='center' bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <a href='index.php?mod=link_picture&path=link_picture&id_pic=<?= $data_sub['id_pic'] ?>&data_top=<?= $id_top ?>'>
          <img src='<?= $_SESSION['web_name'] ?>/module_picture/<?= $data_sub['pic_name'] ?>' width="95%" class="img-corner">
        </a>
      </div>
    <?php }
    if(id_top_permission('id_top_permission')){ ?>
      <div align='center'><img src='coremain/images/true.gif'> <a href='index.php?mod=link_picture_add&path=link_picture&id_top=<?= $id_top ?>' title='เพิ่มข้อมูล'>เพิ่มข้อมูล</a></div>
  <?php }
  }
  // ##################### Module Link แสดงรูป ##########################		
  else if($module_type=="sponser" && $list['status']==1){
  ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2>
          <?php include('coremain/module/sponser/sponser.php'); ?>
        </td>
      </tr>
      <?php if(id_top_permission($id_top)){ ?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan='2' >
          <div align='center'><img src='coremain/images/true.gif'> <a href='index.php?mod=sponser_add&path=sponser&id_top=<?= $id_top ?>' title='เพิ่มข้อมูล'>เพิ่มข้อมูล</a></div>
        </td>
      </tr>
      <?php } ?>
    </table>
  <?php
  }
  // ###################### Module ย่อย  สาสน์ผู้บริหาร #################
  else if($module_type=="boss_message" && $list['status']==1){
  ?>
    <table width="100%">
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2>
          <?php include('coremain/module/boss_message/boss_message.php'); ?>
        </td>
      </tr>
    </table>
  <?php
  }
  ?>
    </td>
  <?php
    if($new_row == 2){
      echo '</tr>';
    }
    ++$num_col;
  }
  ?>
</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>

Youez - 2016 - github.com/yon3zu
LinuXploit