KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/simes/unused/fCMSBackend/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/simes/unused/fCMSBackend/includes/upload.php
<?php

require("./includes/classes/fileupload.class.php");
$request->authorize("filebrowser","upload");

//$acceptable_file_types used by upload() method
//
// Limit acceptable uploads based on MIME type. Common MIME types 
// include: text/plain, image/gif, image/jpeg image/png

// To accept ONLY gifs's use the following
//acceptable_file_types = "image/gifs";

// Accept GIF and JPEG files
//$acceptable_file_types = "image/gif|image/jpeg|image/pjpeg";

// Accept all image files
//$acceptable_file_types = "image";

// Accept ALL files
$acceptable_file_types = '';


// $default_extension used by upload() method
// 
// If no extension is supplied, and the browser or PHP can not figure 
// out what type of file it is, you can add a default extension

$default_extension = ""; // example: ".jpg"


// $mode used by save_file() method
//
// Handles identically named uploaded files.
//
// OPTIONS:
//   1 = overwrite mode
//   2 = create new with incremental extention
//   3 = do nothing if exists, highest protection

$mode = 3;
	
	
/*
**
** UPLOAD LOGIC
** --------------------------------------------------------------------
**
*/
// Create a new instance of the class
$my_uploader = new uploader ('fb_http');
		
// OPTIONAL: set the max filesize of uploadable files in bytes
$my_uploader->max_filesize ($maxsize);
		
// OPTIONAL: if you're uploading images, you can set the max pixel dimensions 
$my_uploader->max_image_size (800, 800); // max_image_size($width, $height)

// UPLOAD the file

$res = $my_uploader->upload ("Filedata", $acceptable_file_types, $default_extension);

if ($res) {
	$rootpath = $request->getAuthFBProperty ('root');
	$upath = $request->joinPathParam ($rootpath, 'PATH');

	$res = $my_uploader->save_file ($upath, $mode, $extlist);
}
		
if (! $res) {

	header ("HTTP/1.1 " . $my_uploader->error);
	
} else {

	// Successful upload!
	header ("HTTP/1.1 200 OK");
}


?>

Anon7 - 2021