diff --git a/views/blue/class.AddDocument.php b/views/blue/class.AddDocument.php new file mode 100644 index 000000000..e788d718d --- /dev/null +++ b/views/blue/class.AddDocument.php @@ -0,0 +1,291 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AddDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $enablelargefileupload = $this->params['enablelargefileupload']; + $strictformcheck = $this->params['strictformcheck']; + $dropfolderdir = $this->params['dropfolderdir']; + $folderid = $folder->getId(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); + +?> + + +contentHeading(getMLText("add_document")); + $this->contentContainerStart(); + + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $folder->getApproversList(); + ?> + + + + + + + + + +
+ contentSubHeading(getMLText("document_infos")); ?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_document, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + + +
:
:
: +
+ + +
:printCategoryChooser("form1");?>
:printSequenceChooser($folder->getDocuments());?>
getName()); ?>printAttributeEditField($attrdef, '') ?>
: +
+ printDateChooser(-1, "exp");?> +
+ + contentSubHeading(getMLText("version_info")); ?> + + + + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + +
:
: + +
    +
  1. +
+
:printDropFolderChooser("form1");?>
:
getName()); ?>printAttributeEditField($attrdef, '', 'attributes_version') ?>
+ + contentSubHeading(getMLText("assign_reviewers")); ?> + +
:
+
+
    +getMandatoryReviewers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
  • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())."
  • "; + else print "
  • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())."
  • "; + } +?> +
+
+
:
+
+
    +getID()) $mandatory=true; + + if ($mandatory) print "
  • ".htmlspecialchars($grp->getName())."
  • "; + else print "
  • ".htmlspecialchars($grp->getName())."
  • "; + } + ?> +
+
+ + contentSubHeading(getMLText("assign_approvers")); ?> + +
:
+
+
    +getMandatoryApprovers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
  • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + else print "
  • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + } +?> +
+
+
:
+
+
    +getID()) $mandatory=true; + + if ($mandatory) print "
  • ".htmlspecialchars($grp->getName()); + else print "
  • ".htmlspecialchars($grp->getName()); + + } + ?> +
+
+ +

+

">

+
+contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.AddEvent.php b/views/blue/class.AddEvent.php new file mode 100644 index 000000000..ec9ee9c6c --- /dev/null +++ b/views/blue/class.AddEvent.php @@ -0,0 +1,93 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AddEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddEvent extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("add_event")); + $this->contentContainerStart(); +?> + + +
+ + + + + + + + + + + + + + + + + + + + +
:printDateChooser(-1, "from");?>
:printDateChooser(-1, "to");?>
:
:

">
+
+contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.AddFile.php b/views/blue/class.AddFile.php new file mode 100644 index 000000000..3ffe88e51 --- /dev/null +++ b/views/blue/class.AddFile.php @@ -0,0 +1,107 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AddFile view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddFile extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + +?> + +contentHeading(getMLText("linked_files")); + $this->contentContainerStart(); + +?> + + + + + + + +
getId()); ?>

+ +
+ + + + + + + + + + + + + + +
:
:
:
+ +

">

+
+contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.AddFile2.php b/views/blue/class.AddFile2.php new file mode 100644 index 000000000..1cc6e5ddf --- /dev/null +++ b/views/blue/class.AddFile2.php @@ -0,0 +1,53 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AddFile2 view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddFile2 extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + + $this->contentHeading(getMLText("linked_files")); + $this->contentContainerStart(); + + $this->printUploadApplet('../op/op.AddFile2.php', array('documentid'=>$document->getId()), 1, array('name'=>1, 'comment'=>1)); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.AddMultiDocument.php b/views/blue/class.AddMultiDocument.php new file mode 100644 index 000000000..9f427f153 --- /dev/null +++ b/views/blue/class.AddMultiDocument.php @@ -0,0 +1,69 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AddMultiDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddMultiDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); + +?> + + +contentHeading(getMLText("add_document")); + $this->contentContainerStart(); + + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $folder->getApproversList(); + + $this->printUploadApplet('../op/op.AddMultiDocument.php', array('folderid'=>$folder->getId())); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.AddSubFolder.php b/views/blue/class.AddSubFolder.php new file mode 100644 index 000000000..cdee15f7f --- /dev/null +++ b/views/blue/class.AddSubFolder.php @@ -0,0 +1,108 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AddSubFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddSubFolder extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("add_subfolder")); + $this->contentContainerStart(); +?> + + +
+ + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_folder, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + +
:
:
:printSequenceChooser($folder->getSubFolders());?>
getName()); ?>printAttributeEditField($attrdef, '') ?>

">
+
+contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.AdminTools.php b/views/blue/class.AdminTools.php new file mode 100644 index 000000000..62d3880c9 --- /dev/null +++ b/views/blue/class.AdminTools.php @@ -0,0 +1,74 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AdminTools view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AdminTools extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $logfileenable = $this->params['logfileenable']; + $enablefullsearch = $this->params['enablefullsearch']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentContainerStart(); +?> + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ApprovalSummary.php b/views/blue/class.ApprovalSummary.php new file mode 100644 index 000000000..8485a0735 --- /dev/null +++ b/views/blue/class.ApprovalSummary.php @@ -0,0 +1,197 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ApprovalSummary view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ApprovalSummary extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $db = $dms->getDB(); + + $this->htmlStartPage(getMLText("approval_summary")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + $this->contentHeading(getMLText("approval_summary")); + $this->contentContainerStart(); + + if (!$db->createTemporaryTable("ttstatid")) { + $this->exitError(getMLText("approval_summary"),getMLText("internal_error_exit")); + } + + // TODO: verificare scadenza + + // Get document list for the current user. + $approvalStatus = $user->getApprovalStatus(); + + // reverse order + $approvalStatus["indstatus"]=array_reverse($approvalStatus["indstatus"],true); + $approvalStatus["grpstatus"]=array_reverse($approvalStatus["grpstatus"],true); + + // Create a comma separated list of all the documentIDs whose information is + // required. + $dList = array(); + foreach ($approvalStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + $docCSV = ""; + foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; + } + + if (strlen($docCSV)>0) { + + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentStatus` ". + "LEFT JOIN `tblDocumentStatusLog` USING (`statusID`) ". + "LEFT JOIN `ttstatid` on `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && !$resArr) { + $this->exitError(getMLText("approval_summary"),getMLText("internal_error_exit")); + } + // Create an array to hold all of these results, and index the array by + // document id. This makes it easier to retrieve document ID information + // later on and saves us having to repeatedly poll the database every time + // new document information is required. + $docIdx = array(); + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + $docIdx[$res["id"]][$res["version"]] = $res; + } + } + + $iRev = array(); + $printheader = true; + foreach ($approvalStatus["indstatus"] as $st) { + + if (isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader = false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } + } + if (!$printheader) { + echo "\n
".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."
\n"; + }else{ + printMLText("no_approval_needed"); + } + + $this->contentContainerEnd(); + $this->contentHeading(getMLText("group_approval_summary")); + $this->contentContainerStart(); + + $printheader = true; + foreach ($approvalStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader = false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + if (!$printheader) { + echo "\n
".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."
\n"; + }else{ + printMLText("empty_notify_list"); + } + + $this->contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.ApproveDocument.php b/views/blue/class.ApproveDocument.php new file mode 100644 index 000000000..6139ad401 --- /dev/null +++ b/views/blue/class.ApproveDocument.php @@ -0,0 +1,174 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ApproveDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ApproveDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $latestContent = $document->getLatestContent(); + $approvals = $latestContent->getApprovalStatus(); + + foreach($approvals as $approval) { + if($approval['approveID'] == $_GET['approveid']) { + $approvalStatus = $approval; + break; + } + } + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("submit_approval")); +?> + + +contentContainerStart(); + + // Display the Approval form. + if ($approvalStatus['type'] == 0) { + if($approvalStatus["status"]!=0) { + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $indUser = $dms->getUser($approvalStatus["userID"]); + print ""; + print "
".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
"; + printApprovalStatusText($approvalStatus["status"]); + print "".htmlspecialchars($approvalStatus["comment"])."".$approvalStatus["date"]." - ". $indUser->getFullname() ."

\n"; + } +?> +
+ + + + +
: +
: +
+ + + + +
+
+"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printApprovalStatusText($approvalStatus["status"]); + print ""; + print "".htmlspecialchars($approvalStatus["comment"]).""; + $indUser = $dms->getUser($approvalStatus["userID"]); + print "".$approvalStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; + print "
\n"; + } + +?> +
+ + + + + + +
: +
: + +
+ + + + +
+
+contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.AttributeMgr.php b/views/blue/class.AttributeMgr.php new file mode 100644 index 000000000..9f1b445e6 --- /dev/null +++ b/views/blue/class.AttributeMgr.php @@ -0,0 +1,255 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for AttributeMgr view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AttributeMgr extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $attrdefs = $this->params['attrdefs']; + + $this->htmlStartPage(getMLText("admin_tools")); +?> + + +globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("attrdef_management")); + $this->contentContainerStart(); +?> + + + + + + + + +getID()."\" style=\"display : none;\">"; +?> +
: + +    +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+isUsed()) { +?> +
+ + + + " type="submit"> +
+ +

+ +
+ contentSubHeading("");?> +
+ + + + : + + +
+ : + +
+
+ : + +
+
+ : + +
+
+ : + +
+
+ : + +
+
+ : + +
+
+ "> +
+ + + + + + +contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.BackupTools.php b/views/blue/class.BackupTools.php new file mode 100644 index 000000000..d234d5dbe --- /dev/null +++ b/views/blue/class.BackupTools.php @@ -0,0 +1,195 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for BackupTools view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_BackupTools extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $contentdir = $this->params['contentdir']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->contentHeading(getMLText("backup_tools")); + $this->contentContainerStart(); + print getMLText("space_used_on_data_folder")." : ".formatted_size(dskspace($contentdir)); + $this->contentContainerEnd(); + + // versioning file creation //////////////////////////////////////////////////// + + $this->contentHeading(getMLText("versioning_file_creation")); + $this->contentContainerStart(); + print "

".getMLText("versioning_file_creation_warning")."

\n"; + + print "
"; + $this->printFolderChooser("form1",M_READWRITE); + print ""; + print "
\n"; + + $this->contentContainerEnd(); + + // archive creation //////////////////////////////////////////////////////////// + + $this->contentHeading(getMLText("archive_creation")); + $this->contentContainerStart(); + print "

".getMLText("archive_creation_warning")."

\n"; + + print "
"; + $this->printFolderChooser("form2",M_READWRITE); + print "".getMLText("human_readable"); + print ""; + print "
\n"; + + // list backup files + $this->contentSubHeading(getMLText("backup_list")); + + $print_header=true; + + $handle = opendir($contentdir); + $entries = array(); + while ($e = readdir($handle)){ + if (is_dir($contentdir.$e)) continue; + if (strpos($e,".tar.gz")==FALSE) continue; + $entries[] = $e; + } + closedir($handle); + + sort($entries); + $entries = array_reverse($entries); + + foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + $folderid=substr($entry,strpos($entry,"_")+1); + $folder=$dms->getFolder((int)$folderid); + + print "\n"; + print "\n"; + if (is_object($folder)) print "\n"; + else print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + if ($print_header) printMLText("empty_notify_list"); + else print "
".getMLText("folder")."".getMLText("creation_date")."".getMLText("file_size")."
".$entry."".htmlspecialchars($folder->getName())."".getMLText("unknown_id")."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry))."
\n"; + + $this->contentContainerEnd(); + + // dump creation /////////////////////////////////////////////////////////////// + + $this->contentHeading(getMLText("dump_creation")); + $this->contentContainerStart(); + print "

".getMLText("dump_creation_warning")."

\n"; + + print "
"; + print ""; + print "
\n"; + + // list backup files + $this->contentSubHeading(getMLText("dump_list")); + + $print_header=true; + + $handle = opendir($contentdir); + $entries = array(); + while ($e = readdir($handle)){ + if (is_dir($contentdir.$e)) continue; + if (strpos($e,".sql.gz")==FALSE) continue; + $entries[] = $e; + } + closedir($handle); + + sort($entries); + $entries = array_reverse($entries); + + foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + if ($print_header) printMLText("empty_notify_list"); + else print "
".getMLText("creation_date")."".getMLText("file_size")."
".$entry."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry))."
\n"; + + $this->contentContainerEnd(); + + // files deletion ////////////////////////////////////////////////////////////// + + $this->contentHeading(getMLText("files_deletion")); + $this->contentContainerStart(); + print "

".getMLText("files_deletion_warning")."

\n"; + + print "
"; + $this->printFolderChooser("form3",M_READWRITE); + print ""; + print "
\n"; + + $this->contentContainerEnd(); + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.BlueStyle.php b/views/blue/class.BlueStyle.php new file mode 100644 index 000000000..bba88d0ea --- /dev/null +++ b/views/blue/class.BlueStyle.php @@ -0,0 +1,1098 @@ +theme = $theme; + $this->params = $params; + } + + protected function htmlStartPage($title="", $bodyClass="") { /* {{{ */ + global $settings; + + if(file_exists("../themes/".$this->theme."/HTMLHead.html")) { + include("../themes/".$this->theme."/HTMLHead.html"); + } else { + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "theme."/style.css\"/>\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ''."\n"; + echo "".(strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."\n"; + echo "\n"; + echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; + } + } /* }}} */ + + protected function htmlEndPage() { /* {{{ */ + + $this->footNote(); + if(file_exists("../themes/".$this->theme."/HTMLFoot.html")) { + include("../themes/".$this->theme."/HTMLFoot.html"); + } else { + echo "\n\n"; + } + } /* }}} */ + + function footNote() { /* {{{ */ + global $settings; + + if ($settings->_printDisclaimer){ + echo "
".getMLText("disclaimer")."
"; + } + + if (isset($settings->_footNote) && strlen((string)$settings->_footNote)>0) { + echo "
".(string)$settings->_footNote."
"; + } + + return; + } /* }}} */ + + function contentStart() { /* {{{ */ + } /* }}} */ + + function contentEnd() { /* {{{ */ + } /* }}} */ + + function globalBanner() { /* {{{ */ + global $settings; + + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo "
". + (strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS"). + "
\n"; + echo "
 
\n". + "
\n"; + return; + } /* }}} */ + + function globalNavigation($folder=null) { /* {{{ */ + + global $settings, $user; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "
\n"; + echo "
". + (strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS"). + "
\n"; + echo "\n"; + echo "
".getMLText("signed_in_as")." ".htmlspecialchars($user->getFullName()). + " (".getMLText("sign_out").").
\n"; + echo "
 
\n". + "
\n"; + return; + } /* }}} */ + + function pageNavigation($pageTitle, $pageType=null, $extra=null) { /* {{{ */ + global $settings, $user; + + echo "
\n"; + // This spacer span is an awful hack, but it is the only way I know to + // get the spacer to match the mainheading content's size. + echo "".($settings->_titleDisplayHack ? $pageTitle : "")."\n"; + echo "
".$pageTitle."
\n"; + echo "
\n
\n"; + + if ($pageType!=null && strcasecmp($pageType, "noNav")) { + echo "
\n"; + switch ($pageType) { + case "view_folder": + $this->folderNavigationBar($extra); + break; + case "view_document": + $this->documentNavigationBar(); + break; + case "my_documents": + $this->myDocumentsNavigationBar(); + break; + case "my_account": + $this->accountNavigationBar(); + break; + case "admin_tools": + $this->adminToolsNavigationBar(); + break; + case "calendar"; + $this->calendarNavigationBar($extra); + break; + } + echo "
\n
\n"; + } + + return; + } /* }}} */ + + function folderNavigationBar($folder) { /* {{{ */ + + global $user, $settings; + + if (!is_object($folder) || strcasecmp(get_class($folder), "LetoDMS_Core_Folder")) { + echo "
    \n"; + echo "
\n"; + return; + } + $accessMode = $folder->getAccessMode($user); + $folderID = $folder->getID(); + echo "\n"; + return; + } /* }}} */ + + function documentNavigationBar() { /* {{{ */ + + global $user, $settings, $document; + + $accessMode = $document->getAccessMode($user); + $docid=".php?documentid=" . $document->getID(); + + echo "\n"; + return; + } /* }}} */ + + function accountNavigationBar() { /* {{{ */ + + global $settings,$user; + + echo "\n"; + return; + } /* }}} */ + + function myDocumentsNavigationBar() { /* {{{ */ + + echo "\n"; + return; + } /* }}} */ + + function adminToolsNavigationBar() { /* {{{ */ + + global $settings; + + echo "\n"; + return; + } /* }}} */ + + function calendarNavigationBar($d){ /* {{{ */ + + global $settings,$user; + + $ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2]; + + echo "\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 getMLText("results_page").": "; + for ($i = 1; $i <= $totalPages; $i++) { + if ($i == $pageNumber) echo "".$i." "; + else echo "".$i.""." "; + } + if ($totalPages>1) { + echo "".getMLText("all_pages").""." "; + } + echo "
"; + + return; + } /* }}} */ + + function contentContainer($content) { /* {{{ */ + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo $content; + echo "
\n
\n
\n"; + return; + } /* }}} */ + + function contentContainerStart() { /* {{{ */ + + echo "
\n"; + echo "
\n"; + echo "
\n"; + return; + } /* }}} */ + + function contentContainerEnd() { /* {{{ */ + + echo "
\n
\n
\n"; + return; + } /* }}} */ + + function contentHeading($heading, $noescape=false) { /* {{{ */ + + if($noescape) + echo "
".$heading."
\n"; + else + echo "
".htmlspecialchars($heading)."
\n"; + return; + } /* }}} */ + + function contentSubHeading($heading, $first=false) { /* {{{ */ + + echo "
".htmlspecialchars($heading)."
\n"; + return; + } /* }}} */ + + function getMimeIcon($fileType) { /* {{{ */ + // for extension use LOWER CASE only + $icons = array(); + $icons["txt"] = "txt.png"; + $icons["text"] = "txt.png"; + $icons["doc"] = "word.png"; + $icons["dot"] = "word.png"; + $icons["docx"] = "word.png"; + $icons["dotx"] = "word.png"; + $icons["rtf"] = "document.png"; + $icons["xls"] = "excel.png"; + $icons["xlt"] = "excel.png"; + $icons["xlsx"] = "excel.png"; + $icons["xltx"] = "excel.png"; + $icons["ppt"] = "powerpoint.png"; + $icons["pot"] = "powerpoint.png"; + $icons["pptx"] = "powerpoint.png"; + $icons["potx"] = "powerpoint.png"; + $icons["exe"] = "binary.png"; + $icons["html"] = "html.png"; + $icons["htm"] = "html.png"; + $icons["gif"] = "image.png"; + $icons["jpg"] = "image.png"; + $icons["jpeg"] = "image.png"; + $icons["bmp"] = "image.png"; + $icons["png"] = "image.png"; + $icons["tif"] = "image.png"; + $icons["tiff"] = "image.png"; + $icons["log"] = "log.png"; + $icons["midi"] = "midi.png"; + $icons["pdf"] = "pdf.png"; + $icons["wav"] = "sound.png"; + $icons["mp3"] = "sound.png"; + $icons["c"] = "source_c.png"; + $icons["cpp"] = "source_cpp.png"; + $icons["h"] = "source_h.png"; + $icons["java"] = "source_java.png"; + $icons["py"] = "source_py.png"; + $icons["tar"] = "tar.png"; + $icons["gz"] = "gz.png"; + $icons["7z"] = "gz.png"; + $icons["bz"] = "gz.png"; + $icons["bz2"] = "gz.png"; + $icons["tgz"] = "gz.png"; + $icons["zip"] = "gz.png"; + $icons["mpg"] = "video.png"; + $icons["avi"] = "video.png"; + $icons["tex"] = "tex.png"; + $icons["ods"] = "ooo_spreadsheet.png"; + $icons["ots"] = "ooo_spreadsheet.png"; + $icons["sxc"] = "ooo_spreadsheet.png"; + $icons["stc"] = "ooo_spreadsheet.png"; + $icons["odt"] = "ooo_textdocument.png"; + $icons["ott"] = "ooo_textdocument.png"; + $icons["sxw"] = "ooo_textdocument.png"; + $icons["stw"] = "ooo_textdocument.png"; + $icons["odp"] = "ooo_presentation.png"; + $icons["otp"] = "ooo_presentation.png"; + $icons["sxi"] = "ooo_presentation.png"; + $icons["sti"] = "ooo_presentation.png"; + $icons["odg"] = "ooo_drawing.png"; + $icons["otg"] = "ooo_drawing.png"; + $icons["sxd"] = "ooo_drawing.png"; + $icons["std"] = "ooo_drawing.png"; + $icons["odf"] = "ooo_formula.png"; + $icons["sxm"] = "ooo_formula.png"; + $icons["smf"] = "ooo_formula.png"; + $icons["mml"] = "ooo_formula.png"; + + $icons["default"] = "default.png"; + + $ext = strtolower(substr($fileType, 1)); + if (isset($icons[$ext])) { + return $icons[$ext]; + } + else { + return $icons["default"]; + } + } /* }}} */ + + function printDateChooser($defDate = -1, $varName) { /* {{{ */ + + if ($defDate == -1) + $defDate = mktime(); + $day = date("d", $defDate); + $month = date("m", $defDate); + $year = date("Y", $defDate); + + print " \n"; + print " \n"; + print ""; + } /* }}} */ + + function printSequenceChooser($objArr, $keepID = -1) { /* {{{ */ + if (count($objArr) > 0) { + $max = $objArr[count($objArr)-1]->getSequence() + 1; + $min = $objArr[0]->getSequence() - 1; + } + else { + $max = 1.0; + } + print ""; + } /* }}} */ + + function printDocumentChooser($formName) { /* {{{ */ + global $settings; + ?> + + "; + print ""; + print "  "; + } /* }}} */ + + function printFolderChooser($formName, $accessMode, $exclude = -1, $default = false) { /* {{{ */ + global $settings; + ?> + + getID() : "") ."\">"; + print "getName()) : "") ."\">"; + print "  "; + } /* }}} */ + + function printCategoryChooser($formName, $categories=array()) { /* {{{ */ + global $settings; +?> + +getId(); + $names[] = htmlspecialchars($cat->getName()); + } + } + print ""; + print ""; + print "  \"\""; + print "  "; + } /* }}} */ + + function printDropFolderChooser($formName, $dropfolderfile="") { /* {{{ */ + global $settings; +?> + +"; + print "  \"\""; + print "  "; + } /* }}} */ + + function printAttributeEditField($attrdef, $objvalue, $fieldname='attributes') { /* {{{ */ + if($valueset = $attrdef->getValueSetAsArray()) { + echo ""; + } else { + echo "getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />"; + } + } /* }}} */ + + function getImgPath($img) { /* {{{ */ + + if ( is_file("../styles/$this->theme/images/$img") ) { + return "../styles/$this->theme/images/$img"; + } + else if ( is_file("../styles/$this->theme/img/$img") ) { + return "../styles/$this->theme/img/$img"; + } + return "../out/images/$img"; + } /* }}} */ + + function printImgPath($img) { /* {{{ */ + print $this->getImgPath($img); + } /* }}} */ + + function exitError($pagetitle,$error) { /* {{{ */ + + $this->htmlStartPage($pagetitle); + $this->globalNavigation(); + + print "
"; + print htmlspecialchars($error); + print "
"; + + $this->htmlEndPage(); + + add_log_line(" $this->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"; + + print "
  • \n"; + + if (count($subFolders) > 0){ + print "printImgPath("minus.png"); + else $this->printImgPath("plus.png"); + print "\" border=0>\n"; + } + else{ + print "printImgPath("blank.png"); + print "\" border=0>\n"; + } + + if ($folder->getAccessMode($user) >= $accessMode) { + + if ($folderID != $currentFolderID){ + + if ($navigation) print ""; + else print "getName())) . "')\">"; + + }else print ""; + + if ($is_open) print "getImgPath("folder_opened.gif")."\" border=0 name=\"treeimg".$folderID."\">".htmlspecialchars($folder->getName()); + else print "getImgPath("folder_closed.gif")."\" border=0 name=\"treeimg".$folderID."\">".htmlspecialchars($folder->getName()); + + if ($folderID != $currentFolderID) print "\n"; + else print ""; + + } + else print "getImgPath("folder_closed.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n"; + + if ($is_open) print "
      \n"; + else print "\n"; + + if ($folderID == $settings->_rootFolderID) print "
    \n"; + } /* }}} */ + + function printTreeNavigation($folderid,$showtree){ /* {{{ */ + global $settings; + +?> + +"; + + if ($showtree==1){ + + print ""; + + $this->contentHeading("", true); + $this->contentContainerStart(); + $this->printFoldersTree(M_READ, -1, $settings->_rootFolderID, $folderid, true); + $this->contentContainerEnd(); + + }else{ + + print ""; + + $this->contentHeading("", true); + $this->contentContainerStart(); + $this->contentContainerEnd(); + } + + print ""; + } /* }}} */ + + /** + * 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; +?> + + + + + + + + + + + + + + + + + + +
    +

    +
    +

    +

    + diff --git a/views/blue/class.Calendar.php b/views/blue/class.Calendar.php new file mode 100644 index 000000000..55c262014 --- /dev/null +++ b/views/blue/class.Calendar.php @@ -0,0 +1,335 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Calendar view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Calendar extends LetoDMS_Blue_Style { + + function generateCalendarArrays() { /* {{{ */ + $this->monthNames = array( getMLText("january"), + getMLText("february"), + getMLText("march"), + getMLText("april"), + getMLText("may"), + getMLText("june"), + getMLText("july"), + getMLText("august"), + getMLText("september"), + getMLText("october"), + getMLText("november"), + getMLText("december") ); + + $this->dayNamesLong = array( getMLText("sunday"), + getMLText("monday"), + getMLText("tuesday"), + getMLText("wednesday"), + getMLText("thursday"), + getMLText("friday"), + getMLText("saturday") ); + + $this->dayNames = array(); + foreach ( $this->dayNamesLong as $dn ){ + $this->dayNames[] = substr($dn,0,2); + } + } /* }}} */ + + // Calculate the number of days in a month, taking into account leap years. + function getDaysInMonth($month, $year) { /* {{{ */ + if ($month < 1 || $month > 12) return 0; + + $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + $d = $daysInMonth[$month - 1]; + + if ($month == 2){ + + if ($year%4 == 0){ + + if ($year%100 == 0){ + + if ($year%400 == 0) $d = 29; + } + else $d = 29; + } + } + return $d; + } /* }}} */ + + // Adjust dates to allow months > 12 and < 0 and day<0 or day>days of the month + function adjustDate(&$day,&$month,&$year) { /* {{{ */ + $d=getDate(mktime(12,0,0, $month, $day, $year)); + $month=$d["mon"]; + $day=$d["mday"]; + $year=$d["year"]; + } /* }}} */ + + // Generate the HTML for a given month + function getMonthHTML($month, $year) { /* {{{ */ + if (!isset($this->monthNames)) $this->generateCalendarArrays(); + if (!isset($this->dayNames)) $this->generateCalendarArrays(); + + $startDay = $this->firstdayofweek; + + $day=1; + $this->adjustDate($day,$month,$year); + + $daysInMonth = $this->getDaysInMonth($month, $year); + $date = getdate(mktime(12, 0, 0, $month, 1, $year)); + + $first = $date["wday"]; + $monthName = $monthNames[$month - 1]; + + $s = "\n"; + + $s .= "\n"; + $s .= "\n"; ; + $s .= "\n"; + + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + + // We need to work out what date to start at so that the first appears in the correct column + $d = $startDay + 1 - $first; + while ($d > 1) $d -= 7; + + // Make sure we know when today is, so that we can use a different CSS style + $today = getdate(time()); + + while ($d <= $daysInMonth) + { + $s .= "\n"; + + for ($i = 0; $i < 7; $i++){ + + $class = ($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "today" : ""; + $s .= "\n"; + $d++; + } + $s .= "\n"; + } + + $s .= "
    ".$monthName."
    " . $this->dayNames[($startDay)%7] . "" . $this->dayNames[($startDay+1)%7] . "" . $this->dayNames[($startDay+2)%7] . "" . $this->dayNames[($startDay+3)%7] . "" . $this->dayNames[($startDay+4)%7] . "" . $this->dayNames[($startDay+5)%7] . "" . $this->dayNames[($startDay+6)%7] . "
    "; + + if ($d > 0 && $d <= $daysInMonth){ + + $s .= "".$d.""; + } + else $s .= " "; + + $s .= "
    \n"; + + return $s; + } /* }}} */ + + function printYearTable($year) { /* {{{ */ + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
    " . $this->getMonthHTML(1 , $year) ."" . $this->getMonthHTML(2 , $year) ."" . $this->getMonthHTML(3 , $year) ."" . $this->getMonthHTML(4 , $year) ."
    " . $this->getMonthHTML(5 , $year) ."" . $this->getMonthHTML(6 , $year) ."" . $this->getMonthHTML(7 , $year) ."" . $this->getMonthHTML(8 , $year) ."
    " . $this->getMonthHTML(9 , $year) ."" . $this->getMonthHTML(10, $year) ."" . $this->getMonthHTML(11, $year) ."" . $this->getMonthHTML(12, $year) ."
    \n"; + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $mode = $this->params['mode']; + $year = $this->params['year']; + $month = $this->params['month']; + $day = $this->params['day']; + $this->firstdayofweek = $this->params['firstdayofweek']; + + $this->adjustDate($day,$month,$year); + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("calendar"), "calendar",array($day,$month,$year)); + + if ($mode=="y"){ + + $this->contentHeading(getMLText("year_view")." : ".$year); + $this->contentContainerStart(); + + print "getImgPath("m.png")."\" border=0> "; + print "getImgPath("c.png")."\" border=0> "; + print "getImgPath("p.png")."\" border=0> "; + + $this->printYearTable($year); + $this->contentContainerEnd(); + + }else if ($mode=="m"){ + + if (!isset($dayNamesLong)) generateCalendarArrays(); + if (!isset($monthNames)) generateCalendarArrays(); + + $this->contentHeading(getMLText("month_view")." : ".$monthNames[$month-1]. " ".$year); + $this->contentContainerStart(); + + print "getImgPath("m.png")."\" border=0> "; + print "getImgPath("c.png")."\" border=0> "; + print "getImgPath("p.png")."\" border=0> "; + + $days=getDaysInMonth($month, $year); + $today = getdate(time()); + + $events = getEventsInInterval(mktime(0,0,0, $month, 1, $year), mktime(23,59,59, $month, $days, $year)); + + echo "\n"; + + for ($i=1; $i<=$days; $i++){ + + // separate weeks + $date = getdate(mktime(12, 0, 0, $month, $i, $year)); + if (($date["wday"]==$this->firstdayofweek) && ($i!=1)) + echo "\n"; + + // highlight today + $class = ($year == $today["year"] && $month == $today["mon"] && $i == $today["mday"]) ? "todayHeader" : "header"; + + echo ""; + echo ""; + echo ""; + + if ($class=="todayHeader") $class="today"; + else $class=""; + + $xdate=mktime(0, 0, 0, $month, $i, $year); + foreach ($events as $event){ + if (($event["start"]<=$xdate)&&($event["stop"]>=$xdate)){ + + if (strlen($event['name']) > 25) $event['name'] = substr($event['name'], 0, 22) . "..."; + print ""; + }else{ + print ""; + } + } + + echo "\n"; + } + echo "
     
    ".$i."".$dayNamesLong[$date["wday"]]."".htmlspecialchars($event['name'])." 
    \n"; + + $this->contentContainerEnd(); + + }else{ + + if (!isset($dayNamesLong)) generateCalendarArrays(); + if (!isset($monthNames)) generateCalendarArrays(); + + // get the week interval - TODO: $GET + $datestart=getdate(mktime(0,0,0,$month,$day,$year)); + while($datestart["wday"]!=$this->firstdayofweek){ + $datestart=getdate(mktime(0,0,0,$datestart["mon"],$datestart["mday"]-1,$datestart["year"])); + } + + $datestop=getdate(mktime(23,59,59,$month,$day,$year)); + if ($datestop["wday"]==$this->firstdayofweek){ + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); + } + while($datestop["wday"]!=$this->firstdayofweek){ + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); + } + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]-1,$datestop["year"])); + + $starttime=mktime(0,0,0,$datestart["mon"],$datestart["mday"],$datestart["year"]); + $stoptime=mktime(23,59,59,$datestop["mon"],$datestop["mday"],$datestop["year"]); + + $today = getdate(time()); + $events = getEventsInInterval($starttime,$stoptime); + + $this->contentHeading(getMLText("week_view")." : ".getReadableDate(mktime(12, 0, 0, $month, $day, $year))); + $this->contentContainerStart(); + + print "getImgPath("m.png")."\" border=0> "; + print "getImgPath("c.png")."\" border=0> "; + print "getImgPath("p.png")."\" border=0> "; + + echo "\n"; + + for ($i=$starttime; $i<$stoptime; $i += 86400){ + + $date = getdate($i); + + // for daylight saving time TODO: could be better + if ( ($i!=$starttime) && ($prev_day==$date["mday"]) ){ + $i += 3600; + $date = getdate($i); + } + + // highlight today + $class = ($date["year"] == $today["year"] && $date["mon"] == $today["mon"] && $date["mday"] == $today["mday"]) ? "todayHeader" : "header"; + + echo ""; + echo ""; + echo ""; + + if ($class=="todayHeader") $class="today"; + else $class=""; + + foreach ($events as $event){ + if (($event["start"]<=$i)&&($event["stop"]>=$i)){ + print ""; + }else{ + print ""; + } + } + + echo "\n"; + + $prev_day=$date["mday"]; + } + echo "
    ".getReadableDate($i)."".$dayNamesLong[$date["wday"]]."".htmlspecialchars($event['name'])." 
    \n"; + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.Categories.php b/views/blue/class.Categories.php new file mode 100644 index 000000000..08db984ee --- /dev/null +++ b/views/blue/class.Categories.php @@ -0,0 +1,152 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Categories view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Categories extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); +?> + + +contentHeading(getMLText("global_document_categories")); + $this->contentContainerStart(); +?> + + + + + + + +getID()."\" style=\"display : none;\">"; +?> +
    : + +    +
    + + + + + + + + + + + +
    +isUsed()) { +?> +
    + + + + " type="submit"> +
    + +

    + +
    + contentSubHeading("");?> +
    : +
    + + + +   + "> +
    +
    + + + + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.CategoryChooser.php b/views/blue/class.CategoryChooser.php new file mode 100644 index 000000000..9a7dcce89 --- /dev/null +++ b/views/blue/class.CategoryChooser.php @@ -0,0 +1,97 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for CategoryChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_CategoryChooser extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $form = $this->params['form']; + $selcats = $this->params['selcats']; + + $this->htmlStartPage(getMLText("choose_target_category")); + $this->globalBanner(); + $this->pageNavigation(getMLText("choose_target_category")); +?> + + + +contentContainerStart(); + $selcatsarr = explode(',', $selcats); +?> + + + + + + + + + + +
    : + +
    + ">    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ChangePassword.php b/views/blue/class.ChangePassword.php new file mode 100644 index 000000000..4459d4bab --- /dev/null +++ b/views/blue/class.ChangePassword.php @@ -0,0 +1,74 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ChangePassword view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ChangePassword extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $referuri = $this->params['referuri']; + $hash = $this->params['hash']; + + $this->htmlStartPage(getMLText("change_password"), "login"); + $this->globalBanner(); + $this->pageNavigation(getMLText("change_password")); + $this->contentContainerStart(); +?> +
    +"; + } + if ($hash) { + echo ""; + } +?> + + + + + + + + + + + + +
     
    ">
    +
    +contentContainerEnd(); ?> + +

    +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.CreateIndex.php b/views/blue/class.CreateIndex.php new file mode 100644 index 000000000..8d31693bd --- /dev/null +++ b/views/blue/class.CreateIndex.php @@ -0,0 +1,49 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for CreateIndex view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_CreateIndex extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText('admin_tools'), 'admin_tools'); + $this->contentHeading(getMLText("create_fulltext_index")); + $this->contentContainerStart(); + + echo '

    '.getMLText('create_fulltext_index_warning').'

    '; + echo ''.getMLText('confirm_create_fulltext_index').''; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> + diff --git a/views/blue/class.DefaultKeywords.php b/views/blue/class.DefaultKeywords.php new file mode 100644 index 000000000..b2e9ecf8f --- /dev/null +++ b/views/blue/class.DefaultKeywords.php @@ -0,0 +1,204 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for DefaultKeywords view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DefaultKeywords extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $selcategory = $this->params['selcategory']; + +$this->htmlStartPage(getMLText("admin_tools")); +$this->globalNavigation(); +$this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + + +contentHeading(getMLText("global_default_keywords")); + $this->contentContainerStart(); +?> + + + + + + + +getOwner(); + if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue; + + print " + +
    : + +    + getID()."\" style=\"display : none;\">"; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + " type="submit" title=""> +
    +
    + contentSubHeading("");?> +
    : +
    + + + +   + "> +
    +
    + contentSubHeading("");?> +
    : + getKeywordLists(); + if (count($lists) == 0) + print getMLText("no_default_keywords"); + else + foreach ($lists as $list) { + ?> +
    + + + "> + + "> + " style="border: 0px;"> + +
    +
    + + + "> + + " style="border: 0px;"> +
    +
    + +
    "> + + + +
    +
    + + + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.DocumentAccess.php b/views/blue/class.DocumentAccess.php new file mode 100644 index 000000000..634e0dfb1 --- /dev/null +++ b/views/blue/class.DocumentAccess.php @@ -0,0 +1,283 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for DocumentAccess view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentAccess extends LetoDMS_Blue_Style { + + function printAccessModeSelection($defMode) { + print "\n"; + } + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $document = $this->params['document']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + + +contentHeading(getMLText("edit_document_access")); + $this->contentContainerStart(); + + if ($user->isAdmin()) { + + $this->contentSubHeading(getMLText("set_owner")); +?> +
    + + + + : + "> +
    +contentSubHeading(getMLText("access_inheritance")); + + if ($document->inheritsAccess()) { + printMLText("inherits_access_msg"); +?> +

    +

    + + + + + "> +
    +
    + + + + + "> +
    +

    +contentContainerEnd(); + $this->htmlEndPage(); + return; +} +?> +
    + + + + "> +
    +getAccessList(); + + $this->contentSubHeading(getMLText("default_access")); +?> +
    + + + + printAccessModeSelection($document->getDefaultAccess()); ?> + "> +
    + +contentSubHeading(getMLText("edit_existing_access")); + + if (count($accessList["users"]) != 0 || count($accessList["groups"]) != 0) { + + print ""; + + /* memorÑ—ze users with access rights */ + $memusers = array(); + foreach ($accessList["users"] as $userAccess) { + $userObj = $userAccess->getUser(); + $memusers[] = $userObj->getID(); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + /* memorize groups with access rights */ + $memgroups = array(); + foreach ($accessList["groups"] as $groupAccess) { + $groupObj = $groupAccess->getGroup(); + $memgroups[] = $groupObj->getID(); + $mode = $groupAccess->getMode(); + print ""; + print ""; + print ""; + print ""; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + } + + print "
    ". htmlspecialchars($userObj->getFullName()) . "\n"; + print "
    \n"; + $this->printAccessModeSelection($userAccess->getMode()); + print "
    \n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("save")." "; + print "\n"; + print "
    \n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
    \n"; + print "
    ". htmlspecialchars($groupObj->getName()) . "
    "; + $this->printAccessModeSelection($groupAccess->getMode()); + print "\n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">"; + print ""; + print "getID()."\">"; + print "".getMLText("save")." "; + print "\n"; + print "
    \n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
    "; + print "

    "; + } +?> +
    + + + + + + + + + + + + + + + + + + + +
    : + +
    : + +
    : +printAccessModeSelection(M_READ); +?> +
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.DocumentChooser.php b/views/blue/class.DocumentChooser.php new file mode 100644 index 000000000..218ba5143 --- /dev/null +++ b/views/blue/class.DocumentChooser.php @@ -0,0 +1,154 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for DocumentChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentChooser extends LetoDMS_Blue_Style { + var $user; + var $form; + + function printTree($path, $level = 0) { /* {{{ */ + $folder = $path[$level]; + $subFolders = LetoDMS_Core_DMS::filterAccess($folder->getSubFolders(), $this->user, M_READ); + $documents = LetoDMS_Core_DMS::filterAccess($folder->getDocuments(), $this->user, M_READ); + + if ($level+1 < count($path)) + $nextFolderID = $path[$level+1]->getID(); + else + $nextFolderID = -1; + + if ($level == 0) { + print "
      \n"; + } + print "
    • \n"; + print "printImgPath("minus.png"); + else if (count($subFolders) + count($documents) > 0) $this->printImgPath("minus.png"); + else $this->printImgPath("blank.png"); + print "\" border=0>\n"; + if ($folder->getAccessMode($this->user) >= M_READ) { + print "getImgPath("folder_opened.gif")."\" border=0>".htmlspecialchars($folder->getName())."\n"; + } + else + print "getImgPath("folder_opened.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n"; + print "
    • \n"; + + print "\n"; + if ($level == 0) { + print "
    \n"; + } + + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $this->user = $this->params['user']; + $folder = $this->params['folder']; + $this->form = $this->params['form']; + + $this->htmlStartPage(getMLText("choose_target_document")); + $this->globalBanner(); + $this->pageNavigation(getMLText("choose_target_document")); +?> + + + +"; + $this->contentContainerStart(); + echo "
    "; + $this->contentContainerEnd(); + $this->contentContainerStart(); + $this->printTree($folder->getPath()); + $this->contentContainerEnd(); +?> + + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.DocumentNotify.php b/views/blue/class.DocumentNotify.php new file mode 100644 index 000000000..7e8f786e8 --- /dev/null +++ b/views/blue/class.DocumentNotify.php @@ -0,0 +1,154 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for DocumentNotify view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentNotify extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $sortusersinlist = $this->params['sortusersinlist']; + + $notifyList = $document->getNotifyList(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + +contentHeading(getMLText("edit_existing_notify")); + $this->contentContainerStart(); + + $userNotifyIDs = array(); + $groupNotifyIDs = array(); + + print "\n"; + if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) { + print ""; + } + else { + foreach ($notifyList["users"] as $userNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print ""; + }else print ""; + print ""; + $userNotifyIDs[] = $userNotify->getID(); + } + foreach ($notifyList["groups"] as $groupNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print ""; + }else print ""; + print ""; + $groupNotifyIDs[] = $groupNotify->getID(); + } + } + print "
    ".getMLText("empty_notify_list")."
    " . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "getID() . "&action=delnotify&userid=".$userNotify->getID()."\">".getMLText("delete")."
    " . htmlspecialchars($groupNotify->getName()) . "getID() . "&action=delnotify&groupid=".$groupNotify->getID()."\">".getMLText("delete")."
    \n"; + +?> +
    + +
    + + + + + + + + + + + + + + +
    : + +
    : + +
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.DocumentVersionDetail.php b/views/blue/class.DocumentVersionDetail.php new file mode 100644 index 000000000..8111405a8 --- /dev/null +++ b/views/blue/class.DocumentVersionDetail.php @@ -0,0 +1,260 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for DocumentVersionDetail view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentVersionDetail extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + $viewonlinefiletypes = $this->params['viewonlinefiletypes']; + $enableversionmodification = $this->params['enableversionmodification']; + + $latestContent = $document->getLatestContent(); + $status = $version->getStatus(); + $reviewStatus = $version->getReviewStatus(); + $approvalStatus = $version->getApprovalStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("document_infos")); + $this->contentContainerStart(); + +?> + + + + + + + + + + + + + + + + + +isLocked()) { + $lockingUser = $document->getLockingUser(); +?> + + + + + + +
    : +getOwner(); + print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; +?> +
    :getComment());?>
    :getDate()); ?>
    :getKeywords());?>
    : $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
    +contentContainerEnd(); + + // verify if file exists + $file_exists=file_exists($dms->contentDir . $version->getPath()); + + $this->contentHeading(getMLText("details_version", array ("version" => $version->getVersion()))); + $this->contentContainerStart(); + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + print "\n"; + print "\n"; + print "\n"; + + print "\n"; + + print ""; + print ""; + print ""; + print "\n
    ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
    ".$version->getVersion()."
      \n"; + print "
    • ".$version->getOriginalFileName()."
    • \n"; + + if ($file_exists) print "
    • ". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."
    • "; + else print "
    • ".getMLText("document_deleted")."
    • "; + + $updatingUser = $version->getUser(); + print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; + print "
    • ".getLongReadableDate($version->getDate())."
    • "; + print "
    ".htmlspecialchars($version->getComment())."".getOverallStatusText($status["status"]).""; + + //if (($document->getAccessMode($user) >= M_READWRITE)) { + print ""; + } + else { + print " "; + } + + echo "
    \n"; + + + print "\n"; + + if (is_array($reviewStatus) && count($reviewStatus)>0) { + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + + foreach ($reviewStatus as $r) { + $required = null; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getName()); + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } + } + + if (is_array($approvalStatus) && count($approvalStatus)>0) { + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + + foreach ($approvalStatus as $a) { + $required = null; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = $dms->getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + break; + case 1: // Approver is a group. + $required = $dms->getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getName()); + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } + } + + print "
    \n"; + $this->contentSubHeading(getMLText("reviewers")); + print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$r["date"]."
    • "; + $updateUser = $dms->getUser($r["userID"]); + print "
    • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'")."
    ".$r["comment"]."".getReviewStatusText($r["status"])."
    \n"; + $this->contentSubHeading(getMLText("approvers")); + print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$a["date"]."
    • "; + $updateUser = $dms->getUser($a["userID"]); + print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."
    ".$a["comment"]."".getApprovalStatusText($a["status"])."
    \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.DropFolderChooser.php b/views/blue/class.DropFolderChooser.php new file mode 100644 index 000000000..86400d926 --- /dev/null +++ b/views/blue/class.DropFolderChooser.php @@ -0,0 +1,70 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for CategoryChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DropFolderChooser extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $dropfolderfile = $this->params['dropfolderfile']; + $form = $this->params['form']; + $dropfolderdir = $this->params['dropfolderdir']; + + $this->htmlStartPage(getMLText("choose_target_file")); + $this->globalBanner(); + $this->pageNavigation(getMLText("choose_target_file")); +?> + + +contentContainerStart(); + + $dir = $dropfolderdir.'/'.$user->getLogin(); + if(is_dir($dir)) { + $d = dir($dir); + echo "\n"; + while (false !== ($entry = $d->read())) { + if($entry != '..' && $entry != '.') { + if(!is_dir($entry)) { + echo "\n"; + } + } + } + echo "
    ".$entry."".filesize($dir.'/'.$entry)."
    \n"; + } + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.EditAttributes.php b/views/blue/class.EditAttributes.php new file mode 100644 index 000000000..84a23ac73 --- /dev/null +++ b/views/blue/class.EditAttributes.php @@ -0,0 +1,76 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for EditAttributes view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditAttributes extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + $attrdefs = $this->params['attrdefs']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + + $this->contentHeading(getMLText("edit_attributes")); + $this->contentContainerStart(); +?> +
    + + + + + + + + + + + + + +
    getName()); ?>printAttributeEditField($attrdef, $version->getAttributeValue($attrdef)) ?>

    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.EditComment.php b/views/blue/class.EditComment.php new file mode 100644 index 000000000..ef9565f42 --- /dev/null +++ b/views/blue/class.EditComment.php @@ -0,0 +1,90 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for EditComment view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditComment extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + +contentHeading(getMLText("edit_comment")); + $this->contentContainerStart(); +?> +
    + + + + + + + + + + + +
    :

    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.EditDocument.php b/views/blue/class.EditDocument.php new file mode 100644 index 000000000..23efafa30 --- /dev/null +++ b/views/blue/class.EditDocument.php @@ -0,0 +1,132 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for EditDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $attrdefs = $this->params['attrdefs']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + +contentHeading(getMLText("edit_document_props")); + $this->contentContainerStart(); +?> +
    + + + + + + + + + + + + + + + + + + +getAccessMode($user) > M_READ) { + print ""; + print ""; + print ""; + } + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + +
    :
    :
    : +
    + + +
    :printCategoryChooser("form1", $document->getCategories());?>
    " . getMLText("sequence") . ":"; + $this->printSequenceChooser($folder->getDocuments(), $document->getID()); + print "
    getName()); ?>printAttributeEditField($attrdef, $document->getAttributeValue($attrdef)) ?>

    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.EditEvent.php b/views/blue/class.EditEvent.php new file mode 100644 index 000000000..04c93482f --- /dev/null +++ b/views/blue/class.EditEvent.php @@ -0,0 +1,101 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for EditEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditEvent extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $event = $this->params['event']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("edit_event")); + $this->contentContainerStart(); +?> + + +
    + + + "> + + + + + + + + + + + + + + + + + + + + + +
    :printDateChooser($event["start"], "from");?>
    :printDateChooser($event["stop"], "to");?>
    :" size="60">
    :

    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.EditFolder.php b/views/blue/class.EditFolder.php new file mode 100644 index 000000000..7a012889f --- /dev/null +++ b/views/blue/class.EditFolder.php @@ -0,0 +1,116 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for EditFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditFolder extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $attrdefs = $this->params['attrdefs']; + $rootfolderid = $this->params['rootfolderid']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); +?> + + + +contentHeading(getMLText("edit_folder_props")); + $this->contentContainerStart(); +?> +
    + + + + + + + + + + + +getID() == $rootfolderid) ? false : $folder->getParent(); + if ($parent && $parent->getAccessMode($user) > M_READ) { + print ""; + print ""; + print "\n"; + } + + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + +
    :
    :
    " . getMLText("sequence") . ":"; + $this->printSequenceChooser($parent->getSubFolders(), $folder->getID()); + print "
    getName()); ?>printAttributeEditField($attrdef, $folder->getAttributeValue($attrdef)) ?>
    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.EditUserData.php b/views/blue/class.EditUserData.php new file mode 100644 index 000000000..5c08b0bce --- /dev/null +++ b/views/blue/class.EditUserData.php @@ -0,0 +1,127 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for EditUserData view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditUserData extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $enableuserimage = $this->params['enableuserimage']; + $passwordstrength = $this->params['passwordstrength']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("edit_user_details")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + +?> + + + +contentHeading(getMLText("edit_user_details")); + $this->contentContainerStart(); +?> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
     
    :
    :
    :
    :
    : +hasImage()) + print ""; + else printMLText("no_user_image"); +?> +
    :
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.FolderAccess.php b/views/blue/class.FolderAccess.php new file mode 100644 index 000000000..ab2f28383 --- /dev/null +++ b/views/blue/class.FolderAccess.php @@ -0,0 +1,275 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for FolderAccess view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_FolderAccess extends LetoDMS_Blue_Style { + function printAccessModeSelection($defMode) { + print "\n"; + } + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $rootfolderid = $this->params['rootfolderid']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); +?> + + + +contentHeading(getMLText("edit_folder_access")); + $this->contentContainerStart(); + + if ($user->isAdmin()) { + + $this->contentSubHeading(getMLText("set_owner")); +?> +
    + + + + : + "> +
    + getID() != $rootfolderid && $folder->getParent()){ + + $this->contentSubHeading(getMLText("access_inheritance")); + + if ($folder->inheritsAccess()) { + printMLText("inherits_access_msg"); +?> +

    +

    + + + + + "> +
    +
    + + + + + "> +
    +

    +contentContainerEnd(); + $this->htmlEndPage(); + return; + } +?> +
    + + + + "> +
    +getAccessList(); + + $this->contentSubHeading(getMLText("default_access")); +?> +
    + + + + printAccessModeSelection($folder->getDefaultAccess()); ?> + "> +
    + +contentSubHeading(getMLText("edit_existing_access")); + + if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) { + + print ""; + + foreach ($accessList["users"] as $userAccess) { + $userObj = $userAccess->getUser(); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + foreach ($accessList["groups"] as $groupAccess) { + $groupObj = $groupAccess->getGroup(); + $mode = $groupAccess->getMode(); + print ""; + print ""; + print ""; + print ""; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">"; + print ""; + print "getID()."\">"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + } + + print "
    ". htmlspecialchars($userObj->getFullName()) . "
    \n"; + $this->printAccessModeSelection($userAccess->getMode()); + print "\n"; + print "".getMLText("save")." "; + print "\n"; + print "
    \n"; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
    \n"; + print "
    ". htmlspecialchars($groupObj->getName()) . "
    "; + $this->printAccessModeSelection($groupAccess->getMode()); + print "\n"; + print "".getMLText("save")." "; + print "\n"; + print "
    \n"; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
    "; + print "

    "; + } +?> +
    + + + + + + + + + + + + + + + + + + + +
    : + +
    : + +
    : +printAccessModeSelection(M_READ); +?> +
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.FolderChooser.php b/views/blue/class.FolderChooser.php new file mode 100644 index 000000000..27aa5ab17 --- /dev/null +++ b/views/blue/class.FolderChooser.php @@ -0,0 +1,105 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for FolderChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_FolderChooser extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $mode = $this->params['mode']; + $exclude = $this->params['exclude']; + $form = $this->params['form']; + $rootfolderid = $this->params['rootfolderid']; + + $this->htmlStartPage(getMLText("choose_target_folder")); + $this->globalBanner(); + $this->pageNavigation(getMLText("choose_target_folder")); +?> + + + + +contentContainerStart(); + $this->printFoldersTree($mode, $exclude, $rootfolderid); + $this->contentContainerEnd(); +?> + + + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.FolderNotify.php b/views/blue/class.FolderNotify.php new file mode 100644 index 000000000..51ae94c9a --- /dev/null +++ b/views/blue/class.FolderNotify.php @@ -0,0 +1,171 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for FolderNotify view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_FolderNotify extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $strictformcheck = $this->params['strictformcheck']; + + $notifyList = $folder->getNotifyList(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); + +?> + + + +contentHeading(getMLText("edit_existing_notify")); + $this->contentContainerStart(); + + $userNotifyIDs = array(); + $groupNotifyIDs = array(); + + print "\n"; + if (empty($notifyList["users"]) && empty($notifyList["groups"])) { + print ""; + } + else { + foreach ($notifyList["users"] as $userNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print ""; + }else print ""; + print ""; + $userNotifyIDs[] = $userNotify->getID(); + } + + foreach ($notifyList["groups"] as $groupNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print ""; + }else print ""; + print ""; + $groupNotifyIDs[] = $groupNotify->getID(); + } + } + print "
    ".getMLText("empty_notify_list")."
    " . htmlspecialchars($userNotify->getFullName()) . ""; + print "
    \n"; + echo createHiddenFieldWithKey('foldernotify')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
    \n"; + print "
    " . htmlspecialchars($groupNotify->getName()) . ""; + print "
    \n"; + echo createHiddenFieldWithKey('foldernotify')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
    \n"; + print "
    \n"; + +?> +
    +
    + + + + + + + + + + + + + + + +
    : + +
    : + +
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ForcePasswordChange.php b/views/blue/class.ForcePasswordChange.php new file mode 100644 index 000000000..fce11cade --- /dev/null +++ b/views/blue/class.ForcePasswordChange.php @@ -0,0 +1,78 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ForcePasswordChange view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ForcePasswordChange extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $passwordstrength = $this->params['passwordstrength']; + + $this->htmlStartPage(getMLText("sign_in"), "login"); + $this->globalBanner(); + echo "

    ".getMLText('password_expiration')."

    "; + echo "

    ".getMLText('password_expiration_text')."

    "; + $this->contentContainerStart(); +?> +
    + + + + + + + + + + + + + + + + +
    :
    :
     
    :
    ">
    + + + +
    + +contentContainerEnd(); + $tmpfoot = array(); + $tmpfoot[] = "" . getMLText("logout") . "\n"; + print "

    "; + print implode(' | ', $tmpfoot); + print "

    \n"; + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.GroupMgr.php b/views/blue/class.GroupMgr.php new file mode 100644 index 000000000..5453d389b --- /dev/null +++ b/views/blue/class.GroupMgr.php @@ -0,0 +1,255 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for GroupMgr view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_GroupMgr extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + +contentHeading(getMLText("group_management")); + $this->contentContainerStart(); +?> + + + + + + + +getID()."\" style=\"display : none;\">"; + + $this->contentSubHeading(getMLText("group")." : ".htmlspecialchars($group->getName())); + +?> + + + + + contentSubHeading(getMLText("edit_group"));?> + + + + + + +
    + +: +   +
    + + + + + + + + + + + +
    :
    :
    ">
    + +contentSubHeading(getMLText("group_members")); +?> + +getUsers(); + if (count($members) == 0) + print ""; + else { + + foreach ($members as $member) { + + print ""; + print ""; + print ""; + print ""; + print ""; + } + } +?> +
    ".getMLText("no_group_members")."
    " . htmlspecialchars($member->getFullName()) . "" . ($group->isMember($member,true)?getMLText("manager"):" ") . "
      "; + print "
    • getID()."\" />getID()."\" />".createHiddenFieldWithKey('rmmember')."
      "; + print "
    • getID()."\" />getID()."\" />".createHiddenFieldWithKey('tmanager')."
      "; + print "
    + +contentSubHeading(getMLText("add_member")); + +?> + +
    + + + + + + + + + +
    + + + + + "> +
    +
    + + + + + + + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.GroupView.php b/views/blue/class.GroupView.php new file mode 100644 index 000000000..b771b9787 --- /dev/null +++ b/views/blue/class.GroupView.php @@ -0,0 +1,103 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for GroupView view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_GroupView extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $allGroups = $this->params['allgroups']; + $allUsers = $this->params['allusers']; + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("groups")); + $this->contentContainerStart(); + + echo "
      \n"; + + foreach ($allGroups as $group){ + + $members = $group->getUsers(); + $managers = $group->getManagers(); + $ismanager = false; /* set to true if current user is manager */ + + echo "
    • ".htmlspecialchars($group->getName()); + if($group->getComment()) + echo " : ".htmlspecialchars($group->getComment()); + foreach($managers as $manager) + if($manager->getId() == $user->getId()) { + echo " : you are the manager of this group"; + $ismanager = true; + } + echo "
    • "; + + echo "
        \n"; + $memberids = array(); + foreach ($members as $member) { + $memberids[] = $member->getId(); + + echo "
      • ".htmlspecialchars($member->getFullName()); + if ($member->getEmail()!="") + echo " (getEmail())."\">".htmlspecialchars($member->getEmail()).")"; + foreach($managers as $manager) + if($manager->getId() == $member->getId()) + echo ", ".getMLText("manager"); + if($ismanager) { + echo ' '.getMLText("rm_user").''; + } + echo "
      • "; + } + if($ismanager) { + echo "
      • ".getMLText("add_user_to_group").":"; + echo "
        "; + echo "getId()."\" />"; + echo ""; + echo "
        "; + echo "
      • "; + } + echo "
      \n"; + } + echo "
    \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.Help.php b/views/blue/class.Help.php new file mode 100644 index 000000000..b11ec549f --- /dev/null +++ b/views/blue/class.Help.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Help view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Help extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $this->htmlStartPage(getMLText("help")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("help"), ""); + + $this->contentContainerStart(); + + readfile("../languages/".$user->getLanguage()."/help.htm"); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.IndexInfo.php b/views/blue/class.IndexInfo.php new file mode 100644 index 000000000..50089b8af --- /dev/null +++ b/views/blue/class.IndexInfo.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for IndexInfo view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_IndexInfo extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $luceneclassdir = $this->params['luceneclassdir']; + $lucenedir = $this->params['lucenedir']; + $index = $this->params['index']; + + $this->htmlStartPage(getMLText('fulltext_info')); + $this->globalNavigation(); + $this->pageNavigation(getMLText('fulltext_info')); + $this->contentContainerStart(); + + $numDocs = $index->count(); + echo "
    ";
    +		for ($id = 0; $id < $numDocs; $id++) {
    +			if (!$index->isDeleted($id)) {
    +				$hit = $index->getDocument($id);
    +				echo $hit->document_id.": ".htmlspecialchars($hit->title)."\n";
    +			}
    +		}
    +		echo "
    "; + + $terms = $index->terms(); + echo "

    ".count($terms)." Terms

    "; + echo "
    ";
    +		foreach($terms as $term) {
    +			echo htmlspecialchars($term->field).":".htmlspecialchars($term->text)."\n";
    +		}
    +		echo "
    "; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.Indexer.php b/views/blue/class.Indexer.php new file mode 100644 index 000000000..c029387d7 --- /dev/null +++ b/views/blue/class.Indexer.php @@ -0,0 +1,96 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Indexer view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Indexer extends LetoDMS_Blue_Style { + + function tree($dms, $index, $folder, $indent='') { /* {{{ */ + echo $indent."D ".htmlspecialchars($folder->getName())."\n"; + $subfolders = $folder->getSubFolders(); + foreach($subfolders as $subfolder) { + $this->tree($dms, $index, $subfolder, $indent.' '); + } + $documents = $folder->getDocuments(); + foreach($documents as $document) { + echo $indent." ".$document->getId().":".htmlspecialchars($document->getName())." "; + /* If the document wasn't indexed before then just add it */ + if(!($hits = $index->find('document_id:'.$document->getId()))) { + $index->addDocument(new LetoDMS_Lucene_IndexedDocument($dms, $document, $settings->_convcmd ? $settings->_convcmd : null)); + echo "(document added)"; + } else { + $hit = $hits[0]; + /* Check if the attribute created is set or has a value older + * than the lasted content. Documents without such an attribute + * where added when a new document was added to the dms. In such + * a case the document content wasn't indexed. + */ + try { + $created = (int) $hit->getDocument()->getFieldValue('created'); + } catch (Zend_Search_Lucene_Exception $e) { + $created = 0; + } + $content = $document->getLatestContent(); + if($created >= $content->getDate()) { + echo $indent."(document unchanged)"; + } else { + if($index->delete($hit->id)) { + $index->addDocument(new LetoDMS_Lucene_IndexedDocument($dms, $document, $settings->_convcmd ? $settings->_convcmd : null)); + } + echo $indent."(document updated)"; + } + } + echo "\n"; + } + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $index = $this->params['index']; + $recreate = $this->params['recreate']; + $folder = $this->params['folder']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText('admin_tools'), 'admin_tools'); + $this->contentHeading(getMLText("update_fulltext_index")); + $this->contentContainerStart(); + + echo "
    ";
    +		$this->tree($dms, $index, $folder);
    +		echo "
    "; + + $index->commit(); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.Info.php b/views/blue/class.Info.php new file mode 100644 index 000000000..cf0667288 --- /dev/null +++ b/views/blue/class.Info.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Info view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Info extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $version = $this->params['version']; + + $this->htmlStartPage($version->banner()); + $this->globalNavigation(); + $this->pageNavigation($version->banner()); + $this->contentContainerStart(); + phpinfo(); + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.KeywordChooser.php b/views/blue/class.KeywordChooser.php new file mode 100644 index 000000000..75ab14dba --- /dev/null +++ b/views/blue/class.KeywordChooser.php @@ -0,0 +1,221 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for KeywordChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_KeywordChooser extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $target = $this->params['form']; + + $this->htmlStartPage(getMLText("use_default_keywords")); +?> + + +
    +contentHeading(getMLText("use_default_keywords")); + $this->contentContainerStart(); +?> + + + + + + + + + + + + + + + + + +getOwner(); + if (!$owner->isAdmin()) + continue; +?> + + + + + + + + + + + + +getOwner(); + if ($owner->isAdmin()) + continue; +?> + + + + + + + + + + + +
    :

    : + +

    : + +

    +
    + ">    + "> +
    + +contentContainerEnd(); +?> + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.LogManagement.php b/views/blue/class.LogManagement.php new file mode 100644 index 000000000..c9c6d6b41 --- /dev/null +++ b/views/blue/class.LogManagement.php @@ -0,0 +1,113 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for LogManagement view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_LogManagement extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $contentdir = $this->params['contentdir']; + $logname = $this->params['logname']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->contentHeading(getMLText("log_management")); + $this->contentContainerStart(); + + $print_header=true; + + $handle = opendir($contentdir); + $entries = array(); + while ($e = readdir($handle)){ + if (is_dir($contentdir.$e)) continue; + if (strpos($e,".log")==FALSE) continue; + if (strcmp($e,"current.log")==0) continue; + $entries[] = $e; + } + closedir($handle); + + sort($entries); + $entries = array_reverse($entries); + + foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + if ($print_header) printMLText("empty_notify_list"); + else print "
    ".getMLText("creation_date")."".getMLText("file_size")."
    ".$entry."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry))."
    \n"; + + $this->contentContainerEnd(); + + if ($logname && file_exists($contentdir.$logname)){ + + $this->contentHeading(" "); + $this->contentContainerStart(); + + $this->contentSubHeading(sanitizeString($logname)); + + echo "
    "; + echo "
    \n";
    +			readfile($contentdir.$logname);
    +			echo "
    \n"; + echo "
    "; + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.Login.php b/views/blue/class.Login.php new file mode 100644 index 000000000..9c62546d9 --- /dev/null +++ b/views/blue/class.Login.php @@ -0,0 +1,137 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Login view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Login extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $enableguestlogin = $this->params['enableguestlogin']; + $enablepasswordforgotten = $this->params['enablepasswordforgotten']; + $refer = $this->params['referrer']; + $themes = $this->params['themes']; + + $this->htmlStartPage(getMLText("sign_in"), "login"); + $this->globalBanner(); + $this->pageNavigation(getMLText("sign_in")); +?> + +contentContainerStart(); ?> +
    +"; + } +?> + + + + + + + + + + + + + + + + + + + + +
    +"; + print "
    +"; + print "
    ">
    +
    +contentContainerEnd(); + $tmpfoot = array(); + if ($enableguestlogin) + $tmpfoot[] = "" . getMLText("guest_login") . "\n"; + if ($enablepasswordforgotten) + $tmpfoot[] = "" . getMLText("password_forgotten") . "\n"; + if($tmpfoot) { + print "

    "; + print implode(' | ', $tmpfoot); + print "

    \n"; + } +?> + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ManageNotify.php b/views/blue/class.ManageNotify.php new file mode 100644 index 000000000..3e4cda7a0 --- /dev/null +++ b/views/blue/class.ManageNotify.php @@ -0,0 +1,195 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ManageNotify view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ManageNotify extends LetoDMS_Blue_Style { + + // Get list of subscriptions for documents or folders for user or groups + function getNotificationList($as_group, $folders) { /* {{{ */ + + // First, get the list of groups of which the user is a member. + if ($as_group){ + + $groups = $this->user->getGroups(); + + if (count($groups)==0) return NULL; + + $grpList = ""; + foreach ($groups as $group) { + $grpList .= (strlen($grpList)==0 ? "" : ", ") . $group->getID(); + } + + $queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ". + "WHERE `tblNotify`.`groupID` IN (". $grpList .")"; + + } else { + $queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ". + "WHERE `tblNotify`.`userID` = '". $this->user->getID()."'" ; + } + + $resArr = $this->db->getResultArray($queryStr); + + $ret=array(); + + foreach ($resArr as $res){ + + if (($res["targetType"] == T_DOCUMENT)&&(!$folders)) $ret[]=$res["target"]; + if (($res["targetType"] == T_FOLDER)&&($folders)) $ret[]=$res["target"]; + } + + return $ret; + } /* }}} */ + + function printFolderNotificationList($ret,$deleteaction=true) { /* {{{ */ + if (count($ret)==0) { + printMLText("empty_notify_list"); + } + else { + + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + foreach($ret as $ID) { + $fld = $this->dms->getFolder($ID); + if (is_object($fld)) { + $owner = $fld->getOwner(); + print ""; + print ""; + print "\n"; + print ""; + print ""; + } + } + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("actions")."
    " . htmlspecialchars($fld->getName()) . "".htmlspecialchars($owner->getFullName())."
    "; + } + } /* }}} */ + + function printDocumentNotificationList($ret,$deleteaction=true) { /* {{{ */ + + if (count($ret)==0) { + printMLText("empty_notify_list"); + } + else { + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + foreach ($ret as $ID) { + $doc = $this->dms->getDocument($ID); + if (is_object($doc)) { + $owner = $doc->getOwner(); + $latest = $doc->getLatestContent(); + $status = $latest->getStatus(); + print "\n"; + print ""; + print "\n"; + print ""; + print ""; + print ""; + print "\n"; + } + } + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("actions")."
    " . htmlspecialchars($doc->getName()) . "".htmlspecialchars($owner->getFullName())."".getOverallStatusText($status["status"])."".$latest->getVersion()."
    "; + } + } /* }}} */ + + function show() { /* {{{ */ + $this->dms = $this->params['dms']; + $this->user = $this->params['user']; + $this->db = $this->dms->getDB(); + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("edit_existing_notify")); + $this->contentContainerStart(); + + print "
    "; + $this->contentSubHeading(getMLText("choose_target_folder")); + $this->printFolderChooser("form1",M_READ); + print ""; + print getMLText("include_subdirectories"); + print ""; + print getMLText("include_documents"); + print "  "; + print "
    "; + + print "
    "; + $this->contentSubHeading(getMLText("choose_target_document")); + $this->printDocumentChooser("form2"); + print "  "; + print "
    "; + + $this->contentContainerEnd(); + + + // + // Display the results. + // + $this->contentHeading(getMLText("edit_folder_notify")); + $this->contentContainerStart(); + $this->contentSubHeading(getMLText("user")); + $ret=$this->getNotificationList(false,true); + printFolderNotificationList($ret); + $this->contentSubHeading(getMLText("group")); + $ret=$this->getNotificationList(true,true); + printFolderNotificationList($ret,false); + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("edit_document_notify")); + $this->contentContainerStart(); + $this->contentSubHeading(getMLText("user")); + $ret=$this->getNotificationList(false,false); + printDocumentNotificationList($ret); + $this->contentSubHeading(getMLText("group")); + $ret=$this->getNotificationList(true,false); + printDocumentNotificationList($ret,false); + $this->contentContainerEnd(); + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.MoveDocument.php b/views/blue/class.MoveDocument.php new file mode 100644 index 000000000..76ebd7391 --- /dev/null +++ b/views/blue/class.MoveDocument.php @@ -0,0 +1,63 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for MoveDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MoveDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("move_document")); + $this->contentContainerStart(); +?> +
    + + + + + + + + + +
    :printFolderChooser("form1", M_READWRITE);?>

    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.MoveFolder.php b/views/blue/class.MoveFolder.php new file mode 100644 index 000000000..d5fc09955 --- /dev/null +++ b/views/blue/class.MoveFolder.php @@ -0,0 +1,66 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for MoveFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MoveFolder extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("move_folder")); + $this->contentContainerStart(); + +?> +
    + + + + + + + + + + +
    :printFolderChooser("form1", M_READWRITE, $folder->getID());?>
    ">
    +
    + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.MyAccount.php b/views/blue/class.MyAccount.php new file mode 100644 index 000000000..cc9706bd7 --- /dev/null +++ b/views/blue/class.MyAccount.php @@ -0,0 +1,81 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for MyAccount view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MyAccount extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $enableuserimage = $this->params['enableuserimage']; + $passwordexpiration = $this->params['passwordexpiration']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("user_info")); + $this->contentContainerStart(); + + print "\n"; + + if ($enableuserimage){ + print "\n"; + print "\n"; + print "\n"; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + if($passwordexpiration > 0) { + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + print "
    ".($user->hasImage() ? "" : getMLText("no_user_image"))."
    ".getMLText("name")." : ".htmlspecialchars($user->getFullName()).($user->isAdmin() ? " (".getMLText("admin").")" : "")."
    ".getMLText("user_login")." : ".$user->getLogin()."
    ".getMLText("email")." : ".htmlspecialchars($user->getEmail())."
    ".getMLText("comment")." : ".htmlspecialchars($user->getComment())."
    ".getMLText("password_expiration")." : ".htmlspecialchars($user->getPwdExpiration())."
    \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.MyDocuments.php b/views/blue/class.MyDocuments.php new file mode 100644 index 000000000..1848f5ba4 --- /dev/null +++ b/views/blue/class.MyDocuments.php @@ -0,0 +1,489 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for MyDocuments view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MyDocuments extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $orderby = $this->params['orderby']; + $showInProcess = $this->params['showinprocess']; + + $db = $dms->getDB(); + + $this->htmlStartPage(getMLText("my_documents")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + + if ($showInProcess){ + + if (!$db->createTemporaryTable("ttstatid") || !$db->createTemporaryTable("ttcontentid")) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + // Get document list for the current user. + $reviewStatus = $user->getReviewStatus(); + $approvalStatus = $user->getApprovalStatus(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + $docCSV = ""; + foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; + } + + if (strlen($docCSV)>0) { + // Get the document information. + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_EXPIRED.") ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + // Create an array to hold all of these results, and index the array by + // document id. This makes it easier to retrieve document ID information + // later on and saves us having to repeatedly poll the database every time + // new document information is required. + $docIdx = array(); + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + $docIdx[$res["id"]][$res["version"]] = $res; + } + + // List the documents where a review has been requested. + $this->contentHeading(getMLText("documents_to_review")); + $this->contentContainerStart(); + $printheader=true; + $iRev = array(); + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + + if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) { + $dList[] = $st["documentID"]; + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { + $dList[] = $st["documentID"]; + + if ($printheader){ + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."
    "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + if (!$printheader){ + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    "; + }else{ + printMLText("no_docs_to_review"); + } + $this->contentContainerEnd(); + + // List the documents where an approval has been requested. + $this->contentHeading(getMLText("documents_to_approve")); + $this->contentContainerStart(); + $printheader=true; + + foreach ($approvalStatus["indstatus"] as $st) { + + if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { + if ($printheader){ + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + if (!$printheader){ + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    \n"; + }else{ + printMLText("no_docs_to_approve"); + } + $this->contentContainerEnd(); + } + else { + + $this->contentHeading(getMLText("documents_to_review")); + $this->contentContainerStart(); + printMLText("no_review_needed"); + $this->contentContainerEnd(); + $this->contentHeading(getMLText("documents_to_approve")); + $this->contentContainerStart(); + printMLText("no_approval_needed"); + $this->contentContainerEnd(); + } + + // Get list of documents owned by current user that are pending review or + // pending approval. + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocuments`.`owner` = '".$user->getID()."' ". + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer("Internal error. Unable to complete request. Exiting."); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_user_requiring_attention")); + $this->contentContainerStart(); + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; + + } + else printMLText("no_docs_to_look_at"); + + $this->contentContainerEnd(); + + + // Get list of documents locked by current user + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer("Internal error. Unable to complete request. Exiting."); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_locked_by_you")); + $this->contentContainerStart(); + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; + + } + else printMLText("no_docs_locked"); + + $this->contentContainerEnd(); + + } + else { + + // Get list of documents owned by current user + if (!$db->createTemporaryTable("ttstatid")) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + if (!$db->createTemporaryTable("ttcontentid")) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocuments`.`owner` = '".$user->getID()."' "; + + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("all_documents")); + $this->contentContainerStart(); + + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + //print ""; + print ""; + print "\n"; + } + print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ". htmlspecialchars($res["statusName"])."".(!$res["expires"] ? getMLText("does_not_expire"):getReadableDate($res["expires"]))."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; + } + else printMLText("empty_notify_list"); + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ObjectCheck.php b/views/blue/class.ObjectCheck.php new file mode 100644 index 000000000..6620161bd --- /dev/null +++ b/views/blue/class.ObjectCheck.php @@ -0,0 +1,212 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ObjectCheck view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ObjectCheck extends LetoDMS_Blue_Style { + + function tree($dms, $folder, $repair, $path=':', $indent='') { /* {{{ */ + + /* Don't do folderlist check for root folder */ + if($path != ':') { + $folderList = $folder->getFolderList(); + /* Check the folder */ + if($folderList != $path) { + print "\n"; + $this->needsrepair = true; + print "getID()."\">"; + print "getID()."\">"; + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print "/".htmlspecialchars($tmppath[$i]->getName()); + } + print $foldername; + print ""; + + $owner = $folder->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Folderlist is '".$folderList."', should be '".$path."'"; + if($repair) { + $folder->repair(); + print "Repaired\n"; + } else { + print "\n"; + } + print "\n"; + } + } + + $subfolders = $folder->getSubFolders(); + foreach($subfolders as $subfolder) { + $this->tree($dms, $subfolder, $indent.' ', $path.$folder->getId().':'); + } + $path .= $folder->getId().':'; + $documents = $folder->getDocuments(); + foreach($documents as $document) { + /* Check the folder list of the document */ + $folderList = $document->getFolderList(); + if($folderList != $path) { + print "\n"; + $this->needsrepair = true; + $lc = $document->getLatestContent(); + print "getID()."\">getFileType())."\" title=\"".$lc->getMimeType()."\">"; + print "getID()."\">/"; + $folder = $document->getFolder(); + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print htmlspecialchars($tmppath[$i]->getName())."/"; + } + print htmlspecialchars($document->getName()); + print ""; + $owner = $document->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Folderlist is '".$folderList."', should be '".$path."'"; + if($repair) { + $document->repair(); + print "Repaired\n"; + } else { + print "\n"; + } + print "\n"; + } + + /* Check if the content is available */ + $versions = $document->getContent(); + if($versions) { + foreach($versions as $version) { + $filepath = $dms->contentDir . $version->getPath(); + if(!file_exists($filepath)) { + print "\n"; + print "getID()."\">getFileType())."\" title=\"".$version->getMimeType()."\">"; + print "getID()."\">/"; + $folder = $document->getFolder(); + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print htmlspecialchars($tmppath[$i]->getName())."/"; + } + print htmlspecialchars($document->getName()); + print ""; + $owner = $document->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Document content of version ".$version->getVersion()." is missing ('".$path."')"; + if($repair) { + print "Cannot repaired\n"; + } else { + print "\n"; + } + print "\n"; + } + } + } else { + print "\n"; + print "\n"; + print "getID()."\">/"; + $folder = $document->getFolder(); + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print htmlspecialchars($tmppath[$i]->getName())."/"; + } + print htmlspecialchars($document->getName()); + print ""; + $owner = $document->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Document has no content! Delete the document manually."; + print "\n"; + } + } + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $versions = $this->params['unlinkedcontent']; + $repair = $this->params['repair']; + $unlink = $this->params['unlink']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("objectcheck")); + $this->contentContainerStart(); + + if($repair) { + echo "

    ".getMLText('repairing_objects')."

    "; + } + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $needsrepair = false; + $this->tree($folder, $repair); + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("error")."
    \n"; + + if($needsrepair && $repair == 0) { + echo '

    '.getMLText('do_object_repair').'

    '; + } + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("unlinked_content")); + $this->contentContainerStart(); + if($unlink) { + echo "

    ".getMLText('unlinking_objects')."

    "; + } + + if($versions) { + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + foreach($versions as $version) { + $doc = $version->getDocument(); + print ""; + if($unlink) { + $doc->removeContent($version); + } + print "\n"; + } + print "
    ".getMLText("document")."".getMLText("version")."".getMLText("original_filename")."".getMLText("mimetype")."
    ".$doc->getId()."".$version->getVersion()."".$version->getOriginalFileName()."".$version->getMimeType()."
    \n"; + if($unlink == 0) { + echo '

    '.getMLText('do_object_unlink').'

    '; + } + } + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.OverrideContentStatus.php b/views/blue/class.OverrideContentStatus.php new file mode 100644 index 000000000..2e949e8c6 --- /dev/null +++ b/views/blue/class.OverrideContentStatus.php @@ -0,0 +1,99 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for OverrideContentStatus view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_OverrideContentStatus extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $overallStatus = $content->getStatus(); + $reviewStatus = $content->getReviewStatus(); + $approvalStatus = $content->getApprovalStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + + $this->contentHeading(getMLText("change_status")); + +?> + +contentContainerStart(); + +// Display the Review form. +?> +
    + + + + +
    +
    +
    + + + +
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.PasswordForgotten.php b/views/blue/class.PasswordForgotten.php new file mode 100644 index 000000000..6e883052d --- /dev/null +++ b/views/blue/class.PasswordForgotten.php @@ -0,0 +1,71 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for PasswordForgotten view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_PasswordForgotten extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $referrer = $this->params['referrer']; + + $this->htmlStartPage(getMLText("password_forgotten"), "login"); + $this->globalBanner(); + $this->pageNavigation(getMLText("password_forgotten")); +?> + +contentContainerStart(); ?> +
    +"; + } +?> +

    + + + + + + + + + + + + +
    ">
    +
    +contentContainerEnd(); ?> + +

    +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveArchive.php b/views/blue/class.RemoveArchive.php new file mode 100644 index 000000000..b1a88c262 --- /dev/null +++ b/views/blue/class.RemoveArchive.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveArchive view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveArchive extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $arkname = $this->params['archive']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("backup_remove")); + $this->contentContainerStart(); + +?> +
    + + +

    htmlspecialchars($arkname)));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveDocument.php b/views/blue/class.RemoveDocument.php new file mode 100644 index 000000000..970963f16 --- /dev/null +++ b/views/blue/class.RemoveDocument.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("rm_document")); + $this->contentContainerStart(); + +?> +
    + + +

    + htmlspecialchars($document->getName())));?> +

    +

    ">

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveDocumentFile.php b/views/blue/class.RemoveDocumentFile.php new file mode 100644 index 000000000..0bc3064ba --- /dev/null +++ b/views/blue/class.RemoveDocumentFile.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveDocumentFile view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveDocumentFile extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $file = $this->params['file']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("rm_file")); + $this->contentContainerStart(); + +?> +
    + + + +

    htmlspecialchars($document->getName()), "name" => htmlspecialchars($file->getName())));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveDump.php b/views/blue/class.RemoveDump.php new file mode 100644 index 000000000..938283bd8 --- /dev/null +++ b/views/blue/class.RemoveDump.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveDump view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveDump extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $dumpname = $this->params['dumpfile']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("dump_remove")); + $this->contentContainerStart(); +?> +
    + + +

    htmlspecialchars($dumpname)));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveEvent.php b/views/blue/class.RemoveEvent.php new file mode 100644 index 000000000..ed0d82766 --- /dev/null +++ b/views/blue/class.RemoveEvent.php @@ -0,0 +1,58 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveEvent extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $event = $this->params['event']; + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("edit_event")); + $this->contentContainerStart(); + +?> +
    + + "> +

    htmlspecialchars($event["name"])));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveFolder.php b/views/blue/class.RemoveFolder.php new file mode 100644 index 000000000..033108924 --- /dev/null +++ b/views/blue/class.RemoveFolder.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveFolder extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("rm_folder")); + $this->contentContainerStart(); +?> +
    + + + +

    + htmlspecialchars($folder->getName())));?> +

    +

    ">

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveFolderFiles.php b/views/blue/class.RemoveFolderFiles.php new file mode 100644 index 000000000..c225734dc --- /dev/null +++ b/views/blue/class.RemoveFolderFiles.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveFolderFiles view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveFolderFiles extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + + $this->htmlStartPage(getMLText("files_deletion")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->contentHeading(getMLText("files_deletion")); + $this->contentContainerStart(); +?> +
    + + +

    htmlspecialchars($folder->getName())));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveGroup.php b/views/blue/class.RemoveGroup.php new file mode 100644 index 000000000..4e08bc3a3 --- /dev/null +++ b/views/blue/class.RemoveGroup.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveGroup view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveGroup extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $group = $this->params['group']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("rm_group")); + $this->contentContainerStart(); + +?> +
    + + + +

    + htmlspecialchars($group->getName())));?> +

    +

    ">

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveLog.php b/views/blue/class.RemoveLog.php new file mode 100644 index 000000000..54c91c914 --- /dev/null +++ b/views/blue/class.RemoveLog.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveLog view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveLog extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $logname = $this->params['logname']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("rm_file")); + $this->contentContainerStart(); +?> +
    + + +

    $logname));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveUser.php b/views/blue/class.RemoveUser.php new file mode 100644 index 000000000..b6205d448 --- /dev/null +++ b/views/blue/class.RemoveUser.php @@ -0,0 +1,78 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveUser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveUser extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $rmuser = $this->params['rmuser']; + $allusers = $this->params['allusers']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("rm_user")); + $this->contentContainerStart(); + +?> +
    + + + +

    + htmlspecialchars($rmuser->getFullName())));?> +

    + +

    +: + +

    + +

    ">

    + +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.RemoveVersion.php b/views/blue/class.RemoveVersion.php new file mode 100644 index 000000000..b42c2403e --- /dev/null +++ b/views/blue/class.RemoveVersion.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for RemoveVersion view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveVersion extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("rm_version")); + $this->contentContainerStart(); +?> +
    + + + +

    htmlspecialchars($document->getName()), "version" => $version->getVersion()));?>

    + "> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ReviewDocument.php b/views/blue/class.ReviewDocument.php new file mode 100644 index 000000000..153af3539 --- /dev/null +++ b/views/blue/class.ReviewDocument.php @@ -0,0 +1,172 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ReviewDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ReviewDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $reviews = $content->getReviewStatus(); + foreach($reviews as $review) { + if($review['reviewID'] == $_GET['reviewid']) { + $reviewStatus = $review; + break; + } + } + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("submit_review")); +?> + + +contentContainerStart(); + + // Display the Review form. + if ($reviewStatus['type'] == 0) { + if($reviewStatus["status"]!=0) { + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $indUser = $dms->getUser($reviewStatus["userID"]); + print ""; + print "
    ".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
    "; + printReviewStatusText($reviewStatus["status"]); + print "".htmlspecialchars($reviewStatus["comment"])."".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."

    "; + } +?> +
    + + + + + +
    : +
    +
    + + + + +
    +
    +"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printReviewStatusText($reviewStatus["status"]); + print ""; + print "".htmlspecialchars($reviewStatus["comment"]).""; + $indUser = $dms->getUser($reviewStatus["userID"]); + print "".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; + print "
    \n"; + } + +?> +
    + + + + + + +
    : +
    : + +
    + + '/> + + +
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ReviewSummary.php b/views/blue/class.ReviewSummary.php new file mode 100644 index 000000000..40cde1c1c --- /dev/null +++ b/views/blue/class.ReviewSummary.php @@ -0,0 +1,42 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ReviewSummary view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ReviewSummary extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + + if (!$db->createTemporaryTable("ttstatid")) { + UI::exitError(getMLText("review_summary"),getMLText("internal_error_exit")); + } + + } /* }}} */ +} +?> diff --git a/views/blue/class.Search.php b/views/blue/class.Search.php new file mode 100644 index 000000000..bf5a3ece3 --- /dev/null +++ b/views/blue/class.Search.php @@ -0,0 +1,162 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Search result view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Search extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $entries = $this->params['searchhits']; + $totalpages = $this->params['totalpages']; + $pageNumber = $this->params['pagenumber']; + $urlparams = $this->params['urlparams']; + $searchin = $this->params['searchin']; + + $this->htmlStartPage(getMLText("search_results")); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), ""); + $this->contentHeading(getMLText("search_results")); + $this->contentContainerStart(); + $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $urlparams); + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + //print "\n"; + //print "\n"; + print "\n\n\n"; + + $resultsFilteredByAccess = false; + $foldercount = $doccount = 0; + foreach ($entries as $entry) { + if(get_class($entry) == 'LetoDMS_Core_Document') { + $document = $entry; + $doccount++; + $lc = $document->getLatestContent(); + print ""; + //print ""; + if (in_array(2, $searchin)) { + $docName = markQuery(htmlspecialchars($document->getName()), "i"); + } else { + $docName = htmlspecialchars($document->getName()); + } + print ""; + print ""; + + $attributes = $lc->getAttributes(); + print ""; + + $owner = $document->getOwner(); + print ""; + $display_status=$lc->getStatus(); + print ""; + + print ""; + + if (in_array(3, $searchin)) $comment = markQuery(htmlspecialchars($document->getComment())); + else $comment = htmlspecialchars($document->getComment()); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print ""; + print "\n"; + } elseif(get_class($entry) == 'LetoDMS_Core_Folder') { + $folder = $entry; + $foldercount++; + if (in_array(2, $searchin)) { + $folderName = markQuery(htmlspecialchars($folder->getName()), "i"); + } else { + $folderName = htmlspecialchars($folder->getName()); + } + print ""; + print ""; + print ""; + + $owner = $folder->getOwner(); + print ""; + print ""; + print ""; + if (in_array(3, $searchin)) $comment = markQuery(htmlspecialchars($folder->getComment())); + else $comment = htmlspecialchars($folder->getComment()); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print ""; + print "\n"; + } + } + if (0 && $resultsFilteredByAccess) { + print ""; + } + + print "
    ".getMLText("name")."".getMLText("attributes")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."".getMLText("reviewers")."".getMLText("approvers")."
    getID()."\">getMimeIcon($lc->getFileType())."\" title=\"".$lc->getMimeType()."\">getID()."\">/"; + $folder = $document->getFolder(); + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + print htmlspecialchars($path[$i]->getName())."/"; + } + print $docName; + print ""; + print "
      \n"; + $attributes = $lc->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + print "
    • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
    • \n"; + } + } + print "
    \n"; + print "
    ".htmlspecialchars($owner->getFullName())."".getOverallStatusText($display_status["status"]). "".$lc->getVersion()."".$comment."
    getID()."\">getID()."\">"; + $path = $folder->getPath(); + print "/"; + for ($i = 1; $i < count($path)-1; $i++) { + print htmlspecialchars($path[$i]->getName())."/"; + } + print $folderName; + print "".htmlspecialchars($owner->getFullName())."".$comment."
    ". getMLText("search_results_access_filtered") . "
    \n"; + $numResults = $doccount + $foldercount; + if ($numResults == 0) { + print "

    ".getMLText("search_no_results")."

    "; + } else { + // print "

    ".getMLText("search_report", array("doccount" => $doccount, "foldercount" => $foldercount, 'searchtime'=>$searchTime))."

    "; + } + + $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> + diff --git a/views/blue/class.SearchForm.php b/views/blue/class.SearchForm.php new file mode 100644 index 000000000..d2f97e32e --- /dev/null +++ b/views/blue/class.SearchForm.php @@ -0,0 +1,271 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for SearchForm view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SearchForm extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $attrdefs = $this->params['attrdefs']; + $allCats = $this->params['allcategories']; + $allUsers = $this->params['allusers']; + $enablefullsearch = $this->params['enablefullsearch']; + + $this->htmlStartPage(getMLText("search")); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "", $folder); +?> + +contentHeading(getMLText("search")); + $this->contentContainerStart(); +?> + +
    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +\n\n"; +echo "\n\n"; +*/ +?> + + + + +
    : + + +
    + + +
    :
      +
    • ()
    • +
    • +
    • +
    • +
    +
    getName()); ?>printAttributeEditField($attrdef, '') ?>
    :
    ()
    + +
    :
    ()
    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    : + +
    :printFolderChooser("form1", M_READ, -1, $folder);?>
    : + +printDateChooser(-1, "createstart"); + print "  "; + printMLText("and"); + print "  "; + $this->printDateChooser(-1, "createend"); +?> +
    ".getMLText("last_update").":"; +printMLText("between"); +print "  "; +$this->printDateChooser(-1, "updatestart"); +print "  "; +printMLText("and"); +print "  "; +$this->printDateChooser(-1, "updateend"); +echo "
    ">
    + +
    + +
    +
    +
    + +

    + + + + + + + + + + + + + + + +
    : + + +
    : + +
    : + +
    ">
    + +
    +
    +
    + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.SearchFulltext.php b/views/blue/class.SearchFulltext.php new file mode 100644 index 000000000..229e43c5c --- /dev/null +++ b/views/blue/class.SearchFulltext.php @@ -0,0 +1,133 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Search result view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SearchFulltext extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $entries = $this->params['searchhits']; + $totalpages = $this->params['totalpages']; + $totaldocs = $this->params['totaldocs']; + $pageNumber = $this->params['pagenumber']; + $urlparams = $this->params['urlparams']; + $searchin = $this->params['searchin']; + $searchTime = $this->params['searchtime']; + + $this->htmlStartPage(getMLText("search_results")); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true), "", $folder); + $this->contentHeading(getMLText("search_results")); + + $this->contentContainerStart(); +?> + + + + + +
    + $totaldocs)); + } +?> + $searchTime));?>
    + +contentContainerEnd(); + $this->htmlEndPage(); + exit; + } + + $this->pageList($pageNumber, $totalpages, "../op/op.SearchFulltext.php", $_GET); + + print ""; + print "\n\n"; + //print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + //print "\n"; + //print "\n"; + print "\n\n\n"; + + $resultsFilteredByAccess = false; + foreach ($entries as $document) { + if ($document->getAccessMode($user) < M_READ) { + $resultsFilteredByAccess = true; + } + else { + $lc = $document->getLatestContent(); + print ""; + $docName = htmlspecialchars($document->getName()); + print ""; + + $owner = $document->getOwner(); + print ""; + print ""; + + print ""; + + $comment = htmlspecialchars($document->getComment()); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print ""; + print "\n"; + } + } + if ($resultsFilteredByAccess) { + print ""; + } + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."".getMLText("reviewers")."".getMLText("approvers")."
    getID()."\">/"; + $folder = $document->getFolder(); + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + print htmlspecialchars($path[$i]->getName())."/"; + } + print $docName; + print "".htmlspecialchars($owner->getFullName())."".getOverallStatusText($lc->getStatus()). "".$lc->getVersion()."".$comment."
    ". getMLText("search_results_access_filtered") . "
    \n"; + + $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> + diff --git a/views/blue/class.SetExpires.php b/views/blue/class.SetExpires.php new file mode 100644 index 000000000..f71baa198 --- /dev/null +++ b/views/blue/class.SetExpires.php @@ -0,0 +1,70 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for SetExpires view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SetExpires extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("set_expiry")); + $this->contentContainerStart(); +?> + +
    + + + + + + + +
    : + expires()?"":"checked") ?> >
    + expires()?"checked":"") ?> >printDateChooser(($document->expires()?$document->getExpires():-1), "exp");?> +
    + +

    +"> +

    + +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.SetReviewersApprovers.php b/views/blue/class.SetReviewersApprovers.php new file mode 100644 index 000000000..3e531b4d4 --- /dev/null +++ b/views/blue/class.SetReviewersApprovers.php @@ -0,0 +1,246 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for SetReviewersApprovers view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SetReviewersApprovers extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $overallStatus = $content->getStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("change_assignments")); + + // Retrieve a list of all users and groups that have review / approve privileges. + $docAccess = $document->getApproversList(); + + // Retrieve list of currently assigned reviewers and approvers, along with + // their latest status. + $reviewStatus = $content->getReviewStatus(); + $approvalStatus = $content->getApprovalStatus(); + + // Index the review results for easy cross-reference with the Approvers List. + $reviewIndex = array("i"=>array(), "g"=>array()); + foreach ($reviewStatus as $i=>$rs) { + if ($rs["type"]==0) { + $reviewIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $reviewIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } + + // Index the approval results for easy cross-reference with the Approvers List. + $approvalIndex = array("i"=>array(), "g"=>array()); + foreach ($approvalStatus as $i=>$rs) { + if ($rs["type"]==0) { + $approvalIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $approvalIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +?> + +contentContainerStart(); ?> + +
    + +contentSubHeading(getMLText("update_reviewers"));?> + +
    :
    +
    +
      +getMandatoryReviewers(); + + foreach ($docAccess["users"] as $usr) { + + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory){ + + print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." <".$usr->getEmail().">"; + print ""; + + }else if (isset($reviewIndex["i"][$usr->getID()])) { + + switch ($reviewIndex["i"][$usr->getID()]["status"]) { + case 0: + print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + break; + case -2: + print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + break; + default: + print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + break; + } + } + else { + print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + } + } +?> +
    +
    +
    :
    +
    +
      +getID()) $mandatory=true; + + if ($mandatory){ + + print "
    • ".htmlspecialchars($group->getName()); + print ""; + + }else if (isset($reviewIndex["g"][$group->getID()])) { + + switch ($reviewIndex["g"][$group->getID()]["status"]) { + case 0: + print "
    • ".htmlspecialchars($group->getName()); + break; + case -2: + print "
    • ".htmlspecialchars($group->getName()); + break; + default: + print "
    • ".htmlspecialchars($group->getName()); + break; + } + } + else { + print "
    • ".htmlspecialchars($group->getName()); + } + } +?> +
    +
    + +contentSubHeading(getMLText("update_approvers"));?> + +
    :
    +
    +
      +getMandatoryApprovers(); + + foreach ($docAccess["users"] as $usr) { + + $mandatory=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory){ + + print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." <".$usr->getEmail().">"; + print ""; + + }else if (isset($approvalIndex["i"][$usr->getID()])) { + + switch ($approvalIndex["i"][$usr->getID()]["status"]) { + case 0: + print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + break; + case -2: + print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + break; + default: + print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + break; + } + } + else { + print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); + } + } +?> +
    +
    +
    :
    +
    +
      +getID()) $mandatory=true; + + if ($mandatory){ + + print "
    • ".htmlspecialchars($group->getName()); + print ""; + + }else if (isset($approvalIndex["g"][$group->getID()])) { + + switch ($approvalIndex["g"][$group->getID()]["status"]) { + case 0: + print "
    • ".htmlspecialchars($group->getName()); + break; + case -2: + print "
    • ".htmlspecialchars($group->getName()); + break; + default: + print "
    • ".htmlspecialchars($group->getName()); + break; + } + } + else { + print "
    • ".htmlspecialchars($group->getName()); + } + } +?> +
    +
    + +

    + + +"> +

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.Settings.php b/views/blue/class.Settings.php new file mode 100644 index 000000000..6d0cb59ae --- /dev/null +++ b/views/blue/class.Settings.php @@ -0,0 +1,498 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Settings view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Settings extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $settings = $this->params['settings']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("settings")); + $this->contentContainerStart(); + +?> + + + +
    + +_configFilePath)) { + echo "

    ".getMLText("settings_notwritable")."

    "; +} else { +?> + " /> + + + +
    +
    +
    + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + "> + + + + + + "> + + + + "> + + + "> + + +
    :
    :
    :_printDisclaimer) echo "checked" ?> />
    : + +
    : + +
    :_strictFormCheck) echo "checked" ?> />
    :
    :_enableConverting) echo "checked" ?> />
    :_enableEmail) echo "checked" ?> />
    :_enableUsersView) echo "checked" ?> />
    :_enableFullSearch) echo "checked" ?> />
    :
    :_enableFolderTree) echo "checked" ?> />
    : + +
    : + +
    :_enableCalendar) echo "checked" ?> />
    : + +
    : + +
    +
    +
    +
    +
    +
    + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + "> + + + + "> + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + "> + + + + +
    :
    :
    :
    :
    :
    :
    :_logFileEnable) echo "checked" ?> />
    : + +
    :_enableLargeFileUpload) echo "checked" ?> />
    :
    :_enableGuestLogin) echo "checked" ?> />
    :_restricted) echo "checked" ?> />
    :_enableUserImage) echo "checked" ?> />
    :_disableSelfEdit) echo "checked" ?> />
    :_enablePasswordForgotten) echo "checked" ?> />
    :
    : + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    + +
    +
    +
    + + +
    + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.Statistic.php b/views/blue/class.Statistic.php new file mode 100644 index 000000000..fc7eca08f --- /dev/null +++ b/views/blue/class.Statistic.php @@ -0,0 +1,232 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for Statistic view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Statistic extends LetoDMS_Blue_Style { + var $dms; + var $folder_count; + var $document_count; + var $file_count; + var $storage_size; + + function getAccessColor($mode) { /* {{{ */ + if ($mode == M_NONE) + return "gray"; + else if ($mode == M_READ) + return "green"; + else if ($mode == M_READWRITE) + return "blue"; + else // if ($mode == M_ALL) + return "red"; + } /* }}} */ + + function printFolder($folder) { /* {{{ */ + $this->folder_count++; + $folder_size=0; + $doc_count=0; + + $color = $folder->inheritsAccess() ? "black" : $this->getAccessColor($folder->getDefaultAccess()); + + print "
  • "; + print "getID()."\">".htmlspecialchars($folder->getName()) .""; + + $owner = $folder->getOwner(); + $color = $this->getAccessColor(M_ALL); + print " [".htmlspecialchars($owner->getFullName())."] "; + + if (! $folder->inheritsAccess()) + $this->printAccessList($folder); + + $subFolders = $folder->getSubFolders(); + $documents = $folder->getDocuments(); + + print "
      "; + + foreach ($subFolders as $sub) $folder_size += $this->printFolder($sub); + foreach ($documents as $document){ + $doc_count++; + $folder_size += $this->printDocument($document); + } + + print "
    "; + + print "".formatted_size($folder_size).", ".$doc_count." ".getMLText("documents")."\n"; + + print "
  • "; + + return $folder_size; + } /* }}} */ + + function printDocument($document) { /* {{{ */ + $this->document_count++; + + $local_file_count=0; + $folder_size=0; + + if (file_exists($this->dms->contentDir.$document->getDir())) { + $handle = opendir($this->dms->contentDir.$document->getDir()); + while ($entry = readdir($handle) ) { + if (is_dir($this->dms->contentDir.$document->getDir().$entry)) continue; + else{ + $local_file_count++; + $folder_size += filesize($this->dms->contentDir.$document->getDir().$entry); + } + + } + closedir($handle); + } + $this->storage_size += $folder_size; + + $color = $document->inheritsAccess() ? "black" : $this->getAccessColor($document->getDefaultAccess()); + print "
  • "; + print "getID()."\">".htmlspecialchars($document->getName()).""; + + $owner = $document->getOwner(); + $color = $this->getAccessColor(M_ALL); + print " [".htmlspecialchars($owner->getFullName())."] "; + + if (! $document->inheritsAccess()) $this->printAccessList($document); + + print "".formatted_size($folder_size).", ".$local_file_count." ".getMLText("files")."\n"; + + print "
  • "; + + $this->file_count += $local_file_count; + return $folder_size; + } /* }}} */ + + function printAccessList($obj) { /* {{{ */ + $accessList = $obj->getAccessList(); + if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) + return; + + print " ("; + + for ($i = 0; $i < count($accessList["groups"]); $i++) + { + $group = $accessList["groups"][$i]->getGroup(); + $color = $this->getAccessColor($accessList["groups"][$i]->getMode()); + print "".htmlspecialchars($group->getName()).""; + if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) + print ", "; + } + for ($i = 0; $i < count($accessList["users"]); $i++) + { + $user = $accessList["users"][$i]->getUser(); + $color = $this->getAccessColor($accessList["users"][$i]->getMode()); + print "".htmlspecialchars($user->getFullName()).""; + if ($i+1 < count($accessList["users"])) + print ", "; + } + print ")"; + } /* }}} */ + + function show() { /* {{{ */ + $this->dms = $this->params['dms']; + $user = $this->params['user']; + $rootfolder = $this->params['rootfolder']; + + $this->htmlStartPage(getMLText("folders_and_documents_statistic")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->folder_count=0; + $this->document_count=0; + $this->file_count=0; + $this->storage_size=0; +?> + + + + +contentHeading(getMLText("folders_and_documents_statistic")); +$this->contentContainerStart(); + +print ""; + +print ""; + +print "
    \n"; + +print "
      \n"; +print "
    • ".getMLText("access_inheritance")."
    • "; +print "
    • getAccessColor(M_ALL)."\">".getMLText("access_mode_all")."
    • "; +print "
    • getAccessColor(M_READWRITE)."\">".getMLText("access_mode_readwrite")."
    • "; +print "
    • getAccessColor(M_READ)."\">".getMLText("access_mode_read")."
    • "; +print "
    • getAccessColor(M_NONE)."\">".getMLText("access_mode_none")."
    • "; +print "
    \n"; + +print "
    \n"; + +print "
      \n"; +$this->printFolder($rootfolder); +print "
    \n"; + +print "
    "; + +print "
      \n"; +print "
    • ".getMLText("folders").": ".$this->folder_count."
    • \n"; +print "
    • ".getMLText("documents").": ".$this->document_count."
    • \n"; +print "
    • ".getMLText("files").": ".$this->file_count."
    • \n"; +print "
    • ".getMLText("storage_size").": ".formatted_size($this->storage_size)."
    • \n"; + +print "
    \n"; + +print "
    \n"; + +$this->contentContainerEnd(); +$this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.UpdateDocument.php b/views/blue/class.UpdateDocument.php new file mode 100644 index 000000000..54577cdf6 --- /dev/null +++ b/views/blue/class.UpdateDocument.php @@ -0,0 +1,257 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UpdateDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UpdateDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + $enablelargefileupload = $this->params['enablelargefileupload']; + $dropfolderdir = $this->params['dropfolderdir']; + $documentid = $document->getId(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); +?> + + + +contentHeading(getMLText("update_document")); + $this->contentContainerStart(); + + if ($document->isLocked()) { + + $lockingUser = $document->getLockingUser(); + + print "
    "; + + printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail())); + + if ($lockingUser->getID() == $user->getID()) + printMLText("unlock_cause_locking_user"); + else if ($document->getAccessMode($user) == M_ALL) + printMLText("unlock_cause_access_mode_all"); + else + { + printMLText("no_update_cause_locked"); + print "
    "; + $this->contentContainerEnd(); + $this->htmlEndPage(); + exit; + } + + print "
    "; + } + + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $document->getApproversList(); +?> + + + + + + + + + + +
    getID()); ?>

    + + +
    + + + + + + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + + + + + + +
    :
    :printDropFolderChooser("form1");?>
    : + +
    : + expires()) print " checked";?>>
    + expires()) print " checked";?>>printDateChooser(-1, "exp");?> +
    getName()); ?>printAttributeEditField($attrdef, '') ?>
    + + contentSubHeading(getMLText("assign_reviewers")); ?> + +
    :
    +
    +
      +getMandatoryReviewers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; + else print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; + } +?> +
    +
    +
    :
    +
    +
      +getID()) $mandatory=true; + + if ($mandatory) print "
    • ".htmlspecialchars($grp->getName())."
    • "; + else print "
    • ".htmlspecialchars($grp->getName())."
    • "; + } +?> +
    +
    + + contentSubHeading(getMLText("assign_approvers")); ?> + +
    :
    +
    +
      +getMandatoryApprovers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; + else print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; + } +?> +
    +
    +
    :
    +
    +
      +getID()) $mandatory=true; + + if ($mandatory) print "
    • ".htmlspecialchars($grp->getName()); + else print "
    • ".htmlspecialchars($grp->getName()); + + } +?> +
    +
    +
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.UpdateDocument2.php b/views/blue/class.UpdateDocument2.php new file mode 100644 index 000000000..ec2ca0787 --- /dev/null +++ b/views/blue/class.UpdateDocument2.php @@ -0,0 +1,81 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UpdateDocument2 view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UpdateDocument2 extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + + $this->contentHeading(getMLText("update_document") . ": " . htmlspecialchars($document->getName())); + $this->contentContainerStart(); + + if ($document->isLocked()) { + + $lockingUser = $document->getLockingUser(); + + print "
    "; + + printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => htmlspecialchars($lockingUser->getEmail()))); + + if ($lockingUser->getID() == $user->getID()) + printMLText("unlock_cause_locking_user"); + else if ($document->getAccessMode($user) == M_ALL) + printMLText("unlock_cause_access_mode_all"); + else + { + printMLText("no_update_cause_locked"); + print "
    "; + $this->contentContainerEnd(); + $this->htmlEndPage(); + exit; + } + + print "
    "; + } + + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $document->getApproversList(); + + $this->printUploadApplet('../op/op.UpdateDocument2.php', array('folderid'=>$folder->getId(), 'documentid'=>$document->getId()), 1, array('version_comment'=>1)); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.UserDefaultKeywords.php b/views/blue/class.UserDefaultKeywords.php new file mode 100644 index 000000000..25bbda33f --- /dev/null +++ b/views/blue/class.UserDefaultKeywords.php @@ -0,0 +1,179 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UserDefaultKeywords view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UserDefaultKeywords extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + + $this->htmlStartPage(getMLText("edit_default_keywords")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_account"), "my_account"); +?> + +contentHeading(getMLText("edit_default_keywords")); + $this->contentContainerStart(); +?> + + + + + + + + +
    : + +    + +getOwner(); + if ($owner->getID() != $user->getID()) continue; + + print "getID()."\" style=\"display : none;\">"; +?> + + + + + + + + + + + + + + + + + + + + "> + + + + +
    + +
    + contentSubHeading("");?> +
    : +
    getID()?>"> + + + + "> +
    +
    + contentSubHeading("");?> +
    : + getKeywordLists(); + if (count($lists) == 0) + print getMLText("no_default_keywords"); + else + foreach ($lists as $list) { + ?> +
    getID().".".$list["id"]?>"> + + "> + + "> + " border="0"> + + &action=removekeywords">" border=0> +
    +
    + +
    "> + + + +
    +
    + + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.UserImage.php b/views/blue/class.UserImage.php new file mode 100644 index 000000000..3b284d7a7 --- /dev/null +++ b/views/blue/class.UserImage.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UserImage view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UserImage extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + + } /* }}} */ +} +?> diff --git a/views/blue/class.UserList.php b/views/blue/class.UserList.php new file mode 100644 index 000000000..b6b1d34d9 --- /dev/null +++ b/views/blue/class.UserList.php @@ -0,0 +1,106 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UserList view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UserList extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $allUsers = $this->params['allusers']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("user_list")); + $this->contentContainerStart(); + + foreach ($allUsers as $currUser) { + if ($currUser->isGuest()) + continue; + + $this->contentSubHeading(getMLText("user") . ": \"" . $currUser->getFullName() . "\""); +?> + + + + + + + + + + + + + + + + + + + + + + + + + +
    :getLogin();?>
    :getFullName();?>
    :getEmail();?>
    :getComment();?>
    : + getGroups(); + if (count($groups) == 0) { + printMLText("no_groups"); + } + else { + for ($j = 0; $j < count($groups); $j++) { + print $groups[$j]->getName(); + if ($j +1 < count($groups)) + print ", "; + } + } + ?> +
    : + hasImage()) + print ""; + else + printMLText("no_user_image"); + ?> +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.UsrMgr.php b/views/blue/class.UsrMgr.php new file mode 100644 index 000000000..dc09618a1 --- /dev/null +++ b/views/blue/class.UsrMgr.php @@ -0,0 +1,426 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UsrMgr view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UsrMgr extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $users = $this->params['allusers']; + $groups = $this->params['allgroups']; + $passwordstrength = $this->params['passwordstrength']; + $passwordexpiration = $this->params['passwordexpiration']; + $httproot = $this->params['httproot']; + $enableuserimage = $this->params['enableuserimage']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + +contentHeading(getMLText("user_management")); + $this->contentContainerStart(); +?> + + + + + + + +getID()."\" style=\"display : none;\">"; + + $this->contentSubHeading(getMLText("user")." : ".htmlspecialchars($currUser->getLogin())); +?> + + + + contentSubHeading(getMLText("edit_user"));?> + + + + + +
    : + +   +
    + + + + + + + + + + + + + 0) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
     
    :
    : getPwdExpiration(); ?>
    :
    :
    :
    :
    :isHidden() ? " checked='checked'" : "");?>>
    :isDisabled() ? " checked='checked'" : "");?>>
    : + hasImage()) + print ""; + else + printMLText("no_user_image"); + ?> +
    :
    : +
    :
    +
    +
      + getMandatoryReviewers(); + + foreach ($users as $usr) { + + if ($usr->isGuest() || ($usr->getID() == $currUser->getID())) + continue; + + $checked=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $checked=true; + + print "
    • ".htmlspecialchars($usr->getLogin())."
    • \n"; + } + ?> +
    +
    +
    :
    +
    +
      + getID()) $checked=true; + + print "
    • ".htmlspecialchars($grp->getName())."
    • \n"; + } + ?> +
    +
    +
    : +
    :
    +
    +
      + getMandatoryApprovers(); + + foreach ($users as $usr) { + + if ($usr->isGuest() || ($usr->getID() == $currUser->getID())) + continue; + + $checked=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $checked=true; + + print "
    • ".htmlspecialchars($usr->getLogin())."
    • \n"; + } + ?> +
    +
    +
    :
    +
    +
      + getID()) $checked=true; + + print "
    • ".htmlspecialchars($grp->getName())."
    • \n"; + } + ?> +
    +
    +
    ">
    + + + + + + + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.UsrView.php b/views/blue/class.UsrView.php new file mode 100644 index 000000000..7ff62fa52 --- /dev/null +++ b/views/blue/class.UsrView.php @@ -0,0 +1,86 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for UsrView view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UsrView extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $users = $this->params['allusers']; + $enableuserimage = $this->params['enableuserimage']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("users")); + $this->contentContainerStart(); + + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($enableuserimage) echo "\n"; + echo "\n\n"; + + foreach ($users as $currUser) { + + if ($currUser->isGuest()) + continue; + + if ($currUser->isHidden()=="1") continue; + + echo "\n"; + + print ""; + + print ""; + print ""; + + if ($enableuserimage){ + print ""; + } + + echo "\n"; + } + + echo "
    ".getMLText("name")."".getMLText("email")."".getMLText("comment")."".getMLText("user_image")."
    ".htmlspecialchars($currUser->getFullName())."getEmail())."\">".htmlspecialchars($currUser->getEmail())."".htmlspecialchars($currUser->getComment()).""; + if ($currUser->hasImage()) print ""; + else printMLText("no_user_image"); + print "
    \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ViewDocument.php b/views/blue/class.ViewDocument.php new file mode 100644 index 000000000..6bd620e16 --- /dev/null +++ b/views/blue/class.ViewDocument.php @@ -0,0 +1,547 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ViewDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ViewDocument extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $accessop = $this->params['accessobject']; + $viewonlinefiletypes = $this->params['viewonlinefiletypes']; + $documentid = $document->getId(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("document_infos")); + $this->contentContainerStart(); + + ?> + + isLocked()) { + $lockingUser = $document->getLockingUser(); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + ?> + + + + + +
    $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
    : + getOwner(); + print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; + ?> +
    :getComment());?>
    :getDate()); ?>
    :getKeywords());?>
    : + getCategories(); + $ct = array(); + foreach($cats as $cat) + $ct[] = htmlspecialchars($cat->getName()); + echo implode(', ', $ct); + ?> +
    getName()); ?>:getValue()); ?>
    + contentContainerEnd(); + + $versions = $document->getContent(); + if(!$latestContent = $document->getLatestContent()) { + $this->contentHeading(getMLText("current_version")); + $this->contentContainerStart(); + print getMLText('document_content_missing'); + $this->contentContainerEnd(); + $this->htmlEndPage(); + exit; + } + + $status = $latestContent->getStatus(); + $reviewStatus = $latestContent->getReviewStatus(); + $approvalStatus = $latestContent->getApprovalStatus(); + + // verify if file exists + $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); + + $this->contentHeading(getMLText("current_version")); + $this->contentContainerStart(); + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + + print ""; + + print ""; + + print ""; + print "\n
    ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
    ".$latestContent->getVersion()."
      \n"; + print "
    • ".$latestContent->getOriginalFileName() ."
    • \n"; + + if ($file_exists) + print "
    • ". formatted_size(filesize($dms->contentDir . $latestContent->getPath())) ." ".htmlspecialchars($latestContent->getMimeType())."
    • "; + else print "
    • ".getMLText("document_deleted")."
    • "; + + $updatingUser = $latestContent->getUser(); + print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; + print "
    • ".getLongReadableDate($latestContent->getDate())."
    • "; + + print "
    \n"; + print "
      \n"; + $attributes = $latestContent->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + print "
    • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
    • \n"; + } + } + print "
    \n"; + + print "
    ".htmlspecialchars($latestContent->getComment())."".getOverallStatusText($status["status"]); + if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){ + print "
    hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; + } + print "
    "; + + print ""; + echo "
    \n"; + + print "\n"; + + if (is_array($reviewStatus) && count($reviewStatus)>0) { + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($reviewStatus as $r) { + $required = null; + $is_reviewer = false; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + if($r["required"] == $user->getId()) + $is_reviewer = true; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + } + if($required->isMember($user) && ($user->getId() != $owner->getId())) + $is_reviewer = true; + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } + } + + if (is_array($approvalStatus) && count($approvalStatus)>0) { + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($approvalStatus as $a) { + $required = null; + $is_approver = false; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = $dms->getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + if($a["required"] == $user->getId()) + $is_approver = true; + break; + case 1: // Approver is a group. + $required = $dms->getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + } + if($required->isMember($user) && ($user->getId() != $owner->getId())) + $is_approver = true; + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } + } + + print "
    \n"; + $this->contentSubHeading(getMLText("reviewers")); + print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$r["date"]."
    • "; + /* $updateUser is the user who has done the review */ + $updateUser = $dms->getUser($r["userID"]); + print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$r["userID"]."'")."
    ".htmlspecialchars($r["comment"])."".getReviewStatusText($r["status"])."
    \n"; + $this->contentSubHeading(getMLText("approvers")); + print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$a["date"]."
    • "; + /* $updateUser is the user who has done the approval */ + $updateUser = $dms->getUser($a["userID"]); + print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."
    ".htmlspecialchars($a["comment"])."".getApprovalStatusText($a["status"])."
    \n"; + + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("previous_versions")); + $this->contentContainerStart(); + + if (count($versions)>1) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + for ($i = count($versions)-2; $i >= 0; $i--) { + $version = $versions[$i]; + $vstat = $version->getStatus(); + + // verify if file exists + $file_exists=file_exists($dms->contentDir . $version->getPath()); + + print "\n"; + print "\n"; + print "\n"; + print ""; + print ""; + print "\n\n"; + } + print "\n
    ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
    ".$version->getVersion()."
      \n"; + print "
    • ".$version->getOriginalFileName()."
    • \n"; + if ($file_exists) print "
    • ". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."
    • "; + else print "
    • ".getMLText("document_deleted")."
    • "; + $updatingUser = $version->getUser(); + print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; + print "
    • ".getLongReadableDate($version->getDate())."
    • "; + print "
    \n"; + print "
      \n"; + $attributes = $version->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + print "
    • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
    • \n"; + } + } + print "
    \n"; + print "
    ".htmlspecialchars($version->getComment())."".getOverallStatusText($vstat["status"]).""; + print ""; + print "
    \n"; + } + else printMLText("no_previous_versions"); + + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("linked_files")); + $this->contentContainerStart(); + + $files = $document->getDocumentFiles(); + + if (count($files) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($files as $file) { + + $file_exists=file_exists($dms->contentDir . $file->getPath()); + + $responsibleUser = $file->getUser(); + + print ""; + print ""; + + print ""; + + print ""; + + print ""; + } + print "\n
    ".getMLText("file")."".getMLText("comment")."
      \n"; + print "
    • ".$file->getOriginalFileName() ."
    • \n"; + if ($file_exists) + print "
    • ". filesize($dms->contentDir . $file->getPath()) ." bytes ".htmlspecialchars($file->getMimeType())."
    • "; + else print "
    • ".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")."
    • "; + + print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."
    • "; + print "
    • ".getLongReadableDate($file->getDate())."
    • "; + + print "
    ".htmlspecialchars($file->getComment()).""; + if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) + print "
    getID()."\" />
    "; + print "
    \n"; + + } + else printMLText("no_attached_files"); + + if ($document->getAccessMode($user) >= M_READWRITE){ + print "
    "; + print "\n"; + } + $this->contentContainerEnd(); + + + $this->contentHeading(getMLText("linked_documents")); + $this->contentContainerStart(); + $links = $document->getDocumentLinks(); + $links = filterDocumentLinks($user, $links); + + if (count($links) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($links as $link) { + $responsibleUser = $link->getUser(); + $targetDoc = $link->getTarget(); + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print "\n
    ".getMLText("comment")."".getMLText("document_link_by")."
    getID()."\" class=\"linklist\">".htmlspecialchars($targetDoc->getName())."".htmlspecialchars($targetDoc->getComment())."".htmlspecialchars($responsibleUser->getFullName()); + if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) + print "
    ".getMLText("document_link_public").":".(($link->isPublic()) ? getMLText("yes") : getMLText("no")); + print "
    "; + if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) + print "
    ".createHiddenFieldWithKey('removedocumentlink')."getID()."\" />
    "; + print "
    \n"; + } + else printMLText("no_linked_files"); + + if (!$user->isGuest()){ + ?> +
    +
    + + + + + + + getAccessMode($user) >= M_READWRITE) { + print ""; + print ""; + } + ?> + + + +
    :printDocumentChooser("form1");?>
    ".getMLText("document_link_public")."
      "; + print "
    • " . getMLText("yes")."
    • "; + print "
    • " . getMLText("no")."
    • "; + print "
    ">
    +
    + contentContainerEnd(); + + $this->contentEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/blue/class.ViewEvent.php b/views/blue/class.ViewEvent.php new file mode 100644 index 000000000..856c3eb07 --- /dev/null +++ b/views/blue/class.ViewEvent.php @@ -0,0 +1,100 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ViewEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ViewEvent extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $event = $this->params['event']; + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("event_details")); + $this->contentContainerStart(); + + $u=$dms->getUser($event["userID"]); + + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo "
    ".getMLText("name").": ".htmlspecialchars($event["name"])."
    ".getMLText("comment").": ".htmlspecialchars($event["comment"])."
    ".getMLText("from").": ".getReadableDate($event["start"])."
    ".getMLText("to").": ".getReadableDate($event["stop"])."
    ".getMLText("last_update").": ".getLongReadableDate($event["date"])."
    ".getMLText("user").": ".(is_object($u)?htmlspecialchars($u->getFullName()):getMLText("unknown_user"))."
    "; + + $this->contentContainerEnd(); + + if (($user->getID()==$event["userID"])||($user->isAdmin())){ + + $this->contentHeading(getMLText("edit")); + $this->contentContainerStart(); + + print ""; + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/blue/class.ViewFolder.php b/views/blue/class.ViewFolder.php new file mode 100644 index 000000000..9fedb03cd --- /dev/null +++ b/views/blue/class.ViewFolder.php @@ -0,0 +1,161 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.BlueStyle.php"); + +/** + * Class which outputs the html page for ViewFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ViewFolder extends LetoDMS_Blue_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $orderby = $this->params['orderby']; + $enableFolderTree = $this->params['enableFolderTree']; + $showtree = $this->params['showtree']; + + $folderid = $folder->getId(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation(getFolderPathHTML($folder), "view_folder", $folder); + + if ($enableFolderTree) $this->printTreeNavigation($folderid,$showtree); + + $this->contentHeading(getMLText("folder_infos")); + + $owner = $folder->getOwner(); + $this->contentContainerStart(); + print "\n\n". + "\n". + "\n\n\n". + "\n". + "\n\n"; + $attributes = $folder->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + ?> + + + + + \n"; + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("folder_contents")); + $this->contentContainerStart(); + + $subFolders = $folder->getSubFolders($orderby); + $subFolders = LetoDMS_Core_DMS::filterAccess($subFolders, $user, M_READ); + $documents = $folder->getDocuments($orderby); + $documents = LetoDMS_Core_DMS::filterAccess($documents, $user, M_READ); + + if ((count($subFolders) > 0)||(count($documents) > 0)){ + print "
    ".getMLText("owner").":getEmail())."\">".htmlspecialchars($owner->getFullName())."". + "
    ".getMLText("comment").":".htmlspecialchars($folder->getComment())."
    getName()); ?>:getValue()); ?>
    "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + } + else printMLText("empty_notify_list"); + + + foreach($subFolders as $subFolder) { + + $owner = $subFolder->getOwner(); + $comment = $subFolder->getComment(); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + $subsub = $subFolder->getSubFolders(); + $subsub = LetoDMS_Core_DMS::filterAccess($subsub, $user, M_READ); + $subdoc = $subFolder->getDocuments(); + $subdoc = LetoDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); + + print ""; + // print ""; + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + + foreach($documents as $document) { + + $owner = $document->getOwner(); + $comment = $document->getComment(); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + $docID = $document->getID(); + if($latestContent = $document->getLatestContent()) { + $version = $latestContent->getVersion(); + $status = $latestContent->getStatus(); + + print ""; + + if (file_exists($dms->contentDir . $latestContent->getPath())) + print ""; + else print ""; + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + + if ((count($subFolders) > 0)||(count($documents) > 0)) echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."
    getID()."&showtree=".$showtree."\">getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "".htmlspecialchars($owner->getFullName())."".count($subsub)." ".getMLText("folders").", ".count($subdoc)." ".getMLText("documents")."".htmlspecialchars($comment)."
    getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">" . htmlspecialchars($document->getName()) . "".htmlspecialchars($owner->getFullName()).""; + if ( $document->isLocked() ) { + print "getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> "; + } + print getOverallStatusText($status["status"])."".$version."".htmlspecialchars($comment)."
    \n"; + + $this->contentContainerEnd(); + + if ($enableFolderTree) print ""; + + $this->contentEnd(); + + $this->htmlEndPage(); + } /* }}} */ +} + +?> diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php new file mode 100644 index 000000000..2879e72e8 --- /dev/null +++ b/views/bootstrap/class.AddDocument.php @@ -0,0 +1,308 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AddDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $enablelargefileupload = $this->params['enablelargefileupload']; + $strictformcheck = $this->params['strictformcheck']; + $dropfolderdir = $this->params['dropfolderdir']; + $folderid = $folder->getId(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + +?> + + +
    + + +
    +contentHeading(getMLText("add_document")); + $this->contentContainerStart(); + + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $folder->getApproversList(); + $this->contentSubHeading(getMLText("document_infos")); +?> +
    + + + + + + + + + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_document, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : +
    + + +
    :printCategoryChooser("form1");?>
    :printSequenceChooser($folder->getDocuments());?>
    getName()); ?>printAttributeEditField($attrdef, '') ?>
    : + + + +   + +
    + contentSubHeading(getMLText("version_info")); ?> +
    :
    : + +
      +
    1. +
    +
    :printDropFolderChooser("form1");?>
    :
    getName()); ?>printAttributeEditField($attrdef, '', 'attributes_version') ?>
    + contentSubHeading(getMLText("assign_reviewers")); ?> +
    +
    :
    +
    + +
    +
    :
    +
    + +
    + contentSubHeading(getMLText("assign_approvers")); ?> +
    +
    :
    +
    + +
    +
    :
    +
    + +
    + +
    +

    ">

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.AddEvent.php b/views/bootstrap/class.AddEvent.php new file mode 100644 index 000000000..40b8fca60 --- /dev/null +++ b/views/bootstrap/class.AddEvent.php @@ -0,0 +1,106 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AddEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddEvent extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation("", "calendar"); + + $this->contentHeading(getMLText("add_event")); + $this->contentContainerStart(); + + $expdate = date('d-m-Y'); +?> + + +
    + + + + + + + + + + + + + + + + + + + + +
    :printDateChooser(-1, "from");?> + + + + +
    :printDateChooser(-1, "to");?> + + + + +
    :
    :
    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php new file mode 100644 index 000000000..0a0c6fe3e --- /dev/null +++ b/views/bootstrap/class.AddFile.php @@ -0,0 +1,112 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AddFile view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddFile extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + $enablelargefileupload = $this->params['enablelargefileupload']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + +?> + +contentHeading(getMLText("linked_files")); +?> +
    + +'.getMLText('link_alt_updatedocument'), "out.AddFile2.php?documentid=".$document->getId().'

    '); + } +?> +
    +contentContainerStart(); +?> + +
    + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.AddSubFolder.php b/views/bootstrap/class.AddSubFolder.php new file mode 100644 index 000000000..4b551f7ca --- /dev/null +++ b/views/bootstrap/class.AddSubFolder.php @@ -0,0 +1,109 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AddSubFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AddSubFolder extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("add_subfolder")); + $this->contentContainerStart(); +?> + + +
    + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_folder, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + +
    :
    :
    :printSequenceChooser($folder->getSubFolders());?>
    getName()); ?>printAttributeEditField($attrdef, '') ?>

    ">
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.AdminTools.php b/views/bootstrap/class.AdminTools.php new file mode 100644 index 000000000..34f996f75 --- /dev/null +++ b/views/bootstrap/class.AdminTools.php @@ -0,0 +1,76 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AdminTools view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AdminTools extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $logfileenable = $this->params['logfileenable']; + $enablefullsearch = $this->params['enablefullsearch']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); +// $this->contentHeading(getMLText("admin_tools")); + $this->contentContainerStart(); +?> + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ApprovalSummary.php b/views/bootstrap/class.ApprovalSummary.php new file mode 100644 index 000000000..ef75d1677 --- /dev/null +++ b/views/bootstrap/class.ApprovalSummary.php @@ -0,0 +1,144 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ApprovalSummary view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ApprovalSummary extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $db = $dms->getDB(); + + $this->htmlStartPage(getMLText("approval_summary")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + $this->contentHeading(getMLText("approval_summary")); + $this->contentContainerStart(); + + // Get document list for the current user. + $approvalStatus = $user->getApprovalStatus(); + + // reverse order + $approvalStatus["indstatus"]=array_reverse($approvalStatus["indstatus"],true); + $approvalStatus["grpstatus"]=array_reverse($approvalStatus["grpstatus"],true); + + $iRev = array(); + $printheader = true; + foreach ($approvalStatus["indstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $moduser = $dms->getUser($st['required']); + + if ($document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader = false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } + } + if (!$printheader) { + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
    \n"; + }else{ + printMLText("no_approval_needed"); + } + + $this->contentContainerEnd(); + $this->contentHeading(getMLText("group_approval_summary")); + $this->contentContainerStart(); + + $printheader = true; + foreach ($approvalStatus["grpstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $modgroup = $dms->getGroup($st['required']); + + if (!in_array($st["documentID"], $iRev) && $document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader = false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + if (!$printheader) { + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
    \n"; + }else{ + printMLText("empty_notify_list"); + } + + $this->contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ApproveDocument.php b/views/bootstrap/class.ApproveDocument.php new file mode 100644 index 000000000..b7a9136f8 --- /dev/null +++ b/views/bootstrap/class.ApproveDocument.php @@ -0,0 +1,177 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ApproveDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ApproveDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $latestContent = $document->getLatestContent(); + $approvals = $latestContent->getApprovalStatus(); + + foreach($approvals as $approval) { + if($approval['approveID'] == $_GET['approveid']) { + $approvalStatus = $approval; + break; + } + } + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("submit_approval")); +?> + + +contentContainerStart(); + + // Display the Approval form. + if ($approvalStatus['type'] == 0) { + if($approvalStatus["status"]!=0) { + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $indUser = $dms->getUser($approvalStatus["userID"]); + print ""; + print "
    ".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
    "; + printApprovalStatusText($approvalStatus["status"]); + print "".htmlspecialchars($approvalStatus["comment"])."".$approvalStatus["date"]." - ". $indUser->getFullname() ."

    \n"; + } +?> +
    + + + + + +
    : +
    : +
    + + + + +
    +
    +"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printApprovalStatusText($approvalStatus["status"]); + print ""; + print "".htmlspecialchars($approvalStatus["comment"]).""; + $indUser = $dms->getUser($approvalStatus["userID"]); + print "".$approvalStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; + print "
    \n"; + } + +?> +
    + + + + + + + +
    : +
    : + +
    + + + + +
    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php new file mode 100644 index 000000000..72f725326 --- /dev/null +++ b/views/bootstrap/class.AttributeMgr.php @@ -0,0 +1,263 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AttributeMgr view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_AttributeMgr extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $attrdefs = $this->params['attrdefs']; + + $this->htmlStartPage(getMLText("admin_tools")); +?> + + +globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("attrdef_management")); +?> + +
    +
    +
    +: + +
    +
    + +
    +
    + + + +getID()."\" style=\"display : none;\">"; +?> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +isUsed()) { +?> +
    + + + + " type="submit" class="btn"> +
    + +

    + +
    + contentSubHeading("");?> +
    + + + + : + + +
    + : + +
    +
    + : + +
    +
    + : + +
    +
    + : + +
    +
    + : + +
    +
    + : + +
    +
    + "> +
    + + + +
    +
    +
    + + + +contentContainerEnd(); + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.BackupTools.php b/views/bootstrap/class.BackupTools.php new file mode 100644 index 000000000..de5611bf1 --- /dev/null +++ b/views/bootstrap/class.BackupTools.php @@ -0,0 +1,196 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for BackupTools view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_BackupTools extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $contentdir = $this->params['contentdir']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->contentHeading(getMLText("backup_tools")); + $this->contentContainerStart(); + print getMLText("space_used_on_data_folder")." : ".formatted_size(dskspace($contentdir)); + $this->contentContainerEnd(); + + // versioning file creation //////////////////////////////////////////////////// + + $this->contentHeading(getMLText("versioning_file_creation")); + $this->contentContainerStart(); + print "

    ".getMLText("versioning_file_creation_warning")."

    \n"; + + print "
    "; + $this->printFolderChooser("form1",M_READWRITE); + print ""; + print "
    \n"; + + $this->contentContainerEnd(); + + // archive creation //////////////////////////////////////////////////////////// + + $this->contentHeading(getMLText("archive_creation")); + $this->contentContainerStart(); + print "

    ".getMLText("archive_creation_warning")."

    \n"; + + print "
    "; + $this->printFolderChooser("form2",M_READWRITE); + print ""; + print ""; + print "
    \n"; + + // list backup files + $this->contentSubHeading(getMLText("backup_list")); + + $print_header=true; + + $handle = opendir($contentdir); + $entries = array(); + while ($e = readdir($handle)){ + if (is_dir($contentdir.$e)) continue; + if (strpos($e,".tar.gz")==FALSE) continue; + $entries[] = $e; + } + closedir($handle); + + sort($entries); + $entries = array_reverse($entries); + + foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + $folderid=substr($entry,strpos($entry,"_")+1); + $folder=$dms->getFolder((int)$folderid); + + print "\n"; + print "\n"; + if (is_object($folder)) print "\n"; + else print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + if ($print_header) printMLText("empty_notify_list"); + else print "
    ".getMLText("folder")."".getMLText("creation_date")."".getMLText("file_size")."
    ".$entry."".htmlspecialchars($folder->getName())."".getMLText("unknown_id")."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry)).""; + print "".getMLText("backup_remove").""; + print "
    \n"; + + $this->contentContainerEnd(); + + // dump creation /////////////////////////////////////////////////////////////// + + $this->contentHeading(getMLText("dump_creation")); + $this->contentContainerStart(); + print "

    ".getMLText("dump_creation_warning")."

    \n"; + + print "
    "; + print ""; + print "
    \n"; + + // list backup files + $this->contentSubHeading(getMLText("dump_list")); + + $print_header=true; + + $handle = opendir($contentdir); + $entries = array(); + while ($e = readdir($handle)){ + if (is_dir($contentdir.$e)) continue; + if (strpos($e,".sql.gz")==FALSE) continue; + $entries[] = $e; + } + closedir($handle); + + sort($entries); + $entries = array_reverse($entries); + + foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + if ($print_header) printMLText("empty_notify_list"); + else print "
    ".getMLText("creation_date")."".getMLText("file_size")."
    ".$entry."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry)).""; + print "".getMLText("dump_remove").""; + print "
    \n"; + + $this->contentContainerEnd(); + + // files deletion ////////////////////////////////////////////////////////////// + + $this->contentHeading(getMLText("files_deletion")); + $this->contentContainerStart(); + print "

    ".getMLText("files_deletion_warning")."

    \n"; + + print "
    "; + $this->printFolderChooser("form3",M_READWRITE); + print ""; + print "
    \n"; + + $this->contentContainerEnd(); + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php new file mode 100644 index 000000000..5db5fb9af --- /dev/null +++ b/views/bootstrap/class.Bootstrap.php @@ -0,0 +1,1251 @@ +theme = $theme; + $this->params = $params; + $this->imgpath = '../views/'.$theme.'/images/'; + } + + function htmlStartPage($title="", $bodyClass="") { /* {{{ */ + echo "\n"; + echo "\n\n"; + echo "\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + + echo ''."\n"; + echo "".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "LetoDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."\n"; + echo "\n"; + echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; + } /* }}} */ + + function htmlEndPage() { /* {{{ */ + $this->footNote(); + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo "\n\n"; + } /* }}} */ + + function footNote() { /* {{{ */ + echo '
    '."\n"; + echo '
    '."\n"; + echo '
    '."\n"; + if ($this->params['printdisclaimer']){ + echo "
    ".getMLText("disclaimer")."
    "; + } + + if (isset($this->params['footnote']) && strlen((string)$this->params['footnote'])>0) { + echo "
    ".(string)$this->params['footnote']."
    "; + } + echo "
    \n"; + echo "
    \n"; + echo "
    \n"; + + return; + } /* }}} */ + + function contentStart() { /* {{{ */ + echo "
    \n"; + echo "
    \n"; + } /* }}} */ + + function contentEnd() { /* {{{ */ + echo "
    \n"; + echo "
    \n"; + } /* }}} */ + + function globalBanner() { /* {{{ */ + global $settings; + echo "
    \n"; + echo "
    \n"; + echo " \n"; + echo "
    \n"; +/* + echo "
    \n"; + echo "
    \n"; + echo "
    \n"; + echo "
    ". + (strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS"). + "
    \n"; + echo "
     
    \n". + "
    \n"; + return; +*/ + } /* }}} */ + + function globalNavigation($folder=null) { /* {{{ */ + global $settings, $user; + + echo "
    \n"; + echo "
    \n"; + echo "
    \n"; + echo "
    \n"; + echo " _rootFolderID."\">".(strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS")."\n"; + if($user) { + echo "
    \n"; + echo " \n"; + + echo " \n"; + echo "
    "; + if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), "LetoDMS_Core_Folder")) { + echo " getID()."\" />"; + } + echo " "; + echo " "; + echo " "; + echo " "; + echo " "; + if($settings->_enableFullSearch) { + echo " "; + } +// echo " "; + echo "
    \n"; + echo "
    \n"; + } + echo "
    \n"; + echo "
    \n"; + echo "
    \n"; + return; + } /* }}} */ + + function getFolderPathHTML($folder, $tagAll=false, $document=null) { /* {{{ */ + $path = $folder->getPath(); + $txtpath = ""; + for ($i = 0; $i < count($path); $i++) { + $txtpath .= "
  • "; + if ($i +1 < count($path)) { + $txtpath .= "getID()."&showtree=".showtree()."\">". + htmlspecialchars($path[$i]->getName()).""; + } + else { + $txtpath .= ($tagAll ? "getID()."&showtree=".showtree()."\">". + htmlspecialchars($path[$i]->getName())."" : htmlspecialchars($path[$i]->getName())); + } + $txtpath .= " /
  • "; + } + if($document) + $txtpath .= "
  • getId()."\">".htmlspecialchars($document->getName())."
  • "; + + return ''; + } /* }}} */ + + function pageNavigation($pageTitle, $pageType=null, $extra=null) { /* {{{ */ + + if ($pageType!=null && strcasecmp($pageType, "noNav")) { + if($pageType == "view_folder" || $pageType == "view_document") + echo $pageTitle."\n"; + echo "
    \n"; + echo "
    \n"; + switch ($pageType) { + case "view_folder": + $this->folderNavigationBar($extra); + break; + case "view_document": + $this->documentNavigationBar(); + break; + case "my_documents": + echo "".$pageTitle.""; //echo $pageTitle."\n"; + $this->myDocumentsNavigationBar(); + break; + case "my_account": + echo "".$pageTitle.""; //echo $pageTitle."\n"; + $this->accountNavigationBar(); + break; + case "admin_tools": + echo "".$pageTitle.""; //echo $pageTitle."\n"; + $this->adminToolsNavigationBar(); + break; + case "calendar"; + echo "".$pageTitle.""; //echo $pageTitle."\n"; + $this->calendarNavigationBar($extra); + break; + } + echo "
    \n"; + echo "
    \n"; + } else { + echo "".$pageTitle."\n"; + } + + return; + } /* }}} */ + + function folderNavigationBar($folder) { /* {{{ */ + + global $user, $settings; + + if (!is_object($folder) || strcasecmp(get_class($folder), "LetoDMS_Core_Folder")) { + echo "
      \n"; + echo "
    \n"; + return; + } + $accessMode = $folder->getAccessMode($user); + $folderID = $folder->getID(); + echo "\n"; + return; + } /* }}} */ + + function documentNavigationBar() { /* {{{ */ + + global $user, $document; + + $accessMode = $document->getAccessMode($user); + $docid=".php?documentid=" . $document->getID(); + + echo "\n"; + return; + } /* }}} */ + + function accountNavigationBar() { /* {{{ */ + + global $settings, $user; + + echo "\n"; + return; + } /* }}} */ + + function myDocumentsNavigationBar() { /* {{{ */ + + echo "\n"; + return; + } /* }}} */ + + function adminToolsNavigationBar() { /* {{{ */ + + global $settings; + + echo "\n"; + return; + } /* }}} */ + + function calendarNavigationBar($d){ /* {{{ */ + + global $user; + + $ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2]; + + echo "\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 ""; + echo "
    "; + + return; + } /* }}} */ + + function contentContainer($content) { /* {{{ */ + echo "
    \n"; + echo $content; + echo "
    \n"; + return; + } /* }}} */ + + function contentContainerStart($type='info') { /* {{{ */ + + //echo "
    \n"; + echo "
    \n"; + return; + } /* }}} */ + + function contentContainerEnd() { /* {{{ */ + + echo "
    \n"; + return; + } /* }}} */ + + function contentHeading($heading, $noescape=false) { /* {{{ */ + + if($noescape) + echo "".$heading."\n"; + else + echo "".htmlspecialchars($heading)."\n"; + return; + } /* }}} */ + + function contentSubHeading($heading, $first=false) { /* {{{ */ + +// echo "
    ".htmlspecialchars($heading)."
    \n"; + echo "
    ".$heading."
    "; + return; + } /* }}} */ + + function getMimeIcon($fileType) { /* {{{ */ + // for extension use LOWER CASE only + $icons = array(); + $icons["txt"] = "txt.png"; + $icons["text"] = "txt.png"; + $icons["doc"] = "word.png"; + $icons["dot"] = "word.png"; + $icons["docx"] = "word.png"; + $icons["dotx"] = "word.png"; + $icons["rtf"] = "document.png"; + $icons["xls"] = "excel.png"; + $icons["xlt"] = "excel.png"; + $icons["xlsx"] = "excel.png"; + $icons["xltx"] = "excel.png"; + $icons["ppt"] = "powerpoint.png"; + $icons["pot"] = "powerpoint.png"; + $icons["pptx"] = "powerpoint.png"; + $icons["potx"] = "powerpoint.png"; + $icons["exe"] = "binary.png"; + $icons["html"] = "html.png"; + $icons["htm"] = "html.png"; + $icons["gif"] = "image.png"; + $icons["jpg"] = "image.png"; + $icons["jpeg"] = "image.png"; + $icons["bmp"] = "image.png"; + $icons["png"] = "image.png"; + $icons["tif"] = "image.png"; + $icons["tiff"] = "image.png"; + $icons["log"] = "log.png"; + $icons["midi"] = "midi.png"; + $icons["pdf"] = "pdf.png"; + $icons["wav"] = "sound.png"; + $icons["mp3"] = "sound.png"; + $icons["c"] = "source_c.png"; + $icons["cpp"] = "source_cpp.png"; + $icons["h"] = "source_h.png"; + $icons["java"] = "source_java.png"; + $icons["py"] = "source_py.png"; + $icons["tar"] = "tar.png"; + $icons["gz"] = "gz.png"; + $icons["7z"] = "gz.png"; + $icons["bz"] = "gz.png"; + $icons["bz2"] = "gz.png"; + $icons["tgz"] = "gz.png"; + $icons["zip"] = "gz.png"; + $icons["mpg"] = "video.png"; + $icons["avi"] = "video.png"; + $icons["tex"] = "tex.png"; + $icons["ods"] = "ooo_spreadsheet.png"; + $icons["ots"] = "ooo_spreadsheet.png"; + $icons["sxc"] = "ooo_spreadsheet.png"; + $icons["stc"] = "ooo_spreadsheet.png"; + $icons["odt"] = "ooo_textdocument.png"; + $icons["ott"] = "ooo_textdocument.png"; + $icons["sxw"] = "ooo_textdocument.png"; + $icons["stw"] = "ooo_textdocument.png"; + $icons["odp"] = "ooo_presentation.png"; + $icons["otp"] = "ooo_presentation.png"; + $icons["sxi"] = "ooo_presentation.png"; + $icons["sti"] = "ooo_presentation.png"; + $icons["odg"] = "ooo_drawing.png"; + $icons["otg"] = "ooo_drawing.png"; + $icons["sxd"] = "ooo_drawing.png"; + $icons["std"] = "ooo_drawing.png"; + $icons["odf"] = "ooo_formula.png"; + $icons["sxm"] = "ooo_formula.png"; + $icons["smf"] = "ooo_formula.png"; + $icons["mml"] = "ooo_formula.png"; + + $icons["default"] = "default.png"; + + $ext = strtolower(substr($fileType, 1)); + if (isset($icons[$ext])) { + return $this->imgpath.$icons[$ext]; + } + else { + return $this->imgpath.$icons["default"]; + } + } /* }}} */ + + function printDateChooser($defDate = -1, $varName) { /* {{{ */ + + if ($defDate == -1) + $defDate = mktime(); + $day = date("d", $defDate); + $month = date("m", $defDate); + $year = date("Y", $defDate); + + print " \n"; + print " \n"; + print ""; + } /* }}} */ + + function printSequenceChooser($objArr, $keepID = -1) { /* {{{ */ + if (count($objArr) > 0) { + $max = $objArr[count($objArr)-1]->getSequence() + 1; + $min = $objArr[0]->getSequence() - 1; + } + else { + $max = 1.0; + } + print ""; + } /* }}} */ + + function printDocumentChooser($formName) { /* {{{ */ + global $settings; + ?> + + "; + print "
    \n"; + print ""; +// print ""; + print "_rootFolderID."\" role=\"button\" class=\"btn\" data-toggle=\"modal\">".getMLText("document")."…\n"; + print "
    \n"; +?> + + + + getID() : "") ."\">"; + print "
    \n"; + print "getName()) : "") ."\">"; +// print ""; + print "".getMLText("folder")."…\n"; + print "
    \n"; +?> + + + +getId(); + $names[] = htmlspecialchars($cat->getName()); + } + } + print ""; + print "
    \n"; + print ""; + print ""; + print "".getMLText("category")."…\n"; + print "
    \n"; +?> + + +
    +
    + +
    + +getValueSetAsArray()) { + echo ""; + } else { + echo "getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />"; + } + } /* }}} */ + + function printDropFolderChooser($formName, $dropfolderfile="") { /* {{{ */ + global $settings; +?> + +\n"; + print ""; + print ""; + print "".getMLText("choose_target_file")."…\n"; + print "
    \n"; +?> + +imgpath.$img) ) { + return $this->imgpath.$img; + } + return "../out/images/$img"; + } /* }}} */ + + function printImgPath($img) { /* {{{ */ + print $this->getImgPath($img); + } /* }}} */ + + function exitError($pagetitle,$error) { /* {{{ */ + + $this->htmlStartPage($pagetitle); + $this->globalNavigation(); + $this->contentStart(); + + print "
    "; + print "

    Error!

    "; + print htmlspecialchars($error); + print "
    "; + + $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"; + + print "
    • \n"; + + if (count($subFolders) > 0){ + print "printImgPath("minus.png"); + else $this->printImgPath("plus.png"); + print "\" border=0>\n"; + } + else{ + print "printImgPath("blank.png"); + print "\" border=0>\n"; + } + + if ($folder->getAccessMode($user) >= $accessMode) { + + if ($folderID != $currentFolderID){ + + if ($navigation) print ""; + else print "getName())) . "')\">"; + + }else print ""; + + if ($is_open) print "getImgPath("folder_opened.gif")."\" border=0 name=\"treeimg".$folderID."\">".htmlspecialchars($folder->getName()); + else print "getImgPath("folder_closed.gif")."\" border=0 name=\"treeimg".$folderID."\">".htmlspecialchars($folder->getName()); + + if ($folderID != $currentFolderID) print "\n"; + else print ""; + + } + else print "getImgPath("folder_closed.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n"; + + if ($is_open) print "
        \n"; + else 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; +?> + + + + + + + + + + + + + + + + + + +
      +

      +
      +

      +

      + diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php new file mode 100644 index 000000000..82cbe5fee --- /dev/null +++ b/views/bootstrap/class.Calendar.php @@ -0,0 +1,348 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Calendar view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Calendar extends LetoDMS_Bootstrap_Style { + + function generateCalendarArrays() { /* {{{ */ + $this->monthNames = array( getMLText("january"), + getMLText("february"), + getMLText("march"), + getMLText("april"), + getMLText("may"), + getMLText("june"), + getMLText("july"), + getMLText("august"), + getMLText("september"), + getMLText("october"), + getMLText("november"), + getMLText("december") ); + + $this->dayNamesLong = array( getMLText("sunday"), + getMLText("monday"), + getMLText("tuesday"), + getMLText("wednesday"), + getMLText("thursday"), + getMLText("friday"), + getMLText("saturday") ); + + $this->dayNames = array(); + foreach ( $this->dayNamesLong as $dn ){ + $this->dayNames[] = substr($dn,0,2); + } + } /* }}} */ + + // Calculate the number of days in a month, taking into account leap years. + function getDaysInMonth($month, $year) { /* {{{ */ + if ($month < 1 || $month > 12) return 0; + + $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + $d = $daysInMonth[$month - 1]; + + if ($month == 2){ + + if ($year%4 == 0){ + + if ($year%100 == 0){ + + if ($year%400 == 0) $d = 29; + } + else $d = 29; + } + } + return $d; + } /* }}} */ + + // Adjust dates to allow months > 12 and < 0 and day<0 or day>days of the month + function adjustDate(&$day,&$month,&$year) { /* {{{ */ + $d=getDate(mktime(12,0,0, $month, $day, $year)); + $month=$d["mon"]; + $day=$d["mday"]; + $year=$d["year"]; + } /* }}} */ + + // Generate the HTML for a given month + function getMonthHTML($month, $year) { /* {{{ */ + if (!isset($this->monthNames)) $this->generateCalendarArrays(); + if (!isset($this->dayNames)) $this->generateCalendarArrays(); + + $startDay = $this->firstdayofweek; + + $day=1; + $this->adjustDate($day,$month,$year); + + $daysInMonth = $this->getDaysInMonth($month, $year); + $date = getdate(mktime(12, 0, 0, $month, 1, $year)); + + $first = $date["wday"]; + $monthName = $this->monthNames[$month - 1]; + + $s = "\n"; + + $s .= "\n"; + $s .= "\n"; ; + $s .= "\n"; + + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + + // We need to work out what date to start at so that the first appears in the correct column + $d = $startDay + 1 - $first; + while ($d > 1) $d -= 7; + + // Make sure we know when today is, so that we can use a different CSS style + $today = getdate(time()); + + while ($d <= $daysInMonth) + { + $s .= "\n"; + + for ($i = 0; $i < 7; $i++){ + + $class = ($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "today" : ""; + $s .= "\n"; + $d++; + } + $s .= "\n"; + } + + $s .= "
      ".$monthName."
      " . $this->dayNames[($startDay)%7] . "" . $this->dayNames[($startDay+1)%7] . "" . $this->dayNames[($startDay+2)%7] . "" . $this->dayNames[($startDay+3)%7] . "" . $this->dayNames[($startDay+4)%7] . "" . $this->dayNames[($startDay+5)%7] . "" . $this->dayNames[($startDay+6)%7] . "
      "; + + if ($d > 0 && $d <= $daysInMonth){ + + $s .= "".$d.""; + } + else $s .= " "; + + $s .= "
      \n"; + + return $s; + } /* }}} */ + + function printYearTable($year) { /* {{{ */ + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
      " . $this->getMonthHTML(1 , $year) ."" . $this->getMonthHTML(2 , $year) ."" . $this->getMonthHTML(3 , $year) ."" . $this->getMonthHTML(4 , $year) ."
      " . $this->getMonthHTML(5 , $year) ."" . $this->getMonthHTML(6 , $year) ."" . $this->getMonthHTML(7 , $year) ."" . $this->getMonthHTML(8 , $year) ."
      " . $this->getMonthHTML(9 , $year) ."" . $this->getMonthHTML(10, $year) ."" . $this->getMonthHTML(11, $year) ."" . $this->getMonthHTML(12, $year) ."
      \n"; + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $mode = $this->params['mode']; + $year = $this->params['year']; + $month = $this->params['month']; + $day = $this->params['day']; + $firstdayofweek = $this->params['firstdayofweek']; + + $this->adjustDate($day,$month,$year); + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation("", "calendar",array($day,$month,$year)); + + if ($mode=="y"){ + + $this->contentHeading(getMLText("year_view").": ".$year); + + echo "
      "; + echo ""; + echo "
      "; + + $this->contentContainerStart(); + $this->printYearTable($year); + $this->contentContainerEnd(); + + }else if ($mode=="m"){ + + if (!isset($this->dayNamesLong)) $this->generateCalendarArrays(); + if (!isset($this->monthNames)) $this->generateCalendarArrays(); + + $this->contentHeading(getMLText("month_view").": ".$this->monthNames[$month-1]. " ".$year); + + echo "
      "; + echo ""; + echo "
      "; + $this->contentContainerStart(); + + $days=$this->getDaysInMonth($month, $year); + $today = getdate(time()); + + $events = getEventsInInterval(mktime(0,0,0, $month, 1, $year), mktime(23,59,59, $month, $days, $year)); + + echo "\n"; + + for ($i=1; $i<=$days; $i++){ + + // separate weeks + $date = getdate(mktime(12, 0, 0, $month, $i, $year)); + if (($date["wday"]==$this->firstdayofweek) && ($i!=1)) + echo "\n"; + + // highlight today + $class = ($year == $today["year"] && $month == $today["mon"] && $i == $today["mday"]) ? "todayHeader" : "header"; + + echo ""; + echo ""; + echo ""; + + if ($class=="todayHeader") $class="today"; + else $class=""; + + $xdate=mktime(0, 0, 0, $month, $i, $year); + foreach ($events as $event){ + if (($event["start"]<=$xdate)&&($event["stop"]>=$xdate)){ + + if (strlen($event['name']) > 25) $event['name'] = substr($event['name'], 0, 22) . "..."; + print ""; + }else{ + print ""; + } + } + + echo "\n"; + } + echo "
       
      ".$i."".$this->dayNamesLong[$date["wday"]]."".htmlspecialchars($event['name'])." 
      \n"; + + $this->contentContainerEnd(); + + }else{ + + if (!isset($this->dayNamesLong)) $this->generateCalendarArrays(); + if (!isset($this->monthNames)) $this->generateCalendarArrays(); + + // get the week interval - TODO: $GET + $datestart=getdate(mktime(0,0,0,$month,$day,$year)); + while($datestart["wday"]!=$this->firstdayofweek){ + $datestart=getdate(mktime(0,0,0,$datestart["mon"],$datestart["mday"]-1,$datestart["year"])); + } + + $datestop=getdate(mktime(23,59,59,$month,$day,$year)); + if ($datestop["wday"]==$this->firstdayofweek){ + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); + } + while($datestop["wday"]!=$this->firstdayofweek){ + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); + } + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]-1,$datestop["year"])); + + $starttime=mktime(0,0,0,$datestart["mon"],$datestart["mday"],$datestart["year"]); + $stoptime=mktime(23,59,59,$datestop["mon"],$datestop["mday"],$datestop["year"]); + + $today = getdate(time()); + $events = getEventsInInterval($starttime,$stoptime); + + $this->contentHeading(getMLText("week_view").": ".getReadableDate(mktime(12, 0, 0, $month, $day, $year))); + + echo "
      "; + echo ""; + echo "
      "; + $this->contentContainerStart(); + + echo "\n"; + + for ($i=$starttime; $i<$stoptime; $i += 86400){ + + $date = getdate($i); + + // for daylight saving time TODO: could be better + if ( ($i!=$starttime) && ($prev_day==$date["mday"]) ){ + $i += 3600; + $date = getdate($i); + } + + // highlight today + $class = ($date["year"] == $today["year"] && $date["mon"] == $today["mon"] && $date["mday"] == $today["mday"]) ? "todayHeader" : "header"; + + echo ""; + echo ""; + echo ""; + + if ($class=="todayHeader") $class="today"; + else $class=""; + + foreach ($events as $event){ + if (($event["start"]<=$i)&&($event["stop"]>=$i)){ + print ""; + }else{ + print ""; + } + } + + echo "\n"; + + $prev_day=$date["mday"]; + } + echo "
      ".getReadableDate($i)."".$this->dayNamesLong[$date["wday"]]."".htmlspecialchars($event['name'])." 
      \n"; + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php new file mode 100644 index 000000000..0a1fc09e9 --- /dev/null +++ b/views/bootstrap/class.Categories.php @@ -0,0 +1,159 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Categories view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Categories extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); +?> + + +contentHeading(getMLText("global_document_categories")); +?> +
      +
      +
      +: + + +
      +
      + +
      +
      + + + + +getID()."\" style=\"display : none;\">"; +?> +
      + + + + + + + + + + + +
      +isUsed()) { +?> +
      + + + + " type="submit"> +
      + +

      + +
      + contentSubHeading("");?> +
      : +
      + + + +   + "> +
      +
      + + + +
      +
      +
      + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.CategoryChooser.php b/views/bootstrap/class.CategoryChooser.php new file mode 100644 index 000000000..0a99912de --- /dev/null +++ b/views/bootstrap/class.CategoryChooser.php @@ -0,0 +1,69 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for CategoryChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_CategoryChooser extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $form = $this->params['form']; + $selcats = $this->params['selcats']; + + $this->htmlStartPage(getMLText("choose_target_category")); + $this->globalBanner(); + $this->contentContainerStart(); + $selcatsarr = explode(',', $selcats); +?> + + + + + +
      : + +
      +contentContainerEnd(); + echo "\n\n"; +// $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ChangePassword.php b/views/bootstrap/class.ChangePassword.php new file mode 100644 index 000000000..24ee82cb1 --- /dev/null +++ b/views/bootstrap/class.ChangePassword.php @@ -0,0 +1,82 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ChangePassword view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ChangePassword extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $referuri = $this->params['referuri']; + $hash = $this->params['hash']; + + $this->htmlStartPage(getMLText("change_password"), "login"); + $this->globalBanner(); + $this->contentStart(); + $this->pageNavigation(getMLText("change_password")); + $this->contentContainerStart(); +?> +
      +"; + } + if ($hash) { + echo ""; + } +?> + + + + + + + + + + + + + + + + + +
      : +
      +
      ">
      +
      +contentContainerEnd(); ?> + +

      +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.CreateIndex.php b/views/bootstrap/class.CreateIndex.php new file mode 100644 index 000000000..b333e75cc --- /dev/null +++ b/views/bootstrap/class.CreateIndex.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for CreateIndex view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_CreateIndex extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText('admin_tools'), 'admin_tools'); + $this->contentHeading(getMLText("create_fulltext_index")); + $this->contentContainerStart(); + + echo '

      '.getMLText('create_fulltext_index_warning').'

      '; + echo ''.getMLText('confirm_create_fulltext_index').''; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> + diff --git a/views/bootstrap/class.DashBoard.php b/views/bootstrap/class.DashBoard.php new file mode 100644 index 000000000..4248c4d50 --- /dev/null +++ b/views/bootstrap/class.DashBoard.php @@ -0,0 +1,122 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for DashBoard view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DashBoard extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $orderby = $this->params['orderby']; + $enableFolderTree = $this->params['enableFolderTree']; + $showtree = $this->params['showtree']; + $cachedir = $this->params['cachedir']; + + $this->htmlStartPage(getMLText("dashboard")); + + $this->globalNavigation($folder); + $this->contentStart(); + + $this->contentHeading("Willkommen im Onlineportal"); +?> +
      +
      + contentHeading('Gruppen'); ?> +
      + Hier eine Ãœbersicht der Gruppen, auf die der Anwender zugreifen darf. +
      +
      +
      +
      +
      + contentHeading('Lesezeichen'); ?> +
      + + + + + + + + + + + + + +
      NameBesitzerStatus
      walking-paper-4hxq62d9.pdfAdminfreigegeben
      +
      + contentHeading('Neue Dokumente'); ?> +
      +
      + contentHeading('Dokumente zur Prüfung'); ?> +
      +
      + contentHeading('Dokumente zur Genehmigung'); ?> +
      +
      +
      +
      + contentHeading('Neue Beiträge im Wiki'); ?> +
      + + + + + + + + + + + + + +
      NameBesitzerGeändert
      Konzept Bebauung Waldstr.H. Huber28.11.2013
      +
      + contentHeading('Zuletzt bearbeitet'); ?> +
      +
      +
      +
      + contentHeading('Neue Beiträge im Diskussionsforum'); ?> +
      +
      +
      +
      + +htmlEndPage(); + } /* }}} */ +} + +?> diff --git a/views/bootstrap/class.DefaultKeywords.php b/views/bootstrap/class.DefaultKeywords.php new file mode 100644 index 000000000..fcc9dcf4b --- /dev/null +++ b/views/bootstrap/class.DefaultKeywords.php @@ -0,0 +1,197 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for DefaultKeywords view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DefaultKeywords extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $selcategoryid = $this->params['selcategoryid']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + +contentHeading(getMLText("global_default_keywords")); +?> +
      +
      +
      + : + +
      +
      + +
      +
      + + + +getOwner(); + if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue; + + print " + +
      getID()."\" style=\"display : none;\">"; +?> + + + + + + + + + + + + + + + + + + +
      +
      + + + + " type="submit" class="btn" title=""> +
      +
      : +
      + + + + + "> +
      +
      : + getKeywordLists(); + if (count($lists) == 0) + print getMLText("no_default_keywords"); + else + foreach ($lists as $list) { +?> +
      + + + "> + + "> + " style="border: 0px;"> + +
      +
      + + + "> + + " style="border: 0px;"> +
      +
      + +
      +
      + + + + + + "> +
      +
      +
      +
      +
      +
      + + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.DocumentAccess.php b/views/bootstrap/class.DocumentAccess.php new file mode 100644 index 000000000..385e8e45d --- /dev/null +++ b/views/bootstrap/class.DocumentAccess.php @@ -0,0 +1,285 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for DocumentAccess view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentAccess extends LetoDMS_Bootstrap_Style { + + function printAccessModeSelection($defMode) { /* {{{ */ + print "\n"; + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $document = $this->params['document']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + + +contentHeading(getMLText("edit_document_access")); + $this->contentContainerStart(); + + if ($user->isAdmin()) { + + $this->contentSubHeading(getMLText("set_owner")); +?> +
      + + + + + "> +
      +contentSubHeading(getMLText("access_inheritance")); + + if ($document->inheritsAccess()) { + printMLText("inherits_access_msg"); +?> +

      +

      + + + + + "> +
      +
      + + + + + "> +
      +

      +contentContainerEnd(); + $this->htmlEndPage(); + return; +} +?> +
      + + + + "> +
      +getAccessList(); + + $this->contentSubHeading(getMLText("default_access")); +?> +
      + + + + printAccessModeSelection($document->getDefaultAccess()); ?> + "> +
      + +contentSubHeading(getMLText("edit_existing_access")); + + if (count($accessList["users"]) != 0 || count($accessList["groups"]) != 0) { + + print ""; + + /* memorÑ—ze users with access rights */ + $memusers = array(); + foreach ($accessList["users"] as $userAccess) { + $userObj = $userAccess->getUser(); + $memusers[] = $userObj->getID(); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + /* memorize groups with access rights */ + $memgroups = array(); + foreach ($accessList["groups"] as $groupAccess) { + $groupObj = $groupAccess->getGroup(); + $memgroups[] = $groupObj->getID(); + $mode = $groupAccess->getMode(); + print ""; + print ""; + print ""; + print ""; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } + + print "
      ". htmlspecialchars($userObj->getFullName()) . "
      \n"; + $this->printAccessModeSelection($userAccess->getMode()); + print "\n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print ""; + print "
      \n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print ""; + print "\n"; + print "
      ". htmlspecialchars($groupObj->getName()) . "
      "; + $this->printAccessModeSelection($groupAccess->getMode()); + print "\n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">"; + print ""; + print "getID()."\">"; + print ""; + print "
      \n"; + echo createHiddenFieldWithKey('documentaccess')."\n"; + print "getId()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print ""; + print ""; + print "

      "; + } +?> +
      + + + + + + + + + + + + + + + + + + + + +
      : + +
      : + +
      : +printAccessModeSelection(M_READ); +?> +
      ">
      +
      + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.DocumentChooser.php b/views/bootstrap/class.DocumentChooser.php new file mode 100644 index 000000000..b0d086639 --- /dev/null +++ b/views/bootstrap/class.DocumentChooser.php @@ -0,0 +1,139 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for DocumentChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentChooser extends LetoDMS_Bootstrap_Style { + var $user; + var $form; + + function printTree($path, $level = 0) { /* {{{ */ + $folder = $path[$level]; + $subFolders = LetoDMS_Core_DMS::filterAccess($folder->getSubFolders(), $this->user, M_READ); + $documents = LetoDMS_Core_DMS::filterAccess($folder->getDocuments(), $this->user, M_READ); + + if ($level+1 < count($path)) + $nextFolderID = $path[$level+1]->getID(); + else + $nextFolderID = -1; + + if ($level == 0) { + print "
        \n"; + } + print "
      • \n"; + print "printImgPath("minus.png"); + else if (count($subFolders) + count($documents) > 0) $this->printImgPath("minus.png"); + else $this->printImgPath("blank.png"); + print "\" border=0>\n"; + if ($folder->getAccessMode($this->user) >= M_READ) { + print "getImgPath("folder_opened.gif")."\" border=0>".htmlspecialchars($folder->getName())."\n"; + } + else + print "getImgPath("folder_opened.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n"; + print "
      • \n"; + + print "\n"; + if ($level == 0) { + print "
      \n"; + } + + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $this->user = $this->params['user']; + $folder = $this->params['folder']; + $this->form = $this->params['form']; + + $this->htmlStartPage(getMLText("choose_target_document")); +// $this->globalBanner(); +// $this->pageNavigation(getMLText("choose_target_document")); +?> + + + +"; + $this->contentContainerStart(); + echo "
      "; + $this->contentContainerEnd(); +*/ + $this->contentContainerStart(); + $this->printTree($folder->getPath()); + $this->contentContainerEnd(); +?> + + + +\n\n"; +// $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php new file mode 100644 index 000000000..c3e00d4e9 --- /dev/null +++ b/views/bootstrap/class.DocumentNotify.php @@ -0,0 +1,156 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for DocumentNotify view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentNotify extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $sortusersinlist = $this->params['sortusersinlist']; + + $notifyList = $document->getNotifyList(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + +contentHeading(getMLText("edit_existing_notify")); + $this->contentContainerStart(); + + $userNotifyIDs = array(); + $groupNotifyIDs = array(); + + print "\n"; + if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) { + print ""; + } + else { + foreach ($notifyList["users"] as $userNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print ""; + }else print ""; + print ""; + $userNotifyIDs[] = $userNotify->getID(); + } + foreach ($notifyList["groups"] as $groupNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print ""; + }else print ""; + print ""; + $groupNotifyIDs[] = $groupNotify->getID(); + } + } + print "
      ".getMLText("empty_notify_list")."
      " . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "getID() . "&action=delnotify&userid=".$userNotify->getID()."\" class=\"btn btn-mini\"> ".getMLText("delete")."
      " . htmlspecialchars($groupNotify->getName()) . "getID() . "&action=delnotify&groupid=".$groupNotify->getID()."\" class=\"btn btn-mini\"> ".getMLText("delete")."
      \n"; + +?> +
      + +
      + + + + + + + + + + + + + + + +
      : + +
      : + +
      ">
      +
      + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.DocumentVersionDetail.php b/views/bootstrap/class.DocumentVersionDetail.php new file mode 100644 index 000000000..e3c600c11 --- /dev/null +++ b/views/bootstrap/class.DocumentVersionDetail.php @@ -0,0 +1,261 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for DocumentVersionDetail view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DocumentVersionDetail extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + $viewonlinefiletypes = $this->params['viewonlinefiletypes']; + $enableversionmodification = $this->params['enableversionmodification']; + + $latestContent = $document->getLatestContent(); + $status = $version->getStatus(); + $reviewStatus = $version->getReviewStatus(); + $approvalStatus = $version->getApprovalStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("document_infos")); + $this->contentContainerStart(); + +?> + + + + + + + + + + + + + + + + + +isLocked()) { + $lockingUser = $document->getLockingUser(); +?> + + + + + + +
      : +getOwner(); + print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; +?> +
      :getComment());?>
      :getDate()); ?>
      :getKeywords());?>
      : $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
      +contentContainerEnd(); + + // verify if file exists + $file_exists=file_exists($dms->contentDir . $version->getPath()); + + $this->contentHeading(getMLText("details_version", array ("version" => $version->getVersion()))); + $this->contentContainerStart(); + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + print "\n"; + print "\n"; + print "\n"; + + print "\n"; + + print ""; + print ""; + print ""; + print "\n
      ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
      ".$version->getVersion()."
        \n"; + print "
      • ".$version->getOriginalFileName()."
      • \n"; + + if ($file_exists) print "
      • ". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."
      • "; + else print "
      • ".getMLText("document_deleted")."
      • "; + + $updatingUser = $version->getUser(); + print "
      • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
      • "; + print "
      • ".getLongReadableDate($version->getDate())."
      • "; + print "
      ".htmlspecialchars($version->getComment())."".getOverallStatusText($status["status"]).""; + + //if (($document->getAccessMode($user) >= M_READWRITE)) { + print ""; + } + else { + print " "; + } + + echo "
      \n"; + + + print "\n"; + + if (is_array($reviewStatus) && count($reviewStatus)>0) { + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + + foreach ($reviewStatus as $r) { + $required = null; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getName()); + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } + } + + if (is_array($approvalStatus) && count($approvalStatus)>0) { + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + + foreach ($approvalStatus as $a) { + $required = null; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = $dms->getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + break; + case 1: // Approver is a group. + $required = $dms->getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getName()); + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } + } + + print "
      \n"; + $this->contentSubHeading(getMLText("reviewers")); + print "
      ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
      ".$reqName."
      • ".$r["date"]."
      • "; + $updateUser = $dms->getUser($r["userID"]); + print "
      • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'")."
      ".$r["comment"]."".getReviewStatusText($r["status"])."
      \n"; + $this->contentSubHeading(getMLText("approvers")); + print "
      ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
      ".$reqName."
      • ".$a["date"]."
      • "; + $updateUser = $dms->getUser($a["userID"]); + print "
      • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."
      ".$a["comment"]."".getApprovalStatusText($a["status"])."
      \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.DropFolderChooser.php b/views/bootstrap/class.DropFolderChooser.php new file mode 100644 index 000000000..e64a29d03 --- /dev/null +++ b/views/bootstrap/class.DropFolderChooser.php @@ -0,0 +1,71 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for CategoryChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_DropFolderChooser extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $dropfolderfile = $this->params['dropfolderfile']; + $form = $this->params['form']; + $dropfolderdir = $this->params['dropfolderdir']; + + $this->htmlStartPage(getMLText("choose_target_file")); +// $this->globalBanner(); +// $this->pageNavigation(getMLText("choose_target_file")); +?> + + +contentContainerStart(); + + $dir = $dropfolderdir.'/'.$user->getLogin(); + if(is_dir($dir)) { + $d = dir($dir); + echo "\n"; + while (false !== ($entry = $d->read())) { + if($entry != '..' && $entry != '.') { + if(!is_dir($entry)) { + echo "\n"; + } + } + } + echo "
      ".$entry."".filesize($dir.'/'.$entry)."
      \n"; + } + + $this->contentContainerEnd(); + echo "\n\n"; +// $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.EditAttributes.php b/views/bootstrap/class.EditAttributes.php new file mode 100644 index 000000000..b790f96c5 --- /dev/null +++ b/views/bootstrap/class.EditAttributes.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for EditAttributes view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditAttributes extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + $attrdefs = $this->params['attrdefs']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + + $this->contentHeading(getMLText("edit_attributes")); + $this->contentContainerStart(); +?> +
      + + + + + + + + + + + + + +
      getName()); ?>printAttributeEditField($attrdef, $version->getAttributeValue($attrdef)) ?>
      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.EditComment.php b/views/bootstrap/class.EditComment.php new file mode 100644 index 000000000..b976c8dd5 --- /dev/null +++ b/views/bootstrap/class.EditComment.php @@ -0,0 +1,92 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for EditComment view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditComment extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + +contentHeading(getMLText("edit_comment")); + $this->contentContainerStart(); +?> +
      + + + + + + + + + + + + +
      :
      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php new file mode 100644 index 000000000..0140500d5 --- /dev/null +++ b/views/bootstrap/class.EditDocument.php @@ -0,0 +1,128 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for EditDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $attrdefs = $this->params['attrdefs']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + +?> + + +contentHeading(getMLText("edit_document_props")); + $this->contentContainerStart(); +?> +
      + + + + + + + + + + + + + + + + + + +getAccessMode($user) > M_READ) { + print ""; + print ""; + print ""; + } + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + +
      :
      :
      : +printKeywordChooser('form1', $document->getKeywords()); +?> +
      :printCategoryChooser("form1", $document->getCategories());?>
      " . getMLText("sequence") . ":"; + $this->printSequenceChooser($folder->getDocuments(), $document->getID()); + print "
      getName()); ?>:printAttributeEditField($attrdef, $document->getAttributeValue($attrdef)) ?>
      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.EditEvent.php b/views/bootstrap/class.EditEvent.php new file mode 100644 index 000000000..8c6543f6b --- /dev/null +++ b/views/bootstrap/class.EditEvent.php @@ -0,0 +1,113 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for EditEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditEvent extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $event = $this->params['event']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("edit_event")); + $this->contentContainerStart(); +?> + + +
      + + + "> + + + + + + + + + + + + + + + + + + + + + + +
      :printDateChooser($event["start"], "from");?> + " data-date-format="dd-mm-yyyy"> + "> + + +
      :printDateChooser($event["stop"], "to");?> + " data-date-format="dd-mm-yyyy"> + "> + + +
      :" size="60">
      :
      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.EditFolder.php b/views/bootstrap/class.EditFolder.php new file mode 100644 index 000000000..5128a0db4 --- /dev/null +++ b/views/bootstrap/class.EditFolder.php @@ -0,0 +1,118 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for EditFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditFolder extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $attrdefs = $this->params['attrdefs']; + $rootfolderid = $this->params['rootfolderid']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); +?> + + + +contentHeading(getMLText("edit_folder_props")); + $this->contentContainerStart(); +?> +
      + + + + + + + + + + + +getID() == $rootfolderid) ? false : $folder->getParent(); + if ($parent && $parent->getAccessMode($user) > M_READ) { + print ""; + print ""; + print "\n"; + } + + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + +
      :
      :
      " . getMLText("sequence") . ":"; + $this->printSequenceChooser($parent->getSubFolders(), $folder->getID()); + print "
      getName()); ?>printAttributeEditField($attrdef, $folder->getAttributeValue($attrdef)) ?>
      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.EditUserData.php b/views/bootstrap/class.EditUserData.php new file mode 100644 index 000000000..62f48d0f1 --- /dev/null +++ b/views/bootstrap/class.EditUserData.php @@ -0,0 +1,162 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for EditUserData view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_EditUserData extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $enableuserimage = $this->params['enableuserimage']; + $passwordstrength = $this->params['passwordstrength']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("edit_user_details")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + +?> + + + +contentHeading(getMLText("edit_user_details")); + $this->contentContainerStart(); +?> +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      :
      :
      : +
      +
      :
      :
      :
      :
      : +hasImage()) + print ""; + else printMLText("no_user_image"); +?> +
      :
      : + +
      : + +
      ">
      +
      + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ErrorDlg.php b/views/bootstrap/class.ErrorDlg.php new file mode 100644 index 000000000..d818c9428 --- /dev/null +++ b/views/bootstrap/class.ErrorDlg.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ErrorDlg view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ErrorDlg extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.FolderAccess.php b/views/bootstrap/class.FolderAccess.php new file mode 100644 index 000000000..5c502c276 --- /dev/null +++ b/views/bootstrap/class.FolderAccess.php @@ -0,0 +1,277 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for FolderAccess view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_FolderAccess extends LetoDMS_Bootstrap_Style { + function printAccessModeSelection($defMode) { /* {{{ */ + print "\n"; + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $rootfolderid = $this->params['rootfolderid']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); +?> + + + +contentHeading(getMLText("edit_folder_access")); + $this->contentContainerStart(); + + if ($user->isAdmin()) { + + $this->contentSubHeading(getMLText("set_owner")); +?> +
      + + + + + "> +
      + getID() != $rootfolderid && $folder->getParent()){ + + $this->contentSubHeading(getMLText("access_inheritance")); + + if ($folder->inheritsAccess()) { + printMLText("inherits_access_msg"); +?> +

      +

      + + + + + "> +
      +
      + + + + + "> +
      +

      +contentContainerEnd(); + $this->htmlEndPage(); + return; + } +?> +
      + + + + "> +
      +getAccessList(); + + $this->contentSubHeading(getMLText("default_access")); +?> +
      + + + + printAccessModeSelection($folder->getDefaultAccess()); ?> + "> +
      + +contentSubHeading(getMLText("edit_existing_access")); + + if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) { + + print ""; + + foreach ($accessList["users"] as $userAccess) { + $userObj = $userAccess->getUser(); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "\n"; + print "\n"; + print "\n"; + } + + foreach ($accessList["groups"] as $groupAccess) { + $groupObj = $groupAccess->getGroup(); + $mode = $groupAccess->getMode(); + print ""; + print ""; + print ""; + print ""; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">"; + print ""; + print "getID()."\">"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + } + + print "
      ". htmlspecialchars($userObj->getFullName()) . "
      \n"; + $this->printAccessModeSelection($userAccess->getMode()); + print "\n"; + print ""; + print "
      \n"; + print ""; + print "
      ". htmlspecialchars($groupObj->getName()) . "
      "; + $this->printAccessModeSelection($groupAccess->getMode()); + print "\n"; + print "".getMLText("save")." "; + print "\n"; + print "
      \n"; + echo createHiddenFieldWithKey('folderaccess')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print "".getMLText("delete")." "; + print "
      "; + print "

      "; + } +?> +
      + + + + + + + + + + + + + + + + + + + + +
      : + +
      : + +
      : +printAccessModeSelection(M_READ); +?> +
      ">
      +
      + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.FolderChooser.php b/views/bootstrap/class.FolderChooser.php new file mode 100644 index 000000000..4079de0c2 --- /dev/null +++ b/views/bootstrap/class.FolderChooser.php @@ -0,0 +1,82 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for FolderChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_FolderChooser extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $mode = $this->params['mode']; + $exclude = $this->params['exclude']; + $form = $this->params['form']; + $rootfolderid = $this->params['rootfolderid']; + + $this->htmlStartPage(getMLText("choose_target_folder")); +// $this->globalBanner(); +?> + + + + +contentContainerStart(); + $this->printFoldersTree($mode, $exclude, $rootfolderid); + $this->contentContainerEnd(); +?> + + + + +\n\n"; +// $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php new file mode 100644 index 000000000..7b79b52eb --- /dev/null +++ b/views/bootstrap/class.FolderNotify.php @@ -0,0 +1,173 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for FolderNotify view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_FolderNotify extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $strictformcheck = $this->params['strictformcheck']; + + $notifyList = $folder->getNotifyList(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + +?> + + + +contentHeading(getMLText("edit_existing_notify")); + $this->contentContainerStart(); + + $userNotifyIDs = array(); + $groupNotifyIDs = array(); + + print "\n"; + if (empty($notifyList["users"]) && empty($notifyList["groups"])) { + print ""; + } + else { + foreach ($notifyList["users"] as $userNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print "\n"; + echo createHiddenFieldWithKey('foldernotify')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print ""; + print "\n"; + }else print ""; + print ""; + $userNotifyIDs[] = $userNotify->getID(); + } + + foreach ($notifyList["groups"] as $groupNotify) { + print ""; + print ""; + print ""; + if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print "\n"; + echo createHiddenFieldWithKey('foldernotify')."\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; + print ""; + print "\n"; + }else print ""; + print ""; + $groupNotifyIDs[] = $groupNotify->getID(); + } + } + print "
      ".getMLText("empty_notify_list")."
      " . htmlspecialchars($userNotify->getFullName()) . "
      "; + print " "; + print "
      " . htmlspecialchars($groupNotify->getName()) . "
      "; + print ""; + print "
      \n"; + +?> +
      +
      + + + + + + + + + + + + + + + + +
      : + +
      : + +
      ">
      +
      + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ForcePasswordChange.php b/views/bootstrap/class.ForcePasswordChange.php new file mode 100644 index 000000000..75d8256f5 --- /dev/null +++ b/views/bootstrap/class.ForcePasswordChange.php @@ -0,0 +1,86 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ForcePasswordChange view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ForcePasswordChange extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $passwordstrength = $this->params['passwordstrength']; + + $this->htmlStartPage(getMLText("sign_in"), "login"); + $this->globalBanner(); + $this->contentStart(); + echo "

      ".getMLText('password_expiration')."

      "; + echo "
      ".getMLText('password_expiration_text')."
      "; + $this->contentContainerStart(); +?> +
      + + + + + + + + + + + + + + + + + + + + + +
      :
      :
      : +
      +
      :
      ">
      + + + +
      + +contentContainerEnd(); + $tmpfoot = array(); + $tmpfoot[] = "" . getMLText("logout") . "\n"; + print "

      "; + print implode(' | ', $tmpfoot); + print "

      \n"; + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php new file mode 100644 index 000000000..63e134dfb --- /dev/null +++ b/views/bootstrap/class.GroupMgr.php @@ -0,0 +1,253 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for GroupMgr view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_GroupMgr extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $strictformcheck = $this->params['strictformcheck']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + +contentHeading(getMLText("group_management")); +?> + +
      +
      +
      +: + +
      +
      + +
      +
      + + + + +getID()."\" style=\"display : none;\">"; +?> + + + + +
      + + + + + + + + + + + + + + + + +
      :
      :
      ">
      + +contentSubHeading(getMLText("group_members")); +?> + +getUsers(); + if (count($members) == 0) + print ""; + else { + + foreach ($members as $member) { + + print ""; + print ""; + print ""; + print ""; + print ""; + } + } +?> +
      ".getMLText("no_group_members")."
      " . htmlspecialchars($member->getFullName()) . "" . ($group->isMember($member,true)?getMLText("manager"):" ") . ""; + print "
      getID()."\" />getID()."\" />".createHiddenFieldWithKey('rmmember')."
      "; + print " "; + print "
      getID()."\" />getID()."\" />".createHiddenFieldWithKey('tmanager')."
      "; + print "
      + +contentSubHeading(getMLText("add_member")); +?> + +
      + + + + + + + + + +
      + + + + + "> +
      +
      + + + + + +
      +
      +
      + + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.GroupView.php b/views/bootstrap/class.GroupView.php new file mode 100644 index 000000000..1a1bf40d0 --- /dev/null +++ b/views/bootstrap/class.GroupView.php @@ -0,0 +1,104 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for GroupView view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_GroupView extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $allGroups = $this->params['allgroups']; + $allUsers = $this->params['allusers']; + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("groups")); + $this->contentContainerStart(); + + echo "
        \n"; + + foreach ($allGroups as $group){ + + $members = $group->getUsers(); + $managers = $group->getManagers(); + $ismanager = false; /* set to true if current user is manager */ + + echo "
      • ".htmlspecialchars($group->getName()); + if($group->getComment()) + echo " : ".htmlspecialchars($group->getComment()); + foreach($managers as $manager) + if($manager->getId() == $user->getId()) { + echo " : you are the manager of this group"; + $ismanager = true; + } + echo "
      • "; + + echo "
          \n"; + $memberids = array(); + foreach ($members as $member) { + $memberids[] = $member->getId(); + + echo "
        • ".htmlspecialchars($member->getFullName()); + if ($member->getEmail()!="") + echo " (getEmail())."\">".htmlspecialchars($member->getEmail()).")"; + foreach($managers as $manager) + if($manager->getId() == $member->getId()) + echo ", ".getMLText("manager"); + if($ismanager) { + echo ' '.getMLText("rm_user").''; + } + echo "
        • "; + } + if($ismanager) { + echo "
        • ".getMLText("add_user_to_group").":"; + echo "
          "; + echo "getId()."\" />"; + echo ""; + echo "
          "; + echo "
        • "; + } + echo "
        \n"; + } + echo "
      \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Help.php b/views/bootstrap/class.Help.php new file mode 100644 index 000000000..e4c100227 --- /dev/null +++ b/views/bootstrap/class.Help.php @@ -0,0 +1,51 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Help view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Help extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $this->htmlStartPage(getMLText("help")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("help"), ""); + + $this->contentContainerStart(); + + readfile("../languages/".$user->getLanguage()."/help.htm"); + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.IndexInfo.php b/views/bootstrap/class.IndexInfo.php new file mode 100644 index 000000000..c4017ac9c --- /dev/null +++ b/views/bootstrap/class.IndexInfo.php @@ -0,0 +1,70 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for IndexInfo view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_IndexInfo extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $luceneclassdir = $this->params['luceneclassdir']; + $lucenedir = $this->params['lucenedir']; + $index = $this->params['index']; + + $this->htmlStartPage(getMLText('fulltext_info')); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("fulltext_info")); + $this->contentContainerStart(); + + $numDocs = $index->count(); + echo "
      ";
      +		for ($id = 0; $id < $numDocs; $id++) {
      +			if (!$index->isDeleted($id)) {
      +				$hit = $index->getDocument($id);
      +				echo $hit->document_id.": ".htmlspecialchars($hit->title)."\n";
      +			}
      +		}
      +		echo "
      "; + + $terms = $index->terms(); + echo "

      ".count($terms)." Terms

      "; + echo "
      ";
      +		foreach($terms as $term) {
      +			echo htmlspecialchars($term->field).":".htmlspecialchars($term->text)."\n";
      +		}
      +		echo "
      "; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Indexer.php b/views/bootstrap/class.Indexer.php new file mode 100644 index 000000000..f4b430b21 --- /dev/null +++ b/views/bootstrap/class.Indexer.php @@ -0,0 +1,95 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Indexer view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Indexer extends LetoDMS_Bootstrap_Style { + + function tree($dms, $index, $folder, $indent='') { /* {{{ */ + echo $indent."D ".htmlspecialchars($folder->getName())."\n"; + $subfolders = $folder->getSubFolders(); + foreach($subfolders as $subfolder) { + $this->tree($dms, $index, $subfolder, $indent.' '); + } + $documents = $folder->getDocuments(); + foreach($documents as $document) { + echo $indent." ".$document->getId().":".htmlspecialchars($document->getName())." "; + /* If the document wasn't indexed before then just add it */ + if(!($hits = $index->find('document_id:'.$document->getId()))) { + $index->addDocument(new LetoDMS_Lucene_IndexedDocument($dms, $document, $settings->_convcmd ? $settings->_convcmd : null)); + echo "(document added)"; + } else { + $hit = $hits[0]; + /* Check if the attribute created is set or has a value older + * than the lasted content. Documents without such an attribute + * where added when a new document was added to the dms. In such + * a case the document content wasn't indexed. + */ + try { + $created = (int) $hit->getDocument()->getFieldValue('created'); + } catch (Zend_Search_Lucene_Exception $e) { + $created = 0; + } + $content = $document->getLatestContent(); + if($created >= $content->getDate()) { + echo $indent."(document unchanged)"; + } else { + if($index->delete($hit->id)) { + $index->addDocument(new LetoDMS_Lucene_IndexedDocument($dms, $document, $settings->_convcmd ? $settings->_convcmd : null)); + } + echo $indent."(document updated)"; + } + } + echo "\n"; + } + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $index = $this->params['index']; + $recreate = $this->params['recreate']; + $folder = $this->params['folder']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("update_fulltext_index")); + + echo "
      ";
      +		$this->tree($dms, $index, $folder);
      +		echo "
      "; + + $index->commit(); + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Info.php b/views/bootstrap/class.Info.php new file mode 100644 index 000000000..79dc8892f --- /dev/null +++ b/views/bootstrap/class.Info.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Info view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Info extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $version = $this->params['version']; + + $this->htmlStartPage($version->banner()); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation($version->banner()); + $this->contentContainerStart(); + phpinfo(); + $this->contentContainerEnd(); + $this->contentEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.KeywordChooser.php b/views/bootstrap/class.KeywordChooser.php new file mode 100644 index 000000000..06566cbd5 --- /dev/null +++ b/views/bootstrap/class.KeywordChooser.php @@ -0,0 +1,203 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for KeywordChooser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_KeywordChooser extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $form = $this->params['form']; + + $this->htmlStartPage(getMLText("use_default_keywords")); +?> + + +
      +contentContainerStart(); +?> + + + + + + + + + + + + +getOwner(); + if (!$owner->isAdmin()) + continue; +?> + + + + + + + + + +getOwner(); + if ($owner->isAdmin()) + continue; +?> + + + + + +
      :
      : + +
      : + +
      + +contentContainerEnd(); +?> + +htmlEndPage(); + echo "\n\n"; + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.LogManagement.php b/views/bootstrap/class.LogManagement.php new file mode 100644 index 000000000..2be41ad97 --- /dev/null +++ b/views/bootstrap/class.LogManagement.php @@ -0,0 +1,114 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for LogManagement view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_LogManagement extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $contentdir = $this->params['contentdir']; + $logname = $this->params['logname']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->contentHeading(getMLText("log_management")); + $this->contentContainerStart(); + + $print_header=true; + + $handle = opendir($contentdir); + $entries = array(); + while ($e = readdir($handle)){ + if (is_dir($contentdir.$e)) continue; + if (strpos($e,".log")==FALSE) continue; + if (strcmp($e,"current.log")==0) continue; + $entries[] = $e; + } + closedir($handle); + + sort($entries); + $entries = array_reverse($entries); + + foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + + if ($print_header) printMLText("empty_notify_list"); + else print "
      ".getMLText("creation_date")."".getMLText("file_size")."
      ".$entry."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry)).""; + + print "".getMLText("rm_file").""; + print " "; + print "".getMLText("download").""; + + print "
      \n"; + + $this->contentContainerEnd(); + + if ($logname && file_exists($contentdir.$logname)){ + + $this->contentHeading(" "); + $this->contentContainerStart(); + + $this->contentSubHeading(sanitizeString($logname)); + + echo "
      "; + echo "
      \n";
      +			readfile($contentdir.$logname);
      +			echo "
      \n"; + echo "
      "; + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Login.php b/views/bootstrap/class.Login.php new file mode 100644 index 000000000..05c0ec08f --- /dev/null +++ b/views/bootstrap/class.Login.php @@ -0,0 +1,139 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Login view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Login extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $enableguestlogin = $this->params['enableguestlogin']; + $enablepasswordforgotten = $this->params['enablepasswordforgotten']; + $refer = $this->params['referrer']; + $themes = $this->params['themes']; + + $this->htmlStartPage(getMLText("sign_in"), "login"); + $this->globalBanner(); + $this->contentStart(); + $this->pageNavigation(getMLText("sign_in")); +?> + +contentContainerStart(); ?> +
      +"; + } +?> + + + + + + + + + + + + + + + + + + + + + +
      +"; + print "
      +"; + print "
      ">
      +
      +contentContainerEnd(); + $tmpfoot = array(); + if ($enableguestlogin) + $tmpfoot[] = "" . getMLText("guest_login") . "\n"; + if ($enablepasswordforgotten) + $tmpfoot[] = "" . getMLText("password_forgotten") . "\n"; + if($tmpfoot) { + print "

      "; + print implode(' | ', $tmpfoot); + print "

      \n"; + } +?> + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ManageNotify.php b/views/bootstrap/class.ManageNotify.php new file mode 100644 index 000000000..9dec8a895 --- /dev/null +++ b/views/bootstrap/class.ManageNotify.php @@ -0,0 +1,200 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ManageNotify view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ManageNotify extends LetoDMS_Bootstrap_Style { + + // Get list of subscriptions for documents or folders for user or groups + function getNotificationList($as_group, $folders) { /* {{{ */ + + // First, get the list of groups of which the user is a member. + if ($as_group){ + + $groups = $this->user->getGroups(); + + if (count($groups)==0) return NULL; + + $grpList = ""; + foreach ($groups as $group) { + $grpList .= (strlen($grpList)==0 ? "" : ", ") . $group->getID(); + } + + $queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ". + "WHERE `tblNotify`.`groupID` IN (". $grpList .")"; + + } else { + $queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ". + "WHERE `tblNotify`.`userID` = '". $this->user->getID()."'" ; + } + + $resArr = $this->db->getResultArray($queryStr); + + $ret=array(); + + foreach ($resArr as $res){ + + if (($res["targetType"] == T_DOCUMENT)&&(!$folders)) $ret[]=$res["target"]; + if (($res["targetType"] == T_FOLDER)&&($folders)) $ret[]=$res["target"]; + } + + return $ret; + } /* }}} */ + + function printFolderNotificationList($ret,$deleteaction=true) { /* {{{ */ + if (count($ret)==0) { + printMLText("empty_notify_list"); + } + else { + + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + foreach($ret as $ID) { + $fld = $this->dms->getFolder($ID); + if (is_object($fld)) { + $owner = $fld->getOwner(); + print ""; + print ""; + print "\n"; + print ""; + print ""; + } + } + print "
      ".getMLText("name")."".getMLText("owner")."".getMLText("actions")."
      " . htmlspecialchars($fld->getName()) . "".htmlspecialchars($owner->getFullName()).""; + if ($deleteaction) print "".getMLText("delete").""; + else print "".getMLText("edit").""; + print "
      "; + } + } /* }}} */ + + function printDocumentNotificationList($ret,$deleteaction=true) { /* {{{ */ + + if (count($ret)==0) { + printMLText("empty_notify_list"); + } + else { + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + foreach ($ret as $ID) { + $doc = $this->dms->getDocument($ID); + if (is_object($doc)) { + $owner = $doc->getOwner(); + $latest = $doc->getLatestContent(); + $status = $latest->getStatus(); + print "\n"; + print ""; + print "\n"; + print ""; + print ""; + print ""; + print "\n"; + } + } + print "
      ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("actions")."
      " . htmlspecialchars($doc->getName()) . "".htmlspecialchars($owner->getFullName())."".getOverallStatusText($status["status"])."".$latest->getVersion().""; + if ($deleteaction) print "".getMLText("delete").""; + else print "".getMLText("edit").""; + print "
      "; + } + } /* }}} */ + + function show() { /* {{{ */ + $this->dms = $this->params['dms']; + $this->user = $this->params['user']; + $this->db = $this->dms->getDB(); + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("edit_existing_notify")); + $this->contentContainerStart(); + + print "
      "; + $this->contentSubHeading(getMLText("choose_target_folder")); + $this->printFolderChooser("form1",M_READ); + print ""; + print ""; + print ""; + print "
      "; + + print "
      "; + $this->contentSubHeading(getMLText("choose_target_document")); + $this->printDocumentChooser("form2"); + print ""; + print "
      "; + + $this->contentContainerEnd(); + + + // + // Display the results. + // + $this->contentHeading(getMLText("edit_folder_notify")); + $this->contentContainerStart(); + $this->contentSubHeading(getMLText("user")); + $ret=$this->getNotificationList(false,true); + $this->printFolderNotificationList($ret); + $this->contentSubHeading(getMLText("group")); + $ret=$this->getNotificationList(true,true); + $this->printFolderNotificationList($ret,false); + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("edit_document_notify")); + $this->contentContainerStart(); + $this->contentSubHeading(getMLText("user")); + $ret=$this->getNotificationList(false,false); + $this->printDocumentNotificationList($ret); + $this->contentSubHeading(getMLText("group")); + $ret=$this->getNotificationList(true,false); + $this->printDocumentNotificationList($ret,false); + $this->contentContainerEnd(); + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.MoveDocument.php b/views/bootstrap/class.MoveDocument.php new file mode 100644 index 000000000..81b20150a --- /dev/null +++ b/views/bootstrap/class.MoveDocument.php @@ -0,0 +1,64 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for MoveDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MoveDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("move_document")); + $this->contentContainerStart('warning'); +?> +
      + + + + + + + + + +
      :printFolderChooser("form1", M_READWRITE);?>

      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.MoveFolder.php b/views/bootstrap/class.MoveFolder.php new file mode 100644 index 000000000..c994dc6b4 --- /dev/null +++ b/views/bootstrap/class.MoveFolder.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for MoveFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MoveFolder extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("move_folder")); + $this->contentContainerStart(); + +?> +
      + + + + + + + + + + + +
      :printFolderChooser("form1", M_READWRITE, $folder->getID());?>
      ">
      +
      + + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.MyAccount.php b/views/bootstrap/class.MyAccount.php new file mode 100644 index 000000000..cf6966ec8 --- /dev/null +++ b/views/bootstrap/class.MyAccount.php @@ -0,0 +1,88 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for MyAccount view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MyAccount extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $enableuserimage = $this->params['enableuserimage']; + $passwordexpiration = $this->params['passwordexpiration']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("user_info")); + $this->contentContainerStart(); + + + echo "
      \n"; + if ($enableuserimage){ + echo "
      \n"; + print ($user->hasImage() ? "" : getMLText("no_user_image"))."\n"; + echo "
      \n"; + echo "
      \n"; + } else { + echo "
      \n"; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + if($passwordexpiration > 0) { + print "\n"; + print "\n"; + print "\n"; + print "\n"; + } + print "
      ".getMLText("name")." : ".htmlspecialchars($user->getFullName()).($user->isAdmin() ? " (".getMLText("admin").")" : "")."
      ".getMLText("user_login")." : ".$user->getLogin()."
      ".getMLText("email")." : ".htmlspecialchars($user->getEmail())."
      ".getMLText("comment")." : ".htmlspecialchars($user->getComment())."
      ".getMLText("password_expiration")." : ".htmlspecialchars($user->getPwdExpiration())."
      \n"; + print "
      \n"; + print "
      \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php new file mode 100644 index 000000000..9f836868b --- /dev/null +++ b/views/bootstrap/class.MyDocuments.php @@ -0,0 +1,490 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for MyDocuments view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_MyDocuments extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $orderby = $this->params['orderby']; + $showInProcess = $this->params['showinprocess']; + + $db = $dms->getDB(); + + $this->htmlStartPage(getMLText("my_documents")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + + if ($showInProcess){ + + if (!$db->createTemporaryTable("ttstatid") || !$db->createTemporaryTable("ttcontentid")) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + // Get document list for the current user. + $reviewStatus = $user->getReviewStatus(); + $approvalStatus = $user->getApprovalStatus(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + $docCSV = ""; + foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; + } + + if (strlen($docCSV)>0) { + // Get the document information. + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_EXPIRED.") ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + // Create an array to hold all of these results, and index the array by + // document id. This makes it easier to retrieve document ID information + // later on and saves us having to repeatedly poll the database every time + // new document information is required. + $docIdx = array(); + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + $docIdx[$res["id"]][$res["version"]] = $res; + } + + // List the documents where a review has been requested. + $this->contentHeading(getMLText("documents_to_review")); + $this->contentContainerStart(); + $printheader=true; + $iRev = array(); + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + + if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) { + $dList[] = $st["documentID"]; + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { + $dList[] = $st["documentID"]; + + if ($printheader){ + print "
      ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."
      "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + if (!$printheader){ + echo "\n
      ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
      "; + }else{ + printMLText("no_docs_to_review"); + } + $this->contentContainerEnd(); + + // List the documents where an approval has been requested. + $this->contentHeading(getMLText("documents_to_approve")); + $this->contentContainerStart(); + $printheader=true; + + foreach ($approvalStatus["indstatus"] as $st) { + + if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { + if ($printheader){ + print "
      ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
      "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + if (!$printheader){ + echo "\n
      ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
      \n"; + }else{ + printMLText("no_docs_to_approve"); + } + $this->contentContainerEnd(); + } + else { + + $this->contentHeading(getMLText("documents_to_review")); + $this->contentContainerStart(); + printMLText("no_review_needed"); + $this->contentContainerEnd(); + $this->contentHeading(getMLText("documents_to_approve")); + $this->contentContainerStart(); + printMLText("no_approval_needed"); + $this->contentContainerEnd(); + } + + // Get list of documents owned by current user that are pending review or + // pending approval. + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocuments`.`owner` = '".$user->getID()."' ". + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer("Internal error. Unable to complete request. Exiting."); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_user_requiring_attention")); + $this->contentContainerStart(); + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + print "
      ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
      "; + + } + else printMLText("no_docs_to_look_at"); + + $this->contentContainerEnd(); + + + // Get list of documents locked by current user + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer("Internal error. Unable to complete request. Exiting."); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_locked_by_you")); + $this->contentContainerStart(); + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + print "
      ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
      "; + + } + else printMLText("no_docs_locked"); + + $this->contentContainerEnd(); + + } + else { + + // Get list of documents owned by current user + if (!$db->createTemporaryTable("ttstatid")) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + if (!$db->createTemporaryTable("ttcontentid")) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". + "AND `tblDocuments`.`owner` = '".$user->getID()."' "; + + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("all_documents")); + $this->contentContainerStart(); + + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + //print ""; + print ""; + print "\n"; + } + print "
      ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ". htmlspecialchars($res["statusName"])."".(!$res["expires"] ? getMLText("does_not_expire"):getReadableDate($res["expires"]))."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
      "; + } + else printMLText("empty_notify_list"); + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php new file mode 100644 index 000000000..6da72ceea --- /dev/null +++ b/views/bootstrap/class.ObjectCheck.php @@ -0,0 +1,213 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ObjectCheck view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ObjectCheck extends LetoDMS_Bootstrap_Style { + + function tree($dms, $folder, $repair, $path=':', $indent='') { /* {{{ */ + + /* Don't do folderlist check for root folder */ + if($path != ':') { + $folderList = $folder->getFolderList(); + /* Check the folder */ + if($folderList != $path) { + print "\n"; + $this->needsrepair = true; + print "getID()."\">"; + print "getID()."\">"; + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print "/".htmlspecialchars($tmppath[$i]->getName()); + } + print $foldername; + print ""; + + $owner = $folder->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Folderlist is '".$folderList."', should be '".$path."'"; + if($repair) { + $folder->repair(); + print "Repaired\n"; + } else { + print "\n"; + } + print "\n"; + } + } + + $subfolders = $folder->getSubFolders(); + foreach($subfolders as $subfolder) { + $this->tree($dms, $subfolder, $indent.' ', $path.$folder->getId().':'); + } + $path .= $folder->getId().':'; + $documents = $folder->getDocuments(); + foreach($documents as $document) { + /* Check the folder list of the document */ + $folderList = $document->getFolderList(); + if($folderList != $path) { + print "\n"; + $this->needsrepair = true; + $lc = $document->getLatestContent(); + print "getID()."\">getFileType())."\" title=\"".$lc->getMimeType()."\">"; + print "getID()."\">/"; + $folder = $document->getFolder(); + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print htmlspecialchars($tmppath[$i]->getName())."/"; + } + print htmlspecialchars($document->getName()); + print ""; + $owner = $document->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Folderlist is '".$folderList."', should be '".$path."'"; + if($repair) { + $document->repair(); + print "Repaired\n"; + } else { + print "\n"; + } + print "\n"; + } + + /* Check if the content is available */ + $versions = $document->getContent(); + if($versions) { + foreach($versions as $version) { + $filepath = $dms->contentDir . $version->getPath(); + if(!file_exists($filepath)) { + print "\n"; + print "getID()."\">getFileType())."\" title=\"".$version->getMimeType()."\">"; + print "getID()."\">/"; + $folder = $document->getFolder(); + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print htmlspecialchars($tmppath[$i]->getName())."/"; + } + print htmlspecialchars($document->getName()); + print ""; + $owner = $document->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Document content of version ".$version->getVersion()." is missing ('".$path."')"; + if($repair) { + print "Cannot repaired\n"; + } else { + print "\n"; + } + print "\n"; + } + } + } else { + print "\n"; + print "\n"; + print "getID()."\">/"; + $folder = $document->getFolder(); + $tmppath = $folder->getPath(); + for ($i = 1; $i < count($tmppath); $i++) { + print htmlspecialchars($tmppath[$i]->getName())."/"; + } + print htmlspecialchars($document->getName()); + print ""; + $owner = $document->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Document has no content! Delete the document manually."; + print "\n"; + } + } + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $versions = $this->params['unlinkedcontent']; + $repair = $this->params['repair']; + $unlink = $this->params['unlink']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("objectcheck")); + + if($repair) { + echo "
      ".getMLText('repairing_objects')."
      "; + } + $this->contentContainerStart(); + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $this->needsrepair = false; + $this->tree($dms, $folder, $repair); + print "
      ".getMLText("name")."".getMLText("owner")."".getMLText("error")."
      \n"; + + if($this->needsrepair && $repair == 0) { + echo '

      '.getMLText('do_object_repair').'

      '; + } + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("unlinked_content")); + $this->contentContainerStart(); + if($unlink) { + echo "

      ".getMLText('unlinking_objects')."

      "; + } + + if($versions) { + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + foreach($versions as $version) { + $doc = $version->getDocument(); + print ""; + if($unlink) { + $doc->removeContent($version); + } + print "\n"; + } + print "
      ".getMLText("document")."".getMLText("version")."".getMLText("original_filename")."".getMLText("mimetype")."
      ".$doc->getId()."".$version->getVersion()."".$version->getOriginalFileName()."".$version->getMimeType()."
      \n"; + if($unlink == 0) { + echo '

      '.getMLText('do_object_unlink').'

      '; + } + } + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.OverrideContentStatus.php b/views/bootstrap/class.OverrideContentStatus.php new file mode 100644 index 000000000..83d50dd21 --- /dev/null +++ b/views/bootstrap/class.OverrideContentStatus.php @@ -0,0 +1,100 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for OverrideContentStatus view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_OverrideContentStatus extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $overallStatus = $content->getStatus(); + $reviewStatus = $content->getReviewStatus(); + $approvalStatus = $content->getApprovalStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + + $this->contentHeading(getMLText("change_status")); + +?> + +contentContainerStart(); + +// Display the Review form. +?> +
      + + + + +
      : +
      : +
      + + + +
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.PasswordForgotten.php b/views/bootstrap/class.PasswordForgotten.php new file mode 100644 index 000000000..bc585e366 --- /dev/null +++ b/views/bootstrap/class.PasswordForgotten.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for PasswordForgotten view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_PasswordForgotten extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $referrer = $this->params['referrer']; + + $this->htmlStartPage(getMLText("password_forgotten"), "login"); + $this->globalBanner(); + $this->contentStart(); + $this->pageNavigation(getMLText("password_forgotten")); +?> + +contentContainerStart(); ?> +
      +"; + } +?> +

      + + + + + + + + + + + + + +
      ">
      +
      +contentContainerEnd(); ?> + +

      +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveDocument.php b/views/bootstrap/class.RemoveDocument.php new file mode 100644 index 000000000..083ec6265 --- /dev/null +++ b/views/bootstrap/class.RemoveDocument.php @@ -0,0 +1,61 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("rm_document")); + $this->contentContainerStart('warning'); + +?> +
      + + +

      + htmlspecialchars($document->getName())));?> +

      +

      ">

      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveDocumentFile.php b/views/bootstrap/class.RemoveDocumentFile.php new file mode 100644 index 000000000..2693ecff2 --- /dev/null +++ b/views/bootstrap/class.RemoveDocumentFile.php @@ -0,0 +1,61 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveDocumentFile view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveDocumentFile extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $file = $this->params['file']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("rm_file")); + $this->contentContainerStart(); + +?> +
      + + + +

      htmlspecialchars($document->getName()), "name" => htmlspecialchars($file->getName())));?>

      + "> +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveEvent.php b/views/bootstrap/class.RemoveEvent.php new file mode 100644 index 000000000..5991c0ae0 --- /dev/null +++ b/views/bootstrap/class.RemoveEvent.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveEvent extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $event = $this->params['event']; + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("edit_event")); + $this->contentContainerStart(); + +?> +
      + + "> +

      htmlspecialchars($event["name"])));?>

      + "> +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveFolder.php b/views/bootstrap/class.RemoveFolder.php new file mode 100644 index 000000000..0eb52534f --- /dev/null +++ b/views/bootstrap/class.RemoveFolder.php @@ -0,0 +1,61 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveFolder extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("rm_folder")); + $this->contentContainerStart(); +?> +
      + + + +

      + htmlspecialchars($folder->getName())));?> +

      +

      ">

      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveGroup.php b/views/bootstrap/class.RemoveGroup.php new file mode 100644 index 000000000..e1e16844b --- /dev/null +++ b/views/bootstrap/class.RemoveGroup.php @@ -0,0 +1,61 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveGroup view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveGroup extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $group = $this->params['group']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("rm_group")); + $this->contentContainerStart(); + +?> +
      + + + +

      + htmlspecialchars($group->getName())));?> +

      +

      ">

      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveLog.php b/views/bootstrap/class.RemoveLog.php new file mode 100644 index 000000000..988e9137d --- /dev/null +++ b/views/bootstrap/class.RemoveLog.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveLog view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveLog extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $logname = $this->params['logname']; + + $this->htmlStartPage(getMLText("backup_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("rm_file")); + $this->contentContainerStart(); +?> +
      + + +

      $logname));?>

      + "> +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveUser.php b/views/bootstrap/class.RemoveUser.php new file mode 100644 index 000000000..f8995e4a0 --- /dev/null +++ b/views/bootstrap/class.RemoveUser.php @@ -0,0 +1,79 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveUser view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveUser extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $rmuser = $this->params['rmuser']; + $allusers = $this->params['allusers']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("rm_user")); + $this->contentContainerStart(); + +?> +
      + + + +

      + htmlspecialchars($rmuser->getFullName())));?> +

      + +

      +: + +

      + +

      ">

      + +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.RemoveVersion.php b/views/bootstrap/class.RemoveVersion.php new file mode 100644 index 000000000..ed4f5b53b --- /dev/null +++ b/views/bootstrap/class.RemoveVersion.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for RemoveVersion view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_RemoveVersion extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $version = $this->params['version']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("rm_version")); + $this->contentContainerStart(); +?> +
      + + + +

      htmlspecialchars($document->getName()), "version" => $version->getVersion()));?>

      + "> +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ReviewDocument.php b/views/bootstrap/class.ReviewDocument.php new file mode 100644 index 000000000..143daafa8 --- /dev/null +++ b/views/bootstrap/class.ReviewDocument.php @@ -0,0 +1,186 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ReviewDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ReviewDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $reviews = $content->getReviewStatus(); + foreach($reviews as $review) { + if($review['reviewID'] == $_GET['reviewid']) { + $reviewStatus = $review; + break; + } + } + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("submit_review")); +?> + + +contentContainerStart(); + + // Display the Review form. + if ($reviewStatus['type'] == 0) { + if($reviewStatus["status"]!=0) { + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $indUser = $dms->getUser($reviewStatus["userID"]); + print ""; + print "
      ".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
      "; + printReviewStatusText($reviewStatus["status"]); + print "".htmlspecialchars($reviewStatus["comment"])."".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."

      "; + } +?> +
      + + + + + + + + + + + + + + +
      :
      + +
      + + + +
      +"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printReviewStatusText($reviewStatus["status"]); + print ""; + print "".htmlspecialchars($reviewStatus["comment"]).""; + $indUser = $dms->getUser($reviewStatus["userID"]); + print "".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; + print "
      \n"; + } + +?> +
      + + + + + + + + + + + + + + +
      :
      : + +
      + + '/> + + +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ReviewSummary.php b/views/bootstrap/class.ReviewSummary.php new file mode 100644 index 000000000..faa6b1ca6 --- /dev/null +++ b/views/bootstrap/class.ReviewSummary.php @@ -0,0 +1,146 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ReviewSummary view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ReviewSummary extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $this->htmlStartPage(getMLText("my_documents")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + + $this->contentHeading(getMLText("review_summary")); + $this->contentContainerStart(); + + // TODO: verificare scadenza + + // Get document list for the current user. + $reviewStatus = $user->getReviewStatus(); + + // reverse order + $reviewStatus["indstatus"]=array_reverse($reviewStatus["indstatus"],true); + $reviewStatus["grpstatus"]=array_reverse($reviewStatus["grpstatus"],true); + + $printheader=true; + $iRev = array(); + foreach ($reviewStatus["indstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $moduser = $dms->getUser($st['required']); + + if ($document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } + } + if (!$printheader) { + echo "\n
      ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
      "; + } else { + printMLText("no_docs_to_review"); + } + + $this->contentContainerEnd(); + $this->contentHeading(getMLText("group_review_summary")); + $this->contentContainerStart(); + + $printheader=true; + foreach ($reviewStatus["grpstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $modgroup = $dms->getGroup($st['required']); + + if (!in_array($st["documentID"], $iRev) && $document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + if (!$printheader) { + echo "\n
      ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
      ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
      "; + }else{ + printMLText("empty_notify_list"); + } + + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php new file mode 100644 index 000000000..2443d5ed9 --- /dev/null +++ b/views/bootstrap/class.Search.php @@ -0,0 +1,159 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Search result view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Search extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $entries = $this->params['searchhits']; + $totalpages = $this->params['totalpages']; + $pageNumber = $this->params['pagenumber']; + $searchTime = $this->params['searchtime']; + $urlparams = $this->params['urlparams']; + $searchin = $this->params['searchin']; + + $this->htmlStartPage(getMLText("search_results")); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation(getMLText("search_results"), ""); + + if($entries) { + print "
      ".getMLText("search_report", array("doccount" => $doccount, "foldercount" => $foldercount, 'searchtime'=>$searchTime))."
      "; + $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $urlparams); + $this->contentContainerStart(); + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + //print "\n"; + //print "\n"; + print "\n\n\n"; + + $foldercount = $doccount = 0; + foreach ($entries as $entry) { + if(get_class($entry) == 'LetoDMS_Core_Document') { + $document = $entry; + $doccount++; + $lc = $document->getLatestContent(); + print ""; + //print ""; + if (in_array(2, $searchin)) { + $docName = markQuery(htmlspecialchars($document->getName()), "i"); + } else { + $docName = htmlspecialchars($document->getName()); + } + print ""; + print ""; + + $attributes = $lc->getAttributes(); + print ""; + + $owner = $document->getOwner(); + print ""; + $display_status=$lc->getStatus(); + print ""; + + print ""; + + if (in_array(3, $searchin)) $comment = markQuery(htmlspecialchars($document->getComment())); + else $comment = htmlspecialchars($document->getComment()); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print ""; + print "\n"; + } elseif(get_class($entry) == 'LetoDMS_Core_Folder') { + $folder = $entry; + $foldercount++; + if (in_array(2, $searchin)) { + $folderName = markQuery(htmlspecialchars($folder->getName()), "i"); + } else { + $folderName = htmlspecialchars($folder->getName()); + } + print ""; + print ""; + print ""; + + $owner = $folder->getOwner(); + print ""; + print ""; + print ""; + if (in_array(3, $searchin)) $comment = markQuery(htmlspecialchars($folder->getComment())); + else $comment = htmlspecialchars($folder->getComment()); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print ""; + print "\n"; + } + } + print "
      ".getMLText("name")."".getMLText("attributes")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."".getMLText("reviewers")."".getMLText("approvers")."
      getID()."\">getMimeIcon($lc->getFileType())."\" title=\"".htmlspecialchars($lc->getMimeType())."\">getID()."\">/"; + $folder = $document->getFolder(); + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + print htmlspecialchars($path[$i]->getName())."/"; + } + print $docName; + print ""; + print "
        \n"; + $attributes = $lc->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + print "
      • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
      • \n"; + } + } + print "
      \n"; + print "
      ".htmlspecialchars($owner->getFullName())."".getOverallStatusText($display_status["status"]). "".$lc->getVersion()."".$comment."
      getID()."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>getID()."\">"; + $path = $folder->getPath(); + print "/"; + for ($i = 1; $i < count($path)-1; $i++) { + print htmlspecialchars($path[$i]->getName())."/"; + } + print $folderName; + print "".htmlspecialchars($owner->getFullName())."".$comment."
      \n"; + $this->contentContainerEnd(); + $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); + } else { + $numResults = $doccount + $foldercount; + if ($numResults == 0) { + print "
      ".getMLText("search_no_results")."
      "; + } + } + $this->htmlEndPage(); + } /* }}} */ +} +?> + diff --git a/views/bootstrap/class.SearchForm.php b/views/bootstrap/class.SearchForm.php new file mode 100644 index 000000000..5cfc17537 --- /dev/null +++ b/views/bootstrap/class.SearchForm.php @@ -0,0 +1,281 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for SearchForm view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SearchForm extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $attrdefs = $this->params['attrdefs']; + $allCats = $this->params['allcategories']; + $allUsers = $this->params['allusers']; + $enablefullsearch = $this->params['enablefullsearch']; + + $this->htmlStartPage(getMLText("search")); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation(getMLText("search"), ""); +?> + + + +
      +
      +contentContainerStart(); +?> +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +\n\n"; +echo "\n\n"; +*/ +?> + + + + +
      : + + +
      + + +
      : + + + + +
      getName()); ?>printAttributeEditField($attrdef, '') ?>
      :
      ()
      + +
      :
      ()
      + + + + + + +
      : + +
      :printFolderChooser("form1", M_READ, -1, $folder);?>
      : + + + + +   + + + + + +printDateChooser(-1, "createstart"); +// print "  "; +// printMLText("and"); +// print "  "; +// $this->printDateChooser(-1, "createend"); +?> +
      ".getMLText("last_update").":"; +printMLText("between"); +print "  "; +$this->printDateChooser(-1, "updatestart"); +print "  "; +printMLText("and"); +print "  "; +$this->printDateChooser(-1, "updateend"); +echo "
      ">
      +
      +contentContainerEnd(); +?> +
      + +
      +contentContainerStart(); +?> +
      + + + + + + + + + + + + + + + + +
      : + + +
      : + +
      : + +
      ">
      + +
      +contentContainerEnd(); + } +?> +
      +
      + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.SearchFulltext.php b/views/bootstrap/class.SearchFulltext.php new file mode 100644 index 000000000..7f5fdb443 --- /dev/null +++ b/views/bootstrap/class.SearchFulltext.php @@ -0,0 +1,130 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Search result view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SearchFulltext extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $entries = $this->params['searchhits']; + $totalpages = $this->params['totalpages']; + $totaldocs = $this->params['totaldocs']; + $pageNumber = $this->params['pagenumber']; + $urlparams = $this->params['urlparams']; + $searchin = $this->params['searchin']; + $searchTime = $this->params['searchtime']; + + $this->htmlStartPage(getMLText("search_results")); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation(getMLText("search_results"), ""); +?> +
      + $totaldocs)); + } + echo ". "; + printMLText("search_time", array("time" => $searchTime)); +?> +
      + +pageList($pageNumber, $totalpages, "../op/op.SearchFulltext.php", $_GET); + $this->contentContainerStart(); + if ($numResults == 0) { + $this->contentContainerEnd(); + $this->htmlEndPage(); + exit; + } + + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + //print "\n"; + //print "\n"; + print "\n\n\n"; + + $resultsFilteredByAccess = false; + foreach ($entries as $document) { + if ($document->getAccessMode($user) < M_READ) { + $resultsFilteredByAccess = true; + } + else { + $lc = $document->getLatestContent(); + print ""; + print ""; + $docName = htmlspecialchars($document->getName()); + print ""; + + $owner = $document->getOwner(); + print ""; + $display_status=$lc->getStatus(); + print ""; + + print ""; + + $comment = htmlspecialchars($document->getComment()); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print ""; + print "\n"; + } + } + if ($resultsFilteredByAccess) { + print ""; + } + print "
      ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."".getMLText("reviewers")."".getMLText("approvers")."
      getMimeIcon($lc->getFileType())."\" title=\"".htmlspecialchars($lc->getMimeType())."\">getID()."\">/"; + $folder = $document->getFolder(); + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + print htmlspecialchars($path[$i]->getName())."/"; + } + print $docName; + print "".htmlspecialchars($owner->getFullName())."".getOverallStatusText($display_status["status"]). "".$lc->getVersion()."".$comment."
      ". getMLText("search_results_access_filtered") . "
      \n"; + + $this->contentContainerEnd(); + $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); + $this->htmlEndPage(); + } /* }}} */ +} +?> + diff --git a/views/bootstrap/class.SetExpires.php b/views/bootstrap/class.SetExpires.php new file mode 100644 index 000000000..75bb4c225 --- /dev/null +++ b/views/bootstrap/class.SetExpires.php @@ -0,0 +1,80 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for SetExpires view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SetExpires extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("set_expiry")); + $this->contentContainerStart(); + + if($document->expires()) + $expdate = date('d-m-Y', $document->getExpires()); + else + $expdate = ''; +?> + +
      + + + + + + + + + + + +
      : + + + +   + +
      ">
      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.SetReviewersApprovers.php b/views/bootstrap/class.SetReviewersApprovers.php new file mode 100644 index 000000000..0f04cb54d --- /dev/null +++ b/views/bootstrap/class.SetReviewersApprovers.php @@ -0,0 +1,239 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for SetReviewersApprovers view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_SetReviewersApprovers extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $overallStatus = $content->getStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("change_assignments")); + + // Retrieve a list of all users and groups that have review / approve privileges. + $docAccess = $document->getApproversList(); + + // Retrieve list of currently assigned reviewers and approvers, along with + // their latest status. + $reviewStatus = $content->getReviewStatus(); + $approvalStatus = $content->getApprovalStatus(); + + // Index the review results for easy cross-reference with the Approvers List. + $reviewIndex = array("i"=>array(), "g"=>array()); + foreach ($reviewStatus as $i=>$rs) { + if ($rs["type"]==0) { + $reviewIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $reviewIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } + + // Index the approval results for easy cross-reference with the Approvers List. + $approvalIndex = array("i"=>array(), "g"=>array()); + foreach ($approvalStatus as $i=>$rs) { + if ($rs["type"]==0) { + $approvalIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $approvalIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +?> + +contentContainerStart(); ?> + +
      + +contentSubHeading(getMLText("update_reviewers"));?> + +
      :
      + "; + + }else if (isset($reviewIndex["i"][$usr->getID()])) { + + switch ($reviewIndex["i"][$usr->getID()]["status"]) { + case 0: + print ""; + break; + case -2: + print ""; + break; + default: + print ""; + break; + } + } + else { + print ""; + } + } +?> + + +
      :
      + "; + + }else if (isset($reviewIndex["g"][$group->getID()])) { + + switch ($reviewIndex["g"][$group->getID()]["status"]) { + case 0: + print ""; + break; + case -2: + print ""; + break; + default: + print ""; + break; + } + } + else { + print ""; + } + } +?> + + +contentSubHeading(getMLText("update_approvers"));?> + +
      :
      + "; + + }else if (isset($approvalIndex["i"][$usr->getID()])) { + + switch ($approvalIndex["i"][$usr->getID()]["status"]) { + case 0: + print ""; + break; + case -2: + print ""; + break; + default: + print ""; + break; + } + } + else { + print ""; + } + } +?> + +
      :
      + + "; + + }else if (isset($approvalIndex["g"][$group->getID()])) { + + switch ($approvalIndex["g"][$group->getID()]["status"]) { + case 0: + print ""; + break; + case -2: + print ""; + break; + default: + print ""; + break; + } + } + else { + print ""; + } + } +?> + + +

      + + +"> +

      +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php new file mode 100644 index 000000000..840b972a9 --- /dev/null +++ b/views/bootstrap/class.Settings.php @@ -0,0 +1,493 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Settings view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Settings extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $settings = $this->params['settings']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("settings")); + +?> + +
      + +_configFilePath)) { + print "
      "; + echo "

      ".getMLText("settings_notwritable")."

      "; + print "
      "; +} +?> + + + +
      +
      +contentContainerStart(); ?> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + "> + + + + + + "> + + + + "> + + + "> + + +
      :
      :
      :_printDisclaimer) echo "checked" ?> />
      : + +
      : + +
      :_strictFormCheck) echo "checked" ?> />
      :
      :_enableConverting) echo "checked" ?> />
      :_enableEmail) echo "checked" ?> />
      :_enableUsersView) echo "checked" ?> />
      :_enableFullSearch) echo "checked" ?> />
      :
      :_enableFolderTree) echo "checked" ?> />
      : + +
      : + +
      :_enableCalendar) echo "checked" ?> />
      : + +
      : + +
      +contentContainerEnd(); ?> +
      + +
      +contentContainerStart(); ?> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + "> + + + + "> + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + "> + + + + +
      :
      :
      :
      :
      :
      :
      :
      :_logFileEnable) echo "checked" ?> />
      : + +
      :_enableLargeFileUpload) echo "checked" ?> />
      :
      :_enableGuestLogin) echo "checked" ?> />
      :_restricted) echo "checked" ?> />
      :_enableUserImage) echo "checked" ?> />
      :_disableSelfEdit) echo "checked" ?> />
      :_enablePasswordForgotten) echo "checked" ?> />
      :
      : + +
      :
      :
      :
      :
      :
      :
      :
      :
      :
      :
      :
      :
      :
      +contentContainerEnd(); ?> +
      + +
      +contentContainerStart(); ?> + + + + "> + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + "> + + + + + +_converters as $mimetype=>$cmd) { +?> + + + + + +
      :
      :
      :_titleDisplayHack) echo "checked" ?> />
      :
      :
      :
      :_enableAdminRevApp) echo "checked" ?> />
      :_enableVersionDeletion) echo "checked" ?> />
      :_enableVersionModification) echo "checked" ?> />
      :_enableOwnerNotification) echo "checked" ?> />
      :_enableNotificationAppRev) echo "checked" ?> />
      :
      :
      :
      :
      :
      :
      :
      +contentContainerEnd(); ?> +
      +
      +_configFilePath)) { +?> + " /> + +
      + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.Statistic.php b/views/bootstrap/class.Statistic.php new file mode 100644 index 000000000..dc9e8388e --- /dev/null +++ b/views/bootstrap/class.Statistic.php @@ -0,0 +1,240 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Statistic view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_Statistic extends LetoDMS_Bootstrap_Style { + var $dms; + var $folder_count; + var $document_count; + var $file_count; + var $storage_size; + + function getAccessColor($mode) { /* {{{ */ + if ($mode == M_NONE) + return "gray"; + else if ($mode == M_READ) + return "green"; + else if ($mode == M_READWRITE) + return "blue"; + else // if ($mode == M_ALL) + return "red"; + } /* }}} */ + + function printFolder($folder) { /* {{{ */ + $this->folder_count++; + $folder_size=0; + $doc_count=0; + + $color = $folder->inheritsAccess() ? "black" : $this->getAccessColor($folder->getDefaultAccess()); + + print "
    • "; + print "getID()."\">".htmlspecialchars($folder->getName()) .""; + + $owner = $folder->getOwner(); + $color = $this->getAccessColor(M_ALL); + print " [".htmlspecialchars($owner->getFullName())."] "; + + if (! $folder->inheritsAccess()) + $this->printAccessList($folder); + + $subFolders = $folder->getSubFolders(); + $documents = $folder->getDocuments(); + + print "
        "; + + foreach ($subFolders as $sub) $folder_size += $this->printFolder($sub); + foreach ($documents as $document){ + $doc_count++; + $folder_size += $this->printDocument($document); + } + + print "
      "; + + print "".formatted_size($folder_size).", ".$doc_count." ".getMLText("documents")."\n"; + + print "
    • "; + + return $folder_size; + } /* }}} */ + + function printDocument($document) { /* {{{ */ + $this->document_count++; + + $local_file_count=0; + $folder_size=0; + + if (file_exists($this->dms->contentDir.$document->getDir())) { + $handle = opendir($this->dms->contentDir.$document->getDir()); + while ($entry = readdir($handle) ) { + if (is_dir($this->dms->contentDir.$document->getDir().$entry)) continue; + else{ + $local_file_count++; + $folder_size += filesize($this->dms->contentDir.$document->getDir().$entry); + } + + } + closedir($handle); + } + $this->storage_size += $folder_size; + + $color = $document->inheritsAccess() ? "black" : $this->getAccessColor($document->getDefaultAccess()); + print "
    • "; + print "getID()."\">".htmlspecialchars($document->getName()).""; + + $owner = $document->getOwner(); + $color = $this->getAccessColor(M_ALL); + print " [".htmlspecialchars($owner->getFullName())."] "; + + if (! $document->inheritsAccess()) $this->printAccessList($document); + + print "".formatted_size($folder_size).", ".$local_file_count." ".getMLText("files")."\n"; + + print "
    • "; + + $this->file_count += $local_file_count; + return $folder_size; + } /* }}} */ + + function printAccessList($obj) { /* {{{ */ + $accessList = $obj->getAccessList(); + if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) + return; + + print " ("; + + for ($i = 0; $i < count($accessList["groups"]); $i++) + { + $group = $accessList["groups"][$i]->getGroup(); + $color = $this->getAccessColor($accessList["groups"][$i]->getMode()); + print "".htmlspecialchars($group->getName()).""; + if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) + print ", "; + } + for ($i = 0; $i < count($accessList["users"]); $i++) + { + $user = $accessList["users"][$i]->getUser(); + $color = $this->getAccessColor($accessList["users"][$i]->getMode()); + print "".htmlspecialchars($user->getFullName()).""; + if ($i+1 < count($accessList["users"])) + print ", "; + } + print ")"; + } /* }}} */ + + function show() { /* {{{ */ + $this->dms = $this->params['dms']; + $user = $this->params['user']; + $rootfolder = $this->params['rootfolder']; + + $this->htmlStartPage(getMLText("folders_and_documents_statistic")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + + $this->folder_count=0; + $this->document_count=0; + $this->file_count=0; + $this->storage_size=0; +?> + + + + +contentHeading(getMLText("folders_and_documents_statistic")); +echo "
      \n"; +echo "
      \n"; +echo "
      \n"; + +print ""; + +print "
      \n"; + +print "
        \n"; +$this->printFolder($rootfolder); +print "
      \n"; + +print "
      \n"; +echo "
      \n"; +echo "
      \n"; + +echo "
      \n"; +echo "
      \n"; +print "Legend\n"; +print "
        \n"; +print "
      • ".getMLText("access_inheritance")."
      • "; +print "
      • getAccessColor(M_ALL)."\">".getMLText("access_mode_all")."
      • "; +print "
      • getAccessColor(M_READWRITE)."\">".getMLText("access_mode_readwrite")."
      • "; +print "
      • getAccessColor(M_READ)."\">".getMLText("access_mode_read")."
      • "; +print "
      • getAccessColor(M_NONE)."\">".getMLText("access_mode_none")."
      • "; +print "
      \n"; + +print "Statistic\n"; +print "
        \n"; +print "
      • ".getMLText("folders").": ".$this->folder_count."
      • \n"; +print "
      • ".getMLText("documents").": ".$this->document_count."
      • \n"; +print "
      • ".getMLText("files").": ".$this->file_count."
      • \n"; +print "
      • ".getMLText("storage_size").": ".formatted_size($this->storage_size)."
      • \n"; + +print "
      \n"; + +echo "
      \n"; +echo "
      \n"; +echo "
      \n"; + + +$this->contentContainerEnd(); +$this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php new file mode 100644 index 000000000..270392f7e --- /dev/null +++ b/views/bootstrap/class.UpdateDocument.php @@ -0,0 +1,279 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for UpdateDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UpdateDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + $enablelargefileupload = $this->params['enablelargefileupload']; + $dropfolderdir = $this->params['dropfolderdir']; + $documentid = $document->getId(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("update_document")); +?> + + + +isLocked()) { + + $lockingUser = $document->getLockingUser(); + + print "
      "; + + printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail())); + + if ($lockingUser->getID() == $user->getID()) + printMLText("unlock_cause_locking_user"); + else if ($document->getAccessMode($user) == M_ALL) + printMLText("unlock_cause_access_mode_all"); + else + { + printMLText("no_update_cause_locked"); + print "
      "; + $this->htmlEndPage(); + exit; + } + + print ""; + } + + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $document->getApproversList(); +?> + +
      + +getID()); + } +?> +
      +contentContainerStart(); +?> + +
      + + + + + + + + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      :
      :printDropFolderChooser("form1");?>
      : + +
      : + + + +   + +
      getName()); ?>:printAttributeEditField($attrdef, '') ?>
      + contentSubHeading(getMLText("assign_reviewers")); ?> +
      +
      :
      +
      +getMandatoryReviewers(); + foreach ($docAccess["users"] as $usr) { + if ($usr->getID()==$user->getID()) continue; + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print ""; + else print ""; + } +*/ +?> + +
      +
      :
      +
      +
      + contentSubHeading(getMLText("assign_approvers")); ?> +
      +
      :
      +
      + +
      +
      :
      +
      + +
      ">
      +
      + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.UserDefaultKeywords.php b/views/bootstrap/class.UserDefaultKeywords.php new file mode 100644 index 000000000..945c106dc --- /dev/null +++ b/views/bootstrap/class.UserDefaultKeywords.php @@ -0,0 +1,190 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for UserDefaultKeywords view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UserDefaultKeywords extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + + $this->htmlStartPage(getMLText("edit_default_keywords")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_account"), "my_account"); +?> + +contentHeading(getMLText("edit_default_keywords")); +?> +
      +
      +
      +: + +
      +
      + +
      +
      + + + +getOwner(); + if ($owner->getID() != $user->getID()) continue; + + print " + +
      getID()."\" style=\"display : none;\">"; +?> + + + + + + + + + + + + + + + + + +
      +
      + + + + " type="submit" class="btn" title=""> +
      +
      : +
      getID()?>"> + + + + + "> +
      +
      : + getKeywordLists(); + if (count($lists) == 0) + print getMLText("no_default_keywords"); + else + foreach ($lists as $list) { +?> +
      getID().".".$list["id"]?>"> + + "> + + "> + " border="0"> + +
      +
      + + + "> + + " style="border: 0px;"> +
      +
      + +
      +
      "> + + + + + "> +
      +
      +
      +
      +
      +
      + + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php new file mode 100644 index 000000000..1f2e02e33 --- /dev/null +++ b/views/bootstrap/class.UserList.php @@ -0,0 +1,107 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for UserList view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UserList extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $allUsers = $this->params['allusers']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation("", "admin_tools"); + $this->contentHeading(getMLText("user_list")); + $this->contentContainerStart(); + + foreach ($allUsers as $currUser) { + if ($currUser->isGuest()) + continue; + + $this->contentSubHeading(getMLText("user") . ": \"" . $currUser->getFullName() . "\""); +?> + + + + + + + + + + + + + + + + + + + + + + + + + +
      :getLogin();?>
      :getFullName();?>
      :getEmail();?>
      :getComment();?>
      : + getGroups(); + if (count($groups) == 0) { + printMLText("no_groups"); + } + else { + for ($j = 0; $j < count($groups); $j++) { + print $groups[$j]->getName(); + if ($j +1 < count($groups)) + print ", "; + } + } + ?> +
      : + hasImage()) + print ""; + else + printMLText("no_user_image"); + ?> +
      +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php new file mode 100644 index 000000000..b5c42778b --- /dev/null +++ b/views/bootstrap/class.UsrMgr.php @@ -0,0 +1,464 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for UsrMgr view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UsrMgr extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $users = $this->params['allusers']; + $groups = $this->params['allgroups']; + $passwordstrength = $this->params['passwordstrength']; + $passwordexpiration = $this->params['passwordexpiration']; + $httproot = $this->params['httproot']; + $enableuserimage = $this->params['enableuserimage']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + +contentHeading(getMLText("user_management")); +?> + +
      +
      +
      +: + +
      +
      + +
      +
      + + + + + +getID()."\" style=\"display : none;\">"; +?> + + + + +
      + + + + + + + + + + + + + + + + + + + + + 0) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      :
      :
      : +
      +
      :
      : getPwdExpiration(); ?>
      :
      :
      :
      :
      :isHidden() ? " checked='checked'" : "");?>>
      :isDisabled() ? " checked='checked'" : "");?>>
      : +hasImage()) + print ""; + else + printMLText("no_user_image"); +?> +
      :
      :
      +
      :
      +
      + +
      +
      :
      +
      + +
      :
      +
      :
      +
      + +
      +
      :
      +
      + +
      ">
      + + + + +
      +
      +
      + + + + +htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.UsrView.php b/views/bootstrap/class.UsrView.php new file mode 100644 index 000000000..f6ef71b61 --- /dev/null +++ b/views/bootstrap/class.UsrView.php @@ -0,0 +1,87 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for UsrView view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_UsrView extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $users = $this->params['allusers']; + $enableuserimage = $this->params['enableuserimage']; + $httproot = $this->params['httproot']; + + $this->htmlStartPage(getMLText("my_account")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_account"), "my_account"); + + $this->contentHeading(getMLText("users")); + $this->contentContainerStart(); + + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($enableuserimage) echo "\n"; + echo "\n\n"; + + foreach ($users as $currUser) { + + if ($currUser->isGuest()) + continue; + + if ($currUser->isHidden()=="1") continue; + + echo "\n"; + + print ""; + + print ""; + print ""; + + if ($enableuserimage){ + print ""; + } + + echo "\n"; + } + + echo "
      ".getMLText("name")."".getMLText("email")."".getMLText("comment")."".getMLText("user_image")."
      ".htmlspecialchars($currUser->getFullName())."getEmail())."\">".htmlspecialchars($currUser->getEmail())."".htmlspecialchars($currUser->getComment()).""; + if ($currUser->hasImage()) print ""; + else printMLText("no_user_image"); + print "
      \n"; + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php new file mode 100644 index 000000000..3b4a2457a --- /dev/null +++ b/views/bootstrap/class.ViewDocument.php @@ -0,0 +1,585 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ViewDocument view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ViewDocument extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $accessop = $this->params['accessobject']; + $viewonlinefiletypes = $this->params['viewonlinefiletypes']; + $documentid = $document->getId(); + + $versions = $document->getContent(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); + $this->contentHeading(getMLText("document_infos")); + + if ($document->isLocked()) { + $lockingUser = $document->getLockingUser(); +?> +
      + $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?> +
      + + +
      +
      + +contentContainerStart(); +?> + + + + + + + + + + + + + + + + + + + + + + + getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); +?> + + + + +
      : + getOwner(); + print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; + ?> +
      :getComment());?>
      :getDate()); ?>
      :getKeywords());?>
      : + getCategories(); + $ct = array(); + foreach($cats as $cat) + $ct[] = htmlspecialchars($cat->getName()); + echo implode(', ', $ct); + ?> +
      getName()); ?>:getValue()); ?>
      +contentContainerEnd(); +?> +
      +
      +getLatestContent()) { + $this->contentContainerStart(); + print getMLText('document_content_missing'); + $this->contentContainerEnd(); + $this->htmlEndPage(); + exit; + } + + $status = $latestContent->getStatus(); + $reviewStatus = $latestContent->getReviewStatus(); + $approvalStatus = $latestContent->getApprovalStatus(); + + // verify if file exists + $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); + + $this->contentContainerStart(); + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + + print ""; + + print ""; + + print ""; + print "\n
      ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
      "; + $previewer = new LetoDMS_Preview_Previewer('/var/lib/letodms/content/cache', 100); + $previewer->createPreview($latestContent); + if($previewer->hasPreview($latestContent)) { + print("getID()."&version=".$latestContent->getVersion()."&width=100\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); + } + print "".$latestContent->getVersion()."
        \n"; + print "
      • ".$latestContent->getOriginalFileName() ."
      • \n"; + + if ($file_exists) + print "
      • ". formatted_size(filesize($dms->contentDir . $latestContent->getPath())) ." ".htmlspecialchars($latestContent->getMimeType())."
      • "; + else print "
      • ".getMLText("document_deleted")."
      • "; + + $updatingUser = $latestContent->getUser(); + print "
      • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
      • "; + print "
      • ".getLongReadableDate($latestContent->getDate())."
      • "; + + print "
      \n"; + print "
        \n"; + $attributes = $latestContent->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + print "
      • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
      • \n"; + } + } + print "
      \n"; + + print "
      ".htmlspecialchars($latestContent->getComment())."".getOverallStatusText($status["status"]); + if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){ + print "
      hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; + } + print "
      "; + + print ""; + echo "
      \n"; + $this->contentContainerEnd(); +?> +
      +
      +contentContainerstart(); + print "\n"; + + if (is_array($reviewStatus) && count($reviewStatus)>0) { + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($reviewStatus as $r) { + $required = null; + $is_reviewer = false; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + if($r["required"] == $user->getId()) + $is_reviewer = true; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + } + if($required->isMember($user) && ($user->getId() != $owner->getId())) + $is_reviewer = true; + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } + } + + if (is_array($approvalStatus) && count($approvalStatus)>0) { + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($approvalStatus as $a) { + $required = null; + $is_approver = false; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = $dms->getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()); + } + if($a["required"] == $user->getId()) + $is_approver = true; + break; + case 1: // Approver is a group. + $required = $dms->getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + } + if($required->isMember($user) && ($user->getId() != $owner->getId())) + $is_approver = true; + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } + } + + print "
      \n"; + $this->contentSubHeading(getMLText("reviewers")); + print "
      ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
      ".$reqName."
      • ".$r["date"]."
      • "; + /* $updateUser is the user who has done the review */ + $updateUser = $dms->getUser($r["userID"]); + print "
      • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$r["userID"]."'")."
      ".htmlspecialchars($r["comment"])."".getReviewStatusText($r["status"])."
      \n"; + $this->contentSubHeading(getMLText("approvers")); + print "
      ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
      ".$reqName."
      • ".$a["date"]."
      • "; + /* $updateUser is the user who has done the approval */ + $updateUser = $dms->getUser($a["userID"]); + print "
      • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."
      ".htmlspecialchars($a["comment"])."".getApprovalStatusText($a["status"])."
      \n"; + $this->contentContainerEnd(); +?> +
      +1) { +?> + + +
      +contentContainerStart(); + + $files = $document->getDocumentFiles(); + + if (count($files) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($files as $file) { + + $file_exists=file_exists($dms->contentDir . $file->getPath()); + + $responsibleUser = $file->getUser(); + + print ""; + print ""; + + print ""; + + print ""; + + print ""; + } + print "\n
      ".getMLText("file")."".getMLText("comment")."
        \n"; + print "
      • ".$file->getOriginalFileName() ."
      • \n"; + if ($file_exists) + print "
      • ". filesize($dms->contentDir . $file->getPath()) ." bytes ".htmlspecialchars($file->getMimeType())."
      • "; + else print "
      • ".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")."
      • "; + + print "
      • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."
      • "; + print "
      • ".getLongReadableDate($file->getDate())."
      • "; + + print "
      ".htmlspecialchars($file->getComment()).""; + if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) + print "
      getID()."\" />
      "; + print "
      \n"; + + } + else printMLText("no_attached_files"); + + if ($document->getAccessMode($user) >= M_READWRITE){ + print "\n"; + } + $this->contentContainerEnd(); +?> +
      + +
      +htmlEndPage(); + + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ViewEvent.php b/views/bootstrap/class.ViewEvent.php new file mode 100644 index 000000000..08d3afb3a --- /dev/null +++ b/views/bootstrap/class.ViewEvent.php @@ -0,0 +1,101 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ViewEvent view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ViewEvent extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $event = $this->params['event']; + + $this->htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("calendar"), "calendar"); + + $this->contentHeading(getMLText("event_details")); + $this->contentContainerStart(); + + $u=$dms->getUser($event["userID"]); + + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + + echo "
      ".getMLText("name").": ".htmlspecialchars($event["name"])."
      ".getMLText("comment").": ".htmlspecialchars($event["comment"])."
      ".getMLText("from").": ".getReadableDate($event["start"])."
      ".getMLText("to").": ".getReadableDate($event["stop"])."
      ".getMLText("last_update").": ".getLongReadableDate($event["date"])."
      ".getMLText("user").": ".(is_object($u)?htmlspecialchars($u->getFullName()):getMLText("unknown_user"))."
      "; + + $this->contentContainerEnd(); + + if (($user->getID()==$event["userID"])||($user->isAdmin())){ + + $this->contentHeading(getMLText("edit")); + $this->contentContainerStart(); + + print ""; + + $this->contentContainerEnd(); + } + + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php new file mode 100644 index 000000000..ce3412301 --- /dev/null +++ b/views/bootstrap/class.ViewFolder.php @@ -0,0 +1,176 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ViewFolder view + * + * @category DMS + * @package LetoDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class LetoDMS_View_ViewFolder extends LetoDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $orderby = $this->params['orderby']; + $enableFolderTree = $this->params['enableFolderTree']; + $showtree = $this->params['showtree']; + $cachedir = $this->params['cachedir']; + + $folderid = $folder->getId(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder), "view_folder", $folder); + + echo "
      \n"; + echo "
      \n"; + if ($enableFolderTree) $this->printTreeNavigation($folderid,$showtree); + echo "
      \n"; + echo "
      \n"; + + $this->contentHeading(getMLText("folder_infos")); + + $owner = $folder->getOwner(); + $this->contentContainerStart(); + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo " + + + + \n"; + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("folder_contents")); + + $subFolders = $folder->getSubFolders($orderby); + $subFolders = LetoDMS_Core_DMS::filterAccess($subFolders, $user, M_READ); + $documents = $folder->getDocuments($orderby); + $documents = LetoDMS_Core_DMS::filterAccess($documents, $user, M_READ); + + if ((count($subFolders) > 0)||(count($documents) > 0)){ + print "
      ".getMLText("owner").":getEmail())."\">".htmlspecialchars($owner->getFullName())."
      ".getMLText("comment").":".htmlspecialchars($folder->getComment()).""; + $attributes = $folder->getAttributes(); + if($attributes) { + foreach($attributes as $attribute) { + $attrdef = $attribute->getAttributeDefinition(); + ?> +
      getName()); ?>:getValue()); ?>
      "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + } + else printMLText("empty_notify_list"); + + + foreach($subFolders as $subFolder) { + + $owner = $subFolder->getOwner(); + $comment = $subFolder->getComment(); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + $subsub = $subFolder->getSubFolders(); + $subsub = LetoDMS_Core_DMS::filterAccess($subsub, $user, M_READ); + $subdoc = $subFolder->getDocuments(); + $subdoc = LetoDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); + + print ""; + // print ""; + print "\n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + + $previewer = new LetoDMS_Preview_Previewer($cachedir, 40); + foreach($documents as $document) { + + $owner = $document->getOwner(); + $comment = $document->getComment(); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + $docID = $document->getID(); + if($latestContent = $document->getLatestContent()) { + $previewer->createPreview($latestContent); + $version = $latestContent->getVersion(); + $status = $latestContent->getStatus(); + + print ""; + + if (file_exists($dms->contentDir . $latestContent->getPath())) { + print ""; + } else + print ""; + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + + if ((count($subFolders) > 0)||(count($documents) > 0)) echo "\n
      ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."
      getID()."&showtree=".$showtree."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "".htmlspecialchars($owner->getFullName())."".count($subsub)." ".getMLText("folders").", ".count($subdoc)." ".getMLText("documents")."".htmlspecialchars($comment)."
      "; + if($previewer->hasPreview($latestContent)) { + print "getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">" . htmlspecialchars($document->getName()) . "".htmlspecialchars($owner->getFullName()).""; + if ( $document->isLocked() ) { + print "getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> "; + } + print getOverallStatusText($status["status"])."".$version."".htmlspecialchars($comment)."
      \n"; + + + echo "
      \n"; + + $this->contentEnd(); + + $this->htmlEndPage(); + } /* }}} */ +} + +?> diff --git a/views/bootstrap/images/application-certificate.png b/views/bootstrap/images/application-certificate.png new file mode 100644 index 000000000..f8d7b3da6 Binary files /dev/null and b/views/bootstrap/images/application-certificate.png differ diff --git a/views/bootstrap/images/application-x-executable.png b/views/bootstrap/images/application-x-executable.png new file mode 100644 index 000000000..7fdb6f567 Binary files /dev/null and b/views/bootstrap/images/application-x-executable.png differ diff --git a/views/bootstrap/images/ascii.png b/views/bootstrap/images/ascii.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/ascii.png differ diff --git a/views/bootstrap/images/audio-x-generic.png b/views/bootstrap/images/audio-x-generic.png new file mode 100644 index 000000000..82bb8bf59 Binary files /dev/null and b/views/bootstrap/images/audio-x-generic.png differ diff --git a/views/bootstrap/images/binary.png b/views/bootstrap/images/binary.png new file mode 100644 index 000000000..7fdb6f567 Binary files /dev/null and b/views/bootstrap/images/binary.png differ diff --git a/views/bootstrap/images/contents2.png b/views/bootstrap/images/contents2.png new file mode 100644 index 000000000..60bba5cf1 Binary files /dev/null and b/views/bootstrap/images/contents2.png differ diff --git a/views/bootstrap/images/deb.png b/views/bootstrap/images/deb.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/deb.png differ diff --git a/views/bootstrap/images/default.png b/views/bootstrap/images/default.png new file mode 100644 index 000000000..6aaf88845 Binary files /dev/null and b/views/bootstrap/images/default.png differ diff --git a/views/bootstrap/images/document.png b/views/bootstrap/images/document.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/document.png differ diff --git a/views/bootstrap/images/empty.png b/views/bootstrap/images/empty.png new file mode 100644 index 000000000..6aaf88845 Binary files /dev/null and b/views/bootstrap/images/empty.png differ diff --git a/views/bootstrap/images/excel.png b/views/bootstrap/images/excel.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/excel.png differ diff --git a/views/bootstrap/images/folder.png b/views/bootstrap/images/folder.png new file mode 100644 index 000000000..a8f2fec0c Binary files /dev/null and b/views/bootstrap/images/folder.png differ diff --git a/views/bootstrap/images/folder_tar.png b/views/bootstrap/images/folder_tar.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/folder_tar.png differ diff --git a/views/bootstrap/images/font-x-generic.png b/views/bootstrap/images/font-x-generic.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/font-x-generic.png differ diff --git a/views/bootstrap/images/gnome-fs-executable.png b/views/bootstrap/images/gnome-fs-executable.png new file mode 100644 index 000000000..7fdb6f567 Binary files /dev/null and b/views/bootstrap/images/gnome-fs-executable.png differ diff --git a/views/bootstrap/images/gnome-fs-regular.png b/views/bootstrap/images/gnome-fs-regular.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/gnome-fs-regular.png differ diff --git a/views/bootstrap/images/gnome-mime-applciation-vnd.stardivision.writer.png b/views/bootstrap/images/gnome-mime-applciation-vnd.stardivision.writer.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-applciation-vnd.stardivision.writer.png differ diff --git a/views/bootstrap/images/gnome-mime-application-msword.png b/views/bootstrap/images/gnome-mime-application-msword.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-msword.png differ diff --git a/views/bootstrap/images/gnome-mime-application-ogg.png b/views/bootstrap/images/gnome-mime-application-ogg.png new file mode 100644 index 000000000..82bb8bf59 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-ogg.png differ diff --git a/views/bootstrap/images/gnome-mime-application-pdf.png b/views/bootstrap/images/gnome-mime-application-pdf.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-pdf.png differ diff --git a/views/bootstrap/images/gnome-mime-application-postscript.png b/views/bootstrap/images/gnome-mime-application-postscript.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-postscript.png differ diff --git a/views/bootstrap/images/gnome-mime-application-rtf.png b/views/bootstrap/images/gnome-mime-application-rtf.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-rtf.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.lotus-1-2-3.png b/views/bootstrap/images/gnome-mime-application-vnd.lotus-1-2-3.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.lotus-1-2-3.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.ms-excel.png b/views/bootstrap/images/gnome-mime-application-vnd.ms-excel.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.ms-excel.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.oasis.opendocument.spreadsheet.png b/views/bootstrap/images/gnome-mime-application-vnd.oasis.opendocument.spreadsheet.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.oasis.opendocument.spreadsheet.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.oasis.opendocument.text.png b/views/bootstrap/images/gnome-mime-application-vnd.oasis.opendocument.text.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.oasis.opendocument.text.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.stardivision.calc.png b/views/bootstrap/images/gnome-mime-application-vnd.stardivision.calc.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.stardivision.calc.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.stardivision.writer.png b/views/bootstrap/images/gnome-mime-application-vnd.stardivision.writer.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.stardivision.writer.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.sun.xml.calc.png b/views/bootstrap/images/gnome-mime-application-vnd.sun.xml.calc.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.sun.xml.calc.png differ diff --git a/views/bootstrap/images/gnome-mime-application-vnd.sun.xml.writer.png b/views/bootstrap/images/gnome-mime-application-vnd.sun.xml.writer.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-vnd.sun.xml.writer.png differ diff --git a/views/bootstrap/images/gnome-mime-application-wordperfect.png b/views/bootstrap/images/gnome-mime-application-wordperfect.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-wordperfect.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-7z-compressed.png b/views/bootstrap/images/gnome-mime-application-x-7z-compressed.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-7z-compressed.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-abiword.png b/views/bootstrap/images/gnome-mime-application-x-abiword.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-abiword.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-applix-spreadsheet.png b/views/bootstrap/images/gnome-mime-application-x-applix-spreadsheet.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-applix-spreadsheet.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-applix-word.png b/views/bootstrap/images/gnome-mime-application-x-applix-word.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-applix-word.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-archive.png b/views/bootstrap/images/gnome-mime-application-x-archive.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-archive.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-arj.png b/views/bootstrap/images/gnome-mime-application-x-arj.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-arj.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-bzip-compressed-tar.png b/views/bootstrap/images/gnome-mime-application-x-bzip-compressed-tar.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-bzip-compressed-tar.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-bzip.png b/views/bootstrap/images/gnome-mime-application-x-bzip.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-bzip.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-cd-image.png b/views/bootstrap/images/gnome-mime-application-x-cd-image.png new file mode 100644 index 000000000..c88440c2a Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-cd-image.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-compress.png b/views/bootstrap/images/gnome-mime-application-x-compress.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-compress.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-compressed-tar.png b/views/bootstrap/images/gnome-mime-application-x-compressed-tar.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-compressed-tar.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-cpio-compressed.png b/views/bootstrap/images/gnome-mime-application-x-cpio-compressed.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-cpio-compressed.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-cpio.png b/views/bootstrap/images/gnome-mime-application-x-cpio.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-cpio.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-deb.png b/views/bootstrap/images/gnome-mime-application-x-deb.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-deb.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-dvi.png b/views/bootstrap/images/gnome-mime-application-x-dvi.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-dvi.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-executable.png b/views/bootstrap/images/gnome-mime-application-x-executable.png new file mode 100644 index 000000000..7fdb6f567 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-executable.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-font-afm.png b/views/bootstrap/images/gnome-mime-application-x-font-afm.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-font-afm.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-font-bdf.png b/views/bootstrap/images/gnome-mime-application-x-font-bdf.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-font-bdf.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-font-linux-psf.png b/views/bootstrap/images/gnome-mime-application-x-font-linux-psf.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-font-linux-psf.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-font-pcf.png b/views/bootstrap/images/gnome-mime-application-x-font-pcf.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-font-pcf.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-font-sunos-news.png b/views/bootstrap/images/gnome-mime-application-x-font-sunos-news.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-font-sunos-news.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-font-ttf.png b/views/bootstrap/images/gnome-mime-application-x-font-ttf.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-font-ttf.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-gnumeric.png b/views/bootstrap/images/gnome-mime-application-x-gnumeric.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-gnumeric.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-gzip.png b/views/bootstrap/images/gnome-mime-application-x-gzip.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-gzip.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-killustrator.png b/views/bootstrap/images/gnome-mime-application-x-killustrator.png new file mode 100644 index 000000000..f17704474 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-killustrator.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-kspread.png b/views/bootstrap/images/gnome-mime-application-x-kspread.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-kspread.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-kword.png b/views/bootstrap/images/gnome-mime-application-x-kword.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-kword.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-ms-dos-executable.png b/views/bootstrap/images/gnome-mime-application-x-ms-dos-executable.png new file mode 100644 index 000000000..7fdb6f567 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-ms-dos-executable.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-perl.png b/views/bootstrap/images/gnome-mime-application-x-perl.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-perl.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-php.png b/views/bootstrap/images/gnome-mime-application-x-php.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-php.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-python-bytecode.png b/views/bootstrap/images/gnome-mime-application-x-python-bytecode.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-python-bytecode.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-rar.png b/views/bootstrap/images/gnome-mime-application-x-rar.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-rar.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-rpm.png b/views/bootstrap/images/gnome-mime-application-x-rpm.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-rpm.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-shellscript.png b/views/bootstrap/images/gnome-mime-application-x-shellscript.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-shellscript.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-shockwave-flash.png b/views/bootstrap/images/gnome-mime-application-x-shockwave-flash.png new file mode 100644 index 000000000..4068687a7 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-shockwave-flash.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-tar.png b/views/bootstrap/images/gnome-mime-application-x-tar.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-tar.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-tarz.png b/views/bootstrap/images/gnome-mime-application-x-tarz.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-tarz.png differ diff --git a/views/bootstrap/images/gnome-mime-application-x-tex.png b/views/bootstrap/images/gnome-mime-application-x-tex.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-x-tex.png differ diff --git a/views/bootstrap/images/gnome-mime-application-xhtml+xml.png b/views/bootstrap/images/gnome-mime-application-xhtml+xml.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-xhtml+xml.png differ diff --git a/views/bootstrap/images/gnome-mime-application-zip.png b/views/bootstrap/images/gnome-mime-application-zip.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-mime-application-zip.png differ diff --git a/views/bootstrap/images/gnome-mime-audio.png b/views/bootstrap/images/gnome-mime-audio.png new file mode 100644 index 000000000..82bb8bf59 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-audio.png differ diff --git a/views/bootstrap/images/gnome-mime-image.png b/views/bootstrap/images/gnome-mime-image.png new file mode 100644 index 000000000..f17704474 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-image.png differ diff --git a/views/bootstrap/images/gnome-mime-text-css.png b/views/bootstrap/images/gnome-mime-text-css.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-css.png differ diff --git a/views/bootstrap/images/gnome-mime-text-html.png b/views/bootstrap/images/gnome-mime-text-html.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-html.png differ diff --git a/views/bootstrap/images/gnome-mime-text-vnd.wap.wml.png b/views/bootstrap/images/gnome-mime-text-vnd.wap.wml.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-vnd.wap.wml.png differ diff --git a/views/bootstrap/images/gnome-mime-text-x-csh.png b/views/bootstrap/images/gnome-mime-text-x-csh.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-x-csh.png differ diff --git a/views/bootstrap/images/gnome-mime-text-x-python.png b/views/bootstrap/images/gnome-mime-text-x-python.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-x-python.png differ diff --git a/views/bootstrap/images/gnome-mime-text-x-sh.png b/views/bootstrap/images/gnome-mime-text-x-sh.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-x-sh.png differ diff --git a/views/bootstrap/images/gnome-mime-text-x-vcard.png b/views/bootstrap/images/gnome-mime-text-x-vcard.png new file mode 100644 index 000000000..60bba5cf1 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-x-vcard.png differ diff --git a/views/bootstrap/images/gnome-mime-text-x-zsh.png b/views/bootstrap/images/gnome-mime-text-x-zsh.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text-x-zsh.png differ diff --git a/views/bootstrap/images/gnome-mime-text.png b/views/bootstrap/images/gnome-mime-text.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-text.png differ diff --git a/views/bootstrap/images/gnome-mime-video.png b/views/bootstrap/images/gnome-mime-video.png new file mode 100644 index 000000000..4068687a7 Binary files /dev/null and b/views/bootstrap/images/gnome-mime-video.png differ diff --git a/views/bootstrap/images/gnome-mime-x-font-afm.png b/views/bootstrap/images/gnome-mime-x-font-afm.png new file mode 100644 index 000000000..938d2b02c Binary files /dev/null and b/views/bootstrap/images/gnome-mime-x-font-afm.png differ diff --git a/views/bootstrap/images/gnome-package.png b/views/bootstrap/images/gnome-package.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gnome-package.png differ diff --git a/views/bootstrap/images/gz.png b/views/bootstrap/images/gz.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/gz.png differ diff --git a/views/bootstrap/images/html.png b/views/bootstrap/images/html.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/html.png differ diff --git a/views/bootstrap/images/image-x-generic.png b/views/bootstrap/images/image-x-generic.png new file mode 100644 index 000000000..f17704474 Binary files /dev/null and b/views/bootstrap/images/image-x-generic.png differ diff --git a/views/bootstrap/images/image.png b/views/bootstrap/images/image.png new file mode 100644 index 000000000..f17704474 Binary files /dev/null and b/views/bootstrap/images/image.png differ diff --git a/views/bootstrap/images/mime_ascii.png b/views/bootstrap/images/mime_ascii.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/mime_ascii.png differ diff --git a/views/bootstrap/images/misc-cd-image.png b/views/bootstrap/images/misc-cd-image.png new file mode 100644 index 000000000..c88440c2a Binary files /dev/null and b/views/bootstrap/images/misc-cd-image.png differ diff --git a/views/bootstrap/images/misc.png b/views/bootstrap/images/misc.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/misc.png differ diff --git a/views/bootstrap/images/package-x-generic.png b/views/bootstrap/images/package-x-generic.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/package-x-generic.png differ diff --git a/views/bootstrap/images/package.png b/views/bootstrap/images/package.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/package.png differ diff --git a/views/bootstrap/images/package_editors.png b/views/bootstrap/images/package_editors.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/package_editors.png differ diff --git a/views/bootstrap/images/package_wordprocessing.png b/views/bootstrap/images/package_wordprocessing.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/package_wordprocessing.png differ diff --git a/views/bootstrap/images/pdf.png b/views/bootstrap/images/pdf.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/pdf.png differ diff --git a/views/bootstrap/images/rpm.png b/views/bootstrap/images/rpm.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/rpm.png differ diff --git a/views/bootstrap/images/shellscript.png b/views/bootstrap/images/shellscript.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/shellscript.png differ diff --git a/views/bootstrap/images/sound.png b/views/bootstrap/images/sound.png new file mode 100644 index 000000000..82bb8bf59 Binary files /dev/null and b/views/bootstrap/images/sound.png differ diff --git a/views/bootstrap/images/spreadsheet.png b/views/bootstrap/images/spreadsheet.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/spreadsheet.png differ diff --git a/views/bootstrap/images/stock_addressbook.png b/views/bootstrap/images/stock_addressbook.png new file mode 100644 index 000000000..60bba5cf1 Binary files /dev/null and b/views/bootstrap/images/stock_addressbook.png differ diff --git a/views/bootstrap/images/stock_script.png b/views/bootstrap/images/stock_script.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/stock_script.png differ diff --git a/views/bootstrap/images/tar.png b/views/bootstrap/images/tar.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/tar.png differ diff --git a/views/bootstrap/images/text-html.png b/views/bootstrap/images/text-html.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/text-html.png differ diff --git a/views/bootstrap/images/text-x-generic.png b/views/bootstrap/images/text-x-generic.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/text-x-generic.png differ diff --git a/views/bootstrap/images/text-x-script.png b/views/bootstrap/images/text-x-script.png new file mode 100644 index 000000000..f60c6930d Binary files /dev/null and b/views/bootstrap/images/text-x-script.png differ diff --git a/views/bootstrap/images/text-x-source.png b/views/bootstrap/images/text-x-source.png new file mode 100644 index 000000000..a1f3409b2 Binary files /dev/null and b/views/bootstrap/images/text-x-source.png differ diff --git a/views/bootstrap/images/tgz.png b/views/bootstrap/images/tgz.png new file mode 100644 index 000000000..285876dca Binary files /dev/null and b/views/bootstrap/images/tgz.png differ diff --git a/views/bootstrap/images/txt.png b/views/bootstrap/images/txt.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/txt.png differ diff --git a/views/bootstrap/images/txt2.png b/views/bootstrap/images/txt2.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/txt2.png differ diff --git a/views/bootstrap/images/unknown.png b/views/bootstrap/images/unknown.png new file mode 100644 index 000000000..1e685ea30 Binary files /dev/null and b/views/bootstrap/images/unknown.png differ diff --git a/views/bootstrap/images/video-x-generic.png b/views/bootstrap/images/video-x-generic.png new file mode 100644 index 000000000..4068687a7 Binary files /dev/null and b/views/bootstrap/images/video-x-generic.png differ diff --git a/views/bootstrap/images/video.png b/views/bootstrap/images/video.png new file mode 100644 index 000000000..4068687a7 Binary files /dev/null and b/views/bootstrap/images/video.png differ diff --git a/views/bootstrap/images/word.png b/views/bootstrap/images/word.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/word.png differ diff --git a/views/bootstrap/images/www.png b/views/bootstrap/images/www.png new file mode 100644 index 000000000..88f0ec90b Binary files /dev/null and b/views/bootstrap/images/www.png differ diff --git a/views/bootstrap/images/x-office-address-book.png b/views/bootstrap/images/x-office-address-book.png new file mode 100644 index 000000000..60bba5cf1 Binary files /dev/null and b/views/bootstrap/images/x-office-address-book.png differ diff --git a/views/bootstrap/images/x-office-document.png b/views/bootstrap/images/x-office-document.png new file mode 100644 index 000000000..4e30e6df0 Binary files /dev/null and b/views/bootstrap/images/x-office-document.png differ diff --git a/views/bootstrap/images/x-office-spreadsheet.png b/views/bootstrap/images/x-office-spreadsheet.png new file mode 100644 index 000000000..7d0086f45 Binary files /dev/null and b/views/bootstrap/images/x-office-spreadsheet.png differ diff --git a/views/clean b/views/clean new file mode 120000 index 000000000..f5ac3db8c --- /dev/null +++ b/views/clean @@ -0,0 +1 @@ +blue \ No newline at end of file diff --git a/views/hc b/views/hc new file mode 120000 index 000000000..f5ac3db8c --- /dev/null +++ b/views/hc @@ -0,0 +1 @@ +blue \ No newline at end of file