CMS  Version 3.9
upload.inc File Reference

Go to the source code of this file.

Variables

 $attachment = new Attachment()
 
 $dir = $config["attachmentdir"]
 
 $name = $_FILES['attachmentFile']["name"]
 
 $base = $config['uploadbase']
 
if(!file_exists("$base/$dir")) $attachment user_id = $user->get($user->primary_key)
 
 $extension = substr($name, strrpos($name, "."))
 
 $file = "$dir/{$attachment->attachment_id}$extension"
 
 $size = getScaledSize(filesize("$base/$file"))
 
$attachment filename = $name
 
$attachment local_filename = $file
 
$attachment file_size =$size
 
 $icon = DocumentHandler::getDocIcon($name)
 

Variable Documentation

◆ $attachment

$attachment = new Attachment()

Definition at line 36 of file upload.inc.

◆ $base

$base = $config['uploadbase']

Definition at line 55 of file upload.inc.

◆ $dir

$dir = $config["attachmentdir"]

Definition at line 53 of file upload.inc.

◆ $extension

$extension = substr($name, strrpos($name, "."))

Definition at line 70 of file upload.inc.

◆ $file

$file = "$dir/{$attachment->attachment_id}$extension"

Definition at line 72 of file upload.inc.

◆ $icon

$icon = DocumentHandler::getDocIcon($name)

Definition at line 92 of file upload.inc.

◆ $name

$name = $_FILES['attachmentFile']["name"]

Definition at line 54 of file upload.inc.

◆ $size

$size = getScaledSize(filesize("$base/$file"))

Definition at line 85 of file upload.inc.

◆ file_size

$attachment file_size =$size

Definition at line 89 of file upload.inc.

◆ filename

$attachment filename = $name

Definition at line 87 of file upload.inc.

◆ local_filename

$attachment local_filename = $file

Definition at line 88 of file upload.inc.

◆ user_id

if (!file_exists("$base/$dir")) $attachment user_id = $user->get($user->primary_key)

Definition at line 67 of file upload.inc.