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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/private_html/coremain//header_addblog.php
<?php
session_start();
include ("function_import_request.php");
echo"<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
echo"<link href='coremain/ccs/style.php' rel='stylesheet' type='text/css'>";
import_request_variables('pG', 'p_');
//#5.3#//if($p_folder_name!="")			{			$folder_name=trim($p_folder_name);		}
$folder_name = isset($p_folder_name) ? $p_folder_name : '';
//#5.3#//if($_SESSION[folder_name]=="")	{			$_SESSION[folder_name]=$folder_name;	}
$_SESSION['folder_name'] = $folder_name;
//#5.3#//if($p_add_menu!="")				{			$add_menu=trim($p_add_menu);			}
$add_menu = isset($p_add_menu) ? $p_add_menu : '';
//#5.3#//if($p_name!="")					{			$name=trim($p_name);					}
$name = isset($p_name) ? $p_name : '';
//#5.3#//if($p_namemenu!="")				{			$namemenu=trim($p_namemenu);			}
$namemenu = isset($p_namemenu) ? $p_namemenu : '';
//#5.3#//if($p_type_module!="")			{			$type_module=trim($p_type_module);		}
$type_module = isset($p_type_module) ? $p_type_module : '';
//#5.3#//if($p_left_right!="")			{			$left_right=trim($p_left_right);		}
$left_right = isset($p_left_right) ? $p_left_right : '';
//#5.3#//if($p_theme_!="")				{			$theme_=trim($p_theme_);				}
$theme_ = isset($p_theme_) ? $p_theme_ : '';
$_SESSION['themes_'] = $_SESSION['themes_'] == '' ? $theme_ : $_SESSION['themes_'];
//#5.3#//if($p_id_modules!="")				{			$id_modules=trim($p_id_modules);				}
$id_modules = isset($p_id_modules) ? $p_id_modules : '';
//#5.3#//if($p_id_graph!="")					{			$id_graph=trim($p_id_graph);				}
$id_graph = isset($p_id_graph) ? $p_id_graph : '';
//#5.3#//if($p_web_name!="")					{			$web_name=trim($p_web_name);		$_SESSION[web_name]=$web_name;		}
$web_name = isset($p_web_name) ? $p_web_name : '';
//#5.3#//if($p_name_select!="")					{			$name_select=trim($p_name_select);				}
$name_select = isset($p_name_select) ? $p_name_select : '';

//#5.3#//if($_SESSION[themes_]=="") $_SESSION[themes_]=$theme_;
include("../coremain/connec_out.php");
include("function_form.php");
include("function_msg.php");
include("function_sql_query.php");
echo "<title>เพิ่ม Blog</title>";

if($id_modules=="" and $add_menu=="" and $name_select=="")  {  $id_modules=1; }

//if($name_select!="" and $add_menu!="")  {  
//	$x=explode("&",$name_select);
//	$cc=explode("=",$x[0]);
//	$id_modules=$cc[1]."<br>";
//
//	$xx=explode("=",$x[1]);
//	$type_module=$xx[1];
//
//	$yy=explode("=",$x[2]);
//	$left_right=$yy[1];
//}

if($namemenu!=""){
$theme=$namemenu;

// Max id
include("../$_SESSION[web_name]/connect.php");
$sql="select max(id_top+1) from cms_menu_top";

$result=mysql_query($sql);
$data=mysql_fetch_row($result);
// Max Position
$sql="select max(`position`+1) from cms_menu_top";
$result=mysql_query($sql);
$data1=mysql_fetch_row($result);
	$sql = "INSERT INTO cms_menu_top (id_top,name,position,left_right,`status`,`lock`,module_type,permission)values('$data[0]','$theme','$data1[0]','$left_right','1',1,'$type_module',0)";
		$result = mysql_query($sql) or die(mysql_error());
}

if($add_menu==1){
?>
<script language="JavaScript"> 
//    window.opener.location.href='../index.php';
//    window.close();
  $('#dialog-popup').dialog('close');
</script>
<?php
}

// Find type of main module
$sql_main_module = "SELECT * FROM cms_main_module WHERE status=1";
$res_main_module = mysql_query ($sql_main_module);
?>
<fieldset><center>
  <form name="fm_add_blog">
  <!--<FORM METHOD=POST ACTION='header_addblog.php?id_top=$id_top&left_right=$left_right;' name='add' onSubmit='return checkadd()'>";-->
  <table align=center>
    <tr>
      <td><img src='coremain/images/marker.gif'>&nbsp;  Blog หลัก (จะสร้างกรอบหลักในระบบ) : </td>
      <td>
        <select name='name_select' style='width:200' class="sl_name_select"><!-- onchange=change_link(this.value);>-->
          <option value="5" <?= $id_modules==5 ? "selected" : '' ?>>ใส่ Code Freed RSS</option>
          <option value="4" <?= $id_modules==4 ? "selected" : '' ?>>สาส์นจากผู้บริหาร</option>
          <option value="3" <?= $id_modules==3 ? "selected" : '' ?>>ลิงค์แสดงรูปใน Blog</option>
          <option value="2" <?= $id_modules==2 ? "selected" : '' ?>>สถานที่ท่องเที่ยว / OTOP</option>
          <option value="1" <?= $id_modules==1 ? "selected" : '' ?>>เมนูย่อย</option>
        </select>
      </td>
    </tr>
    <tr height='40'>
      <td colspan=2><img src='coremain/images/marker.gif'>&nbsp;เลือกข้อความเมนูตามประเภทที่เพิ่ม</td>
    </tr>
    <tr>
      <td colspan=2>
      <?php include("../coremain/connec_out.php"); ?>
        <table width=98% border=0 align=center cellpadding=1 cellspacing=1>
          <tr>
            <td>ชื่อเมนู</td>
            <td colspan="2"><input type="text" name="namemenu" size="30" value="" /></td>
          </tr>
        <?php
          /*$s="SELECT * FROM cms_graphic WHERE id_module='$id_modules' order by id_graphic";
          $r=mysql_query($s);
          $count=0;
          while($da=mysql_fetch_array($r)){
            if(file_exists('images/menu/'. $_SESSION['themes_'] .'/1/'. $da['name'])){
            $mots=$count%3;
            if($mots==0){ ?>
          <tr height='50'>
            <td width='33%'>
              <img src='coremain/images/menu/<?= $_SESSION['themes_'] ?>/1/<?= $da['name'] ?>'>
              <br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              <input name='namemenu' type='radio' value='<?= $da['name'] ?>'>
              <br><br>
            </td>
          <?php }else if($mots==1){ ?>
            <td width='33%'>
              <img src='coremain/images/menu/<?= $_SESSION['themes_'] ?>/1/<?= $da['name'] ?>'>
              <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              <input name='namemenu' type='radio' value='<?= $da['name'] ?>'>
              <br><br>
            </td>
          <?php }else if($mots==2){ ?>
            <td width='33%'>
              <img src='coremain/images/menu/<?= $_SESSION['themes_'] ?>/1/<?= $da['name'] ?>'>
              <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              <input name='namemenu' type='radio' value='<?= $da['name'] ?>'>
              <br><br>
            </td>
          </tr>
          <?php }
            $count++;
            }
          }*/
        ?>
        </table>
      </td>
    </tr>
    <tr height='10'>
      <td colspan=2 align='center'>
        <!--<INPUT TYPE='submit' value='เพิ่ม Blog' onmouseover=this.style.cursor='hand'>-->
        <!--<INPUT TYPE='hidden' name='add_menu' value='1'>-->
        <button type="button" class="ui-button ui-widget ui-corner-all" id="btn_addblog">เพิ่ม Blog</button>
      </td>
    </tr>
  </table>
  </form>
</center></fieldset>

<script language="javascript">
  
  function checkadd() {
    if(document.fm_add_blog.namemenu.value=="") {
      alert("กรุณาเลือก Blog !") ;
      document.fm_add_blog.namemenu.focus() ;
      return false ;
    }else
      return true ;
  }

  
  var arr_select = { '1' : 'link', '2' : 'picture', '3' : 'sponser', '4' : 'boss_message', '5' : 'code', };
  $('.sl_name_select').change(function(){
    var name_select = $(this).val();
    var arrData = [
      { name: 'id_modules', value: name_select },
      { name: 'type_module', value: arr_select[name_select] },
      { name: 'left_right', value: '<?= $left_right ?>' }
    ];
    header_addblog(arrData);
  });
  
  $('#btn_addblog')
        .button()
        .click(function(){
    if(checkadd()){
      var name_select = $('select[name=name_select]').val();
      var arrData = [
        { name: 'id_modules', value: name_select },
        { name: 'type_module', value: arr_select[name_select] },
        { name: 'namemenu', value: $('input[name=namemenu]').val() },//{ name: 'namemenu', value: $('input[name=namemenu]:checked').val() },
        { name: 'left_right', value: '<?= $left_right ?>' },
        { name: 'add_menu', value: '1' }
      ];
      header_addblog(arrData);
    }
  });
  
  function header_addblog(arrData){
    $.ajax({
      type: 'post',
      url: 'coremain/header_addblog.php',
      data: arrData,
      success: function(result){
        $('#dialog-popup').html(result);
      }
    });
  }
  
  //header_addblog.php?id_top=$id_top&left_right=$left_right
  
//	function change_link(clink){
//		window.location = clink;
//	}
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit