CMS  Version 3.9
show.inc File Reference

Go to the source code of this file.

Variables

 $document_id = checkNumeric($_GET["document_id"])
 
 $document = new Document($document_id)
 
 $library = $document->DocumentLibrary()
 
if(!checkRole($library->allow_access) &&! $library->allowAccess()) if(!checkRole($document->allow_access)) $d = new DocumentDownload()
 
$d document_id = $document_id
 
$d user_id = ($user) ? $user->user_id : 0
 
 $filepath = sanitizePath($library->getLibraryDirectory() . DIRECTORY_SEPARATOR . $document->file)
 
 $mimeType = DocumentHandler::getDocMimeType($document->file)
 
if(Fakoli::detectXSendFileSupport()) else
 
 $size = filesize($filepath)
 

Variable Documentation

◆ $d

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

Definition at line 66 of file show.inc.

◆ $document

$document = new Document($document_id)

Definition at line 38 of file show.inc.

◆ $document_id

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

Definition at line 36 of file show.inc.

◆ $filepath

$filepath = sanitizePath($library->getLibraryDirectory() . DIRECTORY_SEPARATOR . $document->file)

Definition at line 75 of file show.inc.

◆ $library

$library = $document->DocumentLibrary()

Definition at line 40 of file show.inc.

◆ $mimeType

$mimeType = DocumentHandler::getDocMimeType($document->file)

Definition at line 77 of file show.inc.

◆ $size

$size = filesize($filepath)

Definition at line 97 of file show.inc.

◆ document_id

$d document_id = $document_id

Definition at line 67 of file show.inc.

◆ else

Initial value:
{
$f = fopen($filepath, "r")
$f
Definition: download.inc:46
$filepath
Definition: show.inc:75

Definition at line 93 of file show.inc.

◆ user_id

$d user_id = ($user) ? $user->user_id : 0

Definition at line 68 of file show.inc.