new dir with different views

This commit is contained in:
steinm 2012-12-14 07:53:13 +00:00
parent 1182551098
commit d4d366d5aa
276 changed files with 25498 additions and 0 deletions

View File

@ -0,0 +1,291 @@
<?php
/**
* Implementation of AddDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
//if (document.form1.userfile[].value == "") msg += "<?php printMLText("js_no_file");?>\n";
<?php
if ($strictformcheck) {
?>
if(!document.form1.name.disabled){
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
}
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (document.form1.keywords.value == "") msg += "<?php printMLText("js_no_keywords");?>\n";
<?php
}
?>
if (msg != ""){
alert(msg);
return false;
}
return true;
}
function addFiles()
{
var li = document.createElement('li');
li.innerHTML = '<input type="File" name="userfile[]" size="60">';
document.getElementById('files').appendChild(li);
// document.getElementById("files").innerHTML += '<br><input type="File" name="userfile[]" size="60">';
document.form1.name.disabled=true;
}
</script>
<?php
$this->contentHeading(getMLText("add_document"));
$this->contentContainerStart();
// Retrieve a list of all users and groups that have review / approve
// privileges.
$docAccess = $folder->getApproversList();
?>
<table>
<tr>
<td class="warning"><?php echo getMLText("max_upload_size")." : ".ini_get( "upload_max_filesize"); ?></td>
</tr>
<?php
if($enablelargefileupload) {
?>
<tr>
<td><?php printf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folderid."&showtree=".showtree()); ?></td>
</tr>
<?php
}
?>
</table>
<?php $this->contentSubHeading(getMLText("document_infos")); ?>
<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
<?php echo createHiddenFieldWithKey('adddocument'); ?>
<input type="hidden" name="folderid" value="<?php print $folderid; ?>">
<input type="hidden" name="showtree" value="<?php echo showtree();?>">
<table>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input name="name" size="60"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="3" cols="80"></textarea></td>
</tr>
<tr>
<td><?php printMLText("keywords");?>:</td>
<td>
<textarea name="keywords" rows="1" cols="80"></textarea><br>
<a href="javascript:chooseKeywords('form1.keywords');"><?php printMLText("use_default_keywords");?></a>
<script language="JavaScript">
var openDlg;
function chooseKeywords(target) {
openDlg = open("out.KeywordChooser.php?target="+target, "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
</script>
</td>
</tr>
<tr>
<td><?php printMLText("categories")?>:</td>
<td><?php $this->printCategoryChooser("form1");?></td>
</tr>
<tr>
<td><?php printMLText("sequence");?>:</td>
<td><?php $this->printSequenceChooser($folder->getDocuments());?></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_document, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php printMLText("expires");?>:</td>
<td>
<input type="radio" name="expires" value="false" checked><?php printMLText("does_not_expire");?><br>
<input type="radio" name="expires" value="true"><?php $this->printDateChooser(-1, "exp");?>
</td>
</tr>
</table>
<?php $this->contentSubHeading(getMLText("version_info")); ?>
<table>
<tr>
<td><?php printMLText("version");?>:</td>
<td><input name="reqversion" value="1"></td>
</tr>
<tr>
<td><?php printMLText("local_file");?>:</td>
<td>
<a href="javascript:addFiles()"><?php printMLtext("add_multiple_files") ?></a>
<ol id="files">
<li><input type="File" name="userfile[]" size="60"></li>
</ol>
</td>
</tr>
<?php if($dropfolderdir) { ?>
<tr>
<td><?php printMLText("dropfolder_file");?>:</td>
<td><?php $this->printDropFolderChooser("form1");?></td>
</tr>
<?php } ?>
<tr>
<td><?php printMLText("comment_for_current_version");?>:</td>
<td><textarea name="version_comment" rows="3" cols="80"></textarea></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '', 'attributes_version') ?></td>
</tr>
<?php
}
}
?>
</table>
<?php $this->contentSubHeading(getMLText("assign_reviewers")); ?>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
$res=$user->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 "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())."</li>";
else print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())."</li>";
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($docAccess["groups"] as $grp) {
$mandatory=false;
foreach ($res as $r) if ($r['reviewerGroupID']==$grp->getID()) $mandatory=true;
if ($mandatory) print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($grp->getName())."</li>";
else print "<li class=\"cbSelectItem\"><input id='revGrp".$grp->getID()."' type='checkbox' name='grpReviewers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName())."</li>";
}
?>
</ul>
</div>
<?php $this->contentSubHeading(getMLText("assign_approvers")); ?>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
$res=$user->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 "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
else print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($docAccess["groups"] as $grp) {
$mandatory=false;
foreach ($res as $r) if ($r['approverGroupID']==$grp->getID()) $mandatory=true;
if ($mandatory) print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($grp->getName());
else print "<li class=\"cbSelectItem\"><input id='appGrp".$grp->getID()."' type='checkbox' name='grpApprovers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName());
}
?>
</ul>
</div>
<p><?php printMLText("add_doc_reviewer_approver_warning")?></p>
<p><input type="Submit" value="<?php printMLText("add_document");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,93 @@
<?php
/**
* Implementation of AddEvent view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if (isset($settings->_strictFormCheck) && $settings->_strictFormCheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<form action="../op/op.AddEvent.php" name="form1" onsubmit="return checkForm();" method="POST">
<table>
<tr>
<td><?php printMLText("from");?>:</td>
<td><?php $this->printDateChooser(-1, "from");?></td>
</tr>
<tr>
<td><?php printMLText("to");?>:</td>
<td><?php $this->printDateChooser(-1, "to");?></td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input name="name" size="60"></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("add_event");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,107 @@
<?php
/**
* Implementation of AddFile view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.userfile.value == "") msg += "<?php printMLText("js_no_file");?>\n";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if (isset($settings->_strictFormCheck) && $settings->_strictFormCheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("linked_files"));
$this->contentContainerStart();
?>
<table>
<tr>
<td class="warning"><?php echo getMLText("max_upload_size")." : ".ini_get( "upload_max_filesize"); ?></td>
</tr>
<tr>
<td><?php printf(getMLText('link_alt_updatedocument'), "out.AddFile2.php?documentid=".$document->getId()); ?></td>
</tr>
</table><br>
<form action="../op/op.AddFile.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
<input type="Hidden" name="documentid" value="<?php print $document->getId(); ?>">
<table>
<tr>
<td><?php printMLText("local_file");?>:</td>
<td><input type="File" name="userfile" size="60"></td>
</tr>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input name="name" size="60"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
</table>
<p><input type="Submit" value="<?php printMLText("add");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,53 @@
<?php
/**
* Implementation of AddFile2 view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
} /* }}} */
}
?>

View File

@ -0,0 +1,69 @@
<?php
/**
* Implementation of AddMultiDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<script language="JavaScript">
var openDlg;
function chooseKeywords(target) {
openDlg = open("out.KeywordChooser.php?target="+target, "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
function chooseCategory(form, cats) {
openDlg = open("out.CategoryChooser.php?form="+form+"&cats="+cats, "openDlg", "width=480,height=480,scrollbars=yes,resizable=yes,status=yes");
}
</script>
<?php
$this->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();
} /* }}} */
}
?>

View File

@ -0,0 +1,108 @@
<?php
/**
* Implementation of AddSubFolder view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<form action="../op/op.AddSubFolder.php" name="form1" onsubmit="return checkForm();" method="POST">
<?php echo createHiddenFieldWithKey('addsubfolder'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getId();?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
<table>
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input name="name" size="60"></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("sequence");?>:</td>
<td><?php $this->printSequenceChooser($folder->getSubFolders());?></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_folder, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("add_subfolder");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,74 @@
<?php
/**
* Implementation of AdminTools view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<ul>
<li class="first"><a href="../out/out.Statistic.php"><?php echo getMLText("folders_and_documents_statistic")?></a></li>
<li><a href="../out/out.BackupTools.php"><?php echo getMLText("backup_tools")?></a></li>
<?php
if ($logfileenable) echo "<li><a href=\"../out/out.LogManagement.php\">".getMLText("log_management")."</a></li>";
?>
<li><a href="../out/out.UsrMgr.php"><?php echo getMLText("user_management")?></a></li>
<li><a href="../out/out.GroupMgr.php"><?php echo getMLText("group_management")?></a></li>
<li><a href="../out/out.DefaultKeywords.php"><?php echo getMLText("global_default_keywords")?></a></li>
<li><a href="../out/out.Categories.php"><?php echo getMLText("global_document_categories")?></a></li>
<li><a href="../out/out.AttributeMgr.php"><?php echo getMLText("global_attributedefinitions")?></a></li>
<li><a href="../out/out.Info.php"><?php echo getMLText("version_info")?></a></li>
<?php
if($enablefullsearch) {
?>
<li><a href="../out/out.Indexer.php"><?php echo getMLText("update_fulltext_index")?></a></li>
<li><a href="../out/out.CreateIndex.php"><?php echo getMLText("create_fulltext_index")?></a></li>
<li><a href="../out/out.IndexInfo.php"><?php echo getMLText("fulltext_info")?></a></li>
<?php
}
?>
<li><a href="../out/out.ObjectCheck.php"><?php echo getMLText("objectcheck")?></a></li>
<li><a href="../out/out.Settings.php"><?php echo getMLText("settings")?></a></li>
</ul>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,197 @@
<?php
/**
* Implementation of ApprovalSummary view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader = false;
}
print "<tr>\n";
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
print "<td>".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."</td>";
print "<td>".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
print "</tr>\n";
}
if ($st["status"]!=-2) {
$iRev[] = $st["documentID"];
}
}
if (!$printheader) {
echo "</tbody>\n</table>\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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader = false;
}
print "<tr>\n";
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
print "<td>".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."</td>";
print "<td>".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
print "</tr>\n";
}
}
if (!$printheader) {
echo "</tbody>\n</table>\n";
}else{
printMLText("empty_notify_list");
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,174 @@
<?php
/**
* Implementation of ApproveDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
function checkIndForm()
{
msg = "";
if (document.form1.approvalStatus.value == "") msg += "<?php printMLText("js_no_approval_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
function checkGrpForm()
{
msg = "";
// if (document.form1.approvalGroup.value == "") msg += "<?php printMLText("js_no_approval_group");?>\n";
if (document.form1.approvalStatus.value == "") msg += "<?php printMLText("js_no_approval_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentContainerStart();
// Display the Approval form.
if ($approvalStatus['type'] == 0) {
if($approvalStatus["status"]!=0) {
print "<table class=\"folderView\"><thead><tr>";
print "<th>".getMLText("status")."</th>";
print "<th>".getMLText("comment")."</th>";
print "<th>".getMLText("last_update")."</th>";
print "</tr></thead><tbody><tr>";
print "<td>";
printApprovalStatusText($approvalStatus["status"]);
print "</td>";
print "<td>".htmlspecialchars($approvalStatus["comment"])."</td>";
$indUser = $dms->getUser($approvalStatus["userID"]);
print "<td>".$approvalStatus["date"]." - ". $indUser->getFullname() ."</td>";
print "</tr></tbody></table><br>\n";
}
?>
<form method="POST" action="../op/op.ApproveDocument.php" name="form1" onsubmit="return checkIndForm();">
<table>
<tr><td><?php printMLText("comment")?>:</td>
<td><textarea name="comment" cols="80" rows="4"></textarea>
</td></tr>
<tr><td><?php printMLText("approval_status")?>:</td>
<td><select name="approvalStatus">
<option value=''></option>
<option value='1'><?php printMLText("status_approved")?></option>
<option value='-1'><?php printMLText("rejected")?></option>
</select>
</td></tr><tr><td></td><td>
<input type='hidden' name='approvalType' value='ind'/>
<input type='hidden' name='documentid' value='<?php echo $document->getId() ?>'/>
<input type='hidden' name='version' value='<?php echo $version ?>'/>
<input type='submit' name='indApproval' value='<?php printMLText("submit_approval")?>'/>
</td></tr></table>
</form>
<?php
}
else if ($approvalStatus['type'] == 1) {
if($approvalStatus["status"]!=0) {
print "<table class=\"folderView\"><thead><tr>";
print "<th>".getMLText("status")."</th>";
print "<th>".getMLText("comment")."</th>";
print "<th>".getMLText("last_update")."</th>";
print "</tr></thead><tbody><tr>";
print "<td>";
printApprovalStatusText($approvalStatus["status"]);
print "</td>";
print "<td>".htmlspecialchars($approvalStatus["comment"])."</td>";
$indUser = $dms->getUser($approvalStatus["userID"]);
print "<td>".$approvalStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."</td>";
print "</tr></tbody></table><br>\n";
}
?>
<form method="POST" action="../op/op.ApproveDocument.php" name="form1" onsubmit="return checkGrpForm();">
<table>
<tr><td><?php printMLText("comment")?>:</td>
<td><textarea name="comment" cols="80" rows="4"></textarea>
</td></tr>
<tr><td><?php printMLText("approval_status")?>:</td>
<td>
<select name="approvalStatus">
<option value=''></option>
<option value='1'><?php printMLText("status_approved")?></option>
<option value='-1'><?php printMLText("rejected")?></option>
</select>
</td></tr>
<tr><td></td><td>
<input type='hidden' name='approvalGroup' value="<?php echo $approvalStatus['required']; ?>" />
<input type='hidden' name='approvalType' value='grp'/>
<input type='hidden' name='documentid' value='<?php echo $document->getId() ?>'/>
<input type='hidden' name='version' value='<?php echo $version ?>'/>
<input type='submit' name='groupApproval' value='<?php printMLText("submit_approval")?>'/></td></tr>
</table>
</form>
<?php
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,255 @@
<?php
/**
* Implementation of AttributeMgr view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
obj = -1;
function showAttributeDefinitions(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("attrdefs" + id);
obj.style.display = "";
}
</script>
<?php
$this->globalNavigation();
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
$this->contentHeading(getMLText("attrdef_management"));
$this->contentContainerStart();
?>
<table>
<tr>
<td><?php echo getMLText("selection")?>:</td>
<td>
<select onchange="showAttributeDefinitions(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_attrdef")?>
<option value="0"><?php echo getMLText("new_attrdef")?>
<?php
$selected=0;
$count=2;
if($attrdefs) {
foreach ($attrdefs as $attrdef) {
if (isset($_GET["attrdefid"]) && $attrdef->getID()==$_GET["attrdefid"]) $selected=$count;
switch($attrdef->getObjType()) {
case LetoDMS_Core_AttributeDefinition::objtype_all:
$ot = getMLText("all");
break;
case LetoDMS_Core_AttributeDefinition::objtype_folder:
$ot = getMLText("folder");
break;
case LetoDMS_Core_AttributeDefinition::objtype_document:
$ot = getMLText("document");
break;
case LetoDMS_Core_AttributeDefinition::objtype_documentcontent:
$ot = getMLText("version");
break;
}
print "<option value=\"".$attrdef->getID()."\">" . htmlspecialchars($attrdef->getName() ." (".$ot.")");
$count++;
}
}
?>
</select>
&nbsp;&nbsp;
</td>
<td id="attrdefs0" style="display : none;">
<form action="../op/op.AttributeMgr.php" method="post">
<?php echo createHiddenFieldWithKey('addattrdef'); ?>
<input type="Hidden" name="action" value="addattrdef">
<table>
<tr>
<td><?php printMLText("attrdef_name");?>:</td><td><input type="text" name="name"></td>
</tr>
<tr>
<td><?php printMLText("attrdef_objtype");?>:</td><td><select name="objtype"><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_folder ?>">Folder</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_document ?>"><?php printMLText("document"); ?></option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_documentcontent ?>"><?php printMLText("version"); ?></option></select>
</tr>
<tr>
<td><?php printMLText("attrdef_type");?>:</td><td><select name="type"><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_int ?>">Integer</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_float ?>">Float</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_string ?>">String</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_boolean ?>">Boolean</option></select></td>
</tr>
<tr>
<td><?php printMLText("attrdef_multiple");?>:</td><td><input type="checkbox" value="1" name="multiple" /></td>
</tr>
<tr>
<td><?php printMLText("attrdef_minvalues");?>:</td><td><input type="text" value="" name="minvalues" /></td>
</tr>
<tr>
<td><?php printMLText("attrdef_maxvalues");?>:</td><td><input type="text" value="" name="maxvalues" /></td>
</tr>
<tr>
<td><?php printMLText("attrdef_valueset");?>:</td><td><input type="text" value="" name="valueset" /></td>
</tr>
</table>
<input type="Submit" value="<?php printMLText("new_attrdef"); ?>">
</form>
</td>
<?php
if($attrdefs) {
foreach ($attrdefs as $attrdef) {
print "<td id=\"attrdefs".$attrdef->getID()."\" style=\"display : none;\">";
?>
<table>
<tr>
<td colspan="2">
<?php
if(!$attrdef->isUsed()) {
?>
<form style="display: inline-block;" method="post" action="../op/op.AttributeMgr.php" >
<?php echo createHiddenFieldWithKey('removeattrdef'); ?>
<input type="Hidden" name="attrdefid" value="<?php echo $attrdef->getID()?>">
<input type="Hidden" name="action" value="removeattrdef">
<input value="<?php echo getMLText("rm_attrdef")?>" type="submit">
</form>
<?php
} else {
?>
<p><?php echo getMLText('attrdef_in_use') ?></p>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<form action="../op/op.AttributeMgr.php" method="post">
<tr>
<td>
<?php echo createHiddenFieldWithKey('editattrdef'); ?>
<input type="Hidden" name="action" value="editattrdef">
<input type="Hidden" name="attrdefid" value="<?php echo $attrdef->getID()?>" />
<?php printMLText("attrdef_name");?>:
</td>
<td>
<input name="name" value="<?php echo htmlspecialchars($attrdef->getName()) ?>">
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_type");?>:
</td>
<td>
<select name="type"><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>>Integer</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>>Float</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>>String</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>>Boolean</option></select><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_objtype");?>:
</td>
<td>
<select name="objtype"><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef->getObjType() == LetoDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>>Folder</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef->getObjType() == LetoDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>>Document</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef->getObjType() == LetoDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>>Document content</option></select><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_multiple");?>:
</td>
<td>
<input type="checkbox" value="1" name="multiple" /><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_minvalues");?>:
</td>
<td>
<input type="text" value="<?php echo $attrdef->getMinValues() ?>" name="minvalues" /><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_maxvalues");?>:
</td>
<td>
<input type="text" value="<?php echo $attrdef->getMaxValues() ?>" name="maxvalues" /><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_valueset");?>:
</td>
<td>
<input type="text" value="<?php echo $attrdef->getValueSet() ?>" name="valueset" /><br />
</td>
</tr>
<tr>
<td>
<input type="Submit" value="<?php printMLText("save");?>">
</td>
</tr>
</form>
</table>
</td>
<?php
}
}
?>
</tr></table>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showAttributeDefinitions(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,195 @@
<?php
/**
* Implementation of BackupTools view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<p>".getMLText("versioning_file_creation_warning")."</p>\n";
print "<form action=\"../op/op.CreateVersioningFiles.php\" name=\"form1\">";
$this->printFolderChooser("form1",M_READWRITE);
print "<input type='submit' name='' value='".getMLText("versioning_file_creation")."'/>";
print "</form>\n";
$this->contentContainerEnd();
// archive creation ////////////////////////////////////////////////////////////
$this->contentHeading(getMLText("archive_creation"));
$this->contentContainerStart();
print "<p>".getMLText("archive_creation_warning")."</p>\n";
print "<form action=\"../op/op.CreateFolderArchive.php\" name=\"form2\">";
$this->printFolderChooser("form2",M_READWRITE);
print "<input type=\"checkbox\" name=\"human_readable\" value=\"1\">".getMLText("human_readable");
print "<input type='submit' name='' value='".getMLText("archive_creation")."'/>";
print "</form>\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 "<table class=\"folderView\">\n";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("folder")."</th>\n";
print "<th>".getMLText("creation_date")."</th>\n";
print "<th>".getMLText("file_size")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$print_header=false;
}
$folderid=substr($entry,strpos($entry,"_")+1);
$folder=$dms->getFolder((int)$folderid);
print "<tr>\n";
print "<td><a href=\"../op/op.Download.php?arkname=".$entry."\">".$entry."</a></td>\n";
if (is_object($folder)) print "<td>".htmlspecialchars($folder->getName())."</td>\n";
else print "<td>".getMLText("unknown_id")."</td>\n";
print "<td>".getLongReadableDate(filectime($contentdir.$entry))."</td>\n";
print "<td>".formatted_size(filesize($contentdir.$entry))."</td>\n";
print "<td><ul class=\"actions\">";
print "<li><a href=\"out.RemoveArchive.php?arkname=".$entry."\">".getMLText("backup_remove")."</a></li>";
print "</ul></td>\n";
print "</tr>\n";
}
if ($print_header) printMLText("empty_notify_list");
else print "</table>\n";
$this->contentContainerEnd();
// dump creation ///////////////////////////////////////////////////////////////
$this->contentHeading(getMLText("dump_creation"));
$this->contentContainerStart();
print "<p>".getMLText("dump_creation_warning")."</p>\n";
print "<form action=\"../op/op.CreateDump.php\" name=\"form4\">";
print "<input type='submit' name='' value='".getMLText("dump_creation")."'/>";
print "</form>\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 "<table class=\"folderView\">\n";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("creation_date")."</th>\n";
print "<th>".getMLText("file_size")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$print_header=false;
}
print "<tr>\n";
print "<td><a href=\"../op/op.Download.php?dumpname=".$entry."\">".$entry."</a></td>\n";
print "<td>".getLongReadableDate(filectime($contentdir.$entry))."</td>\n";
print "<td>".formatted_size(filesize($contentdir.$entry))."</td>\n";
print "<td><ul class=\"actions\">";
print "<li><a href=\"out.RemoveDump.php?dumpname=".$entry."\">".getMLText("dump_remove")."</a></li>";
print "</ul></td>\n";
print "</tr>\n";
}
if ($print_header) printMLText("empty_notify_list");
else print "</table>\n";
$this->contentContainerEnd();
// files deletion //////////////////////////////////////////////////////////////
$this->contentHeading(getMLText("files_deletion"));
$this->contentContainerStart();
print "<p>".getMLText("files_deletion_warning")."</p>\n";
print "<form action=\"../out/out.RemoveFolderFiles.php\" name=\"form3\">";
$this->printFolderChooser("form3",M_READWRITE);
print "<input type='submit' name='' value='".getMLText("files_deletion")."'/>";
print "</form>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,335 @@
<?php
/**
* Implementation of Calendar view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 = "<table border=0>\n";
$s .= "<tr>\n";
$s .= "<td align=\"center\" class=\"header\" colspan=\"7\"><a href=\"../out/out.Calendar.php?mode=m&year=".$year."&month=".$month."\">".$monthName."</a></td>\n"; ;
$s .= "</tr>\n";
$s .= "<tr>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay)%7] . "</td>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay+1)%7] . "</td>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay+2)%7] . "</td>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay+3)%7] . "</td>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay+4)%7] . "</td>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay+5)%7] . "</td>\n";
$s .= "<td class=\"header\">" . $this->dayNames[($startDay+6)%7] . "</td>\n";
$s .= "</tr>\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 .= "<tr>\n";
for ($i = 0; $i < 7; $i++){
$class = ($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "today" : "";
$s .= "<td class=\"$class\">";
if ($d > 0 && $d <= $daysInMonth){
$s .= "<a href=\"../out/out.Calendar.php?mode=w&year=".$year."&month=".$month."&day=".$d."\">".$d."</a>";
}
else $s .= "&nbsp;";
$s .= "</td>\n";
$d++;
}
$s .= "</tr>\n";
}
$s .= "</table>\n";
return $s;
} /* }}} */
function printYearTable($year) { /* {{{ */
print "<table class=\"calendaryear\" border=\"0\">\n";
print "<tr>";
print "<td>" . $this->getMonthHTML(1 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(2 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(3 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(4 , $year) ."</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td>" . $this->getMonthHTML(5 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(6 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(7 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(8 , $year) ."</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td>" . $this->getMonthHTML(9 , $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(10, $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(11, $year) ."</td>\n";
print "<td>" . $this->getMonthHTML(12, $year) ."</td>\n";
print "</tr>\n";
print "</table>\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 "<a href=\"../out/out.Calendar.php?mode=y&year=".($year-1)."\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a>&nbsp;";
print "<a href=\"../out/out.Calendar.php?mode=y\"><img src=\"".$this->getImgPath("c.png")."\" border=0></a>&nbsp;";
print "<a href=\"../out/out.Calendar.php?mode=y&year=".($year+1)."\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a>&nbsp;";
$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 "<a href=\"../out/out.Calendar.php?mode=m&year=".($year)."&month=".($month-1)."\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a>&nbsp;";
print "<a href=\"../out/out.Calendar.php?mode=m\"><img src=\"".$this->getImgPath("c.png")."\" border=0></a>&nbsp;";
print "<a href=\"../out/out.Calendar.php?mode=m&year=".($year)."&month=".($month+1)."\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a>&nbsp;";
$days=getDaysInMonth($month, $year);
$today = getdate(time());
$events = getEventsInInterval(mktime(0,0,0, $month, 1, $year), mktime(23,59,59, $month, $days, $year));
echo "<table class='calendarmonth'>\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 "<tr><td class='separator' colspan='".(count($events)+2)."'>&nbsp;</td></tr>\n";
// highlight today
$class = ($year == $today["year"] && $month == $today["mon"] && $i == $today["mday"]) ? "todayHeader" : "header";
echo "<tr>";
echo "<td class='".$class."'><a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($i)."\">".$i."</a></td>";
echo "<td class='".$class."'><a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($i)."\">".$dayNamesLong[$date["wday"]]."</a></td>";
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 "<td class='".$class."'><a href=\"../out/out.ViewEvent.php?id=".$event['id']."\">".htmlspecialchars($event['name'])."</a></td>";
}else{
print "<td class='".$class."'>&nbsp;</td>";
}
}
echo "</tr>\n";
}
echo "</table>\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 "<a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($day-7)."\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a>&nbsp;";
print "<a href=\"../out/out.Calendar.php?mode=w\"><img src=\"".$this->getImgPath("c.png")."\" border=0></a>&nbsp;";
print "<a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($day+7)."\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a>&nbsp;";
echo "<table class='calendarweek'>\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 "<tr>";
echo "<td class='".$class."'>".getReadableDate($i)."</td>";
echo "<td class='".$class."'>".$dayNamesLong[$date["wday"]]."</td>";
if ($class=="todayHeader") $class="today";
else $class="";
foreach ($events as $event){
if (($event["start"]<=$i)&&($event["stop"]>=$i)){
print "<td class='".$class."'><a href=\"../out/out.ViewEvent.php?id=".$event['id']."\">".htmlspecialchars($event['name'])."</a></td>";
}else{
print "<td class='".$class."'>&nbsp;</td>";
}
}
echo "</tr>\n";
$prev_day=$date["mday"];
}
echo "</table>\n";
$this->contentContainerEnd();
}
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,152 @@
<?php
/**
* Implementation of Categories view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
obj = -1;
function showCategories(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("categories" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("global_document_categories"));
$this->contentContainerStart();
?>
<table>
<tr>
<td><?php echo getMLText("selection")?>:</td>
<td>
<select onchange="showCategories(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_document_category")?>
<?php
$selected=0;
$count=2;
foreach ($categories as $category) {
if (isset($_GET["categoryid"]) && $category->getID()==$_GET["categoryid"]) $selected=$count;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
$count++;
}
?>
</select>
&nbsp;&nbsp;
</td>
<td id="categories0" style="display : none;">
<form action="../op/op.Categories.php" method="post">
<?php echo createHiddenFieldWithKey('addcategory'); ?>
<input type="Hidden" name="action" value="addcategory">
<?php printMLText("name");?> : <input name="name">
<input type="Submit" value="<?php printMLText("new_document_category"); ?>">
</form>
</td>
<?php
foreach ($categories as $category) {
print "<td id=\"categories".$category->getID()."\" style=\"display : none;\">";
?>
<table>
<tr>
<td colspan="2">
<?php
if(!$category->isUsed()) {
?>
<form style="display: inline-block;" method="post" action="../op/op.Categories.php" >
<?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="action" value="removecategory">
<input value="<?php echo getMLText("rm_document_category")?>" type="submit">
</form>
<?php
} else {
?>
<p><?php echo getMLText('category_in_use') ?></p>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td>
<form action="../op/op.Categories.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="Hidden" name="action" value="editcategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" value="<?php echo htmlspecialchars($category->getName()) ?>">&nbsp;
<input type="Submit" value="<?php printMLText("save");?>">
</form>
</td>
</tr>
</table>
</td>
<?php } ?>
</tr></table>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showCategories(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,97 @@
<?php
/**
* Implementation of CategoryChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
var targetName = opener.document.<?php echo $form?>.categoryname<?php print $form ?>;
var targetID = opener.document.<?php echo $form?>.categoryid<?php print $form ?>;
$(document).ready(function(){
$('#getcategories').click(function(){
// alert($('#keywordta option:selected').text());
var value = '';
$('#keywordta option:selected').each(function(){
value += ' ' + $(this).text();
});
targetName.value = value;
targetID.value = $('#keywordta').val();
window.close();
return true;
});
});
</script>
<?php
$this->contentContainerStart();
$selcatsarr = explode(',', $selcats);
?>
<table>
<tr>
<td valign="top" class="inputDescription"><?php echo getMLText("categories")?>:</td>
<td>
<select id="keywordta" size="5" style="min-width: 100px;" multiple>
<?php
foreach($categories as $category) {
echo "<option value=\"".$category->getId()."\"";
if(in_array($category->getID(), $selcatsarr))
echo " selected";
echo ">".htmlspecialchars($category->getName())."</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="button" id='getcategories' value="<?php echo getMLText("accept")?>"> &nbsp;&nbsp;
</td>
</tr>
</table>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,74 @@
<?php
/**
* Implementation of ChangePassword view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.ChangePassword.php" method="post" name="form1" onsubmit="return checkForm();">
<?php
if ($referuri) {
echo "<input type='hidden' name='referuri' value='".$referuri."'/>";
}
if ($hash) {
echo "<input type='hidden' name='hash' value='".$hash."'/>";
}
?>
<table border="0">
<tr>
<td><?php printMLText("password");?></td>
<td><input class="pwd" type="password" name="newpassword" id="password"> <div id="outerstrength" style="min-width: 100px; height: 14px; display: inline-block; border: 1px solid black; padding: 1px;"><div id="innerstrength" style="width: 0px; height: 14px; display: inline-block; border: 0px; padding: 0px; background-color: red;">&nbsp;</div> <div id="strength" style="display: inline-block;"></div></div></td>
</tr>
<tr>
<td><?php printMLText("password_repeat");?></td>
<td><input type="password" name="newpasswordrepeat" id="passwordrepeat"></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("submit_password") ?>"></td>
</tr>
</table>
</form>
<?php $this->contentContainerEnd(); ?>
<script language="JavaScript">document.form1.newpassword.focus();</script>
<p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,49 @@
<?php
/**
* Implementation of CreateIndex view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 '<p>'.getMLText('create_fulltext_index_warning').'</p>';
echo '<a href="out.Indexer.php?create=1&confirm=1">'.getMLText('confirm_create_fulltext_index').'</a>';
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,204 @@
<?php
/**
* Implementation of DefaultKeywords view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
obj = -1;
function showKeywords(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("keywords" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("global_default_keywords"));
$this->contentContainerStart();
?>
<table>
<tr>
<td><?php echo getMLText("selection")?>:</td>
<td>
<select onchange="showKeywords(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
<?php
$selected=0;
$count=2;
foreach ($categories as $category) {
$owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
if ($categoryid && $category->getID()==$selcategoryid) $selected=$count;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
$count++;
}
?>
</select>
&nbsp;&nbsp;
</td>
<td id="keywords0" style="display : none;">
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('addcategory'); ?>
<input type="Hidden" name="action" value="addcategory">
<?php printMLText("name");?> : <input name="name">
<input type="Submit" value="<?php printMLText("new_default_keyword_category"); ?>">
</form>
</td>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
print "<td id=\"keywords".$category->getID()."\" style=\"display : none;\">";
?>
<table>
<tr>
<td colspan="2">
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="action" value="removecategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input value="<?php printMLText("rm_default_keyword_category");?>" type="submit" title="<?php echo getMLText("delete")?>">
</form>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td>
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="Hidden" name="action" value="editcategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" value="<?php echo htmlspecialchars($category->getName()) ?>">&nbsp;
<input type="Submit" value="<?php printMLText("save");?>">
</form>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<tr>
<td><?php echo getMLText("default_keywords")?>:</td>
<td>
<?php
$lists = $category->getKeywordLists();
if (count($lists) == 0)
print getMLText("no_default_keywords");
else
foreach ($lists as $list) {
?>
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
<?php echo createHiddenFieldWithKey('editkeywords'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
<input type="Hidden" name="action" value="editkeywords">
<input name="keywords" value="<?php echo htmlspecialchars($list["keywords"]) ?>">
<input name="action" value="editkeywords" type="Image" src="images/save.gif" title="<?php echo getMLText("save")?>" style="border: 0px;">
<!-- <input name="action" value="removekeywords" type="Image" src="images/del.gif" title="<?php echo getMLText("delete")?>" border="0"> &nbsp; -->
</form>
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
<?php echo createHiddenFieldWithKey('removekeywords'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
<input type="Hidden" name="action" value="removekeywords">
<input name="action" value="removekeywords" type="Image" src="images/del.gif" title="<?php echo getMLText("delete")?>" style="border: 0px;">
</form>
<br>
<?php } ?>
</td>
</tr>
<tr>
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('newkeywords'); ?>
<td><input type="Submit" value="<?php printMLText("new_default_keywords");?>"></td>
<td>
<input type="Hidden" name="action" value="newkeywords">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="keywords">
</td>
</form>
</tr>
</table>
</td>
<?php } ?>
</tr></table>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showKeywords(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,283 @@
<?php
/**
* Implementation of DocumentAccess view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<select name=\"mode\">\n";
print "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "</option>\n";
print "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "</option>\n";
print "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "</option>\n";
print "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "</option>\n";
print "</select>\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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) &&
(document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1))
msg += "<?php printMLText("js_select_user_or_group");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_document_access"));
$this->contentContainerStart();
if ($user->isAdmin()) {
$this->contentSubHeading(getMLText("set_owner"));
?>
<form action="../op/op.DocumentAccess.php">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="Hidden" name="action" value="setowner">
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
<?php printMLText("owner");?> : <select name="ownerid">
<?php
$owner = $document->getOwner();
foreach ($allUsers as $currUser) {
if ($currUser->isGuest())
continue;
print "<option value=\"".$currUser->getID()."\"";
if ($currUser->getID() == $owner->getID())
print " selected";
print ">" . htmlspecialchars($currUser->getLogin() . " - " . $currUser->getFullname()) . "</option>\n";
}
?>
</select>
<input type="Submit" value="<?php printMLText("save")?>">
</form>
<?php
}
$this->contentSubHeading(getMLText("access_inheritance"));
if ($document->inheritsAccess()) {
printMLText("inherits_access_msg");
?>
<p>
<form action="../op/op.DocumentAccess.php" style="display: inline-block;">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="hidden" name="action" value="notinherit">
<input type="hidden" name="mode" value="copy">
<input type="submit" value="<?php printMLText("inherits_access_copy_msg")?>">
</form>
<form action="../op/op.DocumentAccess.php" style="display: inline-block;">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="hidden" name="action" value="notinherit">
<input type="hidden" name="mode" value="empty">
<input type="submit" value="<?php printMLText("inherits_access_empty_msg")?>">
</form>
</p>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
return;
}
?>
<form action="../op/op.DocumentAccess.php">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="hidden" name="action" value="inherit">
<input type="submit" value="<?php printMLText("does_not_inherit_access_msg")?>">
</form>
<?php
$accessList = $document->getAccessList();
$this->contentSubHeading(getMLText("default_access"));
?>
<form action="../op/op.DocumentAccess.php">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="Hidden" name="action" value="setdefault">
<?php $this->printAccessModeSelection($document->getDefaultAccess()); ?>
<input type="Submit" value="<?php printMLText("save");?>">
</form>
<?php
$this->contentSubHeading(getMLText("edit_existing_access"));
if (count($accessList["users"]) != 0 || count($accessList["groups"]) != 0) {
print "<table class=\"defaultView\">";
/* memorїze users with access rights */
$memusers = array();
foreach ($accessList["users"] as $userAccess) {
$userObj = $userAccess->getUser();
$memusers[] = $userObj->getID();
print "<tr>\n";
print "<td><img src=\"images/usericon.gif\" class=\"mimeicon\"></td>\n";
print "<td>". htmlspecialchars($userObj->getFullName()) . "</td>\n";
print "<td>\n";
print "<form action=\"../op/op.DocumentAccess.php\">\n";
$this->printAccessModeSelection($userAccess->getMode());
print "</td>\n";
print "<td><span class=\"actions\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"Hidden\" name=\"documentid\" value=\"".$document->getId()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"editaccess\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/save.gif\">".getMLText("save")." ";
print "</span></td>\n";
print "</form>\n";
print "<td><span class=\"actions\">\n";
print "<form action=\"../op/op.DocumentAccess.php\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"Hidden\" name=\"documentid\" value=\"".$document->getId()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/del.gif\">".getMLText("delete")." ";
print "</form>\n";
print "<span></td>\n";
print "</tr>\n";
}
/* memorize groups with access rights */
$memgroups = array();
foreach ($accessList["groups"] as $groupAccess) {
$groupObj = $groupAccess->getGroup();
$memgroups[] = $groupObj->getID();
$mode = $groupAccess->getMode();
print "<tr>";
print "<td><img src=\"images/groupicon.gif\" class=\"mimeicon\"></td>";
print "<td>". htmlspecialchars($groupObj->getName()) . "</td>";
print "<form action=\"../op/op.DocumentAccess.php\">";
print "<td>";
$this->printAccessModeSelection($groupAccess->getMode());
print "</td>\n";
print "<td><span class=\"actions\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"Hidden\" name=\"documentid\" value=\"".$document->getId()."\">";
print "<input type=\"Hidden\" name=\"action\" value=\"editaccess\">";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/save.gif\">".getMLText("save")." ";
print "</span></td>\n";
print "</form>";
print "<td><span class=\"actions\">\n";
print "<form action=\"../op/op.DocumentAccess.php\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"Hidden\" name=\"documentid\" value=\"".$document->getId()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/del.gif\">".getMLText("delete")." ";
print "</form>";
print "</span></td>\n";
print "</tr>\n";
}
print "</table><br>";
}
?>
<form action="../op/op.DocumentAccess.php" name="form1" onsubmit="return checkForm();">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getId()?>">
<input type="Hidden" name="action" value="addaccess">
<table>
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?></option>
<?php
foreach ($allUsers as $userObj) {
if ($userObj->isGuest() || in_array($userObj->getID(), $memusers)) {
continue;
}
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("group");?>:</td>
<td>
<select name="groupid">
<option value="-1"><?php printMLText("select_one");?></option>
<?php
foreach ($allGroups as $groupObj) {
if(in_array($groupObj->getID(), $memgroups))
continue;
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("access_mode");?>:</td>
<td>
<?php
$this->printAccessModeSelection(M_READ);
?>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("add");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,154 @@
<?php
/**
* Implementation of DocumentChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<ul style='list-style-type: none;'>\n";
}
print " <li>\n";
print "<img class='treeicon' src=\"";
if ($level == 0) $this->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 "<img src=\"".$this->getImgPath("folder_opened.gif")."\" border=0>".htmlspecialchars($folder->getName())."\n";
}
else
print "<img src=\"".$this->getImgPath("folder_opened.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n";
print " </li>\n";
print "<ul style='list-style-type: none;'>";
for ($i = 0; $i < count($subFolders); $i++) {
if ($subFolders[$i]->getID() == $nextFolderID)
$this->printTree($path, $level+1);
else {
print "<li>\n";
$subFolders_ = LetoDMS_Core_DMS::filterAccess($subFolders[$i]->getSubFolders(), $this->user, M_READ);
$documents_ = LetoDMS_Core_DMS::filterAccess($subFolders[$i]->getDocuments(), $this->user, M_READ);
if (count($subFolders_) + count($documents_) > 0)
print "<a href=\"out.DocumentChooser.php?form=".$this->form."&folderid=".$subFolders[$i]->getID()."\"><img class='treeicon' src=\"".$this->getImgPath("plus.png")."\" border=0></a>";
else
print "<img class='treeicon' src=\"".$this->getImgPath("blank.png")."\">";
print "<img src=\"".$this->getImgPath("folder_closed.gif")."\" border=0>".htmlspecialchars($subFolders[$i]->getName())."\n";
print "</li>";
}
}
for ($i = 0; $i < count($documents); $i++) {
print "<li>\n";
print "<img class='treeicon' src=\"images/blank.png\">";
print "<a class=\"foldertree_selectable\" href=\"javascript:documentSelected(".$documents[$i]->getID().",'".str_replace("'", "\\'", htmlspecialchars($documents[$i]->getName()))."');\"><img src=\"images/file.gif\" border=0>".htmlspecialchars($documents[$i]->getName())."</a>";
print "</li>";
}
print "</ul>\n";
if ($level == 0) {
print "</ul>\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"));
?>
<script language="JavaScript">
function decodeString(s) {
s = new String(s);
s = s.replace(/&amp;/, "&");
s = s.replace(/&#0037;/, "%"); // percent
s = s.replace(/&quot;/, "\""); // double quote
s = s.replace(/&#0047;&#0042;/, "/*"); // start of comment
s = s.replace(/&#0042;&#0047;/, "*/"); // end of comment
s = s.replace(/&lt;/, "<");
s = s.replace(/&gt;/, ">");
s = s.replace(/&#0061;/, "=");
s = s.replace(/&#0041;/, ")");
s = s.replace(/&#0040;/, "(");
s = s.replace(/&#0039;/, "'");
s = s.replace(/&#0043;/, "+");
return s;
}
var targetName;
var targetID;
function documentSelected(id, name) {
targetName.value = name; //decodeString(name);
targetID.value = id;
window.close();
return true;
}
</script>
<?php
echo "<input type=\"text\" class=\"autocomplete\" />";
$this->contentContainerStart();
echo "<div id=\"resultautocomplete\"></div>";
$this->contentContainerEnd();
$this->contentContainerStart();
$this->printTree($folder->getPath());
$this->contentContainerEnd();
?>
<script language="JavaScript">
targetName = opener.document.<?php echo $this->form?>.docname<?php print $this->form ?>;
targetID = opener.document.<?php echo $this->form?>.docid<?php print $this->form ?>;
</script>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,154 @@
<?php
/**
* Implementation of DocumentNotify view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) &&
(document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1))
msg += "<?php printMLText("js_select_user_or_group");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_existing_notify"));
$this->contentContainerStart();
$userNotifyIDs = array();
$groupNotifyIDs = array();
print "<table class=\"defaultView\">\n";
if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) {
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
}
else {
foreach ($notifyList["users"] as $userNotify) {
print "<tr>";
print "<td><img src=\"images/usericon.gif\" class=\"mimeicon\"></td>";
print "<td>" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "</td>";
if ($user->isAdmin() || $user->getID() == $userNotify->getID()) {
print "<td><a href=\"../op/op.DocumentNotify.php?documentid=". $document->getID() . "&action=delnotify&userid=".$userNotify->getID()."\"><img src=\"images/del.gif\" class=\"mimeicon\"></a>".getMLText("delete")."</td>";
}else print "<td></td>";
print "</tr>";
$userNotifyIDs[] = $userNotify->getID();
}
foreach ($notifyList["groups"] as $groupNotify) {
print "<tr>";
print "<td><img src=\"images/groupicon.gif\" width=16 height=16 border=0></td>";
print "<td>" . htmlspecialchars($groupNotify->getName()) . "</td>";
if ($user->isAdmin() || $groupNotify->isMember($user,true)) {
print "<td><a href=\"../op/op.DocumentNotify.php?documentid=". $document->getID() . "&action=delnotify&groupid=".$groupNotify->getID()."\"><img src=\"images/del.gif\" class=\"mimeicon\"></a>".getMLText("delete")."</td>";
}else print "<td></td>";
print "</tr>";
$groupNotifyIDs[] = $groupNotify->getID();
}
}
print "</table>\n";
?>
<br>
<form action="../op/op.DocumentNotify.php" name="form1" onsubmit="return checkForm();">
<input type="Hidden" name="documentid" value="<?php print $document->getID()?>">
<input type="Hidden" name="action" value="addnotify">
<table>
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?>
<?php
if ($user->isAdmin()) {
$allUsers = $dms->getAllUsers($sortusersinlist);
foreach ($allUsers as $userObj) {
if (!$userObj->isGuest() && ($document->getAccessMode($userObj) >= M_READ) && !in_array($userObj->getID(), $userNotifyIDs))
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "\n";
}
}
elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) {
print "<option value=\"".$user->getID()."\">" . htmlspecialchars($user->getLogin() . " - " . $user->getFullName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("group");?>:</td>
<td>
<select name="groupid">
<option value="-1"><?php printMLText("select_one");?>
<?php
$allGroups = $dms->getAllGroups();
foreach ($allGroups as $groupObj) {
if (($user->isAdmin() || $groupObj->isMember($user,true)) && $document->getGroupAccessMode($groupObj) >= M_READ && !in_array($groupObj->getID(), $groupNotifyIDs)) {
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "\n";
}
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("add") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,260 @@
<?php
/**
* Implementation of DocumentVersionDetail view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<table>
<tr>
<td><?php printMLText("owner");?>:</td>
<td>
<?php
$owner = $document->getOwner();
print "<a class=\"infos\" href=\"mailto:".$owner->getEmail()."\">".htmlspecialchars($owner->getFullName())."</a>";
?>
</td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><?php print htmlspecialchars($document->getComment());?></td>
</tr>
<tr>
<td><?php printMLText("creation_date");?>:</td>
<td><?php print getLongReadableDate($document->getDate()); ?></td>
</tr>
<tr>
<td><?php printMLText("keywords");?>:</td>
<td><?php print htmlspecialchars($document->getKeywords());?></td>
</tr>
<?php
if ($document->isLocked()) {
$lockingUser = $document->getLockingUser();
?>
<tr>
<td><?php printMLText("lock_status");?>:</td>
<td><?php printMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?></td>
</tr>
<?php
}
?>
</tr>
</table>
<?php
$this->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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th width='10%'></th>\n";
print "<th width='10%'>".getMLText("version")."</th>\n";
print "<th width='20%'>".getMLText("file")."</th>\n";
print "<th width='25%'>".getMLText("comment")."</th>\n";
print "<th width='15%'>".getMLText("status")."</th>\n";
print "<th width='20%'></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
print "<tr>\n";
print "<td><ul class=\"actions\">";
if ($file_exists){
print "<li><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$version->getVersion()."\"><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\"> ".getMLText("download")."</a>";
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$document->getID()."&version=".$version->getVersion()."\"><img src=\"images/view.gif\" class=\"mimeicon\">" . getMLText("view_online") . "</a>";
}else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\"> ";
print "</ul></td>\n";
print "<td class=\"center\">".$version->getVersion()."</td>\n";
print "<td><ul class=\"documentDetail\">\n";
print "<li>".$version->getOriginalFileName()."</li>\n";
if ($file_exists) print "<li>". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."</li>";
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
$updatingUser = $version->getUser();
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$updatingUser->getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
print "<li>".getLongReadableDate($version->getDate())."</li>";
print "</ul></td>\n";
print "<td>".htmlspecialchars($version->getComment())."</td>";
print "<td>".getOverallStatusText($status["status"])."</td>";
print "<td>";
//if (($document->getAccessMode($user) >= M_READWRITE)) {
print "<ul class=\"actions\">";
if (($enableversionmodification && ($document->getAccessMode($user) >= M_READWRITE)) || $user->isAdmin()) {
print "<li><a href=\"out.RemoveVersion.php?documentid=".$document->getID()."&version=".$version->getVersion()."\">".getMLText("rm_version")."</a></li>";
}
if (($enableversionmodification && ($document->getAccessMode($user) == M_ALL)) || $user->isAdmin()) {
if ( $status["status"]==S_RELEASED || $status["status"]==S_OBSOLETE ){
print "<li><a href='../out/out.OverrideContentStatus.php?documentid=".$document->getID()."&version=".$version->getVersion()."'>".getMLText("change_status")."</a></li>";
}
}
if (($enableversionmodification && ($document->getAccessMode($user) >= M_READWRITE)) || $user->isAdmin()) {
if($status["status"] != S_OBSOLETE)
print "<li><a href=\"out.EditComment.php?documentid=".$document->getID()."&version=".$version->getVersion()."\">".getMLText("edit_comment")."</a></li>";
if ( $status["status"] == S_DRAFT_REV){
print "<li><a href=\"out.EditAttributes.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."\">".getMLText("edit_attributes")."</a></li>";
}
print "</ul>";
}
else {
print "&nbsp;";
}
echo "</td>";
print "</tr></tbody>\n</table>\n";
print "<table class=\"folderView\">\n";
if (is_array($reviewStatus) && count($reviewStatus)>0) {
print "<tr><td colspan=4>\n";
$this->contentSubHeading(getMLText("reviewers"));
print "</td></tr>\n";
print "<tr>\n";
print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n";
print "<td width='25%'><b>".getMLText("comment")."</b></td>";
print "<td width='35%'><b>".getMLText("status")."</b></td>\n";
print "</tr>\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 "<tr>\n";
print "<td>".$reqName."</td>\n";
print "<td><ul class=\"documentDetail\"><li>".$r["date"]."</li>";
$updateUser = $dms->getUser($r["userID"]);
print "<li>".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'")."</li></ul></td>";
print "<td>".$r["comment"]."</td>\n";
print "<td>".getReviewStatusText($r["status"])."</td>\n";
print "</tr>\n";
}
}
if (is_array($approvalStatus) && count($approvalStatus)>0) {
print "<tr><td colspan=4>\n";
$this->contentSubHeading(getMLText("approvers"));
print "</td></tr>\n";
print "<tr>\n";
print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n";
print "<td width='25%'><b>".getMLText("comment")."</b></td>";
print "<td width='35%'><b>".getMLText("status")."</b></td>\n";
print "</tr>\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 "<tr>\n";
print "<td>".$reqName."</td>\n";
print "<td><ul class=\"documentDetail\"><li>".$a["date"]."</li>";
$updateUser = $dms->getUser($a["userID"]);
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."</li></ul></td>";
print "<td>".$a["comment"]."</td>\n";
print "<td>".getApprovalStatusText($a["status"])."</td>\n";
print "</tr>\n";
}
}
print "</table>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,70 @@
<?php
/**
* Implementation of CategoryChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
var targetName = opener.document.<?php echo $form?>.dropfolderfile<?php print $form ?>;
</script>
<?php
$this->contentContainerStart();
$dir = $dropfolderdir.'/'.$user->getLogin();
if(is_dir($dir)) {
$d = dir($dir);
echo "<table>\n";
while (false !== ($entry = $d->read())) {
if($entry != '..' && $entry != '.') {
if(!is_dir($entry)) {
echo "<tr><td><span style=\"cursor: pointer;\" onClick=\"targetName.value = '".$entry."'; window.close();\">".$entry."</span></td><td>".filesize($dir.'/'.$entry)."</td></tr>\n";
}
}
}
echo "</table>\n";
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,76 @@
<?php
/**
* Implementation of EditAttributes view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.EditAttributes.php" name="form1" method="POST">
<?php echo createHiddenFieldWithKey('editattributes'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
<input type="Hidden" name="version" value="<?php print $version->getVersion();?>">
<table cellpadding="3">
<?php
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, $version->getAttributeValue($attrdef)) ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("save") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,90 @@
<?php
/**
* Implementation of EditComment view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_comment"));
$this->contentContainerStart();
?>
<form action="../op/op.EditComment.php" name="form1" onsubmit="return checkForm();" method="POST">
<?php echo createHiddenFieldWithKey('editcomment'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
<input type="Hidden" name="version" value="<?php print $version->getVersion();?>">
<table cellpadding="3">
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($version->getComment());?></textarea></td>
</tr>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("save") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,132 @@
<?php
/**
* Implementation of EditDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (document.form1.keywords.value == "") msg += "<?php printMLText("js_no_keywords");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_document_props"));
$this->contentContainerStart();
?>
<form action="../op/op.EditDocument.php" name="form1" onsubmit="return checkForm();" method="POST">
<input type="hidden" name="documentid" value="<?php echo $document->getID() ?>">
<table cellpadding="3">
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input name="name" value="<?php print htmlspecialchars($document->getName());?>" size="60"></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($document->getComment());?></textarea></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("keywords");?>:</td>
<td class="standardText">
<textarea name="keywords" rows="2" cols="80"><?php print htmlspecialchars($document->getKeywords());?></textarea><br>
<a href="javascript:chooseKeywords('form1.keywords');"><?php printMLText("use_default_keywords");?></a>
<script language="JavaScript">
var openDlg;
function chooseKeywords(target) {
openDlg = open("out.KeywordChooser.php?target="+target, "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
</script>
</td>
</tr>
<tr>
<td><?php printMLText("categories")?>:</td>
<td><?php $this->printCategoryChooser("form1", $document->getCategories());?></td>
</tr>
<?php
if ($folder->getAccessMode($user) > M_READ) {
print "<tr>";
print "<td class=\"inputDescription\">" . getMLText("sequence") . ":</td>";
print "<td>";
$this->printSequenceChooser($folder->getDocuments(), $document->getID());
print "</td></tr>";
}
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, $document->getAttributeValue($attrdef)) ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("save") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,101 @@
<?php
/**
* Implementation of EditEvent view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<form action="../op/op.EditEvent.php" name="form1" onsubmit="return checkForm();" method="POST">
<?php echo createHiddenFieldWithKey('editevent'); ?>
<input type="Hidden" name="eventid" value="<?php echo (int) $event["id"]; ?>">
<table>
<tr>
<td><?php printMLText("from");?>:</td>
<td><?php $this->printDateChooser($event["start"], "from");?></td>
</tr>
<tr>
<td><?php printMLText("to");?>:</td>
<td><?php $this->printDateChooser($event["stop"], "to");?></td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input name="name" value="<?php echo htmlspecialchars($event["name"]);?>" size="60"></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"><?php echo htmlspecialchars($event["comment"])?></textarea></td>
</tr>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("edit_event");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,116 @@
<?php
/**
* Implementation of EditFolder view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_folder_props"));
$this->contentContainerStart();
?>
<form action="../op/op.EditFolder.php" name="form1" onsubmit="return checkForm();" method="POST">
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
<table>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input name="name" value="<?php print htmlspecialchars($folder->getName());?>" size="60"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($folder->getComment());?></textarea></td>
</tr>
<?php
$parent = ($folder->getID() == $rootfolderid) ? false : $folder->getParent();
if ($parent && $parent->getAccessMode($user) > M_READ) {
print "<tr>";
print "<td>" . getMLText("sequence") . ":</td>";
print "<td>";
$this->printSequenceChooser($parent->getSubFolders(), $folder->getID());
print "</td></tr>\n";
}
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, $folder->getAttributeValue($attrdef)) ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("save"); ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,127 @@
<?php
/**
* Implementation of EditUserData view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.pwd.value != document.form1.pwdconf.value) msg += "<?php printMLText("js_pwd_not_conf");?>\n";
if (document.form1.fullname.value == "") msg += "<?php printMLText("js_no_name");?>\n";
if (document.form1.email.value == "") msg += "<?php printMLText("js_no_email");?>\n";
// if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_user_details"));
$this->contentContainerStart();
?>
<form action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
<table>
<tr>
<td><?php printMLText("current_password");?>:</td>
<td><input id="currentpwd" type="Password" name="currentpwd" size="30"></td>
</tr>
<tr>
<td><?php printMLText("new_password");?>:</td>
<td><input class="pwd" rel="outerstrength" type="Password" name="pwd" size="30"> <div id="outerstrength" style="min-width: 100px; height: 14px; display: inline-block; border: 1px solid black; padding: 1px;"><div id="innerstrength" style="width: 0px; height: 14px; display: inline-block; border: 0px; padding: 0px; background-color: red;">&nbsp;</div> <div id="strength" style="display: inline-block;"></div></div></td>
</tr>
<tr>
<td><?php printMLText("confirm_pwd");?>:</td>
<td><input id="pwdconf" type="Password" name="pwdconf" size="30"></td>
</tr>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input name="fullname" value="<?php print htmlspecialchars($user->getFullName());?>" size="30"></td>
</tr>
<tr>
<td><?php printMLText("email");?>:</td>
<td><input name="email" value="<?php print htmlspecialchars($user->getEmail());?>" size="30"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($user->getComment());?></textarea></td>
</tr>
<?php
if ($enableuserimage){
?>
<tr>
<td><?php printMLText("user_image");?>:</td>
<td>
<?php
if ($user->hasImage())
print "<img src=\"".$httproot . "out/out.UserImage.php?userid=".$user->getId()."\">";
else printMLText("no_user_image");
?>
</td>
</tr>
<tr>
<td><?php printMLText("new_user_image");?>:</td>
<td><input type="file" name="userfile" accept="image/jpeg" size="30"></td>
</tr>
<?php } ?>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("submit_userinfo") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,275 @@
<?php
/**
* Implementation of FolderAccess view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<select name=\"mode\">\n";
print "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "\n";
print "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "\n";
print "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "\n";
print "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "\n";
print "</select>\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);
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) &&
(document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1))
msg += "<?php printMLText("js_select_user_or_group");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_folder_access"));
$this->contentContainerStart();
if ($user->isAdmin()) {
$this->contentSubHeading(getMLText("set_owner"));
?>
<form action="../op/op.FolderAccess.php">
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="Hidden" name="action" value="setowner">
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>">
<?php printMLText("owner");?> : <select name="ownerid">
<?php
$owner = $folder->getOwner();
foreach ($allUsers as $currUser) {
if ($currUser->isGuest())
continue;
print "<option value=\"".$currUser->getID()."\"";
if ($currUser->getID() == $owner->getID())
print " selected";
print ">" . htmlspecialchars($currUser->getLogin() . " - " . $currUser->getFullname()) . "</option>\n";
}
?>
</select>
<input type="Submit" value="<?php printMLText("save")?>">
</form>
<?php
}
if ($folder->getID() != $rootfolderid && $folder->getParent()){
$this->contentSubHeading(getMLText("access_inheritance"));
if ($folder->inheritsAccess()) {
printMLText("inherits_access_msg");
?>
<p>
<form action="../op/op.FolderAccess.php" style="display: inline-block;">
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="hidden" name="action" value="notinherit">
<input type="hidden" name="mode" value="copy">
<input type="submit" value="<?php printMLText("inherits_access_copy_msg")?>">
</form>
<form action="../op/op.FolderAccess.php" style="display: inline-block;">
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="hidden" name="action" value="notinherit">
<input type="hidden" name="mode" value="empty">
<input type="submit" value="<?php printMLText("inherits_access_empty_msg")?>">
</form>
</p>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
return;
}
?>
<form action="../op/op.FolderAccess.php">
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="hidden" name="action" value="inherit">
<input type="submit" value="<?php printMLText("does_not_inherit_access_msg")?>">
</form>
<?php
}
$accessList = $folder->getAccessList();
$this->contentSubHeading(getMLText("default_access"));
?>
<form action="../op/op.FolderAccess.php">
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="Hidden" name="action" value="setdefault">
<?php $this->printAccessModeSelection($folder->getDefaultAccess()); ?>
<input type="Submit" value="<?php printMLText("save");?>">
</form>
<?php
$this->contentSubHeading(getMLText("edit_existing_access"));
if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) {
print "<table class=\"defaultView\">";
foreach ($accessList["users"] as $userAccess) {
$userObj = $userAccess->getUser();
print "<tr>\n";
print "<td><img src=\"images/usericon.gif\" class=\"mimeicon\"></td>\n";
print "<td>". htmlspecialchars($userObj->getFullName()) . "</td>\n";
print "<form action=\"../op/op.FolderAccess.php\">\n";
echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"editaccess\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<td>\n";
$this->printAccessModeSelection($userAccess->getMode());
print "</td>\n";
print "<td><span class=\"actions\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/save.gif\">".getMLText("save")." ";
print "</span></td>\n";
print "</form>\n";
print "<td><span class=\"actions\">\n";
print "<form action=\"../op/op.FolderAccess.php\">\n";
echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/del.gif\">".getMLText("delete")." ";
print "</form>\n";
print "<span></td>\n";
print "</tr>\n";
}
foreach ($accessList["groups"] as $groupAccess) {
$groupObj = $groupAccess->getGroup();
$mode = $groupAccess->getMode();
print "<tr>";
print "<td><img src=\"images/groupicon.gif\" class=\"mimeicon\"></td>";
print "<td>". htmlspecialchars($groupObj->getName()) . "</td>";
print "<form action=\"../op/op.FolderAccess.php\">";
echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">";
print "<input type=\"Hidden\" name=\"action\" value=\"editaccess\">";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">";
print "<td>";
$this->printAccessModeSelection($groupAccess->getMode());
print "</td>\n";
print "<td><span class=\"actions\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/save.gif\">".getMLText("save")." ";
print "</span></td>\n";
print "</form>";
print "<td><span class=\"actions\">\n";
print "<form action=\"../op/op.FolderAccess.php\">\n";
echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/del.gif\">".getMLText("delete")." ";
print "</form>";
print "</span></td>\n";
print "</tr>\n";
}
print "</table><br>";
}
?>
<form action="../op/op.FolderAccess.php" name="form1" onsubmit="return checkForm();">
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getID()?>">
<input type="Hidden" name="action" value="addaccess">
<table>
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?>
<?php
foreach ($allUsers as $userObj) {
if ($userObj->isGuest()) {
continue;
}
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("group");?>:</td>
<td>
<select name="groupid">
<option value="-1"><?php printMLText("select_one");?>
<?php
foreach ($allGroups as $groupObj) {
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("access_mode");?>:</td>
<td>
<?php
$this->printAccessModeSelection(M_READ);
?>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("add");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,105 @@
<?php
/**
* Implementation of FolderChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
function toggleTree(id){
obj = document.getElementById("tree" + id);
if ( obj.style.display == "none" ) obj.style.display = "";
else obj.style.display = "none";
}
function decodeString(s) {
s = new String(s);
s = s.replace(/&amp;/, "&");
s = s.replace(/&#0037;/, "%"); // percent
s = s.replace(/&quot;/, "\""); // double quote
s = s.replace(/&#0047;&#0042;/, "/*"); // start of comment
s = s.replace(/&#0042;&#0047;/, "*/"); // end of comment
s = s.replace(/&lt;/, "<");
s = s.replace(/&gt;/, ">");
s = s.replace(/&#0061;/, "=");
s = s.replace(/&#0041;/, ")");
s = s.replace(/&#0040;/, "(");
s = s.replace(/&#0039;/, "'");
s = s.replace(/&#0043;/, "+");
return s;
}
var targetName;
var targetID;
function folderSelected(id, name) {
// targetName.value = decodeString(name);
targetName.value = name;
targetID.value = id;
window.close();
return true;
}
</script>
<?php
$this->contentContainerStart();
$this->printFoldersTree($mode, $exclude, $rootfolderid);
$this->contentContainerEnd();
?>
<script language="JavaScript">
targetName = opener.document.<?php echo $form?>.targetname<?php print $form ?>;
targetID = opener.document.<?php echo $form?>.targetid<?php print $form ?>;
</script>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,171 @@
<?php
/**
* Implementation of FolderNotify view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) &&
(document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1))
msg += "<?php printMLText("js_select_user_or_group");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_existing_notify"));
$this->contentContainerStart();
$userNotifyIDs = array();
$groupNotifyIDs = array();
print "<table class=\"defaultView\">\n";
if (empty($notifyList["users"]) && empty($notifyList["groups"])) {
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
}
else {
foreach ($notifyList["users"] as $userNotify) {
print "<tr>";
print "<td><img src=\"images/usericon.gif\" class=\"mimeicon\"></td>";
print "<td>" . htmlspecialchars($userNotify->getFullName()) . "</td>";
if ($user->isAdmin() || $user->getID() == $userNotify->getID()) {
print "<td>";
print "<form action=\"../op/op.FolderNotify.php\" method=\"post\">\n";
echo createHiddenFieldWithKey('foldernotify')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userNotify->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/del.gif\">".getMLText("delete")." ";
print "</form>\n";
print "</td>";
}else print "<td></td>";
print "</tr>";
$userNotifyIDs[] = $userNotify->getID();
}
foreach ($notifyList["groups"] as $groupNotify) {
print "<tr>";
print "<td><img src=\"images/groupicon.gif\" class=\"mimeicon\"></td>";
print "<td>" . htmlspecialchars($groupNotify->getName()) . "</td>";
if ($user->isAdmin() || $groupNotify->isMember($user,true)) {
print "<td>";
print "<form action=\"../op/op.FolderNotify.php\" method=\"post\">\n";
echo createHiddenFieldWithKey('foldernotify')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
print "<input type=\"Image\" class=\"mimeicon\" src=\"images/del.gif\">".getMLText("delete")." ";
print "</form>\n";
print "</td>";
}else print "<td></td>";
print "</tr>";
$groupNotifyIDs[] = $groupNotify->getID();
}
}
print "</table>\n";
?>
<br>
<form action="../op/op.FolderNotify.php" method="post" name="form1" onsubmit="return checkForm();">
<?php echo createHiddenFieldWithKey('foldernotify'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getID()?>">
<input type="Hidden" name="action" value="addnotify">
<table>
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?>
<?php
if ($user->isAdmin()) {
foreach ($allUsers as $userObj) {
if (!$userObj->isGuest() && ($folder->getAccessMode($userObj) >= M_READ) && !in_array($userObj->getID(), $userNotifyIDs))
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getFullName()) . "\n";
}
}
elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) {
print "<option value=\"".$user->getID()."\">" . htmlspecialchars($user->getFullName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("group");?>:</td>
<td>
<select name="groupid">
<option value="-1"><?php printMLText("select_one");?>
<?php
foreach ($allGroups as $groupObj) {
if (($user->isAdmin() || $groupObj->isMember($user,true)) && $folder->getGroupAccessMode($groupObj) >= M_READ && !in_array($groupObj->getID(), $groupNotifyIDs)) {
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "\n";
}
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("add") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,78 @@
<?php
/**
* Implementation of ForcePasswordChange view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<h3>".getMLText('password_expiration')."</h3>";
echo "<p>".getMLText('password_expiration_text')."</p>";
$this->contentContainerStart();
?>
<form action="../op/op.EditUserData.php" method="post" name="form1" onsubmit="return checkForm();">
<table>
<tr>
<td><?php printMLText("current_password");?>:</td>
<td><input id="currentpwd" type="Password" name="currentpwd" size="30"></td>
</tr>
<tr>
<td><?php printMLText("password");?>:</td>
<td><input class="pwd" type="Password" name="pwd" size="30"> <div id="outerstrength" style="min-width: 100px; height: 14px; display: inline-block; border: 1px solid black; padding: 1px;"><div id="innerstrength" style="width: 0px; height: 14px; display: inline-block; border: 0px; padding: 0px; background-color: red;">&nbsp;</div> <div id="strength" style="display: inline-block;"></div></div></td>
</tr>
<tr>
<td><?php printMLText("confirm_pwd");?>:</td>
<td><input id="pwdconf" type="Password" name="pwdconf" size="30"></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("submit_userinfo") ?>"></td>
</tr>
</table>
<input type="hidden" name="fullname" value="<?php print htmlspecialchars($user->getFullName());?>" />
<input type="hidden" name="email" value="<?php print htmlspecialchars($user->getEmail());?>" />
<input type="hidden" name="comment" value="<?php print htmlspecialchars($user->getComment());?>" />
</form>
<?php
$this->contentContainerEnd();
$tmpfoot = array();
$tmpfoot[] = "<a href=\"../op/op.Logout.php\">" . getMLText("logout") . "</a>\n";
print "<p>";
print implode(' | ', $tmpfoot);
print "</p>\n";
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,255 @@
<?php
/**
* Implementation of GroupMgr view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm1(num) {
msg = "";
eval("var formObj = document.form" + num + "_1;");
if (formObj.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if ($strictformcheck) {
?>
if (formObj.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
function checkForm2(num) {
msg = "";
eval("var formObj = document.form" + num + "_2;");
if (formObj.userid.options[formObj.userid.selectedIndex].value == -1) msg += "<?php printMLText("js_select_user");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
obj = -1;
function showUser(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("keywords" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("group_management"));
$this->contentContainerStart();
?>
<table>
<tr>
<td>
<?php echo getMLText("selection")?>:<select onchange="showUser(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_group")?>
<option value="0"><?php echo getMLText("add_group")?>
<?php
$selected=0;
$count=2;
foreach ($allGroups as $group) {
if (isset($_GET["groupid"]) && $group->getID()==$_GET["groupid"]) $selected=$count;
print "<option value=\"".$group->getID()."\">" . htmlspecialchars($group->getName());
$count++;
}
?>
</select>
&nbsp;&nbsp;
</td>
<td id="keywords0" style="display : none;">
<form action="../op/op.GroupMgr.php" name="form0_1" method="post" onsubmit="return checkForm1('0');">
<?php echo createHiddenFieldWithKey('addgroup'); ?>
<input type="Hidden" name="action" value="addgroup">
<table>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input name="name"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="50"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("add_group");?>"></td>
</tr>
</table>
</form>
</td>
<?php
foreach ($allGroups as $group) {
print "<td id=\"keywords".$group->getID()."\" style=\"display : none;\">";
$this->contentSubHeading(getMLText("group")." : ".htmlspecialchars($group->getName()));
?>
<a href="../out/out.RemoveGroup.php?groupid=<?php print $group->getID();?>"><img src="images/del.gif" width="15" height="15" border="0" align="absmiddle" alt=""> <?php printMLText("rm_group");?></a>
<?php $this->contentSubHeading(getMLText("edit_group"));?>
<form action="../op/op.GroupMgr.php" name="form<?php print $group->getID();?>_1" method="post" onsubmit="return checkForm1('<?php print $group->getID();?>');">
<?php echo createHiddenFieldWithKey('editgroup'); ?>
<input type="Hidden" name="groupid" value="<?php print $group->getID();?>">
<input type="Hidden" name="action" value="editgroup">
<table>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input name="name" value="<?php print htmlspecialchars($group->getName());?>"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="50"><?php print htmlspecialchars($group->getComment());?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("save");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentSubHeading(getMLText("group_members"));
?>
<table class="folderView">
<?php
$members = $group->getUsers();
if (count($members) == 0)
print "<tr><td>".getMLText("no_group_members")."</td></tr>";
else {
foreach ($members as $member) {
print "<tr>";
print "<td><img src=\"images/usericon.gif\" width=16 height=16></td>";
print "<td>" . htmlspecialchars($member->getFullName()) . "</td>";
print "<td>" . ($group->isMember($member,true)?getMLText("manager"):"&nbsp;") . "</td>";
print "<td align=\"right\"><ul class=\"actions\">";
print "<li><form action=\"../op/op.GroupMgr.php\" method=\"post\"><input type=\"hidden\" name=\"action\" value=\"rmmember\" /><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('rmmember')."<input type=\"submit\" value=\"".getMLText("delete")."\" /></form>";
print "<li><form action=\"../op/op.GroupMgr.php\" method=\"post\"><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"tmanager\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('tmanager')."<input type=\"submit\" value=\"".getMLText("toggle_manager")."\" /></form>";
print "</td></tr>";
}
}
?>
</table>
<?php
$this->contentSubHeading(getMLText("add_member"));
?>
<form action="../op/op.GroupMgr.php" method="POST" name="form<?php print $group->getID();?>_2" onsubmit="return checkForm2('<?php print $group->getID();?>');">
<?php echo createHiddenFieldWithKey('addmember'); ?>
<input type="Hidden" name="action" value="addmember">
<input type="Hidden" name="groupid" value="<?php print $group->getID();?>">
<table width="100%">
<tr>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?>
<?php
foreach ($allUsers as $currUser)
if (!$group->isMember($currUser))
print "<option value=\"".$currUser->getID()."\">" . htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName()) . "\n";
?>
</select>
</td>
<td>
<input type="checkbox" name="manager" value="1"><?php printMLText("manager");?>
</td>
<td align="right">
<input type="Submit" value="<?php printMLText("add");?>">
</td>
</tr>
</table>
</form>
</td>
<?php } ?>
</tr>
</table>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showUser(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,103 @@
<?php
/**
* Implementation of GroupView view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<ul class=\"groupView\">\n";
foreach ($allGroups as $group){
$members = $group->getUsers();
$managers = $group->getManagers();
$ismanager = false; /* set to true if current user is manager */
echo "<li>".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 "</li>";
echo "<ul>\n";
$memberids = array();
foreach ($members as $member) {
$memberids[] = $member->getId();
echo "<li>".htmlspecialchars($member->getFullName());
if ($member->getEmail()!="")
echo " (<a href=\"mailto:".htmlspecialchars($member->getEmail())."\">".htmlspecialchars($member->getEmail())."</a>)";
foreach($managers as $manager)
if($manager->getId() == $member->getId())
echo ", ".getMLText("manager");
if($ismanager) {
echo ' <a href="../op/op.GroupView.php?action=del&groupid='.$group->getId().'&userid='.$member->getId().'"><img src="images/del.gif" width="15" height="15" border="0" align="absmiddle" alt=""> '.getMLText("rm_user").'</a>';
}
echo "</li>";
}
if($ismanager) {
echo "<li>".getMLText("add_user_to_group").":";
echo "<form action=\"../op/op.GroupView.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"add\" /><input type=\"hidden\" name=\"groupid\" value=\"".$group->getId()."\" />";
echo "<select name=\"userid\" onChange=\"javascript: submit();\">";
echo "<option value=\"\"></option>";
foreach($allUsers as $u) {
if(!$u->isAdmin() && !$u->isGuest() && !in_array($u->getId(), $memberids))
echo "<option value=\"".$u->getId()."\">".htmlspecialchars($u->getFullName())."</option>";
}
echo "</select>";
echo "</form>";
echo "</li>";
}
echo "</ul>\n";
}
echo "</ul>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

50
views/blue/class.Help.php Normal file
View File

@ -0,0 +1,50 @@
<?php
/**
* Implementation of Help view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
} /* }}} */
}
?>

View File

@ -0,0 +1,68 @@
<?php
/**
* Implementation of IndexInfo view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<pre>";
for ($id = 0; $id < $numDocs; $id++) {
if (!$index->isDeleted($id)) {
$hit = $index->getDocument($id);
echo $hit->document_id.": ".htmlspecialchars($hit->title)."\n";
}
}
echo "</pre>";
$terms = $index->terms();
echo "<p>".count($terms)." Terms</p>";
echo "<pre>";
foreach($terms as $term) {
echo htmlspecialchars($term->field).":".htmlspecialchars($term->text)."\n";
}
echo "</pre>";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,96 @@
<?php
/**
* Implementation of Indexer view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<pre>";
$this->tree($dms, $index, $folder);
echo "</pre>";
$index->commit();
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

48
views/blue/class.Info.php Normal file
View File

@ -0,0 +1,48 @@
<?php
/**
* Implementation of Info view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
} /* }}} */
}
?>

View File

@ -0,0 +1,221 @@
<?php
/**
* Implementation of KeywordChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
var targetObj = opener.document.<?php echo $target ?>;
var myTA;
function insertKeywords(keywords) {
if (navigator.appName == "Microsoft Internet Explorer") {
myTA.value += " " + keywords;
}
//assuming Mozilla
else {
selStart = myTA.selectionStart;
myTA.value = myTA.value.substring(0,myTA.selectionStart) + " "
+ keywords
+ myTA.value.substring(myTA.selectionStart,myTA.value.length);
myTA.selectionStart = selStart + keywords.length+1;
myTA.selectionEnd = selStart + keywords.length+1;
}
myTA.focus();
}
function cancel() {
window.close();
return true;
}
function acceptKeywords() {
targetObj.value = myTA.value;
window.close();
return true;
}
obj = new Array();
obj[0] = -1;
obj[1] = -1;
function showKeywords(which) {
if (obj[which] != -1)
obj[which].style.display = "none";
list = document.getElementById("categories" + which);
id = list.options[list.selectedIndex].value;
if (id == -1)
return;
obj[which] = document.getElementById("keywords" + id);
obj[which].style.display = "";
}
</script>
<div>
<?php
$this->contentHeading(getMLText("use_default_keywords"));
$this->contentContainerStart();
?>
<table>
<tr>
<td valign="top" class="inputDescription"><?php echo getMLText("keywords")?>:</td>
<td><textarea id="keywordta" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td class="inputDescription"><?php echo getMLText("global_default_keywords")?>:</td>
<td>
<select onchange="showKeywords(0)" id="categories0">
<option value="-1"><?php echo getMLText("choose_category")?>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if (!$owner->isAdmin())
continue;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
}
?>
</select>
</td>
</tr>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if (!$owner->isAdmin())
continue;
?>
<tr id="keywords<?php echo $category->getID()?>" style="display : none;">
<td valign="top" class="inputDescription"><?php echo getMLText("default_keywords")?>:</td>
<td>
<?php
$lists = $category->getKeywordLists();
if (count($lists) == 0) print getMLText("no_default_keywords");
else {
print "<ul>";
foreach ($lists as $list) {
print "<li><a href='javascript:insertKeywords(\"".htmlspecialchars($list["keywords"])."\");'>".htmlspecialchars($list["keywords"])."</a></li>";
}
print "</ul>";
}
?>
</td>
</tr>
<?php } ?>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td class="inputDescription"><?php echo getMLText("personal_default_keywords")?>:</td>
<td>
<select onchange="showKeywords(1)" id="categories1">
<option value="-1"><?php echo getMLText("choose_category")?>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if ($owner->isAdmin())
continue;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
}
?>
</select>
</td>
</tr>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if ($owner->isAdmin())
continue;
?>
<tr id="keywords<?php echo $category->getID()?>" style="display : none;">
<td valign="top" class="inputDescription"><?php echo getMLText("default_keywords")?>:</td>
<td class="standardText">
<?php
$lists = $category->getKeywordLists();
if (count($lists) == 0) print getMLText("no_default_keywords");
else {
print "<ul>";
foreach ($lists as $list) {
print "<li><a href='javascript:insertKeywords(\"".htmlspecialchars($list["keywords"])."\");'>".htmlspecialchars($list["keywords"])."</a></li>";
}
print "</ul>";
}
?>
</td>
</tr>
<?php } ?>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td colspan="2">
<br>
<input type="Button" onclick="acceptKeywords();" value="<?php echo getMLText("accept")?>"> &nbsp;&nbsp;
<input type="Button" onclick="cancel();" value="<?php echo getMLText("cancel")?>">
</td>
</tr>
</table>
<?php
$this->contentContainerEnd();
?>
<script language="JavaScript">
myTA = document.getElementById("keywordta");
myTA.value = targetObj.value;
myTA.focus();
</script>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,113 @@
<?php
/**
* Implementation of LogManagement view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"folderView\">\n";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("creation_date")."</th>\n";
print "<th>".getMLText("file_size")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$print_header=false;
}
print "<tr>\n";
print "<td><a href=\"out.LogManagement.php?logname=".$entry."\">".$entry."</a></td>\n";
print "<td>".getLongReadableDate(filectime($contentdir.$entry))."</td>\n";
print "<td>".formatted_size(filesize($contentdir.$entry))."</td>\n";
print "<td><ul class=\"actions\">";
print "<li><a href=\"out.RemoveLog.php?logname=".$entry."\">".getMLText("rm_file")."</a></li>";
print "<li><a href=\"../op/op.Download.php?logname=".$entry."\">".getMLText("download")."</a></li>";
print "</ul></td>\n";
print "</tr>\n";
}
if ($print_header) printMLText("empty_notify_list");
else print "</table>\n";
$this->contentContainerEnd();
if ($logname && file_exists($contentdir.$logname)){
$this->contentHeading(" ");
$this->contentContainerStart();
$this->contentSubHeading(sanitizeString($logname));
echo "<div class=\"logview\">";
echo "<pre>\n";
readfile($contentdir.$logname);
echo "</pre>\n";
echo "</div>";
$this->contentContainerEnd();
}
$this->htmlEndPage();
} /* }}} */
}
?>

137
views/blue/class.Login.php Normal file
View File

@ -0,0 +1,137 @@
<?php
/**
* Implementation of Login view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.login.value == "") msg += "<?php printMLText("js_no_login");?>\n";
if (document.form1.pwd.value == "") msg += "<?php printMLText("js_no_pwd");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
function guestLogin()
{
url = "../op/op.Login.php?login=guest" +
"&sesstheme=" + document.form1.sesstheme.options[document.form1.sesstheme.options.selectedIndex].value +
"&lang=" + document.form1.lang.options[document.form1.lang.options.selectedIndex].value;
if (document.form1.referuri) {
url += "&referuri=" + escape(document.form1.referuri.value);
}
document.location.href = url;
}
</script>
<?php $this->contentContainerStart(); ?>
<form action="../op/op.Login.php" method="post" name="form1" onsubmit="return checkForm();">
<?php
if ($refer) {
echo "<input type='hidden' name='referuri' value='".sanitizeString($refer)."'/>";
}
?>
<table border="0">
<tr>
<td><?php printMLText("user_login");?></td>
<td><input name="login" id="login"></td>
</tr>
<tr>
<td><?php printMLText("password");?></td>
<td><input name="pwd" type="Password"></td>
</tr>
<tr>
<td><?php printMLText("language");?></td>
<td>
<?php
print "<select name=\"lang\">";
print "<option value=\"\">-";
$languages = getLanguages();
foreach ($languages as $currLang) {
print "<option value=\"".$currLang."\">".$currLang;
}
print "</select>";
?>
</td>
</tr>
<tr>
<td><?php printMLText("theme");?></td>
<td>
<?php
print "<select name=\"sesstheme\">";
print "<option value=\"\">-";
foreach ($themes as $currTheme) {
print "<option value=\"".$currTheme."\">".$currTheme;
}
print "</select>";
?>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("submit_login") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$tmpfoot = array();
if ($enableguestlogin)
$tmpfoot[] = "<a href=\"javascript:guestLogin()\">" . getMLText("guest_login") . "</a>\n";
if ($enablepasswordforgotten)
$tmpfoot[] = "<a href=\"../out/out.PasswordForgotten.php\">" . getMLText("password_forgotten") . "</a>\n";
if($tmpfoot) {
print "<p>";
print implode(' | ', $tmpfoot);
print "</p>\n";
}
?>
<script language="JavaScript">document.form1.login.focus();</script>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,195 @@
<?php
/**
* Implementation of ManageNotify view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"folderView\">";
print "<thead><tr>\n";
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("actions")."</th>\n";
print "</tr></thead>\n<tbody>\n";
foreach($ret as $ID) {
$fld = $this->dms->getFolder($ID);
if (is_object($fld)) {
$owner = $fld->getOwner();
print "<tr class=\"folder\">";
print "<td><img src=\"images/folder_closed.gif\" width=18 height=18 border=0></td>";
print "<td><a href=\"../out/out.ViewFolder.php?folderid=".$ID."\">" . htmlspecialchars($fld->getName()) . "</a></td>\n";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td><ul class=\"actions\">";
if ($deleteaction) print "<li><a href='../op/op.ManageNotify.php?id=".$ID."&type=folder&action=del'>".getMLText("delete")."</a>";
else print "<li><a href='../out/out.FolderNotify.php?folderid=".$ID."'>".getMLText("edit")."</a>";
print "</ul></td></tr>";
}
}
print "</tbody></table>";
}
} /* }}} */
function printDocumentNotificationList($ret,$deleteaction=true) { /* {{{ */
if (count($ret)==0) {
printMLText("empty_notify_list");
}
else {
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("actions")."</th>\n";
print "</tr></thead>\n<tbody>\n";
foreach ($ret as $ID) {
$doc = $this->dms->getDocument($ID);
if (is_object($doc)) {
$owner = $doc->getOwner();
$latest = $doc->getLatestContent();
$status = $latest->getStatus();
print "<tr>\n";
print "<td><img src=\"images/file.gif\" width=18 height=18 border=0></td>";
print "<td><a href=\"../out/out.ViewDocument.php?documentid=".$ID."\">" . htmlspecialchars($doc->getName()) . "</a></td>\n";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>".getOverallStatusText($status["status"])."</td>";
print "<td class=\"center\">".$latest->getVersion()."</td>";
print "<td><ul class=\"actions\">";
if ($deleteaction) print "<li><a href='../op/op.ManageNotify.php?id=".$ID."&type=document&action=del'>".getMLText("delete")."</a>";
else print "<li><a href='../out/out.DocumentNotify.php?documentid=".$ID."'>".getMLText("edit")."</a>";
print "</ul></td></tr>\n";
}
}
print "</tbody></table>";
}
} /* }}} */
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 "<form method=POST action=\"../op/op.ManageNotify.php?type=folder&action=add\" name=\"form1\">";
$this->contentSubHeading(getMLText("choose_target_folder"));
$this->printFolderChooser("form1",M_READ);
print "<input type=\"checkbox\" name=\"recursefolder\" value=\"1\">";
print getMLText("include_subdirectories");
print "<input type=\"checkbox\" name=\"recursedoc\" value=\"1\">";
print getMLText("include_documents");
print "&nbsp;&nbsp;<input type='submit' name='' value='".getMLText("add")."'/>";
print "</form>";
print "<form method=POST action=\"../op/op.ManageNotify.php?type=document&action=add\" name=\"form2\">";
$this->contentSubHeading(getMLText("choose_target_document"));
$this->printDocumentChooser("form2");
print "&nbsp;&nbsp;<input type=\"Submit\" value=\"".getMLText("add")."\">";
print "</form>";
$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();
} /* }}} */
}
?>

View File

@ -0,0 +1,63 @@
<?php
/**
* Implementation of MoveDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.MoveDocument.php" name="form1">
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
<table>
<tr>
<td><?php printMLText("choose_target_folder");?>:</td>
<td><?php $this->printFolderChooser("form1", M_READWRITE);?></td>
</tr>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("move");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,66 @@
<?php
/**
* Implementation of MoveFolder view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.MoveFolder.php" name="form1">
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
<table>
<tr>
<td><?php printMLText("choose_target_folder");?>:</td>
<td><?php $this->printFolderChooser("form1", M_READWRITE, $folder->getID());?></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("move_folder"); ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,81 @@
<?php
/**
* Implementation of MyAccount view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table>\n";
if ($enableuserimage){
print "<tr>\n";
print "<td rowspan=5 id=\"userImage\">".($user->hasImage() ? "<img class=\"userImage\" src=\"".$httproot . "out/out.UserImage.php?userid=".$user->getId()."\">" : getMLText("no_user_image"))."</td>\n";
print "</tr>\n";
}
print "<tr>\n";
print "<td>".getMLText("name")." : </td>\n";
print "<td>".htmlspecialchars($user->getFullName()).($user->isAdmin() ? " (".getMLText("admin").")" : "")."</td>\n";
print "</tr>\n<tr>\n";
print "<td>".getMLText("user_login")." : </td>\n";
print "<td>".$user->getLogin()."</td>\n";
print "</tr>\n<tr>\n";
print "<td>".getMLText("email")." : </td>\n";
print "<td>".htmlspecialchars($user->getEmail())."</td>\n";
print "</tr>\n<tr>\n";
print "<td>".getMLText("comment")." : </td>\n";
print "<td>".htmlspecialchars($user->getComment())."</td>\n";
print "</tr>\n";
if($passwordexpiration > 0) {
print "<tr>\n";
print "<td>".getMLText("password_expiration")." : </td>\n";
print "<td>".htmlspecialchars($user->getPwdExpiration())."</td>\n";
print "</tr>\n";
}
print "</table>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,489 @@
<?php
/**
* Implementation of MyDocuments view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader=false;
}
print "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."</td>";
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
print "</tr>\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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader=false;
}
print "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."</td>";
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
print "</tr>\n";
}
}
if (!$printheader){
echo "</tbody>\n</table>";
}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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader=false;
}
print "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."</td>";
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
print "</tr>\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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader=false;
}
print "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."</td>";
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
print "</tr>\n";
}
}
if (!$printheader){
echo "</tbody>\n</table>\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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\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 "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$res["documentID"]."\">" . htmlspecialchars($res["name"]) . "</a></td>\n";
print "<td>".getOverallStatusText($res["status"])."</td>";
print "<td>".$res["version"]."</td>";
print "<td>".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."</td>";
print "<td>".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."</td>";
print "</tr>\n";
}
print "</tbody></table>";
}
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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\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 "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$res["documentID"]."\">" . htmlspecialchars($res["name"]) . "</a></td>\n";
print "<td>".getOverallStatusText($res["status"])."</td>";
print "<td>".$res["version"]."</td>";
print "<td>".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."</td>";
print "<td>".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."</td>";
print "</tr>\n";
}
print "</tbody></table>";
}
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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th><a href=\"../out/out.MyDocuments.php?orderby=n\">".getMLText("name")."</a></th>\n";
print "<th><a href=\"../out/out.MyDocuments.php?orderby=s\">".getMLText("status")."</a></th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th><a href=\"../out/out.MyDocuments.php?orderby=u\">".getMLText("last_update")."</a></th>\n";
print "<th><a href=\"../out/out.MyDocuments.php?orderby=e\">".getMLText("expires")."</a></th>\n";
print "</tr>\n</thead>\n<tbody>\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 "<tr>\n";
print "<td><a href=\"out.ViewDocument.php?documentid=".$res["documentID"]."\">" . htmlspecialchars($res["name"]) . "</a></td>\n";
print "<td>".getOverallStatusText($res["status"])."</td>";
print "<td>".$res["version"]."</td>";
print "<td>".$res["statusDate"]." ". htmlspecialchars($res["statusName"])."</td>";
//print "<td>".(!$res["expires"] ? getMLText("does_not_expire"):getReadableDate($res["expires"]))."</td>";
print "<td>".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."</td>";
print "</tr>\n";
}
print "</tbody></table>";
}
else printMLText("empty_notify_list");
$this->contentContainerEnd();
}
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,212 @@
<?php
/**
* Implementation of ObjectCheck view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<tr>\n";
$this->needsrepair = true;
print "<td><a class=\"standardText\" href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\"><img src=\"../out/images/folder_closed.gif\" width=18 height=18 border=0></a></td>";
print "<td><a class=\"standardText\" href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\">";
$tmppath = $folder->getPath();
for ($i = 1; $i < count($tmppath); $i++) {
print "/".htmlspecialchars($tmppath[$i]->getName());
}
print $foldername;
print "</a></td>";
$owner = $folder->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>Folderlist is '".$folderList."', should be '".$path."'</td>";
if($repair) {
$folder->repair();
print "<td><span class=\"success\">Repaired</span></td>\n";
} else {
print "<td></td>\n";
}
print "</tr>\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 "<tr>\n";
$this->needsrepair = true;
$lc = $document->getLatestContent();
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\"><img class=\"mimeicon\" src=\"../out/images/icons/".UI::getMimeIcon($lc->getFileType())."\" title=\"".$lc->getMimeType()."\"></a></td>";
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\">/";
$folder = $document->getFolder();
$tmppath = $folder->getPath();
for ($i = 1; $i < count($tmppath); $i++) {
print htmlspecialchars($tmppath[$i]->getName())."/";
}
print htmlspecialchars($document->getName());
print "</a></td>";
$owner = $document->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>Folderlist is '".$folderList."', should be '".$path."'</td>";
if($repair) {
$document->repair();
print "<td><span class=\"success\">Repaired</span></td>\n";
} else {
print "<td></td>\n";
}
print "</tr>\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 "<tr>\n";
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\"><img class=\"mimeicon\" src=\"../out/images/icons/".UI::getMimeIcon($version->getFileType())."\" title=\"".$version->getMimeType()."\"></a></td>";
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\">/";
$folder = $document->getFolder();
$tmppath = $folder->getPath();
for ($i = 1; $i < count($tmppath); $i++) {
print htmlspecialchars($tmppath[$i]->getName())."/";
}
print htmlspecialchars($document->getName());
print "</a></td>";
$owner = $document->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>Document content of version ".$version->getVersion()." is missing ('".$path."')</td>";
if($repair) {
print "<td><span class=\"warning\">Cannot repaired</span></td>\n";
} else {
print "<td></td>\n";
}
print "</tr>\n";
}
}
} else {
print "<tr>\n";
print "<td></td>\n";
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\">/";
$folder = $document->getFolder();
$tmppath = $folder->getPath();
for ($i = 1; $i < count($tmppath); $i++) {
print htmlspecialchars($tmppath[$i]->getName())."/";
}
print htmlspecialchars($document->getName());
print "</a></td>";
$owner = $document->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>Document has no content! Delete the document manually.</td>";
print "</tr>\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 "<p>".getMLText('repairing_objects')."</p>";
}
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("error")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$needsrepair = false;
$this->tree($folder, $repair);
print "</tbody></table>\n";
if($needsrepair && $repair == 0) {
echo '<p><a href="out.ObjectCheck.php?repair=1">'.getMLText('do_object_repair').'</a></p>';
}
$this->contentContainerEnd();
$this->contentHeading(getMLText("unlinked_content"));
$this->contentContainerStart();
if($unlink) {
echo "<p>".getMLText('unlinking_objects')."</p>";
}
if($versions) {
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("document")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("original_filename")."</th>\n";
print "<th>".getMLText("mimetype")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
foreach($versions as $version) {
$doc = $version->getDocument();
print "<tr><td>".$doc->getId()."</td><td>".$version->getVersion()."</td><td>".$version->getOriginalFileName()."</td><td>".$version->getMimeType()."</td>";
if($unlink) {
$doc->removeContent($version);
}
print "</tr>\n";
}
print "</tbody></table>\n";
if($unlink == 0) {
echo '<p><a href="out.ObjectCheck.php?unlink=1">'.getMLText('do_object_unlink').'</a></p>';
}
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,99 @@
<?php
/**
* Implementation of OverrideContentStatus view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.overrideStatus.value == "") msg += "<?php printMLText("js_no_override_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentContainerStart();
// Display the Review form.
?>
<form method="post" action="../op/op.OverrideContentStatus.php" name="form1" onsubmit="return checkForm();">
<table>
<tr><td><?php echo(printMLText("comment")); ?></td>
<td><textarea name="comment" cols="40" rows="4"></textarea>
</td></tr>
<tr><td><?php echo(printMLText("status")); ?></td>
<td><select name="overrideStatus">
<option value=''></option>
<?php
if ($overallStatus["status"] == S_OBSOLETE) echo "<option value='".S_RELEASED."'>".getOverallStatusText(S_RELEASED)."</option>";
if ($overallStatus["status"] == S_RELEASED) echo "<option value='".S_OBSOLETE."'>".getOverallStatusText(S_OBSOLETE)."</option>";
?>
</select>
</td></tr><tr><td></td><td>
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
<input type='submit' name='overrideContentStatus' value='<?php echo(printMLText("update")); ?>'/>
</td></tr></table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,71 @@
<?php
/**
* Implementation of PasswordForgotten view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<?php $this->contentContainerStart(); ?>
<form action="../op/op.PasswordForgotten.php" method="post" name="form1" onsubmit="return checkForm();">
<?php
if ($referrer) {
echo "<input type='hidden' name='referuri' value='".$referrer."'/>";
}
?>
<p><?php printMLText("password_forgotten_text"); ?></p>
<table border="0">
<tr>
<td><?php printMLText("login");?></td>
<td><input name="login" id="login"></td>
</tr>
<tr>
<td><?php printMLText("email");?></td>
<td><input name="email" id="email"></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("submit_password_forgotten") ?>"></td>
</tr>
</table>
</form>
<?php $this->contentContainerEnd(); ?>
<script language="JavaScript">document.form1.email.focus();</script>
<p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,57 @@
<?php
/**
* Implementation of RemoveArchive view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveArchive.php" name="form1" method="post">
<input type="hidden" name="arkname" value="<?php echo htmlspecialchars($arkname); ?>">
<?php echo createHiddenFieldWithKey('removearchive'); ?>
<p><?php printMLText("confirm_rm_backup", array ("arkname" => htmlspecialchars($arkname)));?></p>
<input type="submit" value="<?php printMLText("backup_remove");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,60 @@
<?php
/**
* Implementation of RemoveDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveDocument.php" name="form1" method="post">
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
<?php echo createHiddenFieldWithKey('removedocument'); ?>
<p>
<?php printMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName())));?>
</p>
<p><input type="Submit" value="<?php printMLText("rm_document");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,60 @@
<?php
/**
* Implementation of RemoveDocumentFile view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveDocumentFile.php" name="form1" method="post">
<?php echo createHiddenFieldWithKey('removedocumentfile'); ?>
<input type="Hidden" name="documentid" value="<?php echo $document->getID()?>">
<input type="Hidden" name="fileid" value="<?php echo $file->getID()?>">
<p><?php printMLText("confirm_rm_file", array ("documentname" => htmlspecialchars($document->getName()), "name" => htmlspecialchars($file->getName())));?></p>
<input type="Submit" value="<?php printMLText("rm_file");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,56 @@
<?php
/**
* Implementation of RemoveDump view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveDump.php" name="form1" method="post">
<input type="Hidden" name="dumpname" value="<?php echo htmlspecialchars($dumpname); ?>">
<?php echo createHiddenFieldWithKey('removedump'); ?>
<p><?php printMLText("confirm_rm_dump", array ("dumpname" => htmlspecialchars($dumpname)));?></p>
<input type="submit" value="<?php printMLText("dump_remove");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,58 @@
<?php
/**
* Implementation of RemoveEvent view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveEvent.php" name="form1" method="post">
<?php echo createHiddenFieldWithKey('removeevent'); ?>
<input type="hidden" name="eventid" value="<?php echo intval($event["id"]); ?>">
<p><?php printMLText("confirm_rm_event", array ("name" => htmlspecialchars($event["name"])));?></p>
<input type="submit" value="<?php printMLText("delete");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,60 @@
<?php
/**
* Implementation of RemoveFolder view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveFolder.php" method="post" name="form1">
<input type="Hidden" name="folderid" value="<?php print $folderid;?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
<?php echo createHiddenFieldWithKey('removefolder'); ?>
<p>
<?php printMLText("confirm_rm_folder", array ("foldername" => htmlspecialchars($folder->getName())));?>
</p>
<p><input type="Submit" value="<?php printMLText("rm_folder");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,57 @@
<?php
/**
* Implementation of RemoveFolderFiles view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveFolderFiles.php" name="form1" method="post">
<?php echo createHiddenFieldWithKey('removefolderfiles'); ?>
<input type="hidden" name="folderid" value="<?php echo $folder->getID()?>">
<p><?php printMLText("confirm_rm_folder_files", array ("foldername" => htmlspecialchars($folder->getName())));?></p>
<input type="submit" value="<?php printMLText("accept");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,60 @@
<?php
/**
* Implementation of RemoveGroup view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.GroupMgr.php" name="form1" method="post">
<input type="hidden" name="groupid" value="<?php print $group->getID();?>">
<input type="hidden" name="action" value="removegroup">
<?php echo createHiddenFieldWithKey('removegroup'); ?>
<p>
<?php printMLText("confirm_rm_group", array ("groupname" => htmlspecialchars($group->getName())));?>
</p>
<p><input type="submit" value="<?php printMLText("rm_group");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,56 @@
<?php
/**
* Implementation of RemoveLog view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveLog.php" name="form1" method="post">
<?php echo createHiddenFieldWithKey('removelog'); ?>
<input type="hidden" name="logname" value="<?php echo $logname?>">
<p><?php printMLText("confirm_rm_log", array ("logname" => $logname));?></p>
<input type="submit" value="<?php printMLText("rm_file");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,78 @@
<?php
/**
* Implementation of RemoveUser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.UsrMgr.php" name="form1" method="post">
<input type="hidden" name="userid" value="<?php print $rmuser->getID();?>">
<input type="hidden" name="action" value="removeuser">
<?php echo createHiddenFieldWithKey('removeuser'); ?>
<p>
<?php printMLText("confirm_rm_user", array ("username" => htmlspecialchars($rmuser->getFullName())));?>
</p>
<p>
<?php printMLText("assign_user_property_to"); ?>:
<select name="assignTo">
<?php
foreach ($allusers as $currUser) {
if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
continue;
if ($rmuser && $currUser->getID()==$rmuser->getID()) $selected=$count;
print "<option value=\"".$currUser->getID()."\">" . htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName());
}
?>
</select>
</p>
<p><input type="submit" value="<?php printMLText("rm_user");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,59 @@
<?php
/**
* Implementation of RemoveVersion view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.RemoveVersion.php" name="form1" method="post">
<?php echo createHiddenFieldWithKey('removeversion'); ?>
<input type="hidden" name="documentid" value="<?php echo $document->getID()?>">
<input type="hidden" name="version" value="<?php echo $version->getVersion()?>">
<p><?php printMLText("confirm_rm_version", array ("documentname" => htmlspecialchars($document->getName()), "version" => $version->getVersion()));?></p>
<input type="submit" value="<?php printMLText("rm_version");?>">
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,172 @@
<?php
/**
* Implementation of ReviewDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
function checkIndForm()
{
msg = "";
if (document.form1.reviewStatus.value == "") msg += "<?php printMLText("js_no_review_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
function checkGrpForm()
{
msg = "";
if (document.form1.reviewGroup.value == "") msg += "<?php printMLText("js_no_review_group");?>\n";
if (document.form1.reviewStatus.value == "") msg += "<?php printMLText("js_no_review_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentContainerStart();
// Display the Review form.
if ($reviewStatus['type'] == 0) {
if($reviewStatus["status"]!=0) {
print "<table class=\"folderView\"><thead><tr>";
print "<th>".getMLText("status")."</th>";
print "<th>".getMLText("comment")."</th>";
print "<th>".getMLText("last_update")."</th>";
print "</tr></thead><tbody><tr>";
print "<td>";
printReviewStatusText($reviewStatus["status"]);
print "</td>";
print "<td>".htmlspecialchars($reviewStatus["comment"])."</td>";
$indUser = $dms->getUser($reviewStatus["userID"]);
print "<td>".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."</td>";
print "</tr></tbody></table><br>";
}
?>
<form method="post" action="../op/op.ReviewDocument.php" name="form1" onsubmit="return checkIndForm();">
<?php echo createHiddenFieldWithKey('reviewdocument'); ?>
<table>
<tr><td class='infos' valign='top'><?php printMLText("comment")?>:</td>
<td class='infos' valign='top'><textarea name="comment" cols="80" rows="4"></textarea>
</td></tr>
<tr><td><?php printMLText("review_status")?></td>
<td><select name="reviewStatus">
<option value=''></option>
<option value='1'><?php printMLText("status_reviewed")?></option>
<option value='-1'><?php printMLText("rejected")?></option>
</select>
</td></tr><tr><td></td><td>
<input type='hidden' name='reviewType' value='ind'/>
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
<input type='submit' name='indReview' value='<?php printMLText("submit_review")?>'/>
</td></tr></table>
</form>
<?php
}
else if ($reviewStatus['type'] == 1) {
if($reviewStatus["status"]!=0) {
print "<table class=\"folderView\"><thead><tr>";
print "<th>".getMLText("status")."</th>";
print "<th>".getMLText("comment")."</th>";
print "<th>".getMLText("last_update")."</th>";
print "</tr></thead><tbody><tr>";
print "<td>";
printReviewStatusText($reviewStatus["status"]);
print "</td>";
print "<td>".htmlspecialchars($reviewStatus["comment"])."</td>";
$indUser = $dms->getUser($reviewStatus["userID"]);
print "<td>".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."</td>";
print "</tr></tbody></table><br>\n";
}
?>
<form method="post" action="../op/op.ReviewDocument.php" name="form1" onsubmit="return checkGrpForm();">
<table>
<tr><td><?php printMLText("comment")?>:</td>
<td><textarea name="comment" cols="80" rows="4"></textarea>
</td></tr>
<tr><td><?php printMLText("review_status")?>:</td>
<td>
<select name="reviewStatus">
<option value=''></option>
<option value='1'><?php printMLText("status_reviewed")?></option>
<option value='-1'><?php printMLText("rejected")?></option>
</select>
</td></tr>
<tr><td></td><td>
<input type='hidden' name='reviewType' value='grp'/>
<input type='hidden' name='reviewGroup' value='<?php echo $reviewStatus['required']; ?>'/>
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
<input type='submit' name='groupReview' value='<?php printMLText("submit_review")?>'/></td></tr>
</table>
</form>
<?php
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,42 @@
<?php
/**
* Implementation of ReviewSummary view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
}
} /* }}} */
}
?>

162
views/blue/class.Search.php Normal file
View File

@ -0,0 +1,162 @@
<?php
/**
* Implementation of Search result view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("attributes")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("comment")."</th>\n";
//print "<th>".getMLText("reviewers")."</th>\n";
//print "<th>".getMLText("approvers")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$resultsFilteredByAccess = false;
$foldercount = $doccount = 0;
foreach ($entries as $entry) {
if(get_class($entry) == 'LetoDMS_Core_Document') {
$document = $entry;
$doccount++;
$lc = $document->getLatestContent();
print "<tr>";
//print "<td><img src=\"../out/images/file.gif\" class=\"mimeicon\"></td>";
if (in_array(2, $searchin)) {
$docName = markQuery(htmlspecialchars($document->getName()), "i");
} else {
$docName = htmlspecialchars($document->getName());
}
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\"><img class=\"mimeicon\" src=\"../out/images/icons/".$this->getMimeIcon($lc->getFileType())."\" title=\"".$lc->getMimeType()."\"></a></td>";
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\">/";
$folder = $document->getFolder();
$path = $folder->getPath();
for ($i = 1; $i < count($path); $i++) {
print htmlspecialchars($path[$i]->getName())."/";
}
print $docName;
print "</a></td>";
$attributes = $lc->getAttributes();
print "<td>";
print "<ul class=\"documentDetail\">\n";
$attributes = $lc->getAttributes();
if($attributes) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."</li>\n";
}
}
print "</ul>\n";
print "</td>";
$owner = $document->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
$display_status=$lc->getStatus();
print "<td>".getOverallStatusText($display_status["status"]). "</td>";
print "<td class=\"center\">".$lc->getVersion()."</td>";
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 "<td>".$comment."</td>";
print "</tr>\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 "<td><a class=\"standardText\" href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\"><img src=\"../out/images/folder_closed.gif\" width=18 height=18 border=0></a></td>";
print "<td><a class=\"standardText\" href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\">";
$path = $folder->getPath();
print "/";
for ($i = 1; $i < count($path)-1; $i++) {
print htmlspecialchars($path[$i]->getName())."/";
}
print $folderName;
print "</a></td>";
print "<td></td>";
$owner = $folder->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td></td>";
print "<td></td>";
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 "<td>".$comment."</td>";
print "</tr>\n";
}
}
if (0 && $resultsFilteredByAccess) {
print "<tr><td colspan=\"7\">". getMLText("search_results_access_filtered") . "</td></tr>";
}
print "</tbody></table>\n";
$numResults = $doccount + $foldercount;
if ($numResults == 0) {
print "<p>".getMLText("search_no_results")."</p>";
} else {
// print "<p>".getMLText("search_report", array("doccount" => $doccount, "foldercount" => $foldercount, 'searchtime'=>$searchTime))."</p>";
}
$this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET);
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,271 @@
<?php
/**
* Implementation of SearchForm view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.query.value == "")
{
if (!document.form1.creationdate.checked && !document.form1.lastupdate.checked &&
!document.form1.pendingReview.checked && !document.form1.pendingApproval.checked)
msg += "<?php printMLText("js_no_query");?>\n";
}
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("search"));
$this->contentContainerStart();
?>
<?php
if($enablefullsearch) {
?>
<div style="width: 35%; float: left;">
<?php
}
?>
<h2><?php echo getMLText('databasesearch') ?></h2>
<form action="../op/op.Search.php" name="form1" onsubmit="return checkForm();">
<table class="searchform">
<tr>
<td><?php printMLText("search_query");?>:</td>
<td>
<input name="query">
<select name="mode">
<option value="1" selected><?php printMLText("search_mode_and");?><br>
<option value="0"><?php printMLText("search_mode_or");?>
</select>
<br />
<a href="javascript:chooseKeywords('form1.query');"><?php printMLText("use_default_keywords");?></a>
<script language="JavaScript">
var openDlg;
function chooseKeywords(target) {
openDlg = open("out.KeywordChooser.php?target="+target, "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
</script>
</td>
</tr>
<tr>
<td><?php printMLText("search_in");?>:</td>
<td><ul class="actions">
<li class="first"><input type="Checkbox" id="keywords" name="searchin[]" value="1"><label for="keywords"><?php printMLText("keywords");?></label> (<?php printMLText('documents_only'); ?>)</li>
<li><input type="Checkbox" name="searchin[]" id="searchName" value="2"><label for="searchName"><?php printMLText("name");?></label></li>
<li><input type="Checkbox" name="searchin[]" id="comment" value="3"><label for="comment"><?php printMLText("comment");?></label></li>
<li><input type="Checkbox" name="searchin[]" id="attributes" value="4"><label for="attributes"><?php printMLText("attributes");?></label></li>
</ul>
</td>
</tr>
<?php
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php printMLText("category");?>:<br />(<?php printMLText('documents_only'); ?>)</td>
<td>
<select name="categoryids[]" multiple>
<option value="-1"><?php printMLText("all_categories");?>
<?php
foreach ($allCats as $catObj) {
print "<option value=\"".$catObj->getID()."\">" . htmlspecialchars($catObj->getName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("status");?>:<br />(<?php printMLText('documents_only'); ?>)</td>
<td>
<ul class="actions">
<li class="first"><input type="checkbox" id="pendingReview" name="pendingReview" value="1"><label for='pendingReview'><?php printOverallStatusText(S_DRAFT_REV);?></label></li>
<li><input type="checkbox" id="pendingApproval" name="pendingApproval" value="1"><label for='pendingApproval'><?php printOverallStatusText(S_DRAFT_APP);?></label></li>
<li><input type="checkbox" id="released" name="released" value="1"><label for='released'><?php printOverallStatusText(S_RELEASED);?></label></li>
<li><input type="checkbox" id="rejected" name="rejected" value="1"><label for='rejected'><?php printOverallStatusText(S_REJECTED);?></label></li>
<li><input type="checkbox" id="obsolete" name="obsolete" value="1"><label for='obsolete'><?php printOverallStatusText(S_OBSOLETE);?></label></li>
<li><input type="checkbox" id="expired" name="expired" value="1"><label for='expired'><?php printOverallStatusText(S_EXPIRED);?></label></li>
</ul>
</td>
</tr>
<tr>
<td><?php printMLText("owner");?>:</td>
<td>
<select name="ownerid">
<option value="-1"><?php printMLText("all_users");?>
<?php
foreach ($allUsers as $userObj) {
if ($userObj->isGuest())
continue;
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin()." - ".$userObj->getFullName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("under_folder")?>:</td>
<td><?php $this->printFolderChooser("form1", M_READ, -1, $folder);?></td>
</tr>
<tr>
<td><?php printMLText("creation_date");?>:</td>
<td>
<input type="Checkbox" name="creationdate" value="true">
<?php
printMLText("between");
print "&nbsp;&nbsp;";
$this->printDateChooser(-1, "createstart");
print "&nbsp;&nbsp;";
printMLText("and");
print "&nbsp;&nbsp;";
$this->printDateChooser(-1, "createend");
?>
</td>
</tr>
<?php
/*
echo "<tr>\n<td>".getMLText("last_update").":</td>\n";
echo "<td><input type=\"Checkbox\" name=\"lastupdate\" value=\"true\">";
printMLText("between");
print "&nbsp;&nbsp;";
$this->printDateChooser(-1, "updatestart");
print "&nbsp;&nbsp;";
printMLText("and");
print "&nbsp;&nbsp;";
$this->printDateChooser(-1, "updateend");
echo "</td>\n</tr>\n";
*/
?>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("search"); ?>"></td>
</tr>
</table>
</form>
<?php
if($enablefullsearch) {
?>
</div>
<div style="width: 35%; float: left; margin-left: 20px;">
<form action="../op/op.SearchFulltext.php" name="form2" onsubmit="return checkForm();">
<table class="searchform">
<h2><?php echo getMLText('fullsearch') ?></h2>
<tr>
<td><?php printMLText("search_query");?>:</td>
<td>
<input name="query">
<!--
<select name="mode">
<option value="1" selected><?php printMLText("search_mode_and");?><br>
<option value="0"><?php printMLText("search_mode_or");?>
</select>
-->
</td>
</tr>
<tr>
<td><?php printMLText("category_filter");?>:</td>
<td>
<select name="categoryids[]" multiple>
<!--
<option value="-1"><?php printMLText("all_categories");?>
-->
<?php
$allCats = $dms->getDocumentCategories();
foreach ($allCats as $catObj) {
print "<option value=\"".$catObj->getID()."\">" . htmlspecialchars($catObj->getName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("owner");?>:</td>
<td>
<select name="ownerid">
<option value="-1"><?php printMLText("all_users");?>
<?php
foreach ($allUsers as $userObj) {
if ($userObj->isGuest())
continue;
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin()." - ".$userObj->getFullName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("search"); ?>"></td>
</tr>
</table>
</form>
</div>
<div style="clear: both"></div>
<?php
}
?>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,133 @@
<?php
/**
* Implementation of Search result view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<table width="100%" style="border-collapse: collapse;">
<tr>
<td align="left" style="padding:0; margin:0;">
<?php
$numResults = $totaldocs;
if ($numResults == 0) {
printMLText("search_no_results");
}
else {
printMLText("search_report_fulltext", array("doccount" => $totaldocs));
}
?>
</td>
<td align="right"><?php printMLText("search_time", array("time" => $searchTime));?></td>
</tr>
</table>
<?php
if ($numResults == 0) {
$this->contentContainerEnd();
$this->htmlEndPage();
exit;
}
$this->pageList($pageNumber, $totalpages, "../op/op.SearchFulltext.php", $_GET);
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
//print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("comment")."</th>\n";
//print "<th>".getMLText("reviewers")."</th>\n";
//print "<th>".getMLText("approvers")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$resultsFilteredByAccess = false;
foreach ($entries as $document) {
if ($document->getAccessMode($user) < M_READ) {
$resultsFilteredByAccess = true;
}
else {
$lc = $document->getLatestContent();
print "<tr>";
$docName = htmlspecialchars($document->getName());
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\">/";
$folder = $document->getFolder();
$path = $folder->getPath();
for ($i = 1; $i < count($path); $i++) {
print htmlspecialchars($path[$i]->getName())."/";
}
print $docName;
print "</a></td>";
$owner = $document->getOwner();
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>".getOverallStatusText($lc->getStatus()). "</td>";
print "<td class=\"center\">".$lc->getVersion()."</td>";
$comment = htmlspecialchars($document->getComment());
if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "...";
print "<td>".$comment."</td>";
print "</tr>\n";
}
}
if ($resultsFilteredByAccess) {
print "<tr><td colspan=\"7\">". getMLText("search_results_access_filtered") . "</td></tr>";
}
print "</tbody></table>\n";
$this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET);
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,70 @@
<?php
/**
* Implementation of SetExpires view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.SetExpires.php" method="post">
<input type="hidden" name="documentid" value="<?php print $document->getID();?>">
<table>
<tr>
<td><?php printMLText("expires");?>:</td>
<td>
<input type="radio" name="expires" value="false" <?php echo ($document->expires()?"":"checked") ?> ><?php printMLText("does_not_expire");?><br>
<input type="radio" name="expires" value="true" <?php echo ($document->expires()?"checked":"") ?> ><?php $this->printDateChooser(($document->expires()?$document->getExpires():-1), "exp");?>
</td>
</tr>
</table>
<p>
<input type="submit" value="<?php printMLText("update");?>">
</p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,246 @@
<?php
/**
* Implementation of SetReviewersApprovers view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
}
}
?>
<?php $this->contentContainerStart(); ?>
<form action="../op/op.SetReviewersApprovers.php" method="post" name="form1">
<?php $this->contentSubHeading(getMLText("update_reviewers"));?>
<div class="cbSelectTitle cbSelectMargin"><?php printMLText("individuals")?>:</div>
<div class="cbSelectContainer cbSelectMargin">
<ul class="cbSelectList">
<?php
$res=$user->getMandatoryReviewers();
foreach ($docAccess["users"] as $usr) {
$mandatory=false;
foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true;
if ($mandatory){
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." &lt;".$usr->getEmail()."&gt;";
print "<input id='revInd".$usr->getID()."' type='hidden' name='indReviewers[]' value='". $usr->getID() ."'>";
}else if (isset($reviewIndex["i"][$usr->getID()])) {
switch ($reviewIndex["i"][$usr->getID()]["status"]) {
case 0:
print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."' checked='checked'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
case -2:
print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
default:
print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."' disabled='disabled'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
}
}
else {
print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
}
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups")?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($docAccess["groups"] as $group) {
$mandatory=false;
foreach ($res as $r) if ($r['reviewerGroupID']==$group->getID()) $mandatory=true;
if ($mandatory){
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($group->getName());
print "<input id='revGrp".$group->getID()."' type='hidden' name='grpReviewers[]' value='". $group->getID() ."'>";
}else if (isset($reviewIndex["g"][$group->getID()])) {
switch ($reviewIndex["g"][$group->getID()]["status"]) {
case 0:
print "<li class=\"cbSelectItem\"><input id='revGrp".$group->getID()."' type='checkbox' name='grpReviewers[]' value='". $group->getID() ."' checked='checked'>".htmlspecialchars($group->getName());
break;
case -2:
print "<li class=\"cbSelectItem\"><input id='revGrp".$group->getID()."' type='checkbox' name='grpReviewers[]' value='". $group->getID() ."'>".htmlspecialchars($group->getName());
break;
default:
print "<li class=\"cbSelectItem\"><input id='revGrp".$group->getID()."' type='checkbox' name='grpReviewers[]' value='". $group->getID() ."' disabled='disabled'>".htmlspecialchars($group->getName());
break;
}
}
else {
print "<li class=\"cbSelectItem\"><input id='revGrp".$group->getID()."' type='checkbox' name='grpReviewers[]' value='". $group->getID() ."'>".htmlspecialchars($group->getName());
}
}
?>
</ul>
</div>
<?php $this->contentSubHeading(getMLText("update_approvers"));?>
<div class="cbSelectTitle cbSelectMargin"><?php printMLText("individuals")?>:</div>
<div class="cbSelectContainer cbSelectMargin">
<ul class="cbSelectList">
<?php
$res=$user->getMandatoryApprovers();
foreach ($docAccess["users"] as $usr) {
$mandatory=false;
foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true;
if ($mandatory){
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." &lt;".$usr->getEmail()."&gt;";
print "<input id='appInd".$usr->getID()."' type='hidden' name='indApprovers[]' value='". $usr->getID() ."'>";
}else if (isset($approvalIndex["i"][$usr->getID()])) {
switch ($approvalIndex["i"][$usr->getID()]["status"]) {
case 0:
print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."' checked='checked'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
case -2:
print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
default:
print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."' disabled='disabled'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
}
}
else {
print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
}
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups")?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($docAccess["groups"] as $group) {
$mandatory=false;
foreach ($res as $r) if ($r['approverGroupID']==$group->getID()) $mandatory=true;
if ($mandatory){
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($group->getName());
print "<input id='appGrp".$group->getID()."' type='hidden' name='grpApprovers[]' value='". $group->getID() ."'>";
}else if (isset($approvalIndex["g"][$group->getID()])) {
switch ($approvalIndex["g"][$group->getID()]["status"]) {
case 0:
print "<li class=\"cbSelectItem\"><input id='appGrp".$group->getID()."' type='checkbox' name='grpApprovers[]' value='". $group->getID() ."' checked='checked'>".htmlspecialchars($group->getName());
break;
case -2:
print "<li class=\"cbSelectItem\"><input id='appGrp".$group->getID()."' type='checkbox' name='grpApprovers[]' value='". $group->getID() ."'>".htmlspecialchars($group->getName());
break;
default:
print "<li class=\"cbSelectItem\"><input id='appGrp".$group->getID()."' type='checkbox' name='grpApprovers[]' value='". $group->getID() ."' disabled='disabled'>".htmlspecialchars($group->getName());
break;
}
}
else {
print "<li class=\"cbSelectItem\"><input id='appGrp".$group->getID()."' type='checkbox' name='grpApprovers[]' value='". $group->getID() ."'>".htmlspecialchars($group->getName());
}
}
?>
</ul>
</div>
<p>
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
<input type="submit" value="<?php printMLText("update");?>">
</p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,498 @@
<?php
/**
* Implementation of Settings view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<script language="JavaScript">
function ShowHide(strId)
{
var objDiv = document.getElementById(strId);
if (objDiv)
{
if(objDiv.style.display == 'block')
{
objDiv.style.display = 'none';
}
else
{
objDiv.style.display = 'block';
}
}
}
</script>
<form action="../op/op.Settings.php" method="post" enctype="multipart/form-data" name="form0" >
<input type="Hidden" name="action" value="saveSettings" />
<?php
if(!is_writeable($settings->_configFilePath)) {
echo "<p>".getMLText("settings_notwritable")."</p>";
} else {
?>
<input type="Submit" value="<?php printMLText("save");?>" />
<?php
}
?>
<div class="contentHeading" onClick="ShowHide('siteID')" style="cursor:pointer">+ <?php printMLText("settings_Site");?></div>
<div id="siteID" style="display:block">
<table>
<!--
-- SETTINGS - SITE - DISPLAY
-->
<tr ><td><b> <?php printMLText("settings_Display");?></b></td> </tr>
<tr title="<?php printMLText("settings_siteName_desc");?>">
<td><?php printMLText("settings_siteName");?>:</td>
<td><input name="siteName" value="<?php echo $settings->_siteName ?>"/></td>
</tr>
<tr title="<?php printMLText("settings_footNote_desc");?>">
<td><?php printMLText("settings_footNote");?>:</td>
<td><input name="footNote" value="<?php echo $settings->_footNote ?>" size="100"/></td>
</tr>
<tr title="<?php printMLText("settings_printDisclaimer_desc");?>">
<td><?php printMLText("settings_printDisclaimer");?>:</td>
<td><input name="printDisclaimer" type="checkbox" <?php if ($settings->_printDisclaimer) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_language_desc");?>">
<td><?php printMLText("settings_language");?>:</td>
<td>
<SELECT name="language">
<?php
$languages = getLanguages();
foreach($languages as $language)
{
echo '<option value="' . $language . '" ';
if ($settings->_language==$language)
echo "selected";
echo '>' . $language . '</option>';
}
?>
</SELECT>
</td>
</tr>
<tr title="<?php printMLText("settings_theme_desc");?>">
<td><?php printMLText("settings_theme");?>:</td>
<td>
<SELECT name="theme">
<?php
$themes = UI::getStyles();
foreach($themes as $theme)
{
echo '<option value="' . $theme . '" ';
if ($settings->_theme==$theme)
echo "selected";
echo '>' . $theme . '</option>';
}
?>
</SELECT>
</td>
</tr>
<!--
-- SETTINGS - SITE - EDITION
-->
<tr><td></td></tr><tr ><td><b> <?php printMLText("settings_Edition");?></b></td> </tr>
<tr title="<?php printMLText("settings_strictFormCheck_desc");?>">
<td><?php printMLText("settings_strictFormCheck");?>:</td>
<td><input name="strictFormCheck" type="checkbox" <?php if ($settings->_strictFormCheck) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_viewOnlineFileTypes_desc");?>">
<td><?php printMLText("settings_viewOnlineFileTypes");?>:</td>
<td><input name="viewOnlineFileTypes" value="<?php echo $settings->getViewOnlineFileTypesToString() ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_enableConverting_desc");?>">
<td><?php printMLText("settings_enableConverting");?>:</td>
<td><input name="enableConverting" type="checkbox" <?php if ($settings->_enableConverting) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableEmail_desc");?>">
<td><?php printMLText("settings_enableEmail");?>:</td>
<td><input name="enableEmail" type="checkbox" <?php if ($settings->_enableEmail) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableUsersView_desc");?>">
<td><?php printMLText("settings_enableUsersView");?>:</td>
<td><input name="enableUsersView" type="checkbox" <?php if ($settings->_enableUsersView) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableFullSearch_desc");?>">
<td><?php printMLText("settings_enableFullSearch");?>:</td>
<td><input name="enableFullSearch" type="checkbox" <?php if ($settings->_enableFullSearch) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_stopWordsFile_desc");?>">
<td><?php printMLText("settings_stopWordsFile");?>:</td>
<td><input name="stopWordsFile" value="<?php echo $settings->_stopWordsFile; ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_enableFolderTree_desc");?>">
<td><?php printMLText("settings_enableFolderTree");?>:</td>
<td><input name="enableFolderTree" type="checkbox" <?php if ($settings->_enableFolderTree) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_expandFolderTree_desc");?>">
<td><?php printMLText("settings_expandFolderTree");?>:</td>
<td>
<SELECT name="expandFolderTree">
<OPTION VALUE="0" <?php if ($settings->_expandFolderTree==0) echo "SELECTED" ?> ><?php printMLText("settings_expandFolderTree_val0");?></OPTION>
<OPTION VALUE="1" <?php if ($settings->_expandFolderTree==1) echo "SELECTED" ?> ><?php printMLText("settings_expandFolderTree_val1");?></OPTION>
<OPTION VALUE="2" <?php if ($settings->_expandFolderTree==2) echo "SELECTED" ?> ><?php printMLText("settings_expandFolderTree_val2");?></OPTION>
</SELECT>
</tr>
<tr title="<?php printMLText("settings_sortUsersInList_desc");?>">
<td><?php printMLText("settings_sortUsersInList");?>:</td>
<td>
<SELECT name="sortUsersInList">
<OPTION VALUE="" <?php if ($settings->_sortUsersInList=='') echo "SELECTED" ?> ><?php printMLText("settings_sortUsersInList_val_login");?></OPTION>
<OPTION VALUE="fullname" <?php if ($settings->_sortUsersInList=='fullname') echo "SELECTED" ?> ><?php printMLText("settings_sortUsersInList_val_fullname");?></OPTION>
</SELECT>
</tr>
<!--
-- SETTINGS - SITE - CALENDAR
-->
<tr><td></td></tr><tr ><td><b> <?php printMLText("settings_Calendar");?></b></td> </tr>
<tr title="<?php printMLText("settings_enableCalendar_desc");?>">
<td><?php printMLText("settings_enableCalendar");?>:</td>
<td><input name="enableCalendar" type="checkbox" <?php if ($settings->_enableCalendar) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_calendarDefaultView_desc");?>">
<td><?php printMLText("settings_calendarDefaultView");?>:</td>
<td>
<SELECT name="calendarDefaultView">
<OPTION VALUE="w" <?php if ($settings->_calendarDefaultView=="w") echo "SELECTED" ?> ><?php printMLText("week_view");?></OPTION>
<OPTION VALUE="m" <?php if ($settings->_calendarDefaultView=="m") echo "SELECTED" ?> ><?php printMLText("month_view");?></OPTION>
<OPTION VALUE="y" <?php if ($settings->_calendarDefaultView=="y") echo "SELECTED" ?> ><?php printMLText("year_view");?></OPTION>
</SELECT>
</tr>
<tr title="<?php printMLText("settings_firstDayOfWeek_desc");?>">
<td><?php printMLText("settings_firstDayOfWeek");?>:</td>
<td>
<SELECT name="firstDayOfWeek">
<OPTION VALUE="0" <?php if ($settings->_firstDayOfWeek=="0") echo "SELECTED" ?> ><?php printMLText("sunday");?></OPTION>
<OPTION VALUE="1" <?php if ($settings->_firstDayOfWeek=="1") echo "SELECTED" ?> ><?php printMLText("monday");?></OPTION>
<OPTION VALUE="2" <?php if ($settings->_firstDayOfWeek=="2") echo "SELECTED" ?> ><?php printMLText("tuesday");?></OPTION>
<OPTION VALUE="3" <?php if ($settings->_firstDayOfWeek=="3") echo "SELECTED" ?> ><?php printMLText("wednesday");?></OPTION>
<OPTION VALUE="4" <?php if ($settings->_firstDayOfWeek=="4") echo "SELECTED" ?> ><?php printMLText("thursday");?></OPTION>
<OPTION VALUE="5" <?php if ($settings->_firstDayOfWeek=="5") echo "SELECTED" ?> ><?php printMLText("friday");?></OPTION>
<OPTION VALUE="6" <?php if ($settings->_firstDayOfWeek=="6") echo "SELECTED" ?> ><?php printMLText("saturday");?></OPTION>
</SELECT>
</tr>
</table>
</div>
<br>
<div class="contentHeading" onClick="ShowHide('systemID')" style="cursor:pointer">+ <?php printMLText("settings_System");?></div>
<div id="systemID" style="display:block">
<table>
<!--
-- SETTINGS - SYSTEM - SERVER
-->
<tr ><td><b> <?php printMLText("settings_Server");?></b></td> </tr>
<tr title="<?php printMLText("settings_rootDir_desc");?>">
<td><?php printMLText("settings_rootDir");?>:</td>
<td><input name="rootDir" value="<?php echo $settings->_rootDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_httpRoot_desc");?>">
<td><?php printMLText("settings_httpRoot");?>:</td>
<td><input name="httpRoot" value="<?php echo $settings->_httpRoot ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_contentDir_desc");?>">
<td><?php printMLText("settings_contentDir");?>:</td>
<td><input name="contentDir" value="<?php echo $settings->_contentDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_stagingDir_desc");?>">
<td><?php printMLText("settings_stagingDir");?>:</td>
<td><input name="stagingDir" value="<?php echo $settings->_stagingDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_luceneDir_desc");?>">
<td><?php printMLText("settings_luceneDir");?>:</td>
<td><input name="luceneDir" value="<?php echo $settings->_luceneDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_dropFolderDir_desc");?>">
<td><?php printMLText("settings_dropFolderDir");?>:</td>
<td><input name="dropFolderDir" value="<?php echo $settings->_dropFolderDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_logFileEnable_desc");?>">
<td><?php printMLText("settings_logFileEnable");?>:</td>
<td><input name="logFileEnable" type="checkbox" <?php if ($settings->_logFileEnable) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_logFileRotation_desc");?>">
<td><?php printMLText("settings_logFileRotation");?>:</td>
<td>
<SELECT name="logFileRotation">
<OPTION VALUE="h" <?php if ($settings->_logFileRotation=="h") echo "SELECTED" ?> ><?php printMLText("hourly");?></OPTION>
<OPTION VALUE="d" <?php if ($settings->_logFileRotation=="d") echo "SELECTED" ?> ><?php printMLText("daily");?></OPTION>
<OPTION VALUE="m" <?php if ($settings->_logFileRotation=="m") echo "SELECTED" ?> ><?php printMLText("monthly");?></OPTION>
</SELECT>
</tr>
<tr title="<?php printMLText("settings_enableLargeFileUpload_desc");?>">
<td><?php printMLText("settings_enableLargeFileUpload");?>:</td>
<td><input name="enableLargeFileUpload" type="checkbox" <?php if ($settings->_enableLargeFileUpload) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_partitionSize_desc");?>">
<td><?php printMLText("settings_partitionSize");?>:</td>
<td><input name="partitionSize" value="<?php echo $settings->_partitionSize ?>" size="100" /></td>
</tr>
<!--
-- SETTINGS - SYSTEM - AUTHENTICATION
-->
<tr ><td><b> <?php printMLText("settings_Authentication");?></b></td> </tr>
<tr title="<?php printMLText("settings_enableGuestLogin_desc");?>">
<td><?php printMLText("settings_enableGuestLogin");?>:</td>
<td><input name="enableGuestLogin" type="checkbox" <?php if ($settings->_enableGuestLogin) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_restricted_desc");?>">
<td><?php printMLText("settings_restricted");?>:</td>
<td><input name="restricted" type="checkbox" <?php if ($settings->_restricted) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableUserImage_desc");?>">
<td><?php printMLText("settings_enableUserImage");?>:</td>
<td><input name="enableUserImage" type="checkbox" <?php if ($settings->_enableUserImage) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_disableSelfEdit_desc");?>">
<td><?php printMLText("settings_disableSelfEdit");?>:</td>
<td><input name="disableSelfEdit" type="checkbox" <?php if ($settings->_disableSelfEdit) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enablePasswordForgotten_desc");?>">
<td><?php printMLText("settings_enablePasswordForgotten");?>:</td>
<td><input name="enablePasswordForgotten" type="checkbox" <?php if ($settings->_enablePasswordForgotten) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_passwordЅtrength_desc");?>">
<td><?php printMLText("settings_passwordStrength");?>:</td>
<td><input name="passwordStrength" value="<?php echo $settings->_passwordStrength; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_passwordStrengthAlgorithm_desc");?>">
<td><?php printMLText("settings_passwordStrengthAlgorithm");?>:</td>
<td>
<select name="passwordStrengthAlgorithm">
<option value="simple" <?php if ($settings->_passwordStrengthAlgorithm=='simple') echo "selected" ?>><?php printMLText("settings_passwordStrengthAlgorithm_valsimple");?></option>
<option value="advanced" <?php if ($settings->_passwordStrengthAlgorithm=='advanced') echo "selected" ?>><?php printMLText("settings_passwordStrengthAlgorithm_valadvanced");?></option>
</select>
</td>
</tr>
<tr title="<?php printMLText("settings_passwordExpiration_desc");?>">
<td><?php printMLText("settings_passwordExpiration");?>:</td>
<td><input name="passwordExpiration" value="<?php echo $settings->_passwordExpiration; ?>" size="3" /></td>
</tr>
<tr title="<?php printMLText("settings_passwordHistory_desc");?>">
<td><?php printMLText("settings_passwordHistory");?>:</td>
<td><input name="passwordHistory" value="<?php echo $settings->_passwordHistory; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_loginFailure_desc");?>">
<td><?php printMLText("settings_loginFailure");?>:</td>
<td><input name="loginFailure" value="<?php echo $settings->_loginFailure; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_encryptionKey_desc");?>">
<td><?php printMLText("settings_encryptionKey");?>:</td>
<td><input name="encryptionKey" value="<?php echo $settings->_encryptionKey; ?>" size="32" /></td>
</tr>
<!-- TODO Connectors -->
<!--
-- SETTINGS - SYSTEM - DATABASE
-->
<tr ><td><b> <?php printMLText("settings_Database");?></b></td> </tr>
<tr title="<?php printMLText("settings_ADOdbPath_desc");?>">
<td><?php printMLText("settings_ADOdbPath");?>:</td>
<td><input name="ADOdbPath" value="<?php echo $settings->_ADOdbPath ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_dbDriver_desc");?>">
<td><?php printMLText("settings_dbDriver");?>:</td>
<td><input name="dbDriver" value="<?php echo $settings->_dbDriver ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_dbHostname_desc");?>">
<td><?php printMLText("settings_dbHostname");?>:</td>
<td><input name="dbHostname" value="<?php echo $settings->_dbHostname ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_dbDatabase_desc");?>">
<td><?php printMLText("settings_dbDatabase");?>:</td>
<td><input name="dbDatabase" value="<?php echo $settings->_dbDatabase ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_dbUser_desc");?>">
<td><?php printMLText("settings_dbUser");?>:</td>
<td><input name="dbUser" value="<?php echo $settings->_dbUser ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_dbPass_desc");?>">
<td><?php printMLText("settings_dbPass");?>:</td>
<td><input name="dbPass" value="<?php echo $settings->_dbPass ?>" type="password" /></td>
</tr>
<!--
-- SETTINGS - SYSTEM - SMTP
-->
<tr ><td><b> <?php printMLText("settings_SMTP");?></b></td> </tr>
<tr title="<?php printMLText("settings_smtpServer_desc");?>">
<td><?php printMLText("settings_smtpServer");?>:</td>
<td><input name="smtpServer" value="<?php echo $settings->_smtpServer ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_smtpPort_desc");?>">
<td><?php printMLText("settings_smtpPort");?>:</td>
<td><input name="smtpPort" value="<?php echo $settings->_smtpPort ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_smtpSendFrom_desc");?>">
<td><?php printMLText("settings_smtpSendFrom");?>:</td>
<td><input name="smtpSendFrom" value="<?php echo $settings->_smtpSendFrom ?>" /></td>
</tr>
</table>
</div>
<br>
<div class="contentHeading" onClick="ShowHide('advancedID')" style="cursor:pointer">+ <?php printMLText("settings_Advanced");?></div>
<div id="advancedID" style="display:none">
<table>
<!--
-- SETTINGS - ADVANCED - DISPLAY
-->
<tr ><td><b> <?php printMLText("settings_Display");?></b></td> </tr>
<tr title="<?php printMLText("settings_siteDefaultPage_desc");?>">
<td><?php printMLText("settings_siteDefaultPage");?>:</td>
<td><input name="siteDefaultPage" value="<?php echo $settings->_siteDefaultPage ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_rootFolderID_desc");?>">
<td><?php printMLText("settings_rootFolderID");?>:</td>
<td><input name="rootFolderID" value="<?php echo $settings->_rootFolderID ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_titleDisplayHack_desc");?>">
<td><?php printMLText("settings_titleDisplayHack");?>:</td>
<td><input name="titleDisplayHack" type="checkbox" <?php if ($settings->_titleDisplayHack) echo "checked" ?> /></td>
</tr>
<!--
-- SETTINGS - ADVANCED - AUTHENTICATION
-->
<tr ><td><b> <?php printMLText("settings_Authentication");?></b></td> </tr>
<tr title="<?php printMLText("settings_guestID_desc");?>">
<td><?php printMLText("settings_guestID");?>:</td>
<td><input name="guestID" value="<?php echo $settings->_guestID ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_adminIP_desc");?>">
<td><?php printMLText("settings_adminIP");?>:</td>
<td><input name="adminIP" value="<?php echo $settings->_adminIP ?>" /></td>
</tr>
<!--
-- SETTINGS - ADVANCED - EDITION
-->
<tr ><td><b> <?php printMLText("settings_Edition");?></b></td> </tr>
<tr title="<?php printMLText("settings_versioningFileName_desc");?>">
<td><?php printMLText("settings_versioningFileName");?>:</td>
<td><input name="versioningFileName" value="<?php echo $settings->_versioningFileName ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_enableAdminRevApp_desc");?>">
<td><?php printMLText("settings_enableAdminRevApp");?>:</td>
<td><input name="enableAdminRevApp" type="checkbox" <?php if ($settings->_enableAdminRevApp) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableVersionDeletion_desc");?>">
<td><?php printMLText("settings_enableVersionDeletion");?>:</td>
<td><input name="enableVersionDeletion" type="checkbox" <?php if ($settings->_enableVersionDeletion) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableVersionModification_desc");?>">
<td><?php printMLText("settings_enableVersionModification");?>:</td>
<td><input name="enableVersionModification" type="checkbox" <?php if ($settings->_enableVersionModification) echo "checked" ?> /></td>
</tr>
<!--
-- SETTINGS - ADVANCED - NOTIFICATION
-->
<tr ><td><b> <?php printMLText("settings_Notification");?></b></td> </tr>
<tr title="<?php printMLText("settings_enableOwnerNotification_desc");?>">
<td><?php printMLText("settings_enableOwnerNotification");?>:</td>
<td><input name="enableOwnerNotification" type="checkbox" <?php if ($settings->_enableOwnerNotification) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_enableNotificationAppRev_desc");?>">
<td><?php printMLText("settings_enableNotificationAppRev");?>:</td>
<td><input name="enableNotificationAppRev" type="checkbox" <?php if ($settings->_enableNotificationAppRev) echo "checked" ?> /></td>
</tr>
<!--
-- SETTINGS - ADVANCED - SERVER
-->
<tr ><td><b> <?php printMLText("settings_Server");?></b></td> </tr>
<tr title="<?php printMLText("settings_coreDir_desc");?>">
<td><?php printMLText("settings_coreDir");?>:</td>
<td><input name="coreDir" value="<?php echo $settings->_coreDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_luceneClassDir_desc");?>">
<td><?php printMLText("settings_luceneClassDir");?>:</td>
<td><input name="luceneClassDir" value="<?php echo $settings->_luceneClassDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_contentOffsetDir_desc");?>">
<td><?php printMLText("settings_contentOffsetDir");?>:</td>
<td><input name="contentOffsetDir" value="<?php echo $settings->_contentOffsetDir ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_maxDirID_desc");?>">
<td><?php printMLText("settings_maxDirID");?>:</td>
<td><input name="maxDirID" value="<?php echo $settings->_maxDirID ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_updateNotifyTime_desc");?>">
<td><?php printMLText("settings_updateNotifyTime");?>:</td>
<td><input name="updateNotifyTime" value="<?php echo $settings->_updateNotifyTime ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_maxExecutionTime_desc");?>">
<td><?php printMLText("settings_maxExecutionTime");?>:</td>
<td><input name="maxExecutionTime" value="<?php echo $settings->_maxExecutionTime ?>" /></td>
</tr>
<tr ><td><b> <?php printMLText("index_converters");?></b></td> </tr>
<?php
foreach($settings->_converters as $mimetype=>$cmd) {
?>
<tr title="<?php echo $mimetype;?>">
<td><?php echo $mimetype;?>:</td>
<td><input name="converters[<?php echo $mimetype;?>]" value="<?php echo $cmd ?>" size="100" /></td>
</tr>
<?php
}
?>
</table>
</div>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,232 @@
<?php
/**
* Implementation of Statistic view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<li class=\"folderClass\">";
print "<a style=\"color: $color\" href=\"out.ViewFolder.php?folderid=".$folder->getID()."\">".htmlspecialchars($folder->getName()) ."</a>";
$owner = $folder->getOwner();
$color = $this->getAccessColor(M_ALL);
print " [<span style=\"color: $color\">".htmlspecialchars($owner->getFullName())."</span>] ";
if (! $folder->inheritsAccess())
$this->printAccessList($folder);
$subFolders = $folder->getSubFolders();
$documents = $folder->getDocuments();
print "<ul>";
foreach ($subFolders as $sub) $folder_size += $this->printFolder($sub);
foreach ($documents as $document){
$doc_count++;
$folder_size += $this->printDocument($document);
}
print "</ul>";
print "<small>".formatted_size($folder_size).", ".$doc_count." ".getMLText("documents")."</small>\n";
print "</li>";
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 "<li class=\"documentClass\">";
print "<a style=\"color: $color\" href=\"out.ViewDocument.php?documentid=".$document->getID()."\">".htmlspecialchars($document->getName())."</a>";
$owner = $document->getOwner();
$color = $this->getAccessColor(M_ALL);
print " [<span style=\"color: $color\">".htmlspecialchars($owner->getFullName())."</span>] ";
if (! $document->inheritsAccess()) $this->printAccessList($document);
print "<small>".formatted_size($folder_size).", ".$local_file_count." ".getMLText("files")."</small>\n";
print "</li>";
$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 " <span>(";
for ($i = 0; $i < count($accessList["groups"]); $i++)
{
$group = $accessList["groups"][$i]->getGroup();
$color = $this->getAccessColor($accessList["groups"][$i]->getMode());
print "<span style=\"color: $color\">".htmlspecialchars($group->getName())."</span>";
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 "<span style=\"color: $color\">".htmlspecialchars($user->getFullName())."</span>";
if ($i+1 < count($accessList["users"]))
print ", ";
}
print ")</span>";
} /* }}} */
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;
?>
<style type="text/css">
.folderClass {
list-style-image : url(<?php $this->printImgPath("folder_closed.gif");?>);
list-style : url(<?php $this->printImgPath("folder_closed.gif");?>);
}
.documentClass {
list-style-image : url(<?php $this->printImgPath("file.gif");?>);
list-style : url(<?php $this->printImgPath("file.gif");?>);
}
</style>
<script language="JavaScript">
function showDocument(id) {
url = "out.DetailedStatistic.php?documentid=" + id;
alert(url);
}
function showFolder(id) {
url = "out.DetailedStatistic.php?folderid=" + id;
alert(url);
}
</script>
<?php
$this->contentHeading(getMLText("folders_and_documents_statistic"));
$this->contentContainerStart();
print "<table><tr><td>\n";
print "<ul class=\"legend\">\n";
print "<li><span style=\"color:black\">".getMLText("access_inheritance")." </span></li>";
print "<li><span style=\"color:".$this->getAccessColor(M_ALL)."\">".getMLText("access_mode_all")." </span></li>";
print "<li><span style=\"color:".$this->getAccessColor(M_READWRITE)."\">".getMLText("access_mode_readwrite")." </span></li>";
print "<li><span style=\"color:".$this->getAccessColor(M_READ)."\">".getMLText("access_mode_read")." </span></li>";
print "<li><span style=\"color:".$this->getAccessColor(M_NONE)."\">".getMLText("access_mode_none")." </span></li>";
print "</ul>\n";
print "</td><td>\n";
print "<ul>\n";
$this->printFolder($rootfolder);
print "</ul>\n";
print "</td></tr>";
print "<tr><td colspan=\"2\">";
print "<ul class=\"legend\">\n";
print "<li>".getMLText("folders").": ".$this->folder_count."</li>\n";
print "<li>".getMLText("documents").": ".$this->document_count."</li>\n";
print "<li>".getMLText("files").": ".$this->file_count."</li>\n";
print "<li>".getMLText("storage_size").": ".formatted_size($this->storage_size)."</li>\n";
print "</ul>\n";
print "</td></tr>";
print "</table>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,257 @@
<?php
/**
* Implementation of UpdateDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
<?php if($dropfolderdir) { ?>
if (document.form1.userfile.value == "" && document.form1.dropfolderfileform1.value == "") msg += "<?php printMLText("js_no_file");?>\n";
<?php } else { ?>
if (document.form1.userfile.value == "") msg += "<?php printMLText("js_no_file");?>\n";
<?php } ?>
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("update_document"));
$this->contentContainerStart();
if ($document->isLocked()) {
$lockingUser = $document->getLockingUser();
print "<table><tr><td class=\"warning\">";
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 "</td></tr></table>";
$this->contentContainerEnd();
$this->htmlEndPage();
exit;
}
print "</td></tr></table><br>";
}
// Retrieve a list of all users and groups that have review / approve
// privileges.
$docAccess = $document->getApproversList();
?>
<table>
<tr>
<td class="warning"><?php echo getMLText("max_upload_size")." : ".ini_get( "upload_max_filesize"); ?></td>
</tr>
<?php
if($enablelargefileupload) {
?>
<tr>
<td><?php printf(getMLText('link_alt_updatedocument'), "out.UpdateDocument2.php?documentid=".$document->getID()); ?></td>
</tr>
<?php
}
?>
</table><br>
<form action="../op/op.UpdateDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
<input type="Hidden" name="documentid" value="<?php print $document->getID(); ?>">
<table>
<tr>
<td><?php printMLText("local_file");?>:</td>
<td><input type="File" name="userfile" size="60"></td>
</tr>
<?php if($dropfolderdir) { ?>
<tr>
<td><?php printMLText("dropfolder_file");?>:</td>
<td><?php $this->printDropFolderChooser("form1");?></td>
</tr>
<?php } ?>
<tr>
<td><?php printMLText("comment");?>:</td>
<td class="standardText">
<textarea name="comment" rows="4" cols="80"></textarea>
</td>
</tr>
<tr>
<td><?php printMLText("expires");?>:</td>
<td class="standardText">
<input type="Radio" name="expires" value="false"<?php if (!$document->expires()) print " checked";?>><?php printMLText("does_not_expire");?><br>
<input type="radio" name="expires" value="true"<?php if ($document->expires()) print " checked";?>><?php $this->printDateChooser(-1, "exp");?>
</td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan=2>
<?php $this->contentSubHeading(getMLText("assign_reviewers")); ?>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer cbSelectMargin">
<ul class="cbSelectList">
<?php
$res=$user->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 "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getFullName())."</li>";
else print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getFullName())."</li>";
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($docAccess["groups"] as $grp) {
$mandatory=false;
foreach ($res as $r) if ($r['reviewerGroupID']==$grp->getID()) $mandatory=true;
if ($mandatory) print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($grp->getName())."</li>";
else print "<li class=\"cbSelectItem\"><input id='revGrp".$grp->getID()."' type='checkbox' name='grpReviewers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName())."</li>";
}
?>
</ul>
</div>
<?php $this->contentSubHeading(getMLText("assign_approvers")); ?>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer cbSelectMargin">
<ul class="cbSelectList">
<?php
$res=$user->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 "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getFullName())."</li>";
else print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getFullName())."</li>";
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($docAccess["groups"] as $grp) {
$mandatory=false;
foreach ($res as $r) if ($r['approverGroupID']==$grp->getID()) $mandatory=true;
if ($mandatory) print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($grp->getName());
else print "<li class=\"cbSelectItem\"><input id='appGrp".$grp->getID()."' type='checkbox' name='grpApprovers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName());
}
?>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="2"><?php printMLText("add_doc_reviewer_approver_warning")?></td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("update_document")?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,81 @@
<?php
/**
* Implementation of UpdateDocument2 view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table><tr><td class=\"warning\">";
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 "</td></tr></table>";
$this->contentContainerEnd();
$this->htmlEndPage();
exit;
}
print "</td></tr></table><br>";
}
// 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();
} /* }}} */
}
?>

View File

@ -0,0 +1,179 @@
<?php
/**
* Implementation of UserDefaultKeywords view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
obj = -1;
function showKeywords(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("keywords" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("edit_default_keywords"));
$this->contentContainerStart();
?>
<table>
<tr>
<td><?php echo getMLText("selection")?>:</td>
<td>
<select onchange="showKeywords(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
<?php
$selected=0;
$count=2;
foreach ($categories as $category) {
$owner = $category->getOwner();
if ($owner->getID() != $user->getID()) continue;
if (isset($_GET["categoryid"]) && $category->getID()==$_GET["categoryid"]) $selected=$count;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
$count++;
}
?>
</select>
&nbsp;&nbsp;
</td>
<td id="keywords0" style="display : none;">
<form action="../op/op.UserDefaultKeywords.php" method="post" name="addcategory">
<input type="Hidden" name="action" value="addcategory">
<?php printMLText("name");?> : <input name="name">
<input type="Submit" value="<?php printMLText("new_default_keyword_category"); ?>">
</form>
<td>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if ($owner->getID() != $user->getID()) continue;
print "<td id=\"keywords".$category->getID()."\" style=\"display : none;\">";
?>
<table>
<tr>
<td colspan="2">
<a href="../op/op.UserDefaultKeywords.php?categoryid=<?php print $category->getID();?>&action=removecategory"><img src="images/del.gif" border="0"><?php printMLText("rm_default_keyword_category");?></a>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td>
<form action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo "category".$category->getID()?>">
<input type="Hidden" name="action" value="editcategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" value="<?php echo htmlspecialchars($category->getName())?>">
<input type="Submit" value="<?php printMLText("save");?>">
</form>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<tr>
<td><?php echo getMLText("default_keywords")?>:</td>
<td>
<?php
$lists = $category->getKeywordLists();
if (count($lists) == 0)
print getMLText("no_default_keywords");
else
foreach ($lists as $list) {
?>
<form action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo "cat".$category->getID().".".$list["id"]?>">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
<input type="Hidden" name="action" value="editkeywords">
<input name="keywords" value="<?php echo htmlspecialchars($list["keywords"]) ?>">
<input name="action" value="editkeywords" type="Image" src="images/save.gif" title="<?php echo getMLText("save")?>" border="0">
<!-- <input name="action" value="removekeywords" type="Image" src="images/del.gif" title="<?php echo getMLText("delete")?>" border="0"> &nbsp; -->
<a href="../op/op.UserDefaultKeywords.php?categoryid=<?php echo $category->getID()?>&keywordsid=<?php echo $list["id"]?>&action=removekeywords"><img src="images/del.gif" title="<?php echo getMLText("delete")?>" border=0></a>
</form>
<br>
<?php } ?>
</td>
</tr>
<tr>
<form action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo $category->getID().".add"?>">
<td><input type="Submit" value="<?php printMLText("new_default_keywords");?>"></td>
<td>
<input type="Hidden" name="action" value="newkeywords">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="keywords">
</td>
</form>
</tr>
</table>
</td>
<?php } ?>
</tr></table>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showKeywords(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,38 @@
<?php
/**
* Implementation of UserImage view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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() { /* {{{ */
} /* }}} */
}
?>

View File

@ -0,0 +1,106 @@
<?php
/**
* Implementation of UserList view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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() . "\"");
?>
<table border="0">
<tr>
<td><?php printMLText("user_login");?>:</td>
<td><?php print $currUser->getLogin();?></td>
</tr>
<tr>
<td><?php printMLText("user_name");?>:</td>
<td><?php print $currUser->getFullName();?></td>
</tr>
<tr>
<td><?php printMLText("email");?>:</td>
<td><a href="mailto:<?php print $currUser->getEmail();?>"><?php print $currUser->getEmail();?></a></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><?php print $currUser->getComment();?></td>
</tr>
<tr>
<td><?php printMLText("groups");?>:</td>
<td>
<?php
$groups = $currUser->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 ", ";
}
}
?>
</td>
</tr>
<tr>
<td><?php printMLText("user_image");?>:</td>
<td>
<?php
if ($currUser->hasImage())
print "<img src=\"".$httproot . "out/out.UserImage.php?userid=".$currUser->getId()."\">";
else
printMLText("no_user_image");
?>
</td>
</tr>
</table>
<?php
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

426
views/blue/class.UsrMgr.php Normal file
View File

@ -0,0 +1,426 @@
<?php
/**
* Implementation of UsrMgr view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm(num)
{
msg = "";
eval("var formObj = document.form" + num + ";");
if (formObj.login.value == "") msg += "<?php printMLText("js_no_login");?>\n";
if ((num == '0') && (formObj.pwd.value == "")) msg += "<?php printMLText("js_no_pwd");?>\n";
if ((formObj.pwd.value != formObj.pwdconf.value)&&(formObj.pwd.value != "" )&&(formObj.pwd.value != "" )) msg += "<?php printMLText("js_pwd_not_conf");?>\n";
if (formObj.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
if (formObj.email.value == "") msg += "<?php printMLText("js_no_email");?>\n";
//if (formObj.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
obj = -1;
function showUser(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("keywords" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("user_management"));
$this->contentContainerStart();
?>
<table><tr>
<td><?php echo getMLText("selection")?>:
<select onchange="showUser(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_user")?>
<option value="0"><?php echo getMLText("add_user")?>
<?php
$selected=0;
$count=2;
foreach ($users as $currUser) {
if (isset($_GET["userid"]) && $currUser->getID()==$_GET["userid"]) $selected=$count;
print "<option value=\"".$currUser->getID()."\">" . htmlspecialchars($currUser->getLogin() . " - ". $currUser->getFullName());
$count++;
}
?>
</select>
&nbsp;&nbsp;
</td>
<td id="keywords0" style="display : none;">
<form action="../op/op.UsrMgr.php" method="post" enctype="multipart/form-data" name="form0" onsubmit="return checkForm('0');">
<?php echo createHiddenFieldWithKey('adduser'); ?>
<input type="Hidden" name="action" value="adduser">
<table>
<tr>
<td><?php printMLText("user_login");?>:</td>
<td><input name="login"></td>
</tr>
<tr>
<td><?php printMLText("password");?>:</td>
<td><input class="pwd" name="pwd" rel="outerstrength" type="Password"> <div id="outerstrength" style="min-width: 100px; height: 14px; display: inline-block; border: 1px solid black; padding: 1px;"><div id="innerstrength" style="width: 0px; height: 14px; display: inline-block; border: 0px; padding: 0px; background-color: red;">&nbsp;</div> <div id="strength" style="display: inline-block;"></div></div></td>
</tr>
<tr>
<td><?php printMLText("confirm_pwd");?>:</td>
<td><input type="Password" name="pwdconf"></td>
</tr>
<?php
if($passwordexpiration > 0) {
?>
<tr>
<td><?php printMLText("password_expiration");?>:</td>
<td><select name="pwdexpiration"><option value="<?php echo date('Y-m-d H:i:s'); ?>"><?php printMLText("now");?></option><option value="<?php echo date('Y-m-d H:i:s', time()+$passwordexpiration*86400); ?>"><?php printMLText("according_settings");?></option></select></td>
</tr>
<?php
}
?>
<tr>
<td><?php printMLText("user_name");?>:</td>
<td><input name="name"></td>
</tr>
<tr>
<td><?php printMLText("email");?>:</td>
<td><input name="email"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="50"></textarea></td>
</tr>
<tr>
<td><?php printMLText("role");?>:</td>
<td><select name="role"><option value="<?php echo LetoDMS_Core_User::role_user ?>"><?php printMLText("role_user"); ?></option><option value="<?php echo LetoDMS_Core_User::role_admin ?>"><?php printMLText("role_admin"); ?></option><option value="<?php echo LetoDMS_Core_User::role_guest ?>"><?php printMLText("role_guest"); ?></option></select></td>
</tr>
<tr>
<td><?php printMLText("is_hidden");?>:</td>
<td><input type="checkbox" name="ishidden" value="1"></td>
</tr>
<tr>
<td><?php printMLText("is_disabled");?>:</td>
<td><input type="checkbox" name="isdisabled" value="1"></td>
</tr>
<?php if ($enableuserimage){ ?>
<tr>
<td><?php printMLText("user_image");?>:</td>
<td><input type="File" name="userfile"></td>
</tr>
<?php } ?>
<tr>
<td><?php printMLText("reviewers");?>:</td>
<td>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList"><?php
foreach ($users as $usr) {
if ($usr->isGuest()) continue;
print "<li class=\"cbSelectItem\"><input id='revUsr".$usr->getID()."' type='checkbox' name='usrReviewers[]' value='". $usr->getID() ."'>".htmlspecialchars($usr->getLogin());
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($groups as $grp) {
print "<li class=\"cbSelectItem\"><input id='revGrp".$grp->getID()."' type='checkbox' name='grpReviewers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName());
}
?>
</ul>
</div>
</td>
</tr>
<tr>
<td><?php printMLText("approvers");?>:</td>
<td>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($users as $usr) {
if ($usr->isGuest()) continue;
print "<li class=\"cbSelectItem\"><input id='appUsr".$usr->getID()."' type='checkbox' name='usrApprovers[]' value='". $usr->getID() ."'>".htmlspecialchars($usr->getLogin());
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($groups as $grp) {
print "<li class=\"cbSelectItem\"><input id='revGrp".$grp->getID()."' type='checkbox' name='grpApprovers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName());
}
?>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("add_user");?>"></td>
</tr>
</table>
</form>
</td>
<?php
foreach ($users as $currUser) {
print "<td id=\"keywords".$currUser->getID()."\" style=\"display : none;\">";
$this->contentSubHeading(getMLText("user")." : ".htmlspecialchars($currUser->getLogin()));
?>
<a class="standardText" href="../out/out.RemoveUser.php?userid=<?php print $currUser->getID();?>"><img src="images/del.gif" width="15" height="15" border="0" align="absmiddle" alt=""> <?php printMLText("rm_user");?></a>
<?php $this->contentSubHeading(getMLText("edit_user"));?>
<form action="../op/op.UsrMgr.php" method="post" enctype="multipart/form-data" name="form<?php print $currUser->getID();?>" onsubmit="return checkForm('<?php print $currUser->getID();?>');">
<?php echo createHiddenFieldWithKey('edituser'); ?>
<input type="Hidden" name="userid" value="<?php print $currUser->getID();?>">
<input type="Hidden" name="action" value="edituser">
<table>
<tr>
<td><?php printMLText("user_login");?>:</td>
<td><input name="login" value="<?php print htmlspecialchars($currUser->getLogin());?>"></td>
</tr>
<tr>
<td><?php printMLText("password");?>:</td>
<td><input type="Password" class="pwd" rel="outerstrength<?php echo $currUser->getID(); ?>" name="pwd"> <div id="outerstrength<?php echo $currUser->getID(); ?>" style="min-width: 100px; height: 14px; display: inline-block; border: 1px solid black; padding: 1px;"><div id="innerstrength" style="width: 0px; height: 14px; display: inline-block; border: 0px; padding: 0px; background-color: red;">&nbsp;</div> <div id="strength" style="display: inline-block;"></td>
</tr>
<tr>
<td><?php printMLText("confirm_pwd");?>:</td>
<td><input type="Password" name="pwdconf"></td>
</tr>
<?php
if($passwordexpiration > 0) {
?>
<tr>
<td><?php printMLText("password_expiration");?>:</td>
<td><select name="pwdexpiration"><option value="<?php echo date('Y-m-d H:i:s'); ?>"><?php printMLText("now");?></option><option value="<?php echo date('Y-m-d H:i:s', time()+$passwordexpiration*86400); ?>"><?php printMLText("according_settings");?></option></select> <?php echo $currUser->getPwdExpiration(); ?></td>
</tr>
<?php
}
?>
<tr>
<td><?php printMLText("user_name");?>:</td>
<td><input name="name" value="<?php print htmlspecialchars($currUser->getFullName());?>"></td>
</tr>
<tr>
<td><?php printMLText("email");?>:</td>
<td><input name="email" value="<?php print htmlspecialchars($currUser->getEmail()) ;?>"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="50"><?php print htmlspecialchars($currUser->getComment());?></textarea></td>
</tr>
<tr>
<td><?php printMLText("role");?>:</td>
<td><select name="role"><option value="<?php echo LetoDMS_Core_User::role_user ?>"><?php printMLText("role_user"); ?></option><option value="<?php echo LetoDMS_Core_User::role_admin ?>" <?php if($currUser->getRole() == LetoDMS_Core_User::role_admin) echo "selected"; ?>><?php printMLText("role_admin"); ?></option><option value="<?php echo LetoDMS_Core_User::role_guest ?>" <?php if($currUser->getRole() == LetoDMS_Core_User::role_guest) echo "selected"; ?>><?php printMLText("role_guest"); ?></option></select></td>
</tr>
<tr>
<td><?php printMLText("is_hidden");?>:</td>
<td><input type="checkbox" name="ishidden" value="1"<?php print ($currUser->isHidden() ? " checked='checked'" : "");?>></td>
</tr>
<tr>
<td><?php printMLText("is_disabled");?>:</td>
<td><input type="checkbox" name="isdisabled" value="1"<?php print ($currUser->isDisabled() ? " checked='checked'" : "");?>></td>
</tr>
<?php if ($enableuserimage){ ?>
<tr>
<td><?php printMLText("user_image");?>:</td>
<td>
<?php
if ($currUser->hasImage())
print "<img src=\"".$httproot . "out/out.UserImage.php?userid=".$currUser->getId()."\">";
else
printMLText("no_user_image");
?>
</td>
</tr>
<tr>
<td><?php printMLText("new_user_image");?>:</td>
<td><input type="file" name="userfile" accept="image/jpeg"></td>
</tr>
<?php } ?>
<tr>
<td><?php printMLText("reviewers");?>:</td>
<td>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
$res=$currUser->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 "<li class=\"cbSelectItem\"><input id='revUsr".$usr->getID()."' type='checkbox' ".($checked?"checked='checked' ":"")."name='usrReviewers[]' value='". $usr->getID() ."'>".htmlspecialchars($usr->getLogin())."</li>\n";
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($groups as $grp) {
$checked=false;
foreach ($res as $r) if ($r['reviewerGroupID']==$grp->getID()) $checked=true;
print "<li class=\"cbSelectItem\"><input id='revGrp".$grp->getID()."' type='checkbox' ".($checked?"checked='checked' ":"")."name='grpReviewers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName())."</li>\n";
}
?>
</ul>
</div>
</td>
</tr>
<tr>
<td><?php printMLText("approvers");?>:</td>
<td>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
$res=$currUser->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 "<li class=\"cbSelectItem\"><input id='appUsr".$usr->getID()."' type='checkbox' ".($checked?"checked='checked' ":"")."name='usrApprovers[]' value='". $usr->getID() ."'>".htmlspecialchars($usr->getLogin())."</li>\n";
}
?>
</ul>
</div>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
<div class="cbSelectContainer">
<ul class="cbSelectList">
<?php
foreach ($groups as $grp) {
$checked=false;
foreach ($res as $r) if ($r['approverGroupID']==$grp->getID()) $checked=true;
print "<li class=\"cbSelectItem\"><input id='revGrp".$grp->getID()."' type='checkbox' ".($checked?"checked='checked' ":"")."name='grpApprovers[]' value='". $grp->getID() ."'>".htmlspecialchars($grp->getName())."</li>\n";
}
?>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("save");?>"></td>
</tr>
</table>
</form>
</td>
<?php } ?>
</tr></table>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showUser(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,86 @@
<?php
/**
* Implementation of UsrView view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"userView\">\n";
echo "<thead>\n<tr>\n";
echo "<th>".getMLText("name")."</th>\n";
echo "<th>".getMLText("email")."</th>\n";
echo "<th>".getMLText("comment")."</th>\n";
if ($enableuserimage) echo "<th>".getMLText("user_image")."</th>\n";
echo "</tr>\n</thead>\n";
foreach ($users as $currUser) {
if ($currUser->isGuest())
continue;
if ($currUser->isHidden()=="1") continue;
echo "<tr>\n";
print "<td>".htmlspecialchars($currUser->getFullName())."</td>";
print "<td><a href=\"mailto:".htmlspecialchars($currUser->getEmail())."\">".htmlspecialchars($currUser->getEmail())."</a></td>";
print "<td>".htmlspecialchars($currUser->getComment())."</td>";
if ($enableuserimage){
print "<td>";
if ($currUser->hasImage()) print "<img src=\"".$httproot . "out/out.UserImage.php?userid=".$currUser->getId()."\">";
else printMLText("no_user_image");
print "</td>";
}
echo "</tr>\n";
}
echo "</table>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,547 @@
<?php
/**
* Implementation of ViewDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<table>
<?php
if ($document->isLocked()) {
$lockingUser = $document->getLockingUser();
?>
<tr>
<td class="warning" colspan=2><?php printMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?></td>
</tr>
<?php
}
?>
<tr>
<td><?php printMLText("owner");?>:</td>
<td>
<?php
$owner = $document->getOwner();
print "<a class=\"infos\" href=\"mailto:".$owner->getEmail()."\">".htmlspecialchars($owner->getFullName())."</a>";
?>
</td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><?php print htmlspecialchars($document->getComment());?></td>
</tr>
<tr>
<td><?php printMLText("creation_date");?>:</td>
<td><?php print getLongReadableDate($document->getDate()); ?></td>
</tr>
<tr>
<td><?php printMLText("keywords");?>:</td>
<td><?php print htmlspecialchars($document->getKeywords());?></td>
</tr>
<tr>
<td><?php printMLText("categories");?>:</td>
<td>
<?php
$cats = $document->getCategories();
$ct = array();
foreach($cats as $cat)
$ct[] = htmlspecialchars($cat->getName());
echo implode(', ', $ct);
?>
</td>
</tr>
<?php
$attributes = $document->getAttributes();
if($attributes) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php echo htmlspecialchars($attribute->getValue()); ?></td>
</tr>
<?php
}
}
?>
</table>
<?php
$this->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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th width='10%'></th>\n";
print "<th width='10%'>".getMLText("version")."</th>\n";
print "<th width='20%'>".getMLText("file")."</th>\n";
print "<th width='25%'>".getMLText("comment")."</th>\n";
print "<th width='15%'>".getMLText("status")."</th>\n";
print "<th width='20%'></th>\n";
print "</tr></thead><tbody>\n";
print "<tr>\n";
print "<td><ul class=\"actions\">";
if ($file_exists){
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">".getMLText("download")."</a></li>";
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=". $latestContent->getVersion()."\"><img src=\"images/view.gif\" class=\"mimeicon\">" . getMLText("view_online") . "</a></li>";
}else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></li>";
print "</ul></td>\n";
print "<td>".$latestContent->getVersion()."</td>\n";
print "<td><ul class=\"documentDetail\">\n";
print "<li>".$latestContent->getOriginalFileName() ."</li>\n";
if ($file_exists)
print "<li>". formatted_size(filesize($dms->contentDir . $latestContent->getPath())) ." ".htmlspecialchars($latestContent->getMimeType())."</li>";
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
$updatingUser = $latestContent->getUser();
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$updatingUser->getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
print "<li>".getLongReadableDate($latestContent->getDate())."</li>";
print "</ul>\n";
print "<ul class=\"documentDetail\">\n";
$attributes = $latestContent->getAttributes();
if($attributes) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."</li>\n";
}
}
print "</ul>\n";
print "<td>".htmlspecialchars($latestContent->getComment())."</td>";
print "<td width='10%'>".getOverallStatusText($status["status"]);
if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){
print "<br><span".($document->hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires()))."</span>";
}
print "</td>";
print "<td>";
print "<ul class=\"actions\">";
/* Only admin has the right to remove version in any case or a regular
* user if enableVersionDeletion is on
*/
if($accessop->mayRemoveVersion()) {
print "<li><a href=\"out.RemoveVersion.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\">".getMLText("rm_version")."</a></li>";
}
if($accessop->mayOverwriteStatus()) {
print "<li><a href='../out/out.OverrideContentStatus.php?documentid=".$documentid."&version=".$latestContent->getVersion()."'>".getMLText("change_status")."</a></li>";
}
// Allow changing reviewers/approvals only if not reviewed
if($accessop->maySetReviewersApprovers()) {
print "<li><a href='../out/out.SetReviewersApprovers.php?documentid=".$documentid."&version=".$latestContent->getVersion()."'>".getMLText("change_assignments")."</a></li>";
}
if($accessop->maySetExpires()) {
print "<li><a href='../out/out.SetExpires.php?documentid=".$documentid."'>".getMLText("set_expiry")."</a></li>";
}
if($accessop->mayEditComment()) {
print "<li><a href=\"out.EditComment.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\">".getMLText("edit_comment")."</a></li>";
}
if($accessop->mayEditAttributes()) {
print "<li><a href=\"out.EditAttributes.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\">".getMLText("edit_attributes")."</a></li>";
}
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&vfile=1\">".getMLText("versioning_info")."</a></li>";
print "</ul>";
echo "</td>";
print "</tr></tbody>\n</table>\n";
print "<table class=\"folderView\">\n";
if (is_array($reviewStatus) && count($reviewStatus)>0) {
print "<tr><td colspan=5>\n";
$this->contentSubHeading(getMLText("reviewers"));
print "</tr>";
print "<tr>\n";
print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n";
print "<td width='25%'><b>".getMLText("comment")."</b></td>";
print "<td width='15%'><b>".getMLText("status")."</b></td>\n";
print "<td width='20%'></td>\n";
print "</tr>\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 = "<i>".htmlspecialchars($required->getName())."</i>";
}
if($required->isMember($user) && ($user->getId() != $owner->getId()))
$is_reviewer = true;
break;
}
print "<tr>\n";
print "<td>".$reqName."</td>\n";
print "<td><ul class=\"documentDetail\"><li>".$r["date"]."</li>";
/* $updateUser is the user who has done the review */
$updateUser = $dms->getUser($r["userID"]);
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$r["userID"]."'")."</li></ul></td>";
print "<td>".htmlspecialchars($r["comment"])."</td>\n";
print "<td>".getReviewStatusText($r["status"])."</td>\n";
print "<td><ul class=\"actions\">";
if($accessop->mayReview()) {
if ($is_reviewer && $r["status"]==0) {
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\">".getMLText("submit_review")."</a></li>";
}else if (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\">".getMLText("edit")."</a></li>";
}
}
print "</ul></td>\n";
print "</td>\n</tr>\n";
}
}
if (is_array($approvalStatus) && count($approvalStatus)>0) {
print "<tr><td colspan=5>\n";
$this->contentSubHeading(getMLText("approvers"));
print "</tr>";
print "<tr>\n";
print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n";
print "<td width='25%'><b>".getMLText("comment")."</b></td>";
print "<td width='15%'><b>".getMLText("status")."</b></td>\n";
print "<td width='20%'></td>\n";
print "</tr>\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 = "<i>".htmlspecialchars($required->getName())."</i>";
}
if($required->isMember($user) && ($user->getId() != $owner->getId()))
$is_approver = true;
break;
}
print "<tr>\n";
print "<td>".$reqName."</td>\n";
print "<td><ul class=\"documentDetail\"><li>".$a["date"]."</li>";
/* $updateUser is the user who has done the approval */
$updateUser = $dms->getUser($a["userID"]);
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."</li></ul></td>";
print "<td>".htmlspecialchars($a["comment"])."</td>\n";
print "<td>".getApprovalStatusText($a["status"])."</td>\n";
print "<td><ul class=\"actions\">";
if($accessop->mayApprove()) {
if ($is_approver && $status["status"]==S_DRAFT_APP) {
print "<li><a href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("submit_approval")."</a></li>";
}else if (($updateUser==$user)&&(($a["status"]==1)||($a["status"]==-1))&&(!$document->hasExpired())){
print "<li><a href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."</a></li>";
}
}
print "</ul></td>\n";
print "</td>\n</tr>\n";
}
}
print "</table>\n";
$this->contentContainerEnd();
$this->contentHeading(getMLText("previous_versions"));
$this->contentContainerStart();
if (count($versions)>1) {
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th width='10%'></th>\n";
print "<th width='10%'>".getMLText("version")."</th>\n";
print "<th width='20%'>".getMLText("file")."</th>\n";
print "<th width='25%'>".getMLText("comment")."</th>\n";
print "<th width='15%'>".getMLText("status")."</th>\n";
print "<th width='20%'></th>\n";
print "</tr>\n</thead>\n<tbody>\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 "<tr>\n";
print "<td><ul class=\"actions\">";
if ($file_exists){
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\"><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">".getMLText("download")."</a>";
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><img src=\"images/view.gif\" class=\"mimeicon\">" . getMLText("view_online") . "</a>";
}else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
print "</ul></td>\n";
print "<td>".$version->getVersion()."</td>\n";
print "<td><ul class=\"documentDetail\">\n";
print "<li>".$version->getOriginalFileName()."</li>\n";
if ($file_exists) print "<li>". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."</li>";
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
$updatingUser = $version->getUser();
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$updatingUser->getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
print "<li>".getLongReadableDate($version->getDate())."</li>";
print "</ul>\n";
print "<ul class=\"documentDetail\">\n";
$attributes = $version->getAttributes();
if($attributes) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."</li>\n";
}
}
print "</ul>\n";
print "<td>".htmlspecialchars($version->getComment())."</td>";
print "<td>".getOverallStatusText($vstat["status"])."</td>";
print "<td>";
print "<ul class=\"actions\">";
/* Only admin has the right to remove version in any case or a regular
* user if enableVersionDeletion is on
*/
if($accessop->mayRemoveVersion()) {
print "<li><a href=\"out.RemoveVersion.php?documentid=".$documentid."&version=".$version->getVersion()."\">".getMLText("rm_version")."</a></li>";
}
print "<li><a href='../out/out.DocumentVersionDetail.php?documentid=".$documentid."&version=".$version->getVersion()."'>".getMLText("details")."</a></li>";
print "</ul>";
print "</td>\n</tr>\n";
}
print "</tbody>\n</table>\n";
}
else printMLText("no_previous_versions");
$this->contentContainerEnd();
$this->contentHeading(getMLText("linked_files"));
$this->contentContainerStart();
$files = $document->getDocumentFiles();
if (count($files) > 0) {
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th width='20%'></th>\n";
print "<th width='20%'>".getMLText("file")."</th>\n";
print "<th width='40%'>".getMLText("comment")."</th>\n";
print "<th width='20%'></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
foreach($files as $file) {
$file_exists=file_exists($dms->contentDir . $file->getPath());
$responsibleUser = $file->getUser();
print "<tr>";
print "<td><ul class=\"actions\">";
if ($file_exists) {
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\"><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">".htmlspecialchars($file->getName())."</a>";
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\"><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">" . getMLText("view_online") . "</a></li>";
} else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
print "</ul></td>";
print "<td><ul class=\"documentDetail\">\n";
print "<li>".$file->getOriginalFileName() ."</li>\n";
if ($file_exists)
print "<li>". filesize($dms->contentDir . $file->getPath()) ." bytes ".htmlspecialchars($file->getMimeType())."</li>";
else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$responsibleUser->getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."</a></li>";
print "<li>".getLongReadableDate($file->getDate())."</li>";
print "<td>".htmlspecialchars($file->getComment())."</td>";
print "<td><span class=\"actions\">";
if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID()))
print "<form action=\"../out/out.RemoveDocumentFile.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"fileid\" value=\"".$file->getID()."\" /><input type=\"submit\" value=\"".getMLText("delete")."\" /></form>";
print "</span></td>";
print "</tr>";
}
print "</tbody>\n</table>\n";
}
else printMLText("no_attached_files");
if ($document->getAccessMode($user) >= M_READWRITE){
print "<br>";
print "<ul class=\"actions\"><li><a href=\"../out/out.AddFile.php?documentid=".$documentid."\">".getMLText("add")."</a></ul>\n";
}
$this->contentContainerEnd();
$this->contentHeading(getMLText("linked_documents"));
$this->contentContainerStart();
$links = $document->getDocumentLinks();
$links = filterDocumentLinks($user, $links);
if (count($links) > 0) {
print "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th width='40%'></th>\n";
print "<th width='25%'>".getMLText("comment")."</th>\n";
print "<th width='15%'>".getMLText("document_link_by")."</th>\n";
print "<th width='20%'></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
foreach($links as $link) {
$responsibleUser = $link->getUser();
$targetDoc = $link->getTarget();
print "<tr>";
print "<td><a href=\"out.ViewDocument.php?documentid=".$targetDoc->getID()."\" class=\"linklist\">".htmlspecialchars($targetDoc->getName())."</a></td>";
print "<td>".htmlspecialchars($targetDoc->getComment())."</td>";
print "<td>".htmlspecialchars($responsibleUser->getFullName());
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
print "<br>".getMLText("document_link_public").":".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
print "</td>";
print "<td><span class=\"actions\">";
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
print "<form action=\"../op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><input type=\"submit\" value=\"".getMLText("delete")."\" /></form>";
print "</span></td>";
print "</tr>";
}
print "</tbody>\n</table>\n";
}
else printMLText("no_linked_files");
if (!$user->isGuest()){
?>
<br>
<form action="../op/op.AddDocumentLink.php" name="form1">
<input type="Hidden" name="documentid" value="<?php print $documentid;?>">
<table>
<tr>
<td><?php printMLText("add_document_link");?>:</td>
<td><?php $this->printDocumentChooser("form1");?></td>
</tr>
<?php
if ($document->getAccessMode($user) >= M_READWRITE) {
print "<tr><td>".getMLText("document_link_public")."</td>";
print "<td><ul class=\"actions\">";
print "<li><input type=\"Radio\" name=\"public\" value=\"true\" checked>" . getMLText("yes")."</li>";
print "<li><input type=\"Radio\" name=\"public\" value=\"false\">" . getMLText("no")."</li>";
print "</ul></td></tr>";
}
?>
<tr>
<td colspan="2"><input type="Submit" value="<?php printMLText("update");?>"></td>
</tr>
</table>
</form>
<?php
}
$this->contentContainerEnd();
$this->contentEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,100 @@
<?php
/**
* Implementation of ViewEvent view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table>";
echo "<tr>";
echo "<td>".getMLText("name").": </td>";
echo "<td>".htmlspecialchars($event["name"])."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>".getMLText("comment").": </td>";
echo "<td>".htmlspecialchars($event["comment"])."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>".getMLText("from").": </td>";
echo "<td>".getReadableDate($event["start"])."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>".getMLText("to").": </td>";
echo "<td>".getReadableDate($event["stop"])."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>".getMLText("last_update").": </td>";
echo "<td>".getLongReadableDate($event["date"])."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>".getMLText("user").": </td>";
echo "<td>".(is_object($u)?htmlspecialchars($u->getFullName()):getMLText("unknown_user"))."</td>";
echo "</tr>";
echo "</table>";
$this->contentContainerEnd();
if (($user->getID()==$event["userID"])||($user->isAdmin())){
$this->contentHeading(getMLText("edit"));
$this->contentContainerStart();
print "<ul class=\"actions\">";
print "<li><a href=\"../out/out.RemoveEvent.php?id=".$event["id"]."\">".getMLText("delete")."</a>";
print "<li><a href=\"../out/out.EditEvent.php?id=".$event["id"]."\">".getMLText("edit")."</a>";
print "</ul>";
$this->contentContainerEnd();
}
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,161 @@
<?php
/**
* Implementation of ViewFolder view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table>\n<tr>\n".
"<td>".getMLText("owner").":</td>\n".
"<td><a class=\"infos\" href=\"mailto:".htmlspecialchars($owner->getEmail())."\">".htmlspecialchars($owner->getFullName())."</a>".
"</td>\n</tr>\n<tr>\n".
"<td>".getMLText("comment").":</td>\n".
"<td>".htmlspecialchars($folder->getComment())."</td>\n</tr>\n";
$attributes = $folder->getAttributes();
if($attributes) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php echo htmlspecialchars($attribute->getValue()); ?></td>
</tr>
<?php
}
}
print "</table>\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 "<table class=\"folderView\">";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th><a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"?"":"&orderby=n")."\">".getMLText("name")."</a></th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("comment")."</th>\n";
print "</tr>\n</thead>\n<tbody>\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 "<tr class=\"folder\">";
// print "<td><img src=\"images/folder_closed.gif\" width=18 height=18 border=0></td>";
print "<td><a href=\"out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img src=\"images/folder_closed.gif\" width=18 height=18 border=0></a></td>\n";
print "<td><a href=\"out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a></td>\n";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td colspan=\"1\"><small>".count($subsub)." ".getMLText("folders").", ".count($subdoc)." ".getMLText("documents")."</small></td>";
print "<td></td>";
print "<td>".htmlspecialchars($comment)."</td>";
print "</tr>\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 "<tr>";
if (file_exists($dms->contentDir . $latestContent->getPath()))
print "<td><a href=\"../op/op.Download.php?documentid=".$docID."&version=".$version."\"><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></a></td>";
else print "<td><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></td>";
print "<td><a href=\"out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a></td>\n";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>";
if ( $document->isLocked() ) {
print "<img src=\"".$this->getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> ";
}
print getOverallStatusText($status["status"])."</td>";
print "<td>".$version."</td>";
print "<td>".htmlspecialchars($comment)."</td>";
print "</tr>\n";
}
}
if ((count($subFolders) > 0)||(count($documents) > 0)) echo "</tbody>\n</table>\n";
$this->contentContainerEnd();
if ($enableFolderTree) print "</td></tr></table>";
$this->contentEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,308 @@
<?php
/**
* Implementation of AddDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
//if (document.form1.userfile[].value == "") msg += "<?php printMLText("js_no_file");?>\n";
<?php
if ($strictformcheck) {
?>
if(!document.form1.name.disabled){
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
}
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (document.form1.keywords.value == "") msg += "<?php printMLText("js_no_keywords");?>\n";
<?php
}
?>
if (msg != ""){
alert(msg);
return false;
}
return true;
}
function addFiles()
{
var li = document.createElement('li');
li.innerHTML = '<input type="File" name="userfile[]" size="60">';
document.getElementById('files').appendChild(li);
// document.getElementById("files").innerHTML += '<br><input type="File" name="userfile[]" size="60">';
document.form1.name.disabled=true;
}
</script>
<div class="alert alert-warning">
<?php echo getMLText("max_upload_size").": ".ini_get( "upload_max_filesize"); ?>
<?php
if($enablelargefileupload) {
printf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folderid."&showtree=".showtree());
}
?>
</div>
<?php
$this->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"));
?>
<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
<?php echo createHiddenFieldWithKey('adddocument'); ?>
<input type="hidden" name="folderid" value="<?php print $folderid; ?>">
<input type="hidden" name="showtree" value="<?php echo showtree();?>">
<table class="table-condensed">
<tr>
<td><?php printMLText("name");?>:</td>
<td><input type="text" name="name" size="60"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="3" cols="80"></textarea></td>
</tr>
<tr>
<td><?php printMLText("keywords");?>:</td>
<td>
<textarea name="keywords" rows="1" cols="80"></textarea><br>
<a href="javascript:chooseKeywords('form1.keywords');"><?php printMLText("use_default_keywords");?></a>
<script language="JavaScript">
var openDlg;
function chooseKeywords(target) {
openDlg = open("out.KeywordChooser.php?target="+target, "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
</script>
</td>
</tr>
<tr>
<td><?php printMLText("categories")?>:</td>
<td><?php $this->printCategoryChooser("form1");?></td>
</tr>
<tr>
<td><?php printMLText("sequence");?>:</td>
<td><?php $this->printSequenceChooser($folder->getDocuments());?></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_document, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php printMLText("expires");?>:</td>
<td>
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-th"></i></span>
</span>&nbsp;
<label class="checkbox inline">
<input type="checkbox" name="expires" value="false" checked><?php printMLText("does_not_expire");?><br>
</label>
</td>
</tr>
<tr>
<td>
<?php $this->contentSubHeading(getMLText("version_info")); ?>
</td>
</tr>
<tr>
<td><?php printMLText("version");?>:</td>
<td><input type="text" name="reqversion" value="1"></td>
</tr>
<tr>
<td><?php printMLText("local_file");?>:</td>
<td>
<a href="javascript:addFiles()"><?php printMLtext("add_multiple_files") ?></a>
<ol id="files">
<li><input type="file" name="userfile[]" size="60"></li>
</ol>
</td>
</tr>
<?php if($dropfolderdir) { ?>
<tr>
<td><?php printMLText("dropfolder_file");?>:</td>
<td><?php $this->printDropFolderChooser("form1");?></td>
</tr>
<?php } ?>
<tr>
<td><?php printMLText("comment_for_current_version");?>:</td>
<td><textarea name="version_comment" rows="3" cols="80"></textarea></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_documentcontent, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '', 'attributes_version') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td>
<?php $this->contentSubHeading(getMLText("assign_reviewers")); ?>
</td>
</tr>
<tr>
<td>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="indReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_reviewers'); ?>">
<?php
$res=$user->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 "<option disabled=\"disabled\" value=\"".$usr->getID()."\">". htmlspecialchars($usr->getLogin()." - ".$usr->getFullName())."</option>";
else print "<option value=\"".$usr->getID()."\">". htmlspecialchars($usr->getLogin()." - ".$usr->getFullName())."</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="grpReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_reviewers'); ?>">
<?php
foreach ($docAccess["groups"] as $grp) {
$mandatory=false;
foreach ($res as $r) if ($r['reviewerGroupID']==$grp->getID()) $mandatory=true;
if ($mandatory) print "<option value=\"".$grp->getID()."\" disabled=\"disabled\">".htmlspecialchars($grp->getName())."</option>";
else print "<option value=\"".$grp->getID()."\">".htmlspecialchars($grp->getName())."</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>
<?php $this->contentSubHeading(getMLText("assign_approvers")); ?>
</td>
</tr>
<tr>
<td>
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="indApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_approvers'); ?>">
<?php
$res=$user->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 "<option value=\"". $usr->getID() ."\" disabled='disabled'>". htmlspecialchars($usr->getFullName())."</option>";
else print "<option value=\"". $usr->getID() ."\">". htmlspecialchars($usr->getLogin()." - ".$usr->getFullName())."</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="grpApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_approvers'); ?>">
<?php
foreach ($docAccess["groups"] as $grp) {
$mandatory=false;
foreach ($res as $r) if ($r['approverGroupID']==$grp->getID()) $mandatory=true;
if ($mandatory) print "<option value=\"". $grp->getID() ."\" disabled=\"disabled\">".htmlspecialchars($grp->getName())."</option>";
else print "<option value=\"". $grp->getID() ."\">".htmlspecialchars($grp->getName())."</option>";
}
?>
</select>
</td>
</tr>
</table>
<div class="alert"><?php printMLText("add_doc_reviewer_approver_warning")?></div>
<p><input type="submit" class="btn" value="<?php printMLText("add_document");?>"></p>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,106 @@
<?php
/**
* Implementation of AddEvent view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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');
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if (isset($settings->_strictFormCheck) && $settings->_strictFormCheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<form action="../op/op.AddEvent.php" name="form1" onsubmit="return checkForm();" method="POST">
<table class="table-condensed">
<tr>
<td><?php printMLText("from");?>:</td>
<td><?php //$this->printDateChooser(-1, "from");?>
<span class="input-append date" id="fromdate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy">
<input class="span6" size="16" name="from" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-th"></i></span>
</span>
</td>
</tr>
<tr>
<td><?php printMLText("to");?>:</td>
<td><?php //$this->printDateChooser(-1, "to");?>
<span class="input-append date" id="todate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy">
<input class="span6" size="16" name="to" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-th"></i></span>
</span>
</td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input type="text" name="name" size="60"></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr>
<td></td><td><input class="btn" type="submit" value="<?php printMLText("add_event");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,112 @@
<?php
/**
* Implementation of AddFile view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.userfile.value == "") msg += "<?php printMLText("js_no_file");?>\n";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if (isset($settings->_strictFormCheck) && $settings->_strictFormCheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("linked_files"));
?>
<div class="alert alert-warning">
<?php echo getMLText("max_upload_size").": ".ini_get( "upload_max_filesize"); ?>
<?php
if($enablelargefileupload) {
printf('<p>'.getMLText('link_alt_updatedocument'), "out.AddFile2.php?documentid=".$document->getId().'</p>');
}
?>
</div>
<?php
$this->contentContainerStart();
?>
<form action="../op/op.AddFile.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
<input type="Hidden" name="documentid" value="<?php print $document->getId(); ?>">
<table class="table-condensed">
<tr>
<td><?php printMLText("local_file");?>:</td>
<td><input type="File" name="userfile" size="60"></td>
</tr>
<tr>
<td><?php printMLText("name");?>:</td>
<td><input type="text" name="name" size="60"></td>
</tr>
<tr>
<td><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr>
<td></td>
<td><input class="btn" type="submit" value="<?php printMLText("add");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,109 @@
<?php
/**
* Implementation of AddSubFolder view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
<?php
if ($strictformcheck) {
?>
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
<?php
}
?>
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<form action="../op/op.AddSubFolder.php" name="form1" onsubmit="return checkForm();" method="POST">
<?php echo createHiddenFieldWithKey('addsubfolder'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getId();?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
<table class="table-condensed">
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input name="name" size="60"></td>
</tr>
<tr>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("sequence");?>:</td>
<td><?php $this->printSequenceChooser($folder->getSubFolders());?></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_folder, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"><br><input type="submit" class="btn" value="<?php printMLText("add_subfolder");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,76 @@
<?php
/**
* Implementation of AdminTools view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<ul class="unstyled">
<li class="first"><a href="../out/out.Statistic.php"><?php echo getMLText("folders_and_documents_statistic")?></a></li>
<li><a href="../out/out.BackupTools.php"><?php echo getMLText("backup_tools")?></a></li>
<?php
if ($logfileenable) echo "<li><a href=\"../out/out.LogManagement.php\">".getMLText("log_management")."</a></li>";
?>
<li><a href="../out/out.UsrMgr.php"><?php echo getMLText("user_management")?></a></li>
<li><a href="../out/out.GroupMgr.php"><?php echo getMLText("group_management")?></a></li>
<li><a href="../out/out.DefaultKeywords.php"><?php echo getMLText("global_default_keywords")?></a></li>
<li><a href="../out/out.Categories.php"><?php echo getMLText("global_document_categories")?></a></li>
<li><a href="../out/out.AttributeMgr.php"><?php echo getMLText("global_attributedefinitions")?></a></li>
<li><a href="../out/out.Info.php"><?php echo getMLText("version_info")?></a></li>
<?php
if($enablefullsearch) {
?>
<li><a href="../out/out.Indexer.php"><?php echo getMLText("update_fulltext_index")?></a></li>
<li><a href="../out/out.CreateIndex.php"><?php echo getMLText("create_fulltext_index")?></a></li>
<li><a href="../out/out.IndexInfo.php"><?php echo getMLText("fulltext_info")?></a></li>
<?php
}
?>
<li><a href="../out/out.ObjectCheck.php"><?php echo getMLText("objectcheck")?></a></li>
<li><a href="../out/out.Settings.php"><?php echo getMLText("settings")?></a></li>
</ul>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,144 @@
<?php
/**
* Implementation of ApprovalSummary view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<table class=\"table-condensed\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader = false;
}
print "<tr>\n";
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>".getOverallStatusText($st["status"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."</td>";
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
print "</tr>\n";
}
if ($st["status"]!=-2) {
$iRev[] = $st["documentID"];
}
}
if (!$printheader) {
echo "</tbody>\n</table>\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 "<table class=\"table-condensed\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("version")."</th>\n";
print "<th>".getMLText("last_update")."</th>\n";
print "<th>".getMLText("expires")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$printheader = false;
}
print "<tr>\n";
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
print "<td>".getOverallStatusText($st["status"])."</td>";
print "<td>".$st["version"]."</td>";
print "<td>".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."</td>";
print "<td>".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."</td>";
print "</tr>\n";
}
}
if (!$printheader) {
echo "</tbody>\n</table>\n";
}else{
printMLText("empty_notify_list");
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,177 @@
<?php
/**
* Implementation of ApproveDocument view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
function checkIndForm()
{
msg = "";
if (document.form1.approvalStatus.value == "") msg += "<?php printMLText("js_no_approval_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
function checkGrpForm()
{
msg = "";
// if (document.form1.approvalGroup.value == "") msg += "<?php printMLText("js_no_approval_group");?>\n";
if (document.form1.approvalStatus.value == "") msg += "<?php printMLText("js_no_approval_status");?>\n";
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentContainerStart();
// Display the Approval form.
if ($approvalStatus['type'] == 0) {
if($approvalStatus["status"]!=0) {
print "<table class=\"folderView\"><thead><tr>";
print "<th>".getMLText("status")."</th>";
print "<th>".getMLText("comment")."</th>";
print "<th>".getMLText("last_update")."</th>";
print "</tr></thead><tbody><tr>";
print "<td>";
printApprovalStatusText($approvalStatus["status"]);
print "</td>";
print "<td>".htmlspecialchars($approvalStatus["comment"])."</td>";
$indUser = $dms->getUser($approvalStatus["userID"]);
print "<td>".$approvalStatus["date"]." - ". $indUser->getFullname() ."</td>";
print "</tr></tbody></table><br>\n";
}
?>
<form method="POST" action="../op/op.ApproveDocument.php" name="form1" onsubmit="return checkIndForm();">
<?php echo createHiddenFieldWithKey('approvedocument'); ?>
<table>
<tr><td><?php printMLText("comment")?>:</td>
<td><textarea name="comment" cols="80" rows="4"></textarea>
</td></tr>
<tr><td><?php printMLText("approval_status")?>:</td>
<td><select name="approvalStatus">
<option value=''></option>
<option value='1'><?php printMLText("status_approved")?></option>
<option value='-1'><?php printMLText("rejected")?></option>
</select>
</td></tr><tr><td></td><td>
<input type='hidden' name='approvalType' value='ind'/>
<input type='hidden' name='documentid' value='<?php echo $document->getId() ?>'/>
<input type='hidden' name='version' value='<?php echo $version ?>'/>
<input type='submit' class="btn" name='indApproval' value='<?php printMLText("submit_approval")?>'/>
</td></tr></table>
</form>
<?php
}
else if ($approvalStatus['type'] == 1) {
if($approvalStatus["status"]!=0) {
print "<table class=\"folderView\"><thead><tr>";
print "<th>".getMLText("status")."</th>";
print "<th>".getMLText("comment")."</th>";
print "<th>".getMLText("last_update")."</th>";
print "</tr></thead><tbody><tr>";
print "<td>";
printApprovalStatusText($approvalStatus["status"]);
print "</td>";
print "<td>".htmlspecialchars($approvalStatus["comment"])."</td>";
$indUser = $dms->getUser($approvalStatus["userID"]);
print "<td>".$approvalStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."</td>";
print "</tr></tbody></table><br>\n";
}
?>
<form method="POST" action="../op/op.ApproveDocument.php" name="form1" onsubmit="return checkGrpForm();">
<?php echo createHiddenFieldWithKey('approvedocument'); ?>
<table>
<tr><td><?php printMLText("comment")?>:</td>
<td><textarea name="comment" cols="80" rows="4"></textarea>
</td></tr>
<tr><td><?php printMLText("approval_status")?>:</td>
<td>
<select name="approvalStatus">
<option value=''></option>
<option value='1'><?php printMLText("status_approved")?></option>
<option value='-1'><?php printMLText("rejected")?></option>
</select>
</td></tr>
<tr><td></td><td>
<input type='hidden' name='approvalGroup' value="<?php echo $approvalStatus['required']; ?>" />
<input type='hidden' name='approvalType' value='grp'/>
<input type='hidden' name='documentid' value='<?php echo $document->getId() ?>'/>
<input type='hidden' name='version' value='<?php echo $version ?>'/>
<input type='submit' class="btn" name='groupApproval' value='<?php printMLText("submit_approval")?>'/></td></tr>
</table>
</form>
<?php
}
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,263 @@
<?php
/**
* Implementation of AttributeMgr view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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"));
?>
<script language="JavaScript">
obj = -1;
function showAttributeDefinitions(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("attrdefs" + id);
obj.style.display = "";
}
</script>
<?php
$this->globalNavigation();
$this->contentStart();
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
$this->contentHeading(getMLText("attrdef_management"));
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<?php echo getMLText("selection")?>:
<select onchange="showAttributeDefinitions(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_attrdef")?>
<option value="0"><?php echo getMLText("new_attrdef")?>
<?php
$selected=0;
$count=2;
if($attrdefs) {
foreach ($attrdefs as $attrdef) {
if (isset($_GET["attrdefid"]) && $attrdef->getID()==$_GET["attrdefid"]) $selected=$count;
switch($attrdef->getObjType()) {
case LetoDMS_Core_AttributeDefinition::objtype_all:
$ot = getMLText("all");
break;
case LetoDMS_Core_AttributeDefinition::objtype_folder:
$ot = getMLText("folder");
break;
case LetoDMS_Core_AttributeDefinition::objtype_document:
$ot = getMLText("document");
break;
case LetoDMS_Core_AttributeDefinition::objtype_documentcontent:
$ot = getMLText("version");
break;
}
print "<option value=\"".$attrdef->getID()."\">" . htmlspecialchars($attrdef->getName() ." (".$ot.")");
$count++;
}
}
?>
</select>
</div>
</div>
<div class="span8">
<div class="well">
<table class="table-condensed"><tr>
<td id="attrdefs0" style="display : none;">
<form action="../op/op.AttributeMgr.php" method="post">
<?php echo createHiddenFieldWithKey('addattrdef'); ?>
<input type="hidden" name="action" value="addattrdef">
<table class="table-condensed">
<tr>
<td><?php printMLText("attrdef_name");?>:</td><td><input type="text" name="name"></td>
</tr>
<tr>
<td><?php printMLText("attrdef_objtype");?>:</td><td><select name="objtype"><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_folder ?>">Folder</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_document ?>"><?php printMLText("document"); ?></option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_documentcontent ?>"><?php printMLText("version"); ?></option></select>
</tr>
<tr>
<td><?php printMLText("attrdef_type");?>:</td><td><select name="type"><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_int ?>">Integer</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_float ?>">Float</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_string ?>">String</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_boolean ?>">Boolean</option></select></td>
</tr>
<tr>
<td><?php printMLText("attrdef_multiple");?>:</td><td><input type="checkbox" value="1" name="multiple" /></td>
</tr>
<tr>
<td><?php printMLText("attrdef_minvalues");?>:</td><td><input type="text" value="" name="minvalues" /></td>
</tr>
<tr>
<td><?php printMLText("attrdef_maxvalues");?>:</td><td><input type="text" value="" name="maxvalues" /></td>
</tr>
<tr>
<td><?php printMLText("attrdef_valueset");?>:</td><td><input type="text" value="" name="valueset" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" class="btn" value="<?php printMLText("new_attrdef"); ?>"></td>
</tr>
</table>
</form>
</td>
<?php
if($attrdefs) {
foreach ($attrdefs as $attrdef) {
print "<td id=\"attrdefs".$attrdef->getID()."\" style=\"display : none;\">";
?>
<table class="table-condensed">
<tr>
<td colspan="2">
<?php
if(!$attrdef->isUsed()) {
?>
<form style="display: inline-block;" method="post" action="../op/op.AttributeMgr.php" >
<?php echo createHiddenFieldWithKey('removeattrdef'); ?>
<input type="Hidden" name="attrdefid" value="<?php echo $attrdef->getID()?>">
<input type="Hidden" name="action" value="removeattrdef">
<input value="<?php echo getMLText("rm_attrdef")?>" type="submit" class="btn">
</form>
<?php
} else {
?>
<p><?php echo getMLText('attrdef_in_use') ?></p>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<form action="../op/op.AttributeMgr.php" method="post">
<tr>
<td>
<?php echo createHiddenFieldWithKey('editattrdef'); ?>
<input type="Hidden" name="action" value="editattrdef">
<input type="Hidden" name="attrdefid" value="<?php echo $attrdef->getID()?>" />
<?php printMLText("attrdef_name");?>:
</td>
<td>
<input type="text" name="name" value="<?php echo htmlspecialchars($attrdef->getName()) ?>">
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_type");?>:
</td>
<td>
<select name="type"><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>>Integer</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>>Float</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>>String</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef->getType() == LetoDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>>Boolean</option></select><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_objtype");?>:
</td>
<td>
<select name="objtype"><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef->getObjType() == LetoDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>>Folder</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef->getObjType() == LetoDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>>Document</option><option value="<?php echo LetoDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef->getObjType() == LetoDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>>Document content</option></select><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_multiple");?>:
</td>
<td>
<input type="checkbox" value="1" name="multiple" /><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_minvalues");?>:
</td>
<td>
<input type="text" value="<?php echo $attrdef->getMinValues() ?>" name="minvalues" /><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_maxvalues");?>:
</td>
<td>
<input type="text" value="<?php echo $attrdef->getMaxValues() ?>" name="maxvalues" /><br />
</td>
</tr>
<tr>
<td>
<?php printMLText("attrdef_valueset");?>:
</td>
<td>
<input type="text" value="<?php echo $attrdef->getValueSet() ?>" name="valueset" /><br />
</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" class="btn" value="<?php printMLText("save");?>">
</td>
</tr>
</form>
</table>
</td>
<?php
}
}
?>
</tr></table>
</div>
</div>
</div>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showAttributeDefinitions(sel);
</script>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,196 @@
<?php
/**
* Implementation of BackupTools view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<p>".getMLText("versioning_file_creation_warning")."</p>\n";
print "<form action=\"../op/op.CreateVersioningFiles.php\" name=\"form1\">";
$this->printFolderChooser("form1",M_READWRITE);
print "<input type='submit' class='btn' name='' value='".getMLText("versioning_file_creation")."'/>";
print "</form>\n";
$this->contentContainerEnd();
// archive creation ////////////////////////////////////////////////////////////
$this->contentHeading(getMLText("archive_creation"));
$this->contentContainerStart();
print "<p>".getMLText("archive_creation_warning")."</p>\n";
print "<form action=\"../op/op.CreateFolderArchive.php\" name=\"form2\">";
$this->printFolderChooser("form2",M_READWRITE);
print "<label class=\"checkbox\"><input type=\"checkbox\" name=\"human_readable\" value=\"1\">".getMLText("human_readable")."</label>";
print "<input type='submit' class='btn' name='' value='".getMLText("archive_creation")."'/>";
print "</form>\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 "<table class=\"table-condensed\">\n";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("folder")."</th>\n";
print "<th>".getMLText("creation_date")."</th>\n";
print "<th>".getMLText("file_size")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$print_header=false;
}
$folderid=substr($entry,strpos($entry,"_")+1);
$folder=$dms->getFolder((int)$folderid);
print "<tr>\n";
print "<td><a href=\"../op/op.Download.php?arkname=".$entry."\">".$entry."</a></td>\n";
if (is_object($folder)) print "<td>".htmlspecialchars($folder->getName())."</td>\n";
else print "<td>".getMLText("unknown_id")."</td>\n";
print "<td>".getLongReadableDate(filectime($contentdir.$entry))."</td>\n";
print "<td>".formatted_size(filesize($contentdir.$entry))."</td>\n";
print "<td>";
print "<a href=\"out.RemoveArchive.php?arkname=".$entry."\" class=\"btn btn-mini\">".getMLText("backup_remove")."</a>";
print "</td>\n";
print "</tr>\n";
}
if ($print_header) printMLText("empty_notify_list");
else print "</table>\n";
$this->contentContainerEnd();
// dump creation ///////////////////////////////////////////////////////////////
$this->contentHeading(getMLText("dump_creation"));
$this->contentContainerStart();
print "<p>".getMLText("dump_creation_warning")."</p>\n";
print "<form action=\"../op/op.CreateDump.php\" name=\"form4\">";
print "<input type='submit' class='btn' name='' value='".getMLText("dump_creation")."'/>";
print "</form>\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 "<table class=\"table-condensed\">\n";
print "<thead>\n<tr>\n";
print "<th></th>\n";
print "<th>".getMLText("creation_date")."</th>\n";
print "<th>".getMLText("file_size")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$print_header=false;
}
print "<tr>\n";
print "<td><a href=\"../op/op.Download.php?dumpname=".$entry."\">".$entry."</a></td>\n";
print "<td>".getLongReadableDate(filectime($contentdir.$entry))."</td>\n";
print "<td>".formatted_size(filesize($contentdir.$entry))."</td>\n";
print "<td>";
print "<a href=\"out.RemoveDump.php?dumpname=".$entry."\" class=\"btn btn-mini\">".getMLText("dump_remove")."</a>";
print "</td>\n";
print "</tr>\n";
}
if ($print_header) printMLText("empty_notify_list");
else print "</table>\n";
$this->contentContainerEnd();
// files deletion //////////////////////////////////////////////////////////////
$this->contentHeading(getMLText("files_deletion"));
$this->contentContainerStart();
print "<p>".getMLText("files_deletion_warning")."</p>\n";
print "<form action=\"../out/out.RemoveFolderFiles.php\" name=\"form3\">";
$this->printFolderChooser("form3",M_READWRITE);
print "<input type='submit' class='btn' name='' value='".getMLText("files_deletion")."'/>";
print "</form>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,348 @@
<?php
/**
* Implementation of Calendar view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 = "<table class=\"table\">\n";
$s .= "<tr>\n";
$s .= "<td style=\"border-top: 0px;\" colspan=\"7\"><a href=\"../out/out.Calendar.php?mode=m&year=".$year."&month=".$month."\">".$monthName."</a></td>\n"; ;
$s .= "</tr>\n";
$s .= "<tr>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay)%7] . "</th>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay+1)%7] . "</th>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay+2)%7] . "</th>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay+3)%7] . "</th>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay+4)%7] . "</th>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay+5)%7] . "</th>\n";
$s .= "<th class=\"header\">" . $this->dayNames[($startDay+6)%7] . "</th>\n";
$s .= "</tr>\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 .= "<tr>\n";
for ($i = 0; $i < 7; $i++){
$class = ($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "today" : "";
$s .= "<td class=\"$class\">";
if ($d > 0 && $d <= $daysInMonth){
$s .= "<a href=\"../out/out.Calendar.php?mode=w&year=".$year."&month=".$month."&day=".$d."\">".$d."</a>";
}
else $s .= "&nbsp;";
$s .= "</td>\n";
$d++;
}
$s .= "</tr>\n";
}
$s .= "</table>\n";
return $s;
} /* }}} */
function printYearTable($year) { /* {{{ */
print "<table class=\"table-condensed\">\n";
print "<tr>";
print "<td valign=\"top\">" . $this->getMonthHTML(1 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(2 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(3 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(4 , $year) ."</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(5 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(6 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(7 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(8 , $year) ."</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(9 , $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(10, $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(11, $year) ."</td>\n";
print "<td valign=\"top\">" . $this->getMonthHTML(12, $year) ."</td>\n";
print "</tr>\n";
print "</table>\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 "<div class=\"pagination pagination-small\">";
echo "<ul>";
print "<li><a href=\"../out/out.Calendar.php?mode=y&year=".($year-1)."\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a></li>";
print "<li><a href=\"../out/out.Calendar.php?mode=y\"><img src=\"".$this->getImgPath("c.png")."\" border=0></a></li>";
print "<li><a href=\"../out/out.Calendar.php?mode=y&year=".($year+1)."\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a></li>";
echo "</ul>";
echo "</div>";
$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 "<div class=\"pagination pagination-small\">";
echo "<ul>";
print "<li><a href=\"../out/out.Calendar.php?mode=m&year=".($year)."&month=".($month-1)."\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a></li>";
print "<li><a href=\"../out/out.Calendar.php?mode=m\"><img src=\"".$this->getImgPath("c.png")."\" border=0></a></li>";
print "<li><a href=\"../out/out.Calendar.php?mode=m&year=".($year)."&month=".($month+1)."\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a></li>";
echo "</ul>";
echo "</div>";
$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 "<table class='table-condensed'>\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 "<tr><td class='separator' colspan='".(count($events)+2)."'>&nbsp;</td></tr>\n";
// highlight today
$class = ($year == $today["year"] && $month == $today["mon"] && $i == $today["mday"]) ? "todayHeader" : "header";
echo "<tr>";
echo "<td class='".$class."'><a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($i)."\">".$i."</a></td>";
echo "<td class='".$class."'><a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($i)."\">".$this->dayNamesLong[$date["wday"]]."</a></td>";
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 "<td class='".$class."'><a href=\"../out/out.ViewEvent.php?id=".$event['id']."\">".htmlspecialchars($event['name'])."</a></td>";
}else{
print "<td class='".$class."'>&nbsp;</td>";
}
}
echo "</tr>\n";
}
echo "</table>\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 "<div class=\"pagination pagination-small\">";
echo "<ul>";
print "<li><a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($day-7)."\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a></li>";
print "<li><a href=\"../out/out.Calendar.php?mode=w\"><img src=\"".$this->getImgPath("c.png")."\" border=0></a></li>";
print "<li><a href=\"../out/out.Calendar.php?mode=w&year=".($year)."&month=".($month)."&day=".($day+7)."\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a></li>";
echo "</ul>";
echo "</div>";
$this->contentContainerStart();
echo "<table class='table-condensed'>\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 "<tr>";
echo "<td class='".$class."'>".getReadableDate($i)."</td>";
echo "<td class='".$class."'>".$this->dayNamesLong[$date["wday"]]."</td>";
if ($class=="todayHeader") $class="today";
else $class="";
foreach ($events as $event){
if (($event["start"]<=$i)&&($event["stop"]>=$i)){
print "<td class='".$class."'><a href=\"../out/out.ViewEvent.php?id=".$event['id']."\">".htmlspecialchars($event['name'])."</a></td>";
}else{
print "<td class='".$class."'>&nbsp;</td>";
}
}
echo "</tr>\n";
$prev_day=$date["mday"];
}
echo "</table>\n";
$this->contentContainerEnd();
}
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,159 @@
<?php
/**
* Implementation of Categories view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
obj = -1;
function showCategories(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("categories" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("global_document_categories"));
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<?php echo getMLText("selection")?>:
<select onchange="showCategories(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_document_category")?>
<?php
$selected=0;
$count=2;
foreach ($categories as $category) {
if (isset($_GET["categoryid"]) && $category->getID()==$_GET["categoryid"]) $selected=$count;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
$count++;
}
?>
</select>
</div>
</div>
<div class="span8">
<div class="well">
<table class="table-condensed"><tr>
<td id="categories0" style="display : none;">
<form action="../op/op.Categories.php" method="post">
<?php echo createHiddenFieldWithKey('addcategory'); ?>
<input type="Hidden" name="action" value="addcategory">
<?php printMLText("name");?> : <input type="text" name="name">
<input type="submit" class="btn" value="<?php printMLText("new_document_category"); ?>">
</form>
</td>
<?php
foreach ($categories as $category) {
print "<td id=\"categories".$category->getID()."\" style=\"display : none;\">";
?>
<table>
<tr>
<td colspan="2">
<?php
if(!$category->isUsed()) {
?>
<form style="display: inline-block;" method="post" action="../op/op.Categories.php" >
<?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="action" value="removecategory">
<input value="<?php echo getMLText("rm_document_category")?>" type="submit">
</form>
<?php
} else {
?>
<p><?php echo getMLText('category_in_use') ?></p>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2">
<?php $this->contentSubHeading("");?>
</td>
</tr>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td>
<form class="form-inline" style="margin-bottom: 0px;" action="../op/op.Categories.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="Hidden" name="action" value="editcategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" type="text" value="<?php echo htmlspecialchars($category->getName()) ?>">&nbsp;
<input type="submit" class="btn" value="<?php printMLText("save");?>">
</form>
</td>
</tr>
</table>
</td>
<?php } ?>
</tr></table>
</div>
</div>
</div>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showCategories(sel);
</script>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,69 @@
<?php
/**
* Implementation of CategoryChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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);
?>
<table>
<tr>
<td valign="top" class="inputDescription"><?php echo getMLText("categories")?>:</td>
<td>
<select id="keywordta" size="5" style="min-width: 100px;" multiple>
<?php
foreach($categories as $category) {
echo "<option value=\"".$category->getId()."\"";
if(in_array($category->getID(), $selcatsarr))
echo " selected";
echo ">".htmlspecialchars($category->getName())."</option>\n";
}
?>
</select>
</td>
</tr>
</table>
<?php
$this->contentContainerEnd();
echo "</body>\n</html>\n";
// $this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,82 @@
<?php
/**
* Implementation of ChangePassword view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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();
?>
<form action="../op/op.ChangePassword.php" method="post" name="form1" onsubmit="return checkForm();">
<?php
if ($referuri) {
echo "<input type='hidden' name='referuri' value='".$referuri."'/>";
}
if ($hash) {
echo "<input type='hidden' name='hash' value='".$hash."'/>";
}
?>
<table class="table-condensed">
<tr>
<td><?php printMLText("password");?></td>
<td><input class="pwd" type="password" rel="strengthbar" name="newpassword" id="password"></td>
</tr>
<tr>
<td><?php printMLText("password_strength");?>:</td>
<td>
<div id="strengthbar" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>
</td>
</tr>
<tr>
<td><?php printMLText("password_repeat");?></td>
<td><input type="password" name="newpasswordrepeat" id="passwordrepeat"></td>
</tr>
<tr>
<td></td>
<td><input class="btn" type="submit" value="<?php printMLText("submit_password") ?>"></td>
</tr>
</table>
</form>
<?php $this->contentContainerEnd(); ?>
<script language="JavaScript">document.form1.newpassword.focus();</script>
<p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,50 @@
<?php
/**
* Implementation of CreateIndex view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 '<p>'.getMLText('create_fulltext_index_warning').'</p>';
echo '<a href="out.Indexer.php?create=1&confirm=1">'.getMLText('confirm_create_fulltext_index').'</a>';
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,122 @@
<?php
/**
* Implementation of DashBoard view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<div class="row-fluid">
<div class="span12">
<?php $this->contentHeading('Gruppen'); ?>
<div class="well">
Hier eine Übersicht der Gruppen, auf die der Anwender zugreifen darf.
</div>
</div>
<div>
<div class="row-fluid">
<div class="span4">
<?php $this->contentHeading('Lesezeichen'); ?>
<div class="well">
<table class="table"><thead>
<tr>
<th></th>
<th>Name</th>
<th>Besitzer</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr><td><a href="../op/op.Download.php?documentid=403&version=1"><img class="mimeicon" width="40"src="../op/op.Preview.php?documentid=403&version=1&width=40" title="application/pdf"></a></td><td><a href="out.ViewDocument.php?documentid=403&showtree=1">walking-paper-4hxq62d9.pdf</a></td>
<td>Admin</td><td>freigegeben</td></tr>
</tbody>
</table>
</div>
<?php $this->contentHeading('Neue Dokumente'); ?>
<div class="well">
</div>
<?php $this->contentHeading('Dokumente zur Prüfung'); ?>
<div class="well">
</div>
<?php $this->contentHeading('Dokumente zur Genehmigung'); ?>
<div class="well">
</div>
</div>
<div class="span4">
<?php $this->contentHeading('Neue Beiträge im Wiki'); ?>
<div class="well">
<table class="table"><thead>
<tr>
<th></th>
<th>Name</th>
<th>Besitzer</th>
<th>Geändert</th>
</tr>
</thead>
<tbody>
<tr><td><a href="../op/op.Download.php?documentid=403&version=1"><img class="mimeicon" width="40"src="../op/op.Preview.php?documentid=403&version=1&width=40" title="application/pdf"></a></td><td><a href="out.ViewDocument.php?documentid=403&showtree=1">Konzept Bebauung Waldstr.</a></td>
<td>H. Huber</td><td>28.11.2013</td></tr>
</tbody>
</table>
</div>
<?php $this->contentHeading('Zuletzt bearbeitet'); ?>
<div class="well">
</div>
</div>
<div class="span4">
<?php $this->contentHeading('Neue Beiträge im Diskussionsforum'); ?>
<div class="well">
</div>
</div>
</div>
<?
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,197 @@
<?php
/**
* Implementation of DefaultKeywords view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
obj = -1;
function showKeywords(selectObj) {
if (obj != -1)
obj.style.display = "none";
id = selectObj.options[selectObj.selectedIndex].value;
if (id == -1)
return;
obj = document.getElementById("keywords" + id);
obj.style.display = "";
}
</script>
<?php
$this->contentHeading(getMLText("global_default_keywords"));
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<?php echo getMLText("selection")?>:
<select onchange="showKeywords(this)" id="selector">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
<?php
$selected=0;
$count=2;
foreach ($categories as $category) {
$owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
if ($selcategoryid && $category->getID()==$selcategoryid) $selected=$count;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
$count++;
}
?>
</select>
</div>
</div>
<div class="span8">
<div class="well">
<table class="table-condensed"><tr>
<td id="keywords0" style="display : none;">
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('addcategory'); ?>
<input type="Hidden" name="action" value="addcategory">
<?php printMLText("name");?> : <input type="text" name="name">
<input type="submit" class="btn" value="<?php printMLText("new_default_keyword_category"); ?>">
</form>
</td>
<?php
foreach ($categories as $category) {
$owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
print "<td id=\"keywords".$category->getID()."\" style=\"display : none;\">";
?>
<table class="table-condensed">
<tr>
<td></td>
<td>
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="action" value="removecategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input value="<?php printMLText("rm_default_keyword_category");?>" type="submit" class="btn" title="<?php echo getMLText("delete")?>">
</form>
</td>
</tr>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td>
<form class="form-inline" action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="hidden" name="action" value="editcategory">
<input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" type="text" value="<?php echo htmlspecialchars($category->getName()) ?>">
<input type="submit" class="btn" value="<?php printMLText("save");?>">
</form>
</td>
</tr>
<tr>
<td><?php echo getMLText("default_keywords")?>:</td>
<td>
<?php
$lists = $category->getKeywordLists();
if (count($lists) == 0)
print getMLText("no_default_keywords");
else
foreach ($lists as $list) {
?>
<form class="form-inline" style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
<?php echo createHiddenFieldWithKey('editkeywords'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
<input type="Hidden" name="action" value="editkeywords">
<input name="keywords" type="text" value="<?php echo htmlspecialchars($list["keywords"]) ?>">
<input name="action" value="editkeywords" type="Image" src="images/save.gif" class="btn" title="<?php echo getMLText("save")?>" style="border: 0px;">
<!-- <input name="action" value="removekeywords" type="Image" src="images/del.gif" title="<?php echo getMLText("delete")?>" border="0"> &nbsp; -->
</form>
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
<?php echo createHiddenFieldWithKey('removekeywords'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
<input type="Hidden" name="action" value="removekeywords">
<input name="action" value="removekeywords" type="Image" src="images/del.gif" class="btn" title="<?php echo getMLText("delete")?>" style="border: 0px;">
</form>
<br>
<?php } ?>
</td>
</tr>
<tr>
<td></td>
<td>
<form class="form-inline" action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('newkeywords'); ?>
<input type="Hidden" name="action" value="newkeywords">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="text" name="keywords">
<input type="submit" class="btn" value="<?php printMLText("new_default_keywords");?>">
</form>
</td>
</tr>
</table>
</td>
<?php } ?>
</tr></table>
</div>
</div>
</div>
<script language="JavaScript">
sel = document.getElementById("selector");
sel.selectedIndex=<?php print $selected ?>;
showKeywords(sel);
</script>
<?php
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,285 @@
<?php
/**
* Implementation of DocumentAccess view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<select name=\"mode\">\n";
print "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "</option>\n";
print "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "</option>\n";
print "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "</option>\n";
print "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "</option>\n";
print "</select>\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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) &&
(document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1))
msg += "<?php printMLText("js_select_user_or_group");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_document_access"));
$this->contentContainerStart();
if ($user->isAdmin()) {
$this->contentSubHeading(getMLText("set_owner"));
?>
<form class="form-inline" action="../op/op.DocumentAccess.php">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="Hidden" name="action" value="setowner">
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
<select name="ownerid">
<?php
$owner = $document->getOwner();
foreach ($allUsers as $currUser) {
if ($currUser->isGuest())
continue;
print "<option value=\"".$currUser->getID()."\"";
if ($currUser->getID() == $owner->getID())
print " selected";
print ">" . htmlspecialchars($currUser->getLogin() . " - " . $currUser->getFullname()) . "</option>\n";
}
?>
</select>
<input type="submit" class="btn" value="<?php printMLText("save")?>">
</form>
<?php
}
$this->contentSubHeading(getMLText("access_inheritance"));
if ($document->inheritsAccess()) {
printMLText("inherits_access_msg");
?>
<p>
<form action="../op/op.DocumentAccess.php" style="display: inline-block;">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="hidden" name="action" value="notinherit">
<input type="hidden" name="mode" value="copy">
<input type="submit" class="btn" value="<?php printMLText("inherits_access_copy_msg")?>">
</form>
<form action="../op/op.DocumentAccess.php" style="display: inline-block;">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="hidden" name="action" value="notinherit">
<input type="hidden" name="mode" value="empty">
<input type="submit" class="btn" value="<?php printMLText("inherits_access_empty_msg")?>">
</form>
</p>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
return;
}
?>
<form action="../op/op.DocumentAccess.php">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="hidden" name="action" value="inherit">
<input type="submit" class="btn" value="<?php printMLText("does_not_inherit_access_msg")?>">
</form>
<?php
$accessList = $document->getAccessList();
$this->contentSubHeading(getMLText("default_access"));
?>
<form class="form-inline" action="../op/op.DocumentAccess.php">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
<input type="Hidden" name="action" value="setdefault">
<?php $this->printAccessModeSelection($document->getDefaultAccess()); ?>
<input type="submit" class="btn" value="<?php printMLText("save");?>">
</form>
<?php
$this->contentSubHeading(getMLText("edit_existing_access"));
if (count($accessList["users"]) != 0 || count($accessList["groups"]) != 0) {
print "<table class=\"table-condensed\">";
/* memorїze users with access rights */
$memusers = array();
foreach ($accessList["users"] as $userAccess) {
$userObj = $userAccess->getUser();
$memusers[] = $userObj->getID();
print "<tr>\n";
print "<td><img src=\"images/usericon.gif\" class=\"mimeicon\"></td>\n";
print "<td>". htmlspecialchars($userObj->getFullName()) . "</td>\n";
print "<form action=\"../op/op.DocumentAccess.php\">\n";
print "<td>\n";
$this->printAccessModeSelection($userAccess->getMode());
print "</td>\n";
print "<td>\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"Hidden\" name=\"documentid\" value=\"".$document->getId()."\">\n";
print "<input type=\"hidden\" name=\"action\" value=\"editaccess\">\n";
print "<input type=\"hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-download-alt\"></i> ".getMLText("save")."</button>";
print "</td>\n";
print "</form>\n";
print "<form action=\"../op/op.DocumentAccess.php\">\n";
print "<td><span class=\"actions\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"Hidden\" name=\"documentid\" value=\"".$document->getId()."\">\n";
print "<input type=\"hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
print "</form>\n";
print "<span></td>\n";
print "</tr>\n";
}
/* memorize groups with access rights */
$memgroups = array();
foreach ($accessList["groups"] as $groupAccess) {
$groupObj = $groupAccess->getGroup();
$memgroups[] = $groupObj->getID();
$mode = $groupAccess->getMode();
print "<tr>";
print "<td><img src=\"images/groupicon.gif\" class=\"mimeicon\"></td>";
print "<td>". htmlspecialchars($groupObj->getName()) . "</td>";
print "<form action=\"../op/op.DocumentAccess.php\">";
print "<td>";
$this->printAccessModeSelection($groupAccess->getMode());
print "</td>\n";
print "<td><span class=\"actions\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"hidden\" name=\"documentid\" value=\"".$document->getId()."\">";
print "<input type=\"hidden\" name=\"action\" value=\"editaccess\">";
print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">";
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-download-alt\"></i> ".getMLText("save")."</button>";
print "</span></td>\n";
print "</form>";
print "<form action=\"../op/op.DocumentAccess.php\">\n";
print "<td><span class=\"actions\">\n";
echo createHiddenFieldWithKey('documentaccess')."\n";
print "<input type=\"hidden\" name=\"documentid\" value=\"".$document->getId()."\">\n";
print "<input type=\"hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">\n";
print "<button type=\"submit\" class=\"btn btn-mini\"\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
print "</form>";
print "</span></td>\n";
print "</tr>\n";
}
print "</table><br>";
}
?>
<form action="../op/op.DocumentAccess.php" name="form1" onsubmit="return checkForm();">
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getId()?>">
<input type="Hidden" name="action" value="addaccess">
<table>
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?></option>
<?php
foreach ($allUsers as $userObj) {
if ($userObj->isGuest() || in_array($userObj->getID(), $memusers)) {
continue;
}
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("group");?>:</td>
<td>
<select name="groupid">
<option value="-1"><?php printMLText("select_one");?></option>
<?php
foreach ($allGroups as $groupObj) {
if(in_array($groupObj->getID(), $memgroups))
continue;
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("access_mode");?>:</td>
<td>
<?php
$this->printAccessModeSelection(M_READ);
?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" class="btn" value="<?php printMLText("add");?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,139 @@
<?php
/**
* Implementation of DocumentChooser view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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 "<ul style='list-style-type: none;'>\n";
}
print " <li>\n";
print "<img class='treeicon' src=\"";
if ($level == 0) $this->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 "<img src=\"".$this->getImgPath("folder_opened.gif")."\" border=0>".htmlspecialchars($folder->getName())."\n";
}
else
print "<img src=\"".$this->getImgPath("folder_opened.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n";
print " </li>\n";
print "<ul style='list-style-type: none;'>";
for ($i = 0; $i < count($subFolders); $i++) {
if ($subFolders[$i]->getID() == $nextFolderID)
$this->printTree($path, $level+1);
else {
print "<li>\n";
$subFolders_ = LetoDMS_Core_DMS::filterAccess($subFolders[$i]->getSubFolders(), $this->user, M_READ);
$documents_ = LetoDMS_Core_DMS::filterAccess($subFolders[$i]->getDocuments(), $this->user, M_READ);
if (count($subFolders_) + count($documents_) > 0)
print "<a href=\"out.DocumentChooser.php?form=".$this->form."&folderid=".$subFolders[$i]->getID()."\"><img class='treeicon' src=\"".$this->getImgPath("plus.png")."\" border=0></a>";
else
print "<img class='treeicon' src=\"".$this->getImgPath("blank.png")."\">";
print "<img src=\"".$this->getImgPath("folder_closed.gif")."\" border=0>".htmlspecialchars($subFolders[$i]->getName())."\n";
print "</li>";
}
}
for ($i = 0; $i < count($documents); $i++) {
print "<li>\n";
print "<img class='treeicon' src=\"images/blank.png\">";
print "<a class=\"foldertree_selectable\" href=\"javascript:documentSelected(".$documents[$i]->getID().",'".str_replace("'", "\\'", htmlspecialchars($documents[$i]->getName()))."');\"><img src=\"images/file.gif\" border=0>".htmlspecialchars($documents[$i]->getName())."</a>";
print "</li>";
}
print "</ul>\n";
if ($level == 0) {
print "</ul>\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"));
?>
<script language="JavaScript">
var targetName;
var targetID;
function documentSelected(id, name) {
targetName.value = name;
targetID.value = id;
// window.close();
// return true;
}
</script>
<?php
/*
echo "<input type=\"text\" class=\"autocomplete\" />";
$this->contentContainerStart();
echo "<div id=\"resultautocomplete\"></div>";
$this->contentContainerEnd();
*/
$this->contentContainerStart();
$this->printTree($folder->getPath());
$this->contentContainerEnd();
?>
<script language="JavaScript">
targetName = document.<?php echo $this->form?>.docname<?php print $this->form ?>;
targetID = document.<?php echo $this->form?>.docid<?php print $this->form ?>;
</script>
<?php
echo "</body>\n</html>\n";
// $this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -0,0 +1,156 @@
<?php
/**
* Implementation of DocumentNotify view
*
* @category DMS
* @package LetoDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @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 <uwe@steinmann.cx>
* @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");
?>
<script language="JavaScript">
function checkForm()
{
msg = "";
if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) &&
(document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1))
msg += "<?php printMLText("js_select_user_or_group");?>\n";
if (msg != "")
{
alert(msg);
return false;
}
else
return true;
}
</script>
<?php
$this->contentHeading(getMLText("edit_existing_notify"));
$this->contentContainerStart();
$userNotifyIDs = array();
$groupNotifyIDs = array();
print "<table class=\"table-condensed\">\n";
if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) {
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
}
else {
foreach ($notifyList["users"] as $userNotify) {
print "<tr>";
print "<td><img src=\"images/usericon.gif\" class=\"mimeicon\"></td>";
print "<td>" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "</td>";
if ($user->isAdmin() || $user->getID() == $userNotify->getID()) {
print "<td><a href=\"../op/op.DocumentNotify.php?documentid=". $document->getID() . "&action=delnotify&userid=".$userNotify->getID()."\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</a></td>";
}else print "<td></td>";
print "</tr>";
$userNotifyIDs[] = $userNotify->getID();
}
foreach ($notifyList["groups"] as $groupNotify) {
print "<tr>";
print "<td><img src=\"images/groupicon.gif\" width=16 height=16 border=0></td>";
print "<td>" . htmlspecialchars($groupNotify->getName()) . "</td>";
if ($user->isAdmin() || $groupNotify->isMember($user,true)) {
print "<td><a href=\"../op/op.DocumentNotify.php?documentid=". $document->getID() . "&action=delnotify&groupid=".$groupNotify->getID()."\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</a></td>";
}else print "<td></td>";
print "</tr>";
$groupNotifyIDs[] = $groupNotify->getID();
}
}
print "</table>\n";
?>
<br>
<form action="../op/op.DocumentNotify.php" name="form1" onsubmit="return checkForm();">
<input type="hidden" name="documentid" value="<?php print $document->getID()?>">
<input type="hidden" name="action" value="addnotify">
<table class="table-condensed">
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?>
<?php
if ($user->isAdmin()) {
$allUsers = $dms->getAllUsers($sortusersinlist);
foreach ($allUsers as $userObj) {
if (!$userObj->isGuest() && ($document->getAccessMode($userObj) >= M_READ) && !in_array($userObj->getID(), $userNotifyIDs))
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "\n";
}
}
elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) {
print "<option value=\"".$user->getID()."\">" . htmlspecialchars($user->getLogin() . " - " . $user->getFullName()) . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php printMLText("group");?>:</td>
<td>
<select name="groupid">
<option value="-1"><?php printMLText("select_one");?>
<?php
$allGroups = $dms->getAllGroups();
foreach ($allGroups as $groupObj) {
if (($user->isAdmin() || $groupObj->isMember($user,true)) && $document->getGroupAccessMode($groupObj) >= M_READ && !in_array($groupObj->getID(), $groupNotifyIDs)) {
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "\n";
}
}
?>
</select>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" class="btn" value="<?php printMLText("add") ?>"></td>
</tr>
</table>
</form>
<?php
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

Some files were not shown because too many files have changed in this diff Show More