Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:1 to 26 of 26
function Get($File) {
// Ensure required properties are set
$FauxContext = 0;
if ($File->Name == "") $this->ErrorManager->AddError($FauxContext, $this->Name, "Get", "You must supply a file name.", "", 0);
if ($File->Path == "") $this->ErrorManager->AddError($FauxContext, $this->Name, "Get", "You must supply a file path.", "", 0);
if ($this->ErrorManager->ErrorCount == 0) {
$File->Extension = $this->FileExtension($File);
$FilePath = $this->FilePath($File);
$FileHandle = @fopen($FilePath, "r");
if (!$FileHandle) {
$this->ErrorManager->AddError($FauxContext, $this->Name, "Get", "The file could not be opened.", $FilePath, 0);
} else {
$File->Size = filesize($FilePath);
$File->Body = @fread($FileHandle, $File->Size);
if (!$File->Body) $this->ErrorManager->AddError($FauxContext, $this->Name, "Get", "The file could not be read.", "", 0);
@fclose($FileHandle);
}
}
return $this->ErrorManager->Iif($File, false);
}function Get($File) {
// Ensure required properties are set
if ($File->Name == "") {
echo("You must supply a file name.");
die();
}
if ($File->Path == "") {
echo("You must supply a file path.");
die();
}
$File->Extension = $this->FileExtension($File);
$FilePath = $this->FilePath($File);
$FileHandle = fopen($FilePath, "r");
if (!$FileHandle) {
echo("The file could not be opened.");
die();
} else {
$File->Size = filesize($FilePath);
$File->Body = fread($FileHandle, $File->Size);
if (!$File->Body) {
echo("The file could not be read.");
fclose($FileHandle);
die();
}
}
return $File;
}function FormatDisplayedItem($ItemID, $FileName, $FileSize, $HandlerMethod, &$Params, $Config) {
$FolderPath = substr($Config->CurrentBrowsingDirectory, strlen($Config->CurrentWorkingDirectory)+1,(strlen($Config->CurrentBrowsingDirectory)-strlen($Config->CurrentWorkingDirectory)+1));function FormatDisplayedItem($ItemID, $FileName, $FileSize, $HandlerMethod, &$Params, $Config) {
echo("CurrentWorkingDirectory: " . $Config->CurrentWorkingDirectory);
echo("<br />CurrentBrowsingDirectory: " . $Config->CurrentBrowsingDirectory);
$FolderPath = substr($Config->CurrentBrowsingDirectory, strlen($Config->CurrentWorkingDirectory)+1,(strlen($Config->CurrentBrowsingDirectory)-strlen($Config->CurrentWorkingDirectory)+1));
echo("<br />FolderPath: " . $FolderPath);$this->CurrentWorkingDirectory = "/home/www/ghettonesna.org/htdocs/gallery";
1 to 26 of 26