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/module/calendar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/calendar/add_event_result.php
<?php
session_start();
include ("../../function_import_request.php");
include("../../../$_SESSION[web_name]/connect.php");

//import_request_variables('pG', 'p_');
//if($p_date!="")													{	     $date=trim($p_date);							}
//if($p_month!="")												{	     $month=trim($p_month);					}
//if($p_year!="")													{	     $year=trim($p_year);							}
//$years=$date."-".$month."-".$year;
//if($p_event_desc!="")										{	     $event=trim($p_event_desc);			}


$chk = true;
$userfile1_name = isset($_FILES['userfile1']) ? trim($_FILES['userfile1']['name']) : '';
if ($userfile1_name != "") {
  $strings1 = substr($userfile1_name, -4);
  if ($strings1 == ".php" or $strings1 == ".exe" or $strings1 == ".asp") {
    echo "ไฟล์ประกอบไม่อนุญาตให้ Upload <br>เนื่องจากชนิดไฟล์เสียงต่อความเสียหายของระบบ !";
    $chk = false;
  }
}
//********************** ตรวจสอบว่า มีการ Upload File ที่ 1 หรือไม*******************************************่
if ($userfile1_name != "") {     // กำหนดชื่อไฟล์ที่ upload ใหม่ ทั้งนี้เพื่อให้ ไฟล์ไม่ซ้ำกัน
  $sqlmax1 = "select max(id+1)  from cms_calendar";
  $resultmax1 = mysql_query($sqlmax1);
  $datamax1 = mysql_fetch_row($resultmax1);
// ชื่อไฟล์
  $strings = substr($userfile1_name, -4);
  $name1 = "file$datamax1[0]$strings";
  $dlink = "../../../$_SESSION[web_name]/module_calendar/" . $name1;
  $temp_name = $_FILES['userfile1']['tmp_name'];
  if (is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
    if (!move_uploaded_file($temp_name, $dlink)) {
      echo "cant upload";
      $chk = false;
    }
  } chmod("$dlink", 0777);
}
//*************************************************************************************

if($chk){
  $array_data = explode('&', $_POST['data']);
  foreach($array_data as $k => $ele){
    $arr = explode('=', $ele);
    $name = $arr[0];
    unset($arr[0]);
    $value = implode('=', $arr);
    $array_value[$name] = $value;
  }
  $years = $array_value['date'].'-'.$array_value['month'].'-'.($array_value['year'] - 543);
  $event = $array_value['event_desc'];

  $sql1 = "select max(id+1) from cms_calendar";
  $result1 = mysql_query($sql1);
  $data1 = mysql_fetch_row($result1);
  if ($data1[0] == "")
    $data1[0] = 1;
  $str = '';
  $val = '';
  if(isset($name1)){
    $str = ",`file`";
    $val = ",'$name1'";
  }
  $sql = "INSERT INTO cms_calendar(`id`,`date`,`event` $str) values('$data1[0]','$years','$event' $val)";
  if(mysql_query($sql)){
    echo 'OK';
  }else{
    echo 'ไม่สำเร็จ ! กรุณาลองใหม่อีกครั้ง ';
  }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit