date_default_timezone_set("Europe/Berlin");
function __autoload($className) { require_once "../libraries/".$className.".class.php"; }
require_once "../libraries/constants.inc.php";
require_once "../configuration.php";
require_once "../libraries/commonFunctions.inc.php";
require_once("../libraries/registerExceptions.inc.php");
function outputExceptionError($exception) {
if ($exception instanceof CustomException) {
$text = $exception->getString(); // $exception->getExtendedCode();
} else {
$text = $exception->getName().": [".$exception->getCode()."]: ".$exception->getMessage(); // $exception->getCode();
}
outputError($text);
}
function outputError($text) {
echo '
Fehler'.
''.
$text.'!
';
exit();
}
initialize_session();
if (isset($_GET["login"])) {
try {
getSingleton("UserManager")->login($_GET["login"], $_GET["password"]);
} catch (Exception $exception) {
outputExceptionError($exception);
}
}
try {
$entry = getSingleton("DocumentDirectory")->getEntry(preg_replace("/\/$/", "", ACTIVE_DOCUMENTS_DIRECTORY));
} catch (Exception $exception) {
outputExceptionError($exception);
outputError("Sie haben keinen Zugriff auf das Verzeichnis der fertigen Dokumente");
}
if (!$entry->isListable()) { outputError("Sie haben keinen Zugriff auf das Verzeichnis der fertigen Dokumente"); }
?>
Fertige Dokumente
123Plakat.de - Fertige Plakate
echo getSingleton("UserManager")->getActiveUser()->getName()." (".getSingleton("UserManager")->getActiveUser()->getLogin().") logged in.
";
$files = $entry->getFiles();
$files = array_reverse($files);
$pageSize = 50;
echo '';
for($pageNumber = 0; $pageNumber < (count($files) / $pageSize); $pageNumber ++) {
echo '
'.($pageNumber+1).'';
}
echo '
';
$offset = (isset($_GET['page'])) ? $_GET['page'] * $pageSize : 0;
$length = $pageSize;
$columnIndex = $columnCount;
foreach ($files as $file) {
$entryIndex ++;
if ($entryIndex < $offset or $entryIndex > ($offset + $length)) { continue; }
$parts = explode("/", $file->getPath());
$code = $parts[count($parts) - 2];
$fileName = str_replace('.xml', '.jpg', str_replace('/', '-', str_replace('-', '--', $file->getPath())));
echo '';
}
?>