| 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/store.tiacyrusxxx.com/public_html/dev/TSCP2/ |
Upload File : |
<?
//http://www.diginudes.com/DNCP/image_upload.php?type=icon§ion=model&save=77/icon.jpg&tn=none&id=77
include 'config.php';
if (isset($_POST['post'])) {
$max_size = "512000"; // Max size in BYTES (1MB)
if ($_FILES["image"]["size"] > $max_size) die ("<b>Image is too big! <a href=\"#\" onClick=\"history.go(-1)\">Go Back</a></b>");
if ($_POST['type'] == "fullimg") {
if(is_uploaded_file($_FILES['image']['tmp_name'])) {
$file_name = $_FILES['image']['tmp_name'];
$localfile = file_get_contents($file_name);
if($_POST['section'] == "sample") {
$source = $featureroot.$_POST['save'];
} else {
$source = $photosetsroot.$_POST['save'];
}
$handle = fopen($source,"w+");
if(fwrite($handle,$localfile)>-1) {
$source = realpath(".").'/img/temp.jpg';
$handle = fopen($source,"w+");
if(fwrite($handle,$localfile)>-1) {
printf("<meta http-equiv=\"Refresh\" content=\"0;url=./image_crop.php?type=tn§ion=".$_POST['section']."&save=".$_POST['tn']."&tn=none&id=".$_POST['id']."\">");
}
exit;
} else {
die("error could not write.");
}
}
}
$source = realpath(".").'/img/temp.jpg';
if(is_uploaded_file($_FILES['image']['tmp_name'])) {
$file_name = $_FILES['image']['tmp_name'];
$localfile = file_get_contents($file_name);
$handle = fopen($source,"w+");
if(fwrite($handle,$localfile)>-1) {
printf("<meta http-equiv=\"Refresh\" content=\"0;url=./image_crop.php?type=".$_POST['type']."§ion=".$_POST['section']."&save=".$_POST['save']."&tn=".$_POST['tn']."&id=".$_POST['id']."\">");
} else {
die("error could not write.");
}
}
} else {
if(isset($_GET['type'])&&isset($_GET['section'])&&isset($_GET['save'])&&isset($_GET['tn'])&&isset($_GET['id'])){
dbConn();
if ($_GET['section'] == "model") {
$get = mysql_query("SELECT name FROM cms_models WHERE model_id = '".$_GET['id']."'");
} elseif ($_GET['section'] == "video") {
$get = mysql_query("SELECT name FROM cms_content WHERE content_id = '".$_GET['id']."'");
} elseif ($_GET['section'] == "photoset") {
$get = mysql_query("SELECT name FROM cms_content WHERE content_id = '".$_GET['id']."'");
} else {
$get = mysql_query("SELECT title FROM cms_blogs WHERE blog_id = '".$_GET['id']."'");
}
if ($_GET['section'] == "feature" || $_GET['section'] == "sample") {
$got = "feature/sample";
} else {
$got = mysql_result($get, 0);
}
?>
<br><br>
<table width="800" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC"><span class="fourbold">Upload Image</span> [ <?=$_GET['type']?> for <strong><?=$got?></strong> in <?=$_GET['section']?> ]
</td>
</tr>
<tr>
<td>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>" enctype='multipart/form-data'>
<table width="600" border="0" align="center" cellpadding="3" cellspacing="3">
<tr>
<td width="13%" align="right">Image:</td>
<td width="87%"><input type='file' name='image' class="grey"></td>
</tr>
<tr>
<td colspan="2" align="right"><div align="center">
<input type="hidden" name="type" value="<?=$_GET['type']?>">
<input type="hidden" name="section" value="<?=$_GET['section']?>">
<input type="hidden" name="save" value="<?=$_GET['save']?>">
<input type="hidden" name="tn" value="<?=$_GET['tn']?>">
<input type="hidden" name="id" value="<?=$_GET['id']?>">
<input type="submit" name="post" value="Upload" class="grey">
</div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
} else {
die("missing variables");
}
}
?>