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_edit_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_edit']="แก้ไขข้อมูล";
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_widths!="")									{	     $widths=trim($p_widths);							}
if($p_heights!="")									{	     $heights=trim($p_heights);							}
if($p_date!="")										{	     $date=trim($p_date);								}
if($p_month!="")									{	     $month=trim($p_month);								}
if($p_year!="")										{	     $year=trim($p_year);								}
if($p_date1!="")									{	     $date1=trim($p_date1);								}
if($p_month1!="")									{	     $month1=trim($p_month1);							}
if($p_year1!="")									{	     $year1=trim($p_year1);								}
if($p_who!="")										{	     $who=trim($p_who);									}
if($p_check_out!="")								{		$check_out=trim($p_check_out);						}
if($p_id_popup_edit!="")							{	     $id_popup_edit=trim($p_id_popup_edit);				}

$userfile1_name=trim($_FILES['userfile1']['name']);
$date_post=$year.$month.$date;
$date_line=$year1.$month1.$date1;

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>ไฟล์ที่ 1 ชนิดไฟล์ไม่ถูกต้อง <br>ไฟล์ต้องมีนามสกุลเป็น .gif หรือ .jpg หรือ .swf เท่านั้น<br><br>";
					echo"<a href='javascript:history.back()'><font color='ff0000'>[แก้ไขใหม่]</font></center></a>";
//					include('coremain/footer.php');
					exit;
			}
}

// วันประสิ้นสุดประกาศต้องอยู่หลังวันประกาศเสมอ
if($date_post>$date_line)
{
	echo "<br><br><center>วันที่สิ้นสุดวันประกาศ ไม่ถูกต้อง !<br><br>";
					echo"<a href='javascript:history.back()'><font color='ff0000'>[แก้ไขใหม่]</font></center></a><br><br>";
//					include('coremain/footer.php');
	exit;
}

//********************** ตรวจสอบว่า มีการ Upload File ที่ 1 หรือไม*******************************************่
if($userfile1_name!="")
{ 	   // ลบไฟล์เก่าออกก่อน	
			$sql1="select pic1 from cms_popup where id='$id_popup_edit'";
			$result1=mysql_query($sql1);
			$data1=mysql_fetch_row($result1);
			if($data1[0]!="")		{			unlink("$_SESSION[folder_name]/mainfile/$data1[0]");		}
		// ชื่อไฟล์
		$strings=substr($userfile1_name,-4);
		$date=date("d");
		$name1="file$date$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)){
						}
					}
}

// ไฟล์เก่ายังคงใช้อยู่
if($check_out!="1" and $userfile1_name==""){
			$sql="select pic1 from cms_popup where id='$id_popup_edit'";
			$result=mysql_query($sql);
			$data=mysql_fetch_row($result);
					if($userfile1_name=="")	{		$name1=$data[0];	}
}
if($check_out=="1" and $userfile1_name==""){
//ไฟล์เก่าไม่ใช้แล้ว เอาออกจากระบบไปเลย
			$sql1="select pic1 from cms_popup WHERE id='$id_popup_edit'";
			$result1=mysql_query($sql1);
			$data1=mysql_fetch_row($result1);
			if($data1[0]!="")		{			unlink("$_SESSION[folder_name]/mainfile/$data1[0]");		$name1="";}
}
echo"<table width='98%' border='0' cellspacing='1'  align='center' cellpadding='0'>";
echo"<tr> ";
echo" <td height='140' valign='top'>";
$sql="UPDATE `cms_popup` SET `topic` = '$topic', `fulltexts` = '$fulltexts', `who` = '$who',`pic1` = '$name1',`date_post` = '$date_post',`date_line` = '$date_line',`widths` = '$widths',`heights` = '$heights'  WHERE `id` = '$id_popup_edit' LIMIT 1";
$result=mysql_query($sql);
echo "<center><br><br>ข้อมูลได้ถูกแก้ไขแล้ว</center>"; 
echo "<meta http-equiv='refresh' content='2; url=index.php?mod=manage_popup&path=popup'>" ;

echo"</td>  </tr>  </table>";
fieldset_down();
?>

  

Youez - 2016 - github.com/yon3zu
LinuXploit