Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
resizeimg.php File Reference

Go to the source code of this file.

Namespaces

 FDL
 

Functions

 rezizelocalimage ($img, $size, $basedest)
 
 getVaultPauth ($vid)
 
 verifyAccessByVaultId ($vid)
 
 getVaultCacheImage ($vid, $size)
 

Variables

const MAX_RESIZE_IMG_SIZE 512
 
 $size = isset($_GET["size"]) ? $_GET["size"] : null
 
if(!$size) if(!$size) if(!preg_match('/^H? else [0-9]+(px)?$/', $size))
 
if(!$img) $location = ''
 
 $dir = dirname($_SERVER["SCRIPT_NAME"])
 
 $ldir = DEFAULT_PUBDIR
 
 $path = $turl["path"]
 
if($path[0]== '/') $realfile = realpath($path)
 
if(!$realfile$itselfName = $_SERVER["SCRIPT_FILENAME"]
 
 $itselfdir = realpath(dirname($itselfName))
 
if(substr(dirname($realfile),
0, strlen($itselfdir))!=$itselfdir)
if(strtok(substr($realfile,
strlen($itselfdir)),
'/')=="var") 
$cmd = sprintf('file -ib %s', escapeshellarg($realfile))
 
 $tsize = getimagesize($realfile)
 
 $basedest = sprintf("/var/cache/image/%s-%s.png", $size, basename(str_replace("/", "_", $localimage)))
 
 $dest = DEFAULT_PUBDIR . $basedest
 

Function Documentation

getVaultCacheImage (   $vid,
  $size 
)

Definition at line 104 of file resizeimg.php.

getVaultPauth (   $vid)

Definition at line 41 of file resizeimg.php.

+ Here is the call graph for this function:

rezizelocalimage (   $img,
  $size,
  $basedest 
)

Definition at line 21 of file resizeimg.php.

verifyAccessByVaultId (   $vid)

Return true if access granted

Parameters
int$vidvault identifier
Returns
bool

Definition at line 79 of file resizeimg.php.

+ Here is the call graph for this function:

Variable Documentation

$basedest = sprintf("/var/cache/image/%s-%s.png", $size, basename(str_replace("/", "_", $localimage)))

Definition at line 230 of file resizeimg.php.

if (substr(dirname($realfile), 0, strlen($itselfdir))!=$itselfdir) if (strtok(substr($realfile, strlen($itselfdir)), '/')=="var") $cmd = sprintf('file -ib %s', escapeshellarg($realfile))

Definition at line 211 of file resizeimg.php.

$dest = DEFAULT_PUBDIR . $basedest

Definition at line 231 of file resizeimg.php.

$dir = dirname($_SERVER["SCRIPT_NAME"])

Definition at line 144 of file resizeimg.php.

$itselfdir = realpath(dirname($itselfName))

Definition at line 197 of file resizeimg.php.

if (!$realfile) $itselfName = $_SERVER["SCRIPT_FILENAME"]

Definition at line 196 of file resizeimg.php.

$ldir = DEFAULT_PUBDIR

Definition at line 145 of file resizeimg.php.

else $location = ''

Definition at line 143 of file resizeimg.php.

$path = $turl["path"]

Definition at line 172 of file resizeimg.php.

if ($path[0]== '/') $realfile = realpath($path)

Definition at line 176 of file resizeimg.php.

$size = isset($_GET["size"]) ? $_GET["size"] : null

Definition at line 110 of file resizeimg.php.

$tsize = getimagesize($realfile)

Definition at line 213 of file resizeimg.php.

if (file_exists($dest)&&filemtime($dest) >=filemtime(DEFAULT_PUBDIR."/$localimage")) else
Initial value:
{
if ($size[0] == 'H') {
$isize = intval(substr($size, 1));
$size = "H" . $isize;
} else {
$isize = intval($size);
}
}
$img = isset($_GET["img"]) ? $_GET["img"] : null
$size
Definition: resizeimg.php:110
global $_GET
Definition: wsh.php:37
$isize
const MAX_RESIZE_IMG_SIZE
Definition: resizeimg.php:20

Definition at line 127 of file resizeimg.php.

const MAX_RESIZE_IMG_SIZE 512

Definition at line 20 of file resizeimg.php.

← centre documentaire © anakeen