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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/popup/popup_add_output.php
<?php
// Status Package Module
$status_module=select_query("status_module","cms_status_module","id","33");
if($status_module[0]!=1)	{	
	fieldset_no_module();
}
$navig['manage_popup']="จัดการ Popup";
$navig['popup_add']="เพิ่มข้อมูล";
navigator($navig);
echo"<br>";
bar_header("เพิ่มข้อมูล"); // Bar_Header
fieldset_top("จัดการ Popup");



import_request_variables('pG', 'p_');
if($p_topic!="")										{  $topic=trim($p_topic);														}
if($p_evar!="")										{  $fulltexts=trim($p_evar);													}
if($p_date!="")										{  $date=trim($p_date);														}
if($p_month!="")									{  $month=trim($p_month);													}
if($p_year!="")										{  $year=trim($p_year);															}
$date_post=$year.$month.$date;
if($p_date1!="")										{  $date1=trim($p_date1);													}
if($p_month1!="")									{  $month1=trim($p_month1);												}
if($p_year1!="")										{  $year1=trim($p_year1);													}
$date_line=$year1.$month1.$date1;

if($p_who!="")										{  $who=trim($p_who);															}
if($p_widths!="")									{  $widths=trim($p_widths);													}
if($p_heights!="")									{  $heights=trim($p_heights);												}

$userfile1_name=trim($_FILES['userfile1']['name']);


if($userfile1_name!=""){
		$strings1=substr($userfile1_name,-4);
			if($strings1!=".gif" and $strings1!=".jpg" and $strings1!=".GIF" and $strings1!=".JPG" and $strings1!=".SWF" and $strings1!=".swf"){
					echo"<center><br>ชนิดไฟล์ไม่ถูกต้อง <br>ไฟล์ต้องมีนามสกุลเป็น .gif หรือ .jpg หรือ .swf เท่านั้น<br><br>";
					echo"<a href='javascript:history.back()'><font color='ff0000'>[แก้ไขใหม่]</font></center></a>";
//					include('coremain/footer.php');
					exit;
			}
}


//********************** ตรวจสอบว่า มีการ Upload File ที่ 1 หรือไม*******************************************่
if($userfile1_name!="")
{     // กำหนดชื่อไฟล์ที่ upload ใหม่ ทั้งนี้เพื่อให้ ไฟล์ไม่ซ้ำกัน
		$sqlmax1="select max(id+1)  from cms_popup";
		$resultmax1=mysql_query($sqlmax1);
		$datamax1=mysql_fetch_row($resultmax1);
		// ชื่อไฟล์
		$strings=substr($userfile1_name,-4);
		$name1="pic1$datamax1[0]$strings";
					$dlink="$_SESSION[folder_name]/mainfile/".$name1;
					$temp_name=$_FILES['userfile1']['tmp_name'];
					if (is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
						if(!move_uploaded_file($temp_name,$dlink)){
						}
					}
}


//*******เพิ่มข้อมูลลงในฐาน*************************************************
// หาค่า id สูงสุด + 1
$sqlmax1="select max(id+1) from cms_popup";
$resultmax1=mysql_query($sqlmax1);
$datamax1=mysql_fetch_row($resultmax1);		if ($datamax1[0]=="")		{			$datamax1[0]="1";		}

	$sql = "INSERT INTO cms_popup(id,topic,fulltexts,who,date_post,date_line,pic1,status,widths,heights) values('$datamax1[0]','$topic','$fulltexts','$_SESSION[name_post]','$date_post','$date_line','$name1','1','$widths','$heights')";

	$result = mysql_query($sql) or die(mysql_error());
	$sql="UPDATE `cms_popup` SET `status` = '0' WHERE status='1' and id!='$datamax1[0]'";
	$result = mysql_query($sql) or die(mysql_error());

	echo "<center><br>ข้อมูลได้ถูกเพิ่มแล้ว<br><br></center>"; 
	echo "<meta http-equiv='refresh' content='2; url=index.php?mod=manage_popup&path=popup'>" ;
fieldset_down();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit