\n";
return;
} /* }}} */
function pageList($pageNumber, $totalPages, $baseURI, $params) { /* {{{ */
if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) {
return;
}
// Construct the basic URI based on the $_GET array. One could use a
// regular expression to strip out the pg (page number) variable to
// achieve the same effect. This seems to be less haphazard though...
$resultsURI = $baseURI;
$first=true;
foreach ($params as $key=>$value) {
// Don't include the page number in the basic URI. This is added in
// during the list display loop.
if (!strcasecmp($key, "pg")) {
continue;
}
if (is_array($value)) {
foreach ($value as $subvalue) {
$resultsURI .= ($first ? "?" : "&").$key."%5B%5D=".$subvalue;
$first = false;
}
}
else {
$resultsURI .= ($first ? "?" : "&").$key."=".$value;
}
$first = false;
}
echo "
";
echo "
";
for ($i = 1; $i <= $totalPages; $i++) {
if ($i == $pageNumber) echo "
";
$this->htmlEndPage();
add_log_line(" UI::exitError error=".$error." pagetitle=".$pagetitle);
exit;
} /* }}} */
// navigation flag is used for items links (navigation or selection)
function printFoldersTree($accessMode, $exclude, $folderID, $currentFolderID=-1, $navigation=false) { /* {{{ */
global $dms, $user, $form, $settings;
if ($settings->_expandFolderTree==2){
// folder completely open
$is_open=true;
}else if ($settings->_expandFolderTree==1 && $folderID==$settings->_rootFolderID ){
$is_open=true;
}else{
// open the tree until the current folder
$is_open=false;
if ($currentFolderID!=-1){
$currentFolder=$dms->getFolder($currentFolderID);
if (is_object($currentFolder)){
$parent=$currentFolder->getParent();
while (is_object($parent)){
if ($parent->getID()==$folderID){
$is_open=true;
break;
}
$parent=$parent->getParent();
}
}
}
}
$folder = $dms->getFolder($folderID);
if (!is_object($folder)) return;
$subFolders = $folder->getSubFolders();
$subFolders = LetoDMS_Core_DMS::filterAccess($subFolders, $user, M_READ);
if ($folderID == $settings->_rootFolderID) print "
\n";
if ($folderID == $settings->_rootFolderID) print "
\n";
} /* }}} */
function printTreeNavigation($folderid,$showtree){ /* {{{ */
global $settings;
?>
contentHeading("getImgPath("m.png")."\" border=0>", true);
$this->contentContainerStart();
$this->printFoldersTree(M_READ, -1, $settings->_rootFolderID, $folderid, true);
$this->contentContainerEnd();
}else{
$this->contentHeading("getImgPath("p.png")."\" border=0>", true);
$this->contentContainerStart();
$this->contentContainerEnd();
}
} /* }}} */
/**
* Output HTML Code for jumploader
*
* @param string $uploadurl URL where post data is send
* @param integer $folderid id of folder where document is saved
* @param integer $maxfiles maximum number of files allowed to upload
* @param array $fields list of post fields
*/
function printUploadApplet($uploadurl, $attributes, $maxfiles=0, $fields=array()){ /* {{{ */
global $settings;
?>