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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/right_block.php
 <?php
// menu for admin
if($_SESSION['admin_web']=="admin"){
	$sql="SELECT 	id_top,	name,	position,	left_right	,status,module_type FROM cms_menu_top WHERE left_right='2' and permission!='health' and `lock`='1' and module_type!='other' order by position asc";
}else if(id_top_permission("health_system_admin")){
	$sql = "SELECT 	id_top,	name,	position,	left_right	,status,module_type FROM cms_menu_top WHERE left_right='2' and permission!='admin' and status='1' and module_type!='other' and `lock`='1' order by position asc";	
// for member	
}else if ($_SESSION['admin_web']=="member"){
	$sql="SELECT 	id_top,	name,	position,	left_right	,status,module_type FROM cms_menu_top WHERE left_right='2' and permission!='admin' and module_type!='other' and status='1' and `lock`='1' order by position asc";
}else{
	$sql="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";
}
$result=mysql_query($sql);
$dataa=mysql_num_rows($result);
$count_l=1;
if($dataa>0){
  $widthsl="190px";
}
if($_SESSION['admin_web']=="admin") {
  $blog_width='120';
}else{
  $blog_width='190';
}
?>


<!--<table width='190' border='0' cellpadding='0' cellspacing='0' bgcolor='<?= $_SESSION['bg_menu'] ?>'>-->
<table border='0' width='100%' cellpadding='0' cellspacing='0' bgcolor='<?= $_SESSION['bg_menu'] ?>'>
  <tr>
    <td>
<?php
// #####################Module หลัก #################
while($data_top=mysql_fetch_array($result)){
  $id_top = $data_top['id_top'];
  $menu_name = strpos($data_top['name'], '.gif') > -1 || strpos($data_top['name'], '.jpg') > -1 || strpos($data_top['name'], '.png') > -1 ? '' : $data_top['name'];
  $menu_bg = $menu_name == '' ? $data_top['name'] : 'menu_bg.jpg';
?>
    <table width='100%' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td width="100%" 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 ?>
    <?php if($_SESSION['admin_web']=="admin"){ ?>
        </td>
      </tr>
      <tr height='18'><td width='100%' align='right'>
    <?php }
// #############################Admin Edit ##########################
  if($_SESSION['admin_web']=="admin"){
    $sql_num="SELECT count(*) FROM cms_menu_top WHERE left_right='2'";
    $re_num=mysql_query($sql_num);
    $data_num=mysql_fetch_array($re_num);
    # Status Package Module
    $status_module=select_query("status_module","cms_status_module","id","11");
	if($status_module[0]==1){
      # Up 
      if($count_l>1){
        echo "<a href='index.php?id_=$id_top&tables=cms_menu_top&id_order=1&left_right=2'><img src='coremain/images/up.gif' border='0' title='เลื่อนขึ้น'></a> "; 
      }else{
        echo "&nbsp;&nbsp;&nbsp;&nbsp;";
      }
      # Down
      if($count_l<$data_num[0]){
        echo "<a href='index.php?id_=$id_top&tables=cms_menu_top&id_order=2&left_right=2'><img src='coremain/images/down.gif' border='0' title='เลื่อนลง'></a> "; 
      }else {
        echo "&nbsp;&nbsp;&nbsp;";
      }
      # Left
      echo "<a href='index.php?id_=$id_top&tables=cms_menu_top&move_right=1'><img src='coremain/images/left.gif' border='0' title='เลื่อนไปทางซ้าย'></a> "; 
      # show - hide
      if($data_top['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
    //echo"<a href=\"#\" onClick=\"window.open('coremain/module/link/manage_header.php?id_top=$id_top&web_name=$_SESSION[web_name]&module_type=$data_top[module_type]&themes_=$_SESSION[themes_]','blah12','width=700,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes')\"><img src='coremain/images/edit.gif' border='0' title='แก้ไขข้อมูล'></a>&nbsp;";
    //echo '<a href="javascript:void(0);" onClick="windowOpen(\'coremain/module/link/manage_header.php?id_top='.$id_top.'&web_name='.$_SESSION['web_name'].'&module_type='.$data_top['module_type'].'&themes_='.$_SESSION['themes_'].'\', \'myModal\');"><img src="coremain/images/edit.gif" border="0" title="แก้ไขข้อมูล"></a>';
    echo '<a href="javascript:void(0);" class="edit_manage_header" id="'.$id_top.'#@#'.$data_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=$data_top[module_type]'><img src='coremain/images/del1.gif' border='0' title='ลบข้อมูล'  onclick='return goURLdel();'></a>";
      }
    }
  }
?>
      </td></tr>
<?php
// ###################### Module ย่อย  ของ Link#################
  if($data_top["module_type"]=="link"){
    $sql_sub="select id_sub,id_type,name,url from cms_menu_sub WHERE id_top='$id_top' and $data_top[status]='1' and status='1' order by position asc";
    $result_sub=mysql_query($sql_sub);
    while($data_sub=mysql_fetch_array($result_sub)){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='24'>
          <div id='<?= $_SESSION['menu'] ?>'>
            <ul><li>
              <?php
                if($data_sub['id_type']=="1"){
                  echo "<a href='$data_sub[url]&id_type=$data_sub[id_type]'><img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[image_menu]' border=0>&nbsp;&nbsp;".$data_sub['name']."</a>";
                }else if($data_sub[id_type]=="2"){
                  echo "<a href='http://$data_sub[url]' target='_blank'><img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[image_menu]' border=0>&nbsp;&nbsp;".$data_sub['name']."</a>";						
                }
              ?>
            </li></ul>
          </div>
        </td>
      </tr>
<?php }
  }
// ###################### Module ย่อย  ของ Poll #################
  else if($data_top["module_type"]=="poll" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('module/poll/poll.php'); ?>
        </td>
      </tr>
<?php
}
// ###################### Module ย่อย  ของ Other #################
  else if($data_top["module_type"]=="other" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php //include('module/other/other.php'); ?>
        </td>
      </tr>
<?php
}
// ###################### Module ย่อย  ของ Other #################
  else if($data_top["module_type"]=="web_link" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('module/web_link/web_link.php'); ?>
        </td>
      </tr>
<?php
}
// ###################### Module ย่อย  ของ Code#################
  else if($data_top["module_type"]=="code" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('module/code/code.php'); ?>
        </td>
      </tr>
<?php
}
// ###################### Module ย่อย  ของ calendar #################
  else if($data_top["module_type"]=="calendar" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('module/calendar/calendar.php'); ?>
        </td>
      </tr>
<?php
}
// ###################### Module ย่อย  ของ Counter #################
  else if($data_top["module_type"]=="counter" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <?php include('module/counter/counter.php'); ?>
        </td>
      </tr>
<?php
}
// ##################### Module ย่อย OTOP ##########################		
  else if($data_top["module_type"]=="picture" && $data_top['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
    ?>
        <tr bgcolor='<?= $_SESSION['bg_menu'] ?>' height='6'><td colspan=2></td></tr>
        <tr>
          <td colspan=2 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'] ?>' border='0'>
            </a>
          </td>
        </tr>
    <?php }

    if(id_top_permission('id_top_permission')){ ?>
      <tr><td colspan='2' bgcolor='<?= $_SESSION['bg_menu'] ?>'><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></td></tr>
  <?php }
  }
// ##################### Module ย่อย LINK ##########################		
  else if($data_top["module_type"]=="sponser" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2>
          <?php include('module/sponser/sponser.php'); ?>
        </td>
      </tr>
<!--      <tr bgcolor='$_SESSION[bg_menu]'>
        <td colspan=2>-->
      <?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 } ?>
<!--        </td>
    </tr>-->
<?php
  }
// ##################### Module ย่อย ของสมาชิก##########################		
  else if($data_top["module_type"]=="service" && $data_top['status']==1){
    $sql_sub="select id_sub,id_type,name,url from cms_menu_sub WHERE id_top='$id_top' and $data_top[status]='1' and status='1' order by position asc";
    $result_sub=mysql_query($sql_sub);
    while($data_sub=mysql_fetch_array($result_sub)){
  ?>
        <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
          <td colspan=2 height='24'>
            <div id='<?= $_SESSION['menu'] ?>'>
              <ul><li>
                <a href='<?= $data_sub['url'] ?>&id_type=<?= $data_sub['id_type'] ?>'><img src='<?= $_SESSION['web_name'] ?>/theme/<?= $_SESSION['themes_'] ?>/<?= $_SESSION['image_menu'] ?>' border=0>&nbsp;&nbsp;<?= $data_sub['name'] ?></a>
              </li></ul>
            </div>
          </td>
        </tr>
<?php }
  }
// ###################### Module ย่อย  สาสน์ผู้บริหาร #################
  else if($data_top["module_type"]=="boss_message" && $data_top['status']==1){
    $id_top = $data_top["id_top"];
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2>
          <?php include('module/boss_message/boss_message.php'); ?>
        </td>
      </tr>
<?php
  }
// ###################### Module ย่อย  ข้อมูลทั่วไป #################
  else if($data_top["module_type"]=="general_data" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20'>
          <div id='<?= $_SESSION['menu'] ?>'>
            <ul><li>
              <a href='./index.php?mod=general_data&path=general_data&id_type=1'>หมู่บ้านในเขต อบต.</a>
            </li></ul>
          </div>
        </td>
      </tr>
<?php
  }
//clock
  else if($data_top["module_type"]=="clock" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20' align='center'>
          <?php include('module/clock/clock.php'); ?>
        </td>
      </tr>
<?php
  }
//link_pic
  else if($data_top["module_type"]=="link_pic" && $data_top['status']==1){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20' align='center'>
          <?php include('module/link_pic/link_pic.php'); ?>
        </td>
      </tr>
<?php
  }
// ############################## link out ###############################
  else if($data_top["module_type"]=="alink" && $data_top['status']==1){
    $sql_alink="select name , url from cms_menu_sub WHERE id_top='$id_top' and status=1 order by position desc";
    $result_alink=mysql_query($sql_alink);
    while($data_alink=mysql_fetch_array($result_alink)){
?>
      <tr bgcolor='<?= $_SESSION['bg_menu'] ?>'>
        <td colspan=2 height='20' align='left'>
          <div id='<?= $_SESSION['menu'] ?>'>
            <ul><li>
              <a href='<?= $_SERVER["http_host"] ?>/<?= $data_alink['url']?>' target='blank_'><img src='<?= $_SESSION['web_name'] ?>/theme/<?= $_SESSION['themes_'] ?>/<?= $_SESSION['image_menu'] ?>' border=0>&nbsp;&nbsp;<?= $data_alink['name'] ?></a>
            </li></ul>
          </div>
        </td>
      </tr>
<?php }
  }
?>
    </table>
<?php $count_l++;
}
?>

    <!-- แถบสีปิดโมดูลสุดท้าย-->
    <table width='100%' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td height='20' bgcolor='<?= $_SESSION['bg_textrun'] ?>'></td>
      </tr>
    </table>
    <?php
    
    // #################แถบเพิ่ม ฺBlog #################
    if($_SESSION['admin_web']=="admin"){
      $status_module=select_query("status_module","cms_status_module","id","12");
      if($status_module[0]==1){
    ?>
      <br/>
      <table width='100%' border='0' cellpadding='0' cellspacing='0'>
        <tr>
          <td align=center bgcolor='ffcc00'>
            <a href="javascript:void(0);" class="btn_addblog" id="2"><img src='coremain/images/true.gif' title='เพิ่ม Blog' border=0> เพิ่ม Blog</a>
          </td>
        </tr>
      </table><br>
    <?php
      }
    // ################ เพิ่มเมนูใหม่ ############
    ?>
      <br/>
    <?php
    }
    ?>
    </td>
  </tr>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit