CMS  Version 3.9
upload.inc File Reference

Go to the source code of this file.

Functions

 uploadLibraryFile ($field, $document)
 

Variables

 $document_library_id = checkNumeric($_GET["document_library_id"])
 
 $folder_select = checkNumeric($_GET["folder_select"])
 
if(! $document_library_id) global $library = new DocumentLibrary($document_library_id)
 
if(!checkRole($library->allow_access) &&! $library->allowAccess()) $document = new Document()
 
$document filter = new InclusionFilter("document_id", "title", "notes", "keywords", "file", "author", "publication_date", "document_library_id", "owner_id", "allow_access")
 
 $form = new AutoForm($document, "POST", "/action/document/upload?document_library_id=$document_library_id")
 
 $notes = $form->getRenderer("notes")
 
$notes colspan = 1
 
$notes columns = 38
 
if($folder_select) $fileUpload = new FileUploadFieldRenderer($form, "file", "File", uploadLibraryFile)
 
 $allowAccessList = new CheckListFieldRenderer($form, "allow_access", "Allow Access", DocumentManager::getRoleOptions())
 
 if ( $method=="POST")
 

Function Documentation

◆ uploadLibraryFile()

uploadLibraryFile (   $field,
  $document 
)

Definition at line 101 of file upload.inc.

102 {
103  global $library;
104  global $form;
105 
107  $document->file = $mgr->uploadFile($field, $_POST["folder_value"]);
108 }
$_POST["owner_id"]
Definition: blog_form.inc:54
The DocumentManager class provides the core API and management functions for uploading documents and ...
$form
Definition: upload.inc:59
if(!checkRole($library->allow_access) &&! $library->allowAccess()) $document
Definition: upload.inc:55
if(! $document_library_id) global $library
Definition: upload.inc:41
$mgr
Definition: upload.inc:39

Variable Documentation

◆ $allowAccessList

$allowAccessList = new CheckListFieldRenderer($form, "allow_access", "Allow Access", DocumentManager::getRoleOptions())

Definition at line 80 of file upload.inc.

◆ $document

if (!checkRole( $library->allow_access) &&! $library->allowAccess()) $document = new Document()

Definition at line 55 of file upload.inc.

◆ $document_library_id

$document_library_id = checkNumeric($_GET["document_library_id"])

Definition at line 37 of file upload.inc.

◆ $fileUpload

if ( $folder_select) $fileUpload = new FileUploadFieldRenderer($form, "file", "File", uploadLibraryFile)

Definition at line 79 of file upload.inc.

◆ $folder_select

$folder_select = checkNumeric($_GET["folder_select"])

Definition at line 38 of file upload.inc.

◆ $form

$form = new AutoForm($document, "POST", "/action/document/upload?document_library_id=$document_library_id")

Definition at line 59 of file upload.inc.

◆ $library

$library = new DocumentLibrary($document_library_id)

Definition at line 46 of file upload.inc.

◆ $notes

$notes = $form->getRenderer("notes")

Definition at line 69 of file upload.inc.

◆ colspan

$notes colspan = 1

Definition at line 70 of file upload.inc.

◆ columns

$notes columns = 38

Definition at line 71 of file upload.inc.

◆ filter

$document filter = new InclusionFilter("document_id", "title", "notes", "keywords", "file", "author", "publication_date", "document_library_id", "owner_id", "allow_access")

Definition at line 57 of file upload.inc.

◆ if

if($method=="POST") (   $method = = "POST")

Definition at line 82 of file upload.inc.