| 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/playwithfaye.com/public_html/free2/admin/ |
Upload File : |
<?php
include($_SERVER['DOCUMENT_ROOT']."/_config.php");
require($_SERVER['DOCUMENT_ROOT']."/free2/fnc/function_unzip.php");
require($_SERVER['DOCUMENT_ROOT']."/free2/fnc/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>
<link href="../style.css" rel="stylesheet" type="text/css" />
</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 - Added by Michael Moody - 10/30/07
/* 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(TOUR_ROOT."/images/".$asset_id."/"))
{
recursive_remove_directory(TOUR_ROOT."/images/".$asset_id."/")or die("could not REMOVE the dir recursively");;
}
mkdir_recursive(TOUR_ROOT."/images/".$asset_id."/", 0777)or die("no good");
if($media =='P'){
mkdir_recursive(TOUR_ROOT."/images/".$asset_id."/hogal/", 0777)or die("no good");
chmod(TOUR_ROOT."/images/".$asset_id."/hogal/", 0777);
}
$uploaddir = TOUR_ROOT."/images/".$asset_id."/";
$uploadfile = $uploaddir . $_FILES['userfile']['name'];
chmod($uploaddir, 0777);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{ echo ""; }
else { echo "Possible file upload attack!\n"; }
unzipFile($uploadfile, $uploaddir);
if($media =='P')
{
for ($i = '1'; $i <= '15'; $i++)
{
if (!copy(TOUR_ROOT."/images/".$asset_id."/".$i.".jpg", TOUR_ROOT."/images/".$asset_id."/hogal/".$i.".jpg"))
{ echo "failed to copy ".$i.".jpg...<br />\n"; }else{unlink(TOUR_ROOT."/images/".$asset_id."/".$i.".jpg");}
}
if (!copy(TOUR_ROOT."/images/".$asset_id."/featured.jpg", TOUR_ROOT."/images/".$asset_id."/hogal/featured.jpg"))
{ echo "failed to copy featured.jpg...<br />\n"; }else{unlink(TOUR_ROOT."/images/".$asset_id."/featured.jpg");}
}
// unlink($uploadfile);
?>
<p align="center">Click <a href="resize.php?asset_id=<?php echo $asset_id ?>&dir=<?php echo TOUR_ROOT."/images/".$asset_id."/" ?>">HERE</a> to create thumbnails and do the Hogals if they were present in your upload.</p>
<!--<p align="center">Click <a href="resize.php?main_dir=<?php echo TOUR_ROOT."/images/".$asset_id."/" ?>">HERE</a> to create Photo Asset thumbnails </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>");
?>
<!--background="img/loads.jpg"-->
<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="60000000" />
<!-- 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>