Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-07-05 17:22:04 +02:00
commit a289c8bbf6
8 changed files with 387 additions and 382 deletions

View File

@ -117,6 +117,7 @@ class UI extends UI_Default {
/* Always include the base class which defines class SeedDMS_Theme_Style */
require_once($settings->_rootDir."views/".$theme."/class.".ucfirst($theme).".php");
require_once($filename);
$params['settings'] = $settings;
$view = new $classname($params, $theme);
/* Set some configuration parameters */
$view->setParam('accessobject', new SeedDMS_AccessOperation($dms, $user, $settings));
@ -125,7 +126,7 @@ class UI extends UI_Default {
$view->setParam('theme', $theme);
$view->setParam('class', $class);
$view->setParam('session', $session);
$view->setParam('settings', $settings);
// $view->setParam('settings', $settings);
$view->setParam('sitename', $settings->_siteName);
$view->setParam('rootfolderid', $settings->_rootFolderID);
$view->setParam('disableselfedit', $settings->_disableSelfEdit);

View File

@ -39,7 +39,10 @@ class SeedDMS_View_Common {
$this->theme = $theme;
$this->params = $params;
$this->baseurl = '';
$this->imgpath = '../views/'.$theme.'/images/';
if(isset($params['settings']))
$this->imgpath = $params['settings']->_httpRoot.'views/'.$theme.'/images/';
else
$this->imgpath = '../views/'.$theme.'/images/';
}
public function __invoke($get=array()) {

View File

@ -38,7 +38,7 @@ class SeedDMS_View_AddFile extends SeedDMS_Theme_Style {
header('Content-Type: application/javascript; charset=UTF-8');
parent::jsTranslations(array('js_form_error', 'js_form_errors'));
if($enablelargefileupload)
$this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize);
$this->printFineUploaderJs($this->params['settings']->_httpRoot.'op/op.UploadChunks.php', $partitionsize, $maxuploadsize);
$this->printFileChooserJs();
?>
@ -113,10 +113,10 @@ $(document).ready( function() {
$enablelargefileupload = $this->params['enablelargefileupload'];
$maxuploadsize = $this->params['maxuploadsize'];
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/styles/validation-default.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/validation-default.js"></script>'."\n", 'js');
if($enablelargefileupload) {
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/fine-uploader/jquery.fine-uploader.min.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/fine-uploader/jquery.fine-uploader.min.js"></script>'."\n", 'js');
$this->htmlAddHeader($this->getFineUploaderTemplate(), 'js');
}

View File

@ -91,38 +91,38 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
echo '<base href="'.$this->baseurl.'">'."\n";
$sitename = trim(strip_tags($this->params['sitename']));
if($this->params['session'])
echo '<link rel="search" type="application/opensearchdescription+xml" href="../out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "SeedDMS").'"/>'."\n";
echo '<link href="../styles/'.$this->theme.'/bootstrap/css/bootstrap.css" rel="stylesheet">'."\n";
echo '<link href="../styles/'.$this->theme.'/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/bootstrap-datepicker/css/bootstrap-datepicker.css" rel="stylesheet">'."\n";
echo '<link href="../styles/'.$this->theme.'/chosen/css/chosen.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/select2/css/select2.min.css" rel="stylesheet">'."\n";
echo '<link href="../styles/'.$this->theme.'/select2/css/select2-bootstrap.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/jqtree/jqtree.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/styles/application.css" rel="stylesheet">'."\n";
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "SeedDMS").'"/>'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/css/bootstrap.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap-datepicker/css/bootstrap-datepicker.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/chosen/css/chosen.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/select2/css/select2.min.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/select2/css/select2-bootstrap.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jqtree/jqtree.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/application.css" rel="stylesheet">'."\n";
if($this->extraheader['css'])
echo $this->extraheader['css'];
if(method_exists($this, 'css'))
echo '<link href="'.$this->params['absbaseprefix'].'out/out.'.$this->params['class'].'.php?action=css'.(!empty($_SERVER['QUERY_STRING']) ? '&'.$_SERVER['QUERY_STRING'] : '').'" rel="stylesheet">'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery/jquery.min.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jquery/jquery.min.js"></script>'."\n";
if($this->extraheader['js'])
echo $this->extraheader['js'];
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/passwordstrength/jquery.passwordstrength.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/jquery.noty.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/layouts/topRight.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/layouts/topCenter.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/themes/default.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jqtree/tree.jquery.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/bootbox/bootbox.min.js"></script>'."\n";
// echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/bootbox/bootbox.min.js"></script>'."\n";
// echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/bootbox/bootbox.locales.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/passwordstrength/jquery.passwordstrength.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/jquery.noty.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/layouts/topRight.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/layouts/topCenter.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/themes/default.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jqtree/tree.jquery.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootbox/bootbox.min.js"></script>'."\n";
// echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootbox/bootbox.min.js"></script>'."\n";
// echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootbox/bootbox.locales.js"></script>'."\n";
if(!empty($this->extraheader['favicon']))
echo $this->extraheader['favicon'];
else {
echo '<link rel="icon" href="../views/'.$this->theme.'/images/favicon.svg" type="image/svg+xml"/>'."\n";
echo '<link rel="apple-touch-icon" sizes="180x180" href="../views/'.$this->theme.'/images/apple-touch-icon.png">'."\n";
echo '<link rel="icon" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/favicon.svg" type="image/svg+xml"/>'."\n";
echo '<link rel="apple-touch-icon" sizes="180x180" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/apple-touch-icon.png">'."\n";
}
if($this->params['session'] && $this->params['session']->getSu()) {
?>
@ -167,19 +167,19 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$this->missingLanguageKeys();
}
}
echo '<script src="../styles/'.$this->theme.'/bootstrap/js/bootstrap.min.js"></script>'."\n";
echo '<script src="../styles/'.$this->theme.'/bootstrap/js/bootstrap-typeahead.js"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/js/bootstrap.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/js/bootstrap-typeahead.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>'."\n";
foreach(array('de', 'es', 'ar', 'el', 'bg', 'ru', 'hr', 'hu', 'ko', 'pl', 'ro', 'sk', 'tr', 'uk', 'ca', 'nl', 'fi', 'cs', 'it', 'fr', 'sv', 'sl', 'pt-BR', 'zh-CN', 'zh-TW') as $lang)
echo '<script src="../views/'.$this->theme.'/vendors/bootstrap-datepicker/locales/bootstrap-datepicker.'.$lang.'.min.js"></script>'."\n";
echo '<script src="../styles/'.$this->theme.'/chosen/js/chosen.jquery.min.js"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/vendors/select2/js/select2.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap-datepicker/locales/bootstrap-datepicker.'.$lang.'.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/chosen/js/chosen.jquery.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/select2/js/select2.min.js"></script>'."\n";
parse_str($_SERVER['QUERY_STRING'], $tmp);
$tmp['action'] = 'webrootjs';
if(isset($tmp['formtoken']))
unset($tmp['formtoken']);
echo '<script src="'.$this->params['absbaseprefix'].'out/out.'.$this->params['class'].'.php?'.http_build_query($tmp).'"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/styles/application.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/application.js"></script>'."\n";
if($this->params['enablemenutasks'] && isset($this->params['user']) && $this->params['user']) {
$this->addFooterJS('SeedDMSTask.run();');
}
@ -285,8 +285,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo "<div class=\"navbar navbar-inverse navbar-fixed-top\">\n";
echo " <div class=\"navbar-inner\">\n";
echo " <div class=\"container-fluid\">\n";
echo " <a href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="../views/bootstrap/images/seeddms-logo.svg">')."</a>";
echo " <a class=\"brand\" href=\"../out/out.ViewFolder.php\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."/out/out.ViewFolder.php\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
echo " </div>\n";
echo " </div>\n";
echo "</div>\n";
@ -373,16 +373,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-col1\">\n";
echo " <span class=\"fa fa-bars\"></span>\n";
echo " </a>\n";
echo " <a class=\"btn btn-navbar\" href=\"../op/op.Logout.php\">\n";
echo " <a class=\"btn btn-navbar\" href=\"".$this->params['settings']->_httpRoot."op/op.Logout.php\">\n";
echo " <span class=\"fa fa-sign-out\"></span>\n";
echo " </a>\n";
echo " <a href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="../views/bootstrap/images/seeddms-logo.svg">')."</a>";
echo " <a class=\"brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
/* user profile menu {{{ */
if(isset($this->params['session']) && isset($this->params['user']) && $this->params['user']) {
/* search form {{{ */
echo " <form action=\"../out/out.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
echo " <form action=\"".$this->params['settings']->_httpRoot."out/out.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
if ($folder!=null && is_object($folder) && $folder->isType('folder')) {
echo " <input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\" />";
}
@ -405,11 +405,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
// if (!$this->params['user']->isGuest()) {
$menuitems = array();
if ($accessobject->check_view_access('MyDocuments'))
$menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>'my_documents');
$menuitems['my_documents'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyDocuments.php", 'label'=>'my_documents');
if ($accessobject->check_view_access('MyAccount'))
$menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account');
$menuitems['my_account'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyAccount.php", 'label'=>'my_account');
if ($accessobject->check_view_access('TransmittalMgr'))
$menuitems['my_transmittals'] = array('link'=>"../out/out.TransmittalMgr.php", 'label'=>'my_transmittals');
$menuitems['my_transmittals'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransmittalMgr.php", 'label'=>'my_transmittals');
if($this->hasHook('userMenuItems'))
$menuitems = $this->callHook('userMenuItems', $menuitems);
if($menuitems) {
@ -431,7 +431,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo "<li class=\"active\">";
else
echo "<li>";
echo "<a href=\"../op/op.SetLanguage.php?lang=".$currLang."&referer=".$_SERVER["REQUEST_URI"]."\">";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.SetLanguage.php?lang=".$currLang."&referer=".$_SERVER["REQUEST_URI"]."\">";
echo getMLText($currLang)."</a></li>\n";
}
echo " </ul>\n";
@ -440,21 +440,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if(!$this->params['session']->getSu()) {
if($this->params['user']->isAdmin()) {
$showdivider = true;
echo " <li><a href=\"../out/out.SubstituteUser.php\">".getMLText("substitute_user")."</a></li>\n";
echo " <li><a href=\"".$this->params['settings']->_httpRoot."out/out.SubstituteUser.php\">".getMLText("substitute_user")."</a></li>\n";
} elseif($substitutes = $this->params['user']->getReverseSubstitutes()) {
if(count($substitutes) == 1) {
echo " <li><a href=\"../op/op.SubstituteUser.php?userid=".$substitutes[0]->getID()."&formtoken=".createFormKey('substituteuser')."\">".getMLText("substitute_to_user", array('username'=>$substitutes[0]->getFullName()))."</a></li>\n";
echo " <li><a href=\"".$this->params['settings']->_httpRoot."op/op.SubstituteUser.php?userid=".$substitutes[0]->getID()."&formtoken=".createFormKey('substituteuser')."\">".getMLText("substitute_to_user", array('username'=>$substitutes[0]->getFullName()))."</a></li>\n";
} else {
echo " <li><a href=\"../out/out.SubstituteUser.php\">".getMLText("substitute_user")."</a></li>\n";
echo " <li><a href=\"".$this->params['settings']->_httpRoot."out/out.SubstituteUser.php\">".getMLText("substitute_user")."</a></li>\n";
}
}
}
if($showdivider)
echo " <li class=\"divider\"></li>\n";
if($this->params['session']->getSu()) {
echo " <li><a href=\"../op/op.ResetSu.php\">".getMLText("sign_out_user")."</a></li>\n";
echo " <li><a href=\"".$this->params['settings']->_httpRoot."op/op.ResetSu.php\">".getMLText("sign_out_user")."</a></li>\n";
} else {
echo " <li><a href=\"../op/op.Logout.php\">".getMLText("sign_out")."</a></li>\n";
echo " <li><a href=\"".$this->params['settings']->_httpRoot."op/op.Logout.php\">".getMLText("sign_out")."</a></li>\n";
}
echo " </ul>\n";
echo " </li>\n";
@ -507,11 +507,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <ul class=\"nav\">\n";
$menuitems = array();
/* calendar {{{ */
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>'../out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
if ($accessobject->check_view_access('AdminTools')) $menuitems['admintools'] = array('link'=>'../out/out.AdminTools.php', 'label'=>"admin_tools");
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>$this->params['settings']->_httpRoot.'out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
if ($accessobject->check_view_access('AdminTools')) $menuitems['admintools'] = array('link'=>$this->params['settings']->_httpRoot.'out/out.AdminTools.php', 'label'=>"admin_tools");
if($this->params['enablehelp']) {
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$menuitems['help'] = array('link'=>'../out/out.Help.php?context='.$tmp[1], 'label'=>"help");
$menuitems['help'] = array('link'=>$this->params['settings']->_httpRoot.'out/out.Help.php?context='.$tmp[1], 'label'=>"help");
}
/* }}} End of calendar */
@ -546,17 +546,17 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
for ($i = 0; $i < count($path); $i++) {
$txtpath .= "<li>";
if ($i +1 < count($path)) {
$txtpath .= "<a href=\"../out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
$txtpath .= "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
htmlspecialchars($path[$i]->getName())."</a>";
}
else {
$txtpath .= ($tagAll ? "<a href=\"../out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".
htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
}
$txtpath .= " <span class=\"divider\">/</span></li>";
}
if($document)
$txtpath .= "<li><a href=\"../out/out.ViewDocument.php?documentid=".$document->getId()."\">".htmlspecialchars($document->getName())."</a></li>";
$txtpath .= "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\">".htmlspecialchars($document->getName())."</a></li>";
return '<ul class="breadcrumb">'.$txtpath.'</ul>';
} /* }}} */
@ -736,43 +736,43 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
$accessMode = $folder->getAccessMode($this->params['user']);
$folderID = $folder->getID();
echo "<id=\"first\"><a href=\"../out/out.ViewFolder.php?folderid=". $folderID ."&showtree=".showtree()."\" class=\"brand\">".getMLText("folder")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderID ."&showtree=".showtree()."\" class=\"brand\">".getMLText("folder")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
$menuitems = array();
if ($accessMode == M_READ && !$this->params['user']->isGuest()) {
if ($accessobject->check_controller_access('FolderNotify'))
$menuitems['edit_folder_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_notify'));
$menuitems['edit_folder_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_notify'));
}
else if ($accessMode >= M_READWRITE) {
if ($accessobject->check_controller_access('AddSubFolder'))
$menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_subfolder'));
$menuitems['add_subfolder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_subfolder'));
if ($accessobject->check_controller_access('AddDocument'))
$menuitems['add_document'] = array('link'=>"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_document'));
$menuitems['add_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_document'));
if(0 && $this->params['enablelargefileupload'])
$menuitems['add_multiple_documents'] = array('link'=>"../out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_multiple_documents'));
$menuitems['add_multiple_documents'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_multiple_documents'));
if ($accessobject->check_controller_access('EditFolder')) {
$menuitems['edit_folder_props'] = array('link'=>"../out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('edit_folder_props'));
$menuitems['edit_folder_props'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('edit_folder_props'));
}
if ($accessobject->check_controller_access('MoveFolder')) {
if ($folderID != $this->params['rootfolderid'] && $folder->getParent())
$menuitems['move_folder'] = array('link'=>"../out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('move_folder'));
$menuitems['move_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('move_folder'));
}
if ($accessMode == M_ALL) {
if ($folderID != $this->params['rootfolderid'] && $folder->getParent())
if ($accessobject->check_view_access('RemoveFolder'))
$menuitems['rm_folder'] = array('link'=>"../out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('rm_folder'));
$menuitems['rm_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('rm_folder'));
}
if ($accessMode == M_ALL) {
if ($accessobject->check_view_access('FolderAccess'))
$menuitems['edit_folder_access'] = array('link'=>"../out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_access'));
$menuitems['edit_folder_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_access'));
}
if ($accessobject->check_controller_access('FolderNotify'))
$menuitems['edit_existing_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify'));
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify'));
}
if ($accessobject->check_view_access('Indexer') && $this->params['enablefullsearch']) {
$menuitems['index_folder'] = array('link'=>"../out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
$menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
@ -788,58 +788,58 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$accessobject = $this->params['accessobject'];
$accessMode = $document->getAccessMode($this->params['user']);
$docid=".php?documentid=" . $document->getID();
echo "<id=\"first\"><a href=\"../out/out.ViewDocument". $docid ."\" class=\"brand\">".getMLText("document")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument". $docid ."\" class=\"brand\">".getMLText("document")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
$menuitems = array();
if ($accessMode >= M_READWRITE) {
if (!$document->isLocked()) {
if($accessobject->check_controller_access('UpdateDocument'))
$menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
$menuitems['update_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
if($accessobject->check_controller_access('LockDocument'))
$menuitems['lock_document'] = array('link'=>"../op/op.LockDocument".$docid."&formtoken=".createFormKey('lockdocument'), 'label'=>getMLText('lock_document'));
$menuitems['lock_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.LockDocument".$docid."&formtoken=".createFormKey('lockdocument'), 'label'=>getMLText('lock_document'));
if($document->isCheckedOut())
$menuitems['checkin_document'] = array('link'=>"../out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document'));
$menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document'));
else {
if($this->params['checkoutdir']) {
$menuitems['checkout_document'] = array('link'=>"../op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document'));
$menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document'));
}
}
if($accessobject->check_controller_access('EditDocument'))
$menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid , 'label'=>getMLText('edit_document_props'));
$menuitems['edit_document_props'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditDocument".$docid , 'label'=>getMLText('edit_document_props'));
if($accessobject->check_controller_access('MoveDocument'))
$menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
$menuitems['move_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
}
else {
$lockingUser = $document->getLockingUser();
if (($lockingUser->getID() == $this->params['user']->getID()) || ($document->getAccessMode($this->params['user']) == M_ALL)) {
if($accessobject->check_controller_access('UpdateDocument'))
$menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
$menuitems['update_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
if($accessobject->check_controller_access('UnlockDocument'))
$menuitems['unlock_document'] = array('link'=>"../op/op.UnlockDocument".$docid."&formtoken=".createFormKey('unlockdocument'), 'label'=>getMLText('unlock_document'));
$menuitems['unlock_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.UnlockDocument".$docid."&formtoken=".createFormKey('unlockdocument'), 'label'=>getMLText('unlock_document'));
if($accessobject->check_controller_access('EditDocument'))
$menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid, 'label'=>getMLText('edit_document_props'));
$menuitems['edit_document_props'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditDocument".$docid, 'label'=>getMLText('edit_document_props'));
if($accessobject->check_controller_access('MoveDocument'))
$menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
$menuitems['move_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
}
}
if($accessobject->maySetExpires($document)) {
if ($accessobject->check_view_access('SetExpires'))
$menuitems['expires'] = array('link'=>"../out/out.SetExpires".$docid, 'label'=>getMLText('expires'));
$menuitems['expires'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetExpires".$docid, 'label'=>getMLText('expires'));
}
}
if ($accessMode == M_ALL) {
if ($accessobject->check_view_access('RemoveDocument'))
$menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document'));
$menuitems['rm_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document'));
if ($accessobject->check_view_access('DocumentAccess'))
$menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
$menuitems['edit_document_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
}
if ($accessMode >= M_READ && !$this->params['user']->isGuest()) {
if ($accessobject->check_view_access('DocumentNotify'))
$menuitems['edit_existing_notify'] = array('link'=>"../out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
}
if ($accessobject->check_view_access('TransferDocument')) {
$menuitems['transfer_document'] = array('link'=>"../out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
@ -865,26 +865,26 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
private function accountNavigationBar() { /* {{{ */
$accessobject = $this->params['accessobject'];
echo "<id=\"first\"><a href=\"../out/out.MyAccount.php\" class=\"brand\">".getMLText("my_account")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.MyAccount.php\" class=\"brand\">".getMLText("my_account")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
$menuitems = array();
if ($accessobject->check_view_access('EditUserData') || !$this->params['disableselfedit'])
$menuitems['edit_user_details'] = array('link'=>"../out/out.EditUserData.php", 'label'=>getMLText('edit_user_details'));
$menuitems['edit_user_details'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditUserData.php", 'label'=>getMLText('edit_user_details'));
if (!$this->params['user']->isAdmin())
$menuitems['edit_default_keywords'] = array('link'=>"../out/out.UserDefaultKeywords.php", 'label'=>getMLText('edit_default_keywords'));
$menuitems['edit_default_keywords'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UserDefaultKeywords.php", 'label'=>getMLText('edit_default_keywords'));
if ($accessobject->check_view_access('ManageNotify'))
$menuitems['edit_notify'] = array('link'=>"../out/out.ManageNotify.php", 'label'=>getMLText('edit_existing_notify'));
$menuitems['edit_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ManageNotify.php", 'label'=>getMLText('edit_existing_notify'));
$menuitems['2_factor_auth'] = array('link'=>"../out/out.Setup2Factor.php", 'label'=>'2_factor_auth');
if ($this->params['enableusersview']){
if ($accessobject->check_view_access('UsrView'))
$menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>getMLText('users'));
$menuitems['users'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UsrView.php", 'label'=>getMLText('users'));
if ($accessobject->check_view_access('GroupView'))
$menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>getMLText('groups'));
$menuitems['groups'] = array('link'=>$this->params['settings']->_httpRoot."out/out.GroupView.php", 'label'=>getMLText('groups'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
@ -899,22 +899,22 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
private function myDocumentsNavigationBar() { /* {{{ */
$accessobject = $this->params['accessobject'];
echo "<id=\"first\"><a href=\"../out/out.MyDocuments.php\" class=\"brand\">".getMLText("my_documents")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.MyDocuments.php\" class=\"brand\">".getMLText("my_documents")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
$menuitems = array();
if ($accessobject->check_view_access('MyDocuments')) {
$menuitems['inprocess'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>getMLText('documents_in_process'));
$menuitems['all_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>getMLText('all_documents'));
$menuitems['inprocess'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyDocuments.php?inProcess=1", 'label'=>getMLText('documents_in_process'));
$menuitems['all_documents'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyDocuments.php", 'label'=>getMLText('all_documents'));
}
if($this->params['workflowmode'] == 'traditional' || $this->params['workflowmode'] == 'traditional_only_approval') {
if ($accessobject->check_view_access('ReviewSummary'))
$menuitems['review_summary'] = array('link'=>"../out/out.ReviewSummary.php", 'label'=>getMLText('review_summary'));
$menuitems['review_summary'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ReviewSummary.php", 'label'=>getMLText('review_summary'));
if ($accessobject->check_view_access('ApprovalSummary'))
$menuitems['approval_summary'] = array('link'=>"../out/out.ApprovalSummary.php", 'label'=>getMLText('approval_summary'));
$menuitems['approval_summary'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ApprovalSummary.php", 'label'=>getMLText('approval_summary'));
} else {
if ($accessobject->check_view_access('WorkflowSummary'))
$menuitems['workflow_summary'] = array('link'=>"../out/out.WorkflowSummary.php", 'label'=>getMLText('workflow_summary'));
$menuitems['workflow_summary'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowSummary.php", 'label'=>getMLText('workflow_summary'));
}
if ($accessobject->check_view_access('ReceiptSummary'))
$menuitems['receipt_summary'] = array('link'=>"../out/out.ReceiptSummary.php", 'label'=>getMLText('receipt_summary'));
@ -933,39 +933,39 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
private function adminToolsNavigationBar() { /* {{{ */
$accessobject = $this->params['accessobject'];
$settings = $this->params['settings'];
echo " <id=\"first\"><a href=\"../out/out.AdminTools.php\" class=\"brand\">".getMLText("admin_tools")."</a>\n";
echo " <id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.AdminTools.php\" class=\"brand\">".getMLText("admin_tools")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
$menuitems = array();
if($accessobject->check_view_access(array('UsrMgr', 'RoleMgr', 'GroupMgr', 'UserList', 'Acl'))) {
$menuitems['user_group_management'] = array('link'=>"#", 'label'=>getMLText('user_group_management'));
if ($accessobject->check_view_access('UsrMgr'))
$menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>getMLText('user_management'));
$menuitems['user_group_management']['children']['user_management'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UsrMgr.php", 'label'=>getMLText('user_management'));
if ($accessobject->check_view_access('RoleMgr'))
$menuitems['user_group_management']['children']['role_management'] = array('link'=>"../out/out.RoleMgr.php", 'label'=>getMLText('role_management'));
$menuitems['user_group_management']['children']['role_management'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RoleMgr.php", 'label'=>getMLText('role_management'));
if ($accessobject->check_view_access('GroupMgr'))
$menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>getMLText('group_management'));
$menuitems['user_group_management']['children']['group_management'] = array('link'=>$this->params['settings']->_httpRoot."out/out.GroupMgr.php", 'label'=>getMLText('group_management'));
if ($accessobject->check_view_access('UserList'))
$menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>getMLText('user_list'));
$menuitems['user_group_management']['children']['user_list'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UserList.php", 'label'=>getMLText('user_list'));
if ($accessobject->check_view_access('Acl'))
$menuitems['user_group_management']['children']['access_control'] = array('link'=>"../out/out.Acl.php", 'label'=>getMLText('access_control'));
$menuitems['user_group_management']['children']['access_control'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Acl.php", 'label'=>getMLText('access_control'));
}
if($accessobject->check_view_access(array('DefaultKeywords', 'Categories', 'AttributeMgr', 'WorkflowMgr', 'WorkflowStatesMgr', 'WorkflowActionsMgr'))) {
$menuitems['definitions'] = array('link'=>"#", 'label'=>getMLText('definitions'));
if ($accessobject->check_view_access('DefaultKeywords'))
$menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>getMLText('global_default_keywords'));
$menuitems['definitions']['children']['default_keywords'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DefaultKeywords.php", 'label'=>getMLText('global_default_keywords'));
if ($accessobject->check_view_access('Categories'))
$menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>getMLText('global_document_categories'));
$menuitems['definitions']['children']['document_categories'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Categories.php", 'label'=>getMLText('global_document_categories'));
if ($accessobject->check_view_access('AttributeMgr'))
$menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions'));
$menuitems['definitions']['children']['attribute_definitions'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions'));
if($this->params['workflowmode'] == 'advanced') {
if ($accessobject->check_view_access('WorkflowMgr'))
$menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows'));
$menuitems['definitions']['children']['workflows'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows'));
if ($accessobject->check_view_access('WorkflowStatesMgr'))
$menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>getMLText('global_workflow_states'));
$menuitems['definitions']['children']['workflow_states'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowStatesMgr.php", 'label'=>getMLText('global_workflow_states'));
if ($accessobject->check_view_access('WorkflowActionsMgr'))
$menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>getMLText('global_workflow_actions'));
$menuitems['definitions']['children']['workflow_actions'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowActionsMgr.php", 'label'=>getMLText('global_workflow_actions'));
}
}
@ -973,47 +973,47 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if($accessobject->check_view_access(array('Indexer', 'CreateIndex', 'IndexInfo'))) {
$menuitems['fulltext'] = array('link'=>"#", 'label'=>getMLText('fullsearch'));
if ($accessobject->check_view_access('Indexer'))
$menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>getMLText('update_fulltext_index'));
$menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php", 'label'=>getMLText('update_fulltext_index'));
if ($accessobject->check_view_access('CreateIndex'))
$menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>getMLText('create_fulltext_index'));
$menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CreateIndex.php", 'label'=>getMLText('create_fulltext_index'));
if ($accessobject->check_view_access('IndexInfo'))
$menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>getMLText('fulltext_info'));
$menuitems['fulltext']['children']['fulltext_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.IndexInfo.php", 'label'=>getMLText('fulltext_info'));
}
}
if($accessobject->check_view_access(array('BackupTools', 'LogManagement'))) {
$menuitems['backup_log_management'] = array('link'=>"#", 'label'=>getMLText('backup_log_management'));
if ($accessobject->check_view_access('BackupTools'))
$menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>getMLText('backup_tools'));
$menuitems['backup_log_management']['children'][] = array('link'=>$this->params['settings']->_httpRoot."out/out.BackupTools.php", 'label'=>getMLText('backup_tools'));
if ($this->params['logfileenable'])
if ($accessobject->check_view_access('LogManagement'))
$menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.LogManagement.php", 'label'=>getMLText('log_management'));
$menuitems['backup_log_management']['children'][] = array('link'=>$this->params['settings']->_httpRoot."out/out.LogManagement.php", 'label'=>getMLText('log_management'));
}
if($accessobject->check_view_access(array('ImportFS', 'ImportUsers', 'Statistic', 'Charts', 'Timeline', 'ObjectCheck', 'ExtensionMgr', 'Info'))) {
$menuitems['misc'] = array('link'=>"#", 'label'=>getMLText('misc'));
if ($accessobject->check_view_access('ImportFS'))
$menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>getMLText('import_fs'));
$menuitems['misc']['children']['import_fs'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ImportFS.php", 'label'=>getMLText('import_fs'));
if ($accessobject->check_view_access('ImportUsers'))
$menuitems['misc']['children']['import_users'] = array('link'=>"../out/out.ImportUsers.php", 'label'=>getMLText('import_users'));
$menuitems['misc']['children']['import_users'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ImportUsers.php", 'label'=>getMLText('import_users'));
if ($accessobject->check_view_access('Statistic'))
$menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>getMLText('folders_and_documents_statistic'));
$menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Statistic.php", 'label'=>getMLText('folders_and_documents_statistic'));
if ($accessobject->check_view_access('Charts'))
$menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>getMLText('charts'));
$menuitems['misc']['children']['charts'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Charts.php", 'label'=>getMLText('charts'));
if ($accessobject->check_view_access('Timeline'))
$menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>getMLText('timeline'));
$menuitems['misc']['children']['timeline'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Timeline.php", 'label'=>getMLText('timeline'));
if ($accessobject->check_view_access('SchedulerTaskMgr'))
$menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>"../out/out.SchedulerTaskMgr.php", 'label'=>getMLText('scheduler_task_mgr'));
$menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SchedulerTaskMgr.php", 'label'=>getMLText('scheduler_task_mgr'));
if ($accessobject->check_view_access('ObjectCheck'))
$menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>getMLText('objectcheck'));
$menuitems['misc']['children']['objectcheck'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ObjectCheck.php", 'label'=>getMLText('objectcheck'));
if ($accessobject->check_view_access('ExpiredDocuments'))
$menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>getMLText('documents_expired'));
$menuitems['misc']['children']['documents_expired'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ExpiredDocuments.php", 'label'=>getMLText('documents_expired'));
if ($accessobject->check_view_access('ExtensionMgr'))
$menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>getMLText('extension_manager'));
$menuitems['misc']['children']['extension_manager'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ExtensionMgr.php", 'label'=>getMLText('extension_manager'));
if ($accessobject->check_view_access('ClearCache'))
$menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>getMLText('clear_cache'));
$menuitems['misc']['children']['clear_cache'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ClearCache.php", 'label'=>getMLText('clear_cache'));
if ($accessobject->check_view_access('Info'))
$menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>getMLText('version_info'));
$menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info'));
}
if ($settings->_enableDebugMode) {
@ -1034,15 +1034,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
private function calendarOldNavigationBar($d){ /* {{{ */
$accessobject = $this->params['accessobject'];
$ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2];
echo "<id=\"first\"><a href=\"../out/out.CalendarOld.php?mode=y\" class=\"brand\">".getMLText("calendar")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=y\" class=\"brand\">".getMLText("calendar")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
echo "<ul class=\"nav\">\n";
echo "<li><a href=\"../out/out.CalendarOld.php?mode=w".$ds."\">".getMLText("week_view")."</a></li>\n";
echo "<li><a href=\"../out/out.CalendarOld.php?mode=m".$ds."\">".getMLText("month_view")."</a></li>\n";
echo "<li><a href=\"../out/out.CalendarOld.php?mode=y".$ds."\">".getMLText("year_view")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=w".$ds."\">".getMLText("week_view")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=m".$ds."\">".getMLText("month_view")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=y".$ds."\">".getMLText("year_view")."</a></li>\n";
if($accessobject->check_view_access(array('AddEvent')))
echo "<li><a href=\"../out/out.AddEvent.php\">".getMLText("add_event")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.AddEvent.php\">".getMLText("add_event")."</a></li>\n";
echo "</ul>\n";
echo "</div>\n";
return;
@ -1051,12 +1051,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
private function calendarNavigationBar($d){ /* {{{ */
$accessobject = $this->params['accessobject'];
echo "<id=\"first\"><a href=\"../out/out.Calendar.php\" class=\"brand\">".getMLText("calendar")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.Calendar.php\" class=\"brand\">".getMLText("calendar")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
$menuitems = array();
if($accessobject->check_view_access(array('AddEvent')))
$menuitems['addevent'] = array('link'=>"../out/out.AddEvent.php", 'label'=>getMLText('add_event'));
$menuitems['addevent'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddEvent.php", 'label'=>getMLText('add_event'));
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('calendarNavigationBar'))
@ -1615,7 +1615,7 @@ $(document).ready(function() {
$content .= $this->getModalBoxLink(
array(
'target' => 'docChooser'.$formid,
'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
'remote' => $this->params['settings']->_httpRoot."out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
'class' => 'btn btn-secondary',
'title' => getMLText('document').'…'
));
@ -1680,7 +1680,7 @@ function folderSelected<?php echo $formid ?>(id, name) {
$content .= $this->getModalBoxLink(
array(
'target' => 'folderChooser'.$formid,
'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
'remote' => $this->params['settings']->_httpRoot."out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
'class' => 'btn btn-secondary',
'title' => getMLText('folder').'…'
));
@ -1753,7 +1753,7 @@ $(document).ready(function() {
$content .= $this->getModalBoxLink(
array(
'target' => 'keywordChooser',
'remote' => "../out/out.KeywordChooser.php?target=".$formName,
'remote' => $this->params['settings']->_httpRoot."out/out.KeywordChooser.php?target=".$formName,
'class' => 'btn btn-secondary',
'title' => getMLText('keywords').'…'
));
@ -1827,7 +1827,7 @@ $(document).ready(function() {
$tmp = array();
foreach($attrs as $attr) {
if($targetfolder = $dms->getFolder(intval($attr)))
$tmp[] = '<a href="../out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1836,7 +1836,7 @@ $(document).ready(function() {
$tmp = array();
foreach($attrs as $attr) {
if($targetdoc = $dms->getDocument(intval($attr)))
$tmp[] = '<a href="../out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -2005,7 +2005,7 @@ $(document).ready(function() {
$content .= $this->getModalBoxLink(
array(
'target' => 'dropfolderChooser',
'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
'remote' => $this->params['settings']->_httpRoot."out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
'class' => 'btn btn-secondary',
'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")).'…'
));
@ -2393,19 +2393,19 @@ $(function() {
*/
function __printTreeNavigation($folderid, $showtree){ /* {{{ */
if ($showtree==1){
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"fa fa-minus-circle\"></i></a>", true);
$this->contentHeading("<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"fa fa-minus-circle\"></i></a>", true);
$this->contentContainerStart();
?>
<script language="JavaScript">
function folderSelected(id, name) {
window.location = '../out/out.ViewFolder.php?folderid=' + id;
window.location = '<?= $this->params['settings']->_httpRoot ?>out/out.ViewFolder.php?folderid=' + id;
}
</script>
<?php
$this->printNewTreeNavigation($folderid, M_READ, 0, '');
$this->contentContainerEnd();
} else {
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);
$this->contentHeading("<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);
}
} /* }}} */
@ -2484,7 +2484,7 @@ $(function() {
\"label\" : \"<i class='fa fa-remove'></i> ".getMLText("rm_document")."\",
\"class\" : \"btn-danger\",
\"callback\": function() {
$.get('../op/op.Ajax.php',
$.get('".$this->params['settings']->_httpRoot."op/op.Ajax.php',
{ command: 'deletedocument', id: id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -2558,7 +2558,7 @@ $(function() {
\"label\" : \"<i class='fa fa-remove'></i> ".getMLText("rm_folder")."\",
\"class\" : \"btn-danger\",
\"callback\": function() {
$.get('../op/op.Ajax.php',
$.get('".$this->params['settings']->_httpRoot."op/op.Ajax.php',
{ command: 'deletefolder', id: id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -2625,9 +2625,9 @@ $(function() {
$content = '';
$objid = $object->getId();
if($object->isType('document')) {
$content .= '<a class="access-document-btn" href="../out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
$content .= '<a class="access-document-btn" href="'.$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
} elseif($object->isType('folder')) {
$content .= '<a class="access-folder-btn" href="../out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
$content .= '<a class="access-folder-btn" href="'.$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
}
if($return)
return $content;
@ -2839,7 +2839,7 @@ $(document).ready( function() {
\"label\" : \"<i class='fa fa-remove'></i> ".getMLText("rm_attr_value")."\",
\"class\" : \"btn-danger\",
\"callback\": function() {
$.post('../op/op.AttributeMgr.php',
$.post('".$this->params['settings']->_httpRoot."op/op.AttributeMgr.php',
{ action: 'removeattrvalue', attrdefid: id, attrvalue: attrvalue, formtoken: formtoken },
function(data) {
if(data.success) {
@ -2887,7 +2887,7 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
$(ev.currentTarget).parent().toggleClass('selected');
} else {
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
window.location = '../out/out.ViewDocument.php?documentid=' + attr_id;
window.location = '<?= $this->params['settings']->_httpRoot ?>out/out.ViewDocument.php?documentid=' + attr_id;
}
});
<?php
@ -2914,7 +2914,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
attr_id = $(ev.currentTarget).parent().data('target-id');
if(typeof attr_id == 'undefined')
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
window.location = '../out/out.ViewFolder.php?folderid=' + attr_id;
window.location = '<?= $this->params['settings']->_httpRoot ?>out/out.ViewFolder.php?folderid=' + attr_id;
}
});
<?php
@ -3023,9 +3023,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= "<td>";
if (file_exists($dms->contentDir . $latestContent->getPath())) {
if($accessop->check_controller_access('Download', array('action'=>'version')))
$content .= "<a draggable=\"false\" href=\"../op/op.Download.php?documentid=".$docID."&version=".$version."\">";
$content .= "<a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$docID."&version=".$version."\">";
if($previewer->hasPreview($latestContent)) {
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->params['settings']->_httpRoot."op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
} else {
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" ".($previewwidth ? "width=\"".$previewwidth."\"" : "")."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
}
@ -3039,7 +3039,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
if($onepage)
$content .= "<b".($onepage ? ' title="Id:'.$document->getId().'"' : '').">".htmlspecialchars($document->getName()) . "</b>";
else
$content .= "<a draggable=\"false\" href=\"../out/out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
$content .= "<a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
if(isset($extracontent['below_title']))
$content .= $extracontent['below_title'];
$content .= "<br />";
@ -3117,7 +3117,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
}
}
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= '<a href="../out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
@ -3131,7 +3131,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="../out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3200,11 +3200,11 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content = '';
if(!$skipcont)
$content .= $this->folderListRowStart($subFolder);
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
$content .= "<td><a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
if($onepage)
$content .= "<td class=\"wordbreak\" style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
else
$content .= "<td class=\"wordbreak\"><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
$content .= "<td class=\"wordbreak\"><a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
if(isset($extracontent['below_title']))
$content .= $extracontent['below_title'];
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
@ -3258,7 +3258,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
}
if ($accessop->check_view_access('EditFolder')) {
if($subFolderAccessMode >= M_READWRITE) {
$content .= '<a class_="btn btn-mini" href="../out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
$content .= '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
@ -3270,7 +3270,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="../out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3542,14 +3542,14 @@ $(document).ready(function() {
if($accessop->check_controller_access('Download', array('action'=>'review')))
if($rec['file']) {
echo "<br />";
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$document->getID()."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
}
break;
case "approval":
if($accessop->check_controller_access('Download', array('action'=>'approval')))
if($rec['file']) {
echo "<br />";
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$document->getID()."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
}
break;
}

View File

@ -396,6 +396,7 @@ $(document).ready( function() {
function preview() { /* {{{ */
$dms = $this->params['dms'];
$settings = $this->params['settings'];
$document = $this->params['document'];
$timeout = $this->params['timeout'];
$xsendfile = $this->params['xsendfile'];
@ -426,7 +427,7 @@ $(document).ready( function() {
$this->contentHeading(getMLText("preview"));
?>
<audio controls style="width: 100%;" preload="false">
<source src="../op/op.ViewOnline.php?documentid=<?php echo $latestContent->getDocument()->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
<source src="<?= $settings->_httpRoot ?>op/op.ViewOnline.php?documentid=<?php echo $latestContent->getDocument()->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
</audio>
<?php
break;
@ -439,14 +440,14 @@ $(document).ready( function() {
$this->contentHeading(getMLText("preview"));
?>
<video controls style="width: 100%;">
<source src="../op/op.ViewOnline.php?documentid=<?php echo $latestContent->getDocument()->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="video/mp4">
<source src="<?= $settings->_httpRoot ?>op/op.ViewOnline.php?documentid=<?php echo $latestContent->getDocument()->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="video/mp4">
</video>
<?php
break;
case 'application/pdf':
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.ViewOnline.php?documentid='.$latestContent->getDocument()->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<iframe src="<?= $settings->_httpRoot ?>pdfviewer/web/viewer.html?file=<?php echo urlencode($settings->_httpRoot.'op/op.ViewOnline.php?documentid='.$latestContent->getDocument()->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
break;
case 'image/svg+xml':
@ -456,7 +457,7 @@ $(document).ready( function() {
case 'image/gif':
$this->contentHeading(getMLText("preview"));
?>
<img src="../op/op.ViewOnline.php?documentid=<?php echo $latestContent->getDocument()->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<img src="<?= $settings->_httpRoot ?>op/op.ViewOnline.php?documentid=<?php echo $latestContent->getDocument()->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<?php
break;
default:
@ -476,7 +477,7 @@ $(document).ready( function() {
if($pdfpreviewer->hasConverter($latestContent->getMimeType())) {
$this->contentHeading(getMLText("preview_pdf"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.PdfPreview.php?documentid='.$latestContent->getDocument()->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<iframe src="<?= $settings->_httpRoot ?>pdfviewer/web/viewer.html?file=<?php echo urlencode($settings->_httpRoot.'op/op.PdfPreview.php?documentid='.$latestContent->getDocument()->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
}
}
@ -547,15 +548,15 @@ $(document).ready( function() {
if ($file_exists) {
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) {
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run')))
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion()."\">";
print "<a target=\"_blank\" href=\"".$this->params['settings']->_httpRoot."op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion()."\">";
} else {
if($accessobject->check_controller_access('Download', array('action'=>'version')))
print "<a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."\">";
print "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."\">";
}
}
$previewer->createPreview($latestContent);
if($previewer->hasPreview($latestContent)) {
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$latestContent->getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->params['settings']->_httpRoot."op/op.Preview.php?documentid=".$latestContent->getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
} else {
print "<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
}
@ -604,10 +605,10 @@ $(document).ready( function() {
if ($file_exists){
$items = array();
if($accessobject->check_controller_access('Download', array('action'=>'version')))
$items[] = array('link'=>"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'download', 'label'=>'download');
$items[] = array('link'=>$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'download', 'label'=>'download');
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run')))
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes)))
$items[] = array('link'=>"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion(), 'icon'=>'eye', 'label'=>'view_online', 'target'=>'_blank');
$items[] = array('link'=>$this->params['settings']->_httpRoot."op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion(), 'icon'=>'eye', 'label'=>'view_online', 'target'=>'_blank');
if($newitems = $this->callHook('extraVersionViews', $latestContent))
$items = array_merge($items, $newitems);
if($items) {
@ -618,17 +619,17 @@ $(document).ready( function() {
$items = array();
if ($file_exists){
if($islatest && $accessobject->mayEditVersion($latestContent->getDocument())) {
$items[] = array('link'=>"../out/out.EditOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_version');
$items[] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_version');
}
}
/* Only admin has the right to remove version in any case or a regular
* user if enableVersionDeletion is on
*/
if($accessobject->mayRemoveVersion($latestContent->getDocument())) {
$items[] = array('link'=>"../out/out.RemoveVersion.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'remove', 'label'=>'rm_version');
$items[] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveVersion.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'remove', 'label'=>'rm_version');
}
if($islatest && $accessobject->mayOverrideStatus($latestContent->getDocument())) {
$items[] = array('link'=>"../out/out.OverrideContentStatus.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'align-justify', 'label'=>'change_status');
$items[] = array('link'=>$this->params['settings']->_httpRoot."out/out.OverrideContentStatus.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'align-justify', 'label'=>'change_status');
}
if($islatest && $enablereceiptworkflow && $accessobject->check_controller_access('SetRecipients'))
if($accessobject->maySetRecipients($latestContent->getDocument())) {
@ -636,18 +637,18 @@ $(document).ready( function() {
}
if($islatest && $enablerevisionworkflow && $accessobject->check_controller_access('SetRevisors'))
if($accessobject->maySetRevisors($latestContent->getDocument())) {
$items[] = array('link'=>"../out/out.SetRevisors.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'refresh', 'label'=>'change_revisors');
$items[] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetRevisors.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'refresh', 'label'=>'change_revisors');
}
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
// Allow changing reviewers/approvals only if not reviewed
if($accessobject->maySetReviewersApprovers($latestContent->getDocument())) {
$items[] = array('link'=>"../out/out.SetReviewersApprovers.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'change_assignments');
$items[] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetReviewersApprovers.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'change_assignments');
}
} elseif($workflowmode == 'advanced') {
if($accessobject->maySetWorkflow($latestContent->getDocument())) {
$workflow = $latestContent->getWorkflow();
if(!$workflow) {
$items[] = array('link'=>"../out/out.SetWorkflow.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'random', 'label'=>'set_workflow');
$items[] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetWorkflow.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'random', 'label'=>'set_workflow');
}
}
}
@ -711,11 +712,11 @@ $(document).ready( function() {
if($versions === null)
$versions = $document->getContent();
$this->htmlAddHeader('<link href="../styles/bootstrap/timeline/timeline.css" rel="stylesheet">'."\n", 'css');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/bootstrap/timeline/timeline-min.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/bootstrap/timeline/timeline-locales.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/styles/validation-default.js"></script>'."\n", 'js');
$this->htmlAddHeader('<link href="'.$this->params['settings']->_httpRoot.'styles/bootstrap/timeline/timeline.css" rel="stylesheet">'."\n", 'css');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'styles/bootstrap/timeline/timeline-min.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'styles/bootstrap/timeline/timeline-locales.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/validation-default.js"></script>'."\n", 'js');
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder);
@ -991,7 +992,7 @@ $(document).ready( function() {
if($r['file']) {
echo "<br />";
if($accessobject->check_controller_access('Download', array('action'=>'run'))) {
echo "<a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&reviewlogid=".$r['reviewLogID']."\" class=\"btn btn-secondary btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&reviewlogid=".$r['reviewLogID']."\" class=\"btn btn-secondary btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
}
}
print "</td>\n";
@ -1013,7 +1014,7 @@ $(document).ready( function() {
}
}
if($enableremoverevapp && $user->isAdmin() && ($r['status'] == 1 || $r['status'] == -1))
echo '<li><a href="../out/out.RemoveReviewLog.php?documentid='.$document->getID().'&version='.$latestContent->getVersion().'&reviewid='.$r['reviewID'].'" title="'.getMLText('remove_review_log').'"><i class="fa fa-remove"></i></a></li>';
echo '<li><a href="'.$this->params['settings']->_httpRoot.'out/out.RemoveReviewLog.php?documentid='.$document->getID().'&version='.$latestContent->getVersion().'&reviewid='.$r['reviewID'].'" title="'.getMLText('remove_review_log').'"><i class="fa fa-remove"></i></a></li>';
print "</ul></td>\n";
print "</tr>\n";
@ -1097,7 +1098,7 @@ $(document).ready( function() {
if($a['file']) {
echo "<br />";
if($accessobject->check_controller_access('Download', array('action'=>'run'))) {
echo "<a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&approvelogid=".$a['approveLogID']."\" class=\"btn btn-secondary btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&approvelogid=".$a['approveLogID']."\" class=\"btn btn-secondary btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
}
}
echo "</td>\n";
@ -1119,7 +1120,7 @@ $(document).ready( function() {
}
}
if($enableremoverevapp && $user->isAdmin() && ($a['status'] == 1 || $a['status'] == -1))
echo '<li><a href="../out/out.RemoveApprovalLog.php?documentid='.$document->getID().'&version='.$latestContent->getVersion().'&approveid='.$a['approveID'].'" title="'.getMLText('remove_approval_log').'"><i class="fa fa-remove"></i></a></li>';
echo '<li><a href="'.$this->params['settings']->_httpRoot.'out/out.RemoveApprovalLog.php?documentid='.$document->getID().'&version='.$latestContent->getVersion().'&approveid='.$a['approveID'].'" title="'.getMLText('remove_approval_log').'"><i class="fa fa-remove"></i></a></li>';
print "</ul>";
print "</td>\n";
@ -1174,9 +1175,9 @@ $(document).ready( function() {
$this->contentContainerStart();
if($user->isAdmin()) {
if(!$workflowstate || SeedDMS_Core_DMS::checkIfEqual($workflow->getInitState(), $workflowstate)) {
print "<form action=\"../out/out.RemoveWorkflowFromDocument.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-remove\"></i> ".getMLText('rm_workflow')."</button></form>";
print "<form action=\"".$this->params['settings']->_httpRoot."out/out.RemoveWorkflowFromDocument.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-remove\"></i> ".getMLText('rm_workflow')."</button></form>";
} else {
print "<form action=\"../out/out.RewindWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-refresh\"></i> ".getMLText('rewind_workflow')."</button></form>";
print "<form action=\"".$this->params['settings']->_httpRoot."out/out.RewindWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-refresh\"></i> ".getMLText('rewind_workflow')."</button></form>";
}
}
@ -1276,7 +1277,7 @@ $(document).ready( function() {
echo "<td>";
if($latestContent->triggerWorkflowTransitionIsAllowed($user, $transition)) {
$action = $transition->getAction();
print "<form action=\"../out/out.TriggerWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><input type=\"hidden\" name=\"transition\" value=\"".$transition->getID()."\" /><input type=\"submit\" class=\"btn btn-primary\" value=\"".getMLText('action_'.strtolower($action->getName()), array(), htmlspecialchars($action->getName()))."\" /></form>";
print "<form action=\"".$this->params['settings']->_httpRoot."out/out.TriggerWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><input type=\"hidden\" name=\"transition\" value=\"".$transition->getID()."\" /><input type=\"submit\" class=\"btn btn-primary\" value=\"".getMLText('action_'.strtolower($action->getName()), array(), htmlspecialchars($action->getName()))."\" /></form>";
$allowedtransitions[] = $transition;
}
echo "</td>";
@ -1295,7 +1296,7 @@ $(document).ready( function() {
}
}
if($subworkflows) {
echo "<form class=\"form-inline\" action=\"../out/out.RunSubWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" />";
echo "<form class=\"form-inline\" action=\"".$this->params['settings']->_httpRoot."out/out.RunSubWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" />";
echo "<select name=\"subworkflow\" class=\"form-control\">";
foreach($subworkflows as $subworkflow) {
echo "<option value=\"".$subworkflow->getID()."\">".htmlspecialchars($subworkflow->getName())."</option>";
@ -1327,7 +1328,7 @@ $(document).ready( function() {
/* If the init state has not been left, return is always possible */
if($workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()) {
echo "Initial state of sub workflow has not been left. Return to parent workflow is possible<br />";
echo "<form action=\"../out/out.ReturnFromSubWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" />";
echo "<form action=\"".$this->params['settings']->_httpRoot."out/out.ReturnFromSubWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" />";
echo "<input type=\"submit\" class=\"btn btn-primary\" value=\"".getMLText('return_from_subworkflow')."\" />";
echo "</form>";
} else {
@ -1342,7 +1343,7 @@ $(document).ready( function() {
foreach($transitions as $transition) {
if($latestContent->triggerWorkflowTransitionIsAllowed($user, $transition)) {
echo "Triggering transition is allowed<br />";
echo "<form action=\"../out/out.ReturnFromSubWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><input type=\"hidden\" name=\"transition\" value=\"".$transition->getID()."\" />";
echo "<form action=\"".$this->params['settings']->_httpRoot."out/out.ReturnFromSubWorkflow.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$latestContent->getDocument()->getId()."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><input type=\"hidden\" name=\"transition\" value=\"".$transition->getID()."\" />";
echo "<input type=\"submit\" class=\"btn btn-primary\" value=\"".getMLText('return_from_subworkflow')."\" />";
echo "</form>";
@ -1673,16 +1674,16 @@ $(document).ready( function() {
if($file_exists) {
if ($viewonlinefiletypes && (in_array(strtolower($file->getFileType()), $viewonlinefiletypes) || in_array(strtolower($file->getMimeType()), $viewonlinefiletypes))) {
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\">";
print "<a target=\"_blank\" href=\"".$this->params['settings']->_httpRoot."op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\">";
}
} else {
if($accessobject->check_controller_access('Download', array('action'=>'file'))) {
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\">";
print "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\">";
}
}
}
if($previewer->hasPreview($file)) {
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&file=".$file->getID()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($file->getMimeType())."\">");
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->params['settings']->_httpRoot."op/op.Preview.php?documentid=".$document->getID()."&file=".$file->getID()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($file->getMimeType())."\">");
} else {
print "<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
}
@ -1712,11 +1713,11 @@ $(document).ready( function() {
print "<td><ul class=\"unstyled actions\">";
if ($file_exists) {
if($accessobject->check_controller_access('Download', array('action'=>'file'))) {
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\"><i class=\"fa fa-download\"></i>".getMLText('download')."</a></li>";
print "<li><a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\"><i class=\"fa fa-download\"></i>".getMLText('download')."</a></li>";
}
if ($viewonlinefiletypes && (in_array(strtolower($file->getFileType()), $viewonlinefiletypes) || in_array(strtolower($file->getMimeType()), $viewonlinefiletypes))) {
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\"><i class=\"fa fa-star\"></i>" . getMLText("view_online") . "</a></li>";
print "<li><a target=\"_blank\" href=\"".$this->params['settings']->_httpRoot."op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\"><i class=\"fa fa-star\"></i>" . getMLText("view_online") . "</a></li>";
}
}
} else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
@ -1738,7 +1739,7 @@ $(document).ready( function() {
if ($document->getAccessMode($user) >= M_READWRITE){
if(0){
?>
<div id="_draganddrophandler" class="droptarget well alert" data-droptarget="attachment_<?= $document->getID(); ?>" data-target="<?= $document->getID(); ?>" data-uploadformtoken="<?= createFormKey(''); ?>"><?php printMLText('drop_files_here'); ?><a href="../out/out.AddFile.php?documentid=<?= $documentid ?>"> <?= getMLText("add") ?></a></div>
<div id="_draganddrophandler" class="droptarget well alert" data-droptarget="attachment_<?= $document->getID(); ?>" data-target="<?= $document->getID(); ?>" data-uploadformtoken="<?= createFormKey(''); ?>"><?php printMLText('drop_files_here'); ?><a href="<?= $this->params['settings']->_httpRoot ?>out/out.AddFile.php?documentid=<?= $documentid ?>"> <?= getMLText("add") ?></a></div>
<?php
}
print $this->html_link('AddFile', array('documentid'=>$documentid), array('class'=>'btn btn-primary'), getMLText("add"), false, true)."\n";
@ -1776,7 +1777,7 @@ $(document).ready( function() {
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
print "<br />".getMLText("document_link_public").": ".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
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()."\" /><button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
print "<form action=\"".$this->params['settings']->_httpRoot."op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
print "</span></td>";
echo $this->documentListRowEnd($targetDoc);
}
@ -1787,7 +1788,7 @@ $(document).ready( function() {
if ($accessobject->check_view_access('AddDocumentLink')){
?>
<br>
<form action="../op/op.AddDocumentLink.php" id="form1" name="form1" class="form-horizontal">
<form action="<?= $this->params['settings']->_httpRoot ?>op/op.AddDocumentLink.php" id="form1" name="form1" class="form-horizontal">
<input type="hidden" name="documentid" value="<?php print $documentid;?>">
<?php echo createHiddenFieldWithKey('adddocumentlink'); ?>
<?php $this->contentContainerStart(); ?>
@ -1842,7 +1843,7 @@ $(document).ready( function() {
print getMLText("document_link_by")." ".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 "<form action=\"../op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$sourceDoc->getId()."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-danger btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
print "<form action=\"".$this->params['settings']->_httpRoot."op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$sourceDoc->getId()."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-danger btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
print "</span></td>";
echo $this->documentListRowEnd($sourceDoc);
}

View File

@ -221,7 +221,7 @@ $('body').on('click', '.order-btn', function(ev) {
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, 'maintree', ($expandFolderTree == 1) ? -1 : 3, $orderby);
if ($enableDropUpload && $folder->getAccessMode($user) >= M_READWRITE) {
echo "SeedDMSUpload.setUrl('../op/op.Ajax.php');";
echo "SeedDMSUpload.setUrl('".$this->params['settings']->_httpRoot."op/op.Ajax.php');";
echo "SeedDMSUpload.setAbortBtnLabel('".getMLText("cancel")."');";
echo "SeedDMSUpload.setEditBtnLabel('".getMLText("edit_document_props")."');";
$mus2 = SeedDMS_Core_File::parse_filesize(ini_get("upload_max_filesize"));
@ -384,9 +384,9 @@ $('body').on('click', '.order-btn', function(ev) {
print "<thead>\n<tr>\n";
print "<th>".($parent ? '<button class="btn btn-mini btn-secondary btn-sm" id="goto-parent" data-parentid="'.$parent->getID().'"><i class="fa fa-arrow-up"></i></button>' : '')."</th>\n";
print "<th>".getMLText("name");
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"||$orderby=="na"?"&orderby=nd":"&orderby=n")."\" data-orderby=\"".($orderby=="n"||$orderby=="na"?"nd":"n")."\"title=\"".getMLText("sort_by_name")."\">".($orderby=="n"||$orderby=="na"?' <i class="fa fa-sort-alpha-asc selected"></i>':($orderby=="nd"?' <i class="fa fa-sort-alpha-desc selected"></i>':' <i class="fa fa-sort-alpha-asc"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="s"||$orderby=="sa"?"&orderby=sd":"&orderby=s")."\" data-orderby=\"".($orderby=="s"||$orderby=="sa"?"sd":"s")."\" title=\"".getMLText("sort_by_sequence")."\">".($orderby=="s"||$orderby=="sa"?' <i class="fa fa-sort-numeric-asc selected"></i>':($orderby=="sd"?' <i class="fa fa-sort-numeric-desc selected"></i>':' <i class="fa fa-sort-numeric-asc"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="d"||$orderby=="da"?"&orderby=dd":"&orderby=d")."\" data-orderby=\"".($orderby=="d"||$orderby=="da"?"dd":"d")."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="fa fa-sort-amount-asc selected"></i>':($orderby=="dd"?' <i class="fa fa-sort-amount-desc selected"></i>':' <i class="fa fa-sort-amount-asc"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"||$orderby=="na"?"&orderby=nd":"&orderby=n")."\" data-orderby=\"".($orderby=="n"||$orderby=="na"?"nd":"n")."\"title=\"".getMLText("sort_by_name")."\">".($orderby=="n"||$orderby=="na"?' <i class="fa fa-sort-alpha-asc selected"></i>':($orderby=="nd"?' <i class="fa fa-sort-alpha-desc selected"></i>':' <i class="fa fa-sort-alpha-asc"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid .($orderby=="s"||$orderby=="sa"?"&orderby=sd":"&orderby=s")."\" data-orderby=\"".($orderby=="s"||$orderby=="sa"?"sd":"s")."\" title=\"".getMLText("sort_by_sequence")."\">".($orderby=="s"||$orderby=="sa"?' <i class="fa fa-sort-numeric-asc selected"></i>':($orderby=="sd"?' <i class="fa fa-sort-numeric-desc selected"></i>':' <i class="fa fa-sort-numeric-asc"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid .($orderby=="d"||$orderby=="da"?"&orderby=dd":"&orderby=d")."\" data-orderby=\"".($orderby=="d"||$orderby=="da"?"dd":"d")."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="fa fa-sort-amount-asc selected"></i>':($orderby=="dd"?' <i class="fa fa-sort-amount-desc selected"></i>':' <i class="fa fa-sort-amount-asc"></i>'))."</a>";
print "</th>\n";
// print "<th>".getMLText("owner")."</th>\n";
print "<th>".getMLText("status")."</th>\n";
@ -599,7 +599,7 @@ $('body').on('click', '.order-btn', function(ev) {
if ($enableFolderTree) {
if ($showtree==1){
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"fa fa-minus-circle\"></i></a>", true);
$this->contentHeading("<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"fa fa-minus-circle\"></i></a>", true);
$this->contentContainerStart();
/*
* access expandFolderTree with $this->params because it can
@ -608,7 +608,7 @@ $('body').on('click', '.order-btn', function(ev) {
$this->printNewTreeNavigationHtml($folderid, M_READ, 0, 'maintree', ($this->params['expandFolderTree'] == 1) ? -1 : 3, $orderby);
$this->contentContainerEnd();
} else {
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);
$this->contentHeading("<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);
}
}

View File

@ -91,38 +91,38 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
echo '<base href="'.$this->baseurl.'">'."\n";
$sitename = trim(strip_tags($this->params['sitename']));
if($this->params['session'])
echo '<link rel="search" type="application/opensearchdescription+xml" href="../out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "SeedDMS").'"/>'."\n";
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "SeedDMS").'"/>'."\n";
$parenttheme = 'bootstrap';
echo '<link href="../views/'.$this->theme.'/styles/seeddms.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/bootstrap-datepicker/css/bootstrap-datepicker.css" rel="stylesheet">'."\n";
echo '<link href="../styles/'.$parenttheme.'/chosen/css/chosen.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/select2/css/select2.min.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/select2-bootstrap4-theme/select2-bootstrap4.min.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/vendors/jqtree/jqtree.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/styles/application.css" rel="stylesheet">'."\n";
echo '<link href="../views/'.$this->theme.'/styles/styles.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/seeddms.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap-datepicker/css/bootstrap-datepicker.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$parenttheme.'/chosen/css/chosen.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/select2/css/select2.min.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/select2-bootstrap4-theme/select2-bootstrap4.min.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jqtree/jqtree.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/application.css" rel="stylesheet">'."\n";
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/styles.css" rel="stylesheet">'."\n";
if($this->extraheader['css'])
echo $this->extraheader['css'];
if(method_exists($this, 'css'))
echo '<link href="'.$this->params['absbaseprefix'].'out/out.'.$this->params['class'].'.php?action=css'.(!empty($_SERVER['QUERY_STRING']) ? '&'.$_SERVER['QUERY_STRING'] : '').'" rel="stylesheet">'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery/jquery.min.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jquery/jquery.min.js"></script>'."\n";
if($this->extraheader['js'])
echo $this->extraheader['js'];
echo '<script type="text/javascript" src="../styles/'.$parenttheme.'/passwordstrength/jquery.passwordstrength.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/jquery.noty.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/layouts/topRight.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/layouts/topCenter.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/noty/themes/default.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jqtree/tree.jquery.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/bootbox/bootbox.min.js"></script>'."\n";
echo '<script type="text/javascript" src="../views/'.$this->theme.'/vendors/bootbox/bootbox.locales.min.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'styles/'.$parenttheme.'/passwordstrength/jquery.passwordstrength.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/jquery.noty.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/layouts/topRight.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/layouts/topCenter.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/noty/themes/default.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jqtree/tree.jquery.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootbox/bootbox.min.js"></script>'."\n";
echo '<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootbox/bootbox.locales.min.js"></script>'."\n";
if(!empty($this->extraheader['favicon']))
echo $this->extraheader['favicon'];
else {
echo '<link rel="icon" href="../views/'.$this->theme.'/images/favicon.svg" type="image/svg+xml"/>'."\n";
echo '<link rel="apple-touch-icon" sizes="180x180" href="../views/'.$this->theme.'/images/apple-touch-icon.png">'."\n";
echo '<link rel="icon" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/favicon.svg" type="image/svg+xml"/>'."\n";
echo '<link rel="apple-touch-icon" sizes="180x180" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/apple-touch-icon.png">'."\n";
}
if($this->params['session'] && $this->params['session']->getSu()) {
?>
@ -168,21 +168,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
}
$parenttheme = 'bootstrap';
echo '<script src="../views/'.$this->theme.'/vendors/popper/popper.min.js"></script>'."\n";
//echo '<script src="../styles/bootstrap/popper.js-1.14.3/dist/umd/popper.js"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/vendors/bootstrap/bootstrap.min.js"></script>'."\n";
echo '<script src="../styles/'.$parenttheme.'/bootstrap/js/bootstrap-typeahead.js"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/popper/popper.min.js"></script>'."\n";
//echo '<script src="'.$this->params['settings']->_httpRoot.'styles/bootstrap/popper.js-1.14.3/dist/umd/popper.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap/bootstrap.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'styles/'.$parenttheme.'/bootstrap/js/bootstrap-typeahead.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>'."\n";
foreach(array('de', 'es', 'ar', 'el', 'bg', 'ru', 'hr', 'hu', 'ko', 'pl', 'ro', 'sk', 'tr', 'uk', 'ca', 'nl', 'fi', 'cs', 'it', 'fr', 'sv', 'sl', 'pt-BR', 'zh-CN', 'zh-TW') as $lang)
echo '<script src="../views/'.$this->theme.'/vendors/bootstrap-datepicker/locales/bootstrap-datepicker.'.$lang.'.min.js"></script>'."\n";
echo '<script src="../styles/'.$parenttheme.'/chosen/js/chosen.jquery.min.js"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/vendors/select2/js/select2.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/bootstrap-datepicker/locales/bootstrap-datepicker.'.$lang.'.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'styles/'.$parenttheme.'/chosen/js/chosen.jquery.min.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/select2/js/select2.min.js"></script>'."\n";
parse_str($_SERVER['QUERY_STRING'], $tmp);
$tmp['action'] = 'webrootjs';
if(isset($tmp['formtoken']))
unset($tmp['formtoken']);
echo '<script src="'.$this->params['absbaseprefix'].'out/out.'.$this->params['class'].'.php?'.http_build_query($tmp).'"></script>'."\n";
echo '<script src="../views/'.$this->theme.'/styles/application.js"></script>'."\n";
echo '<script src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/application.js"></script>'."\n";
if($this->params['enablemenutasks'] && isset($this->params['user']) && $this->params['user']) {
$this->addFooterJS('SeedDMSTask.run();');
}
@ -297,7 +297,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
function globalBanner() { /* {{{ */
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark fixed-top\">\n";
echo " <a class=\"navbar-brand\" href=\"../out/out.ViewFolder.php\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="../views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo "</nav>\n";
} /* }}} */
@ -305,11 +305,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$dms = $this->params['dms'];
$accessobject = $this->params['accessobject'];
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark border-bottom fixed-top\">\n";
echo " <a class=\"navbar-brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="../views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
if(isset($this->params['user']) && $this->params['user']) {
/* search form {{{ */
echo " <form action=\"../out/out.Search.php\" class=\"form-inline ml-4 mr-auto\" autocomplete=\"off\">";
echo " <form action=\"".$this->params['settings']->_httpRoot."out/out.Search.php\" class=\"form-inline ml-4 mr-auto\" autocomplete=\"off\">";
if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), $dms->getClassname('folder'))) {
echo " <input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\" />";
}
@ -327,11 +327,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <div class=\"collapse navbar-collapse\" id=\"navbarMain\">\n";
echo " <ul class=\"navbar-nav\">\n";
$menuitems = array();
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>'../out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
if ($this->params['user']->isAdmin()) $menuitems['admintools'] = array('link'=>'../out/out.AdminTools.php', 'label'=>"admin_tools");
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>$this->params['settings']->_httpRoot.'out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
if ($this->params['user']->isAdmin()) $menuitems['admintools'] = array('link'=>$this->params['settings']->_httpRoot.'out/out.AdminTools.php', 'label'=>"admin_tools");
if($this->params['enablehelp']) {
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$menuitems['help'] = array('link'=>'../out/out.Help.php?context='.$tmp[1], 'label'=>"help");
$menuitems['help'] = array('link'=>$this->params['settings']->_httpRoot.'out/out.Help.php?context='.$tmp[1], 'label'=>"help");
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('globalNavigationBar'))
@ -402,11 +402,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if (!$this->params['user']->isGuest()) {
$menuitems = array();
if ($accessobject->check_view_access('MyDocuments'))
$menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>'my_documents');
$menuitems['my_documents'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyDocuments.php?inProcess=1", 'label'=>'my_documents');
if ($accessobject->check_view_access('MyAccount'))
$menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account');
$menuitems['my_account'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyAccount.php", 'label'=>'my_account');
if ($accessobject->check_view_access('TransmittalMgr'))
$menuitems['my_transmittals'] = array('link'=>"../out/out.TransmittalMgr.php", 'label'=>'my_transmittals');
$menuitems['my_transmittals'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransmittalMgr.php", 'label'=>'my_transmittals');
if($this->hasHook('userMenuItems'))
$menuitems = $this->callHook('userMenuItems', $menuitems);
if($menuitems) {
@ -428,7 +428,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <a class=\"dropdown-item active\"";
else
echo " <a class=\"dropdown-item\"";
echo " href=\"../op/op.SetLanguage.php?lang=".$currLang."&referer=".$_SERVER["REQUEST_URI"]."\">";
echo " href=\"".$this->params['settings']->_httpRoot."op/op.SetLanguage.php?lang=".$currLang."&referer=".$_SERVER["REQUEST_URI"]."\">";
echo getMLText($currLang)."</a>\n";
}
echo " </div>\n";
@ -437,15 +437,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if(!$this->params['session']->getSu()) {
if($this->params['user']->isAdmin()) {
$showdivider = true;
echo " <a class=\"dropdown-item\" href=\"../out/out.SubstituteUser.php\">".getMLText("substitute_user")."</a>\n";
echo " <a class=\"dropdown-item\" href=\"".$this->params['settings']->_httpRoot."out/out.SubstituteUser.php\">".getMLText("substitute_user")."</a>\n";
}
}
if($showdivider)
echo " <div class=\"dropdown-divider\"></div>\n";
if($this->params['session']->getSu()) {
echo " <a class=\"dropdown-item\" href=\"../op/op.ResetSu.php\">".getMLText("sign_out_user")."</a>\n";
echo " <a class=\"dropdown-item\" href=\"".$this->params['settings']->_httpRoot."op/op.ResetSu.php\">".getMLText("sign_out_user")."</a>\n";
} else {
echo " <a class=\"dropdown-item\" href=\"../op/op.Logout.php\">".getMLText("sign_out")."</a>\n";
echo " <a class=\"dropdown-item\" href=\"".$this->params['settings']->_httpRoot."op/op.Logout.php\">".getMLText("sign_out")."</a>\n";
}
echo " </div>\n";
echo " </li>\n";
@ -466,16 +466,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
for ($i = 0; $i < count($path); $i++) {
$txtpath .= "<li class=\"breadcrumb-item\">";
if ($i +1 < count($path)) {
$txtpath .= "<a href=\"../out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
$txtpath .= "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
htmlspecialchars($path[$i]->getName())."</a>";
}
else {
$txtpath .= ($tagAll ? "<a href=\"../out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".
htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
}
}
if($document)
$txtpath .= "<li class=\"breadcrumb-item active\" aria-current=\"page\"><a href=\"../out/out.ViewDocument.php?documentid=".$document->getId()."\">".htmlspecialchars($document->getName())."</a></li>";
$txtpath .= "<li class=\"breadcrumb-item active\" aria-current=\"page\"><a href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\">".htmlspecialchars($document->getName())."</a></li>";
return '<nav aria-label="breadcrumb"><ol class="breadcrumb">'.$txtpath.'</ol></nav>';
} /* }}} */
@ -660,37 +660,37 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if ($accessMode == M_READ && !$this->params['user']->isGuest()) {
if ($accessobject->check_controller_access('FolderNotify'))
$menuitems['edit_folder_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_notify'));
$menuitems['edit_folder_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_notify'));
}
else if ($accessMode >= M_READWRITE) {
if ($accessobject->check_controller_access('AddSubFolder'))
$menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_subfolder'));
$menuitems['add_subfolder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_subfolder'));
if ($accessobject->check_controller_access('AddDocument'))
$menuitems['add_document'] = array('link'=>"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_document'));
$menuitems['add_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_document'));
if(0 && $this->params['enablelargefileupload'])
$menuitems['add_multiple_documents'] = array('link'=>"../out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_multiple_documents'));
$menuitems['add_multiple_documents'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('add_multiple_documents'));
if ($accessobject->check_controller_access('EditFolder')) {
$menuitems['edit_folder_props'] = array('link'=>"../out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('edit_folder_props'));
$menuitems['edit_folder_props'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('edit_folder_props'));
}
if ($accessobject->check_controller_access('MoveFolder')) {
if ($folderID != $this->params['rootfolderid'] && $folder->getParent())
$menuitems['move_folder'] = array('link'=>"../out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('move_folder'));
$menuitems['move_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('move_folder'));
}
if ($accessMode == M_ALL) {
if ($folderID != $this->params['rootfolderid'] && $folder->getParent())
if ($accessobject->check_view_access('RemoveFolder'))
$menuitems['rm_folder'] = array('link'=>"../out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('rm_folder'));
$menuitems['rm_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>getMLText('rm_folder'));
}
if ($accessMode == M_ALL) {
if ($accessobject->check_view_access('FolderAccess'))
$menuitems['edit_folder_access'] = array('link'=>"../out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_access'));
$menuitems['edit_folder_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderAccess.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>getMLText('edit_folder_access'));
}
if ($accessobject->check_controller_access('FolderNotify'))
$menuitems['edit_existing_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify'));
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify'));
}
if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) {
$menuitems['index_folder'] = array('link'=>"../out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
$menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
@ -709,51 +709,51 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if ($accessMode >= M_READWRITE) {
if (!$document->isLocked()) {
if($accessobject->check_controller_access('UpdateDocument'))
$menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
$menuitems['update_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
if($accessobject->check_controller_access('LockDocument'))
$menuitems['lock_document'] = array('link'=>"../op/op.LockDocument".$docid."&formtoken=".createFormKey('lockdocument'), 'label'=>getMLText('lock_document'));
$menuitems['lock_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.LockDocument".$docid."&formtoken=".createFormKey('lockdocument'), 'label'=>getMLText('lock_document'));
if($document->isCheckedOut())
$menuitems['checkin_document'] = array('link'=>"../out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document'));
$menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document'));
else {
if($this->params['checkoutdir']) {
$menuitems['checkout_document'] = array('link'=>"../op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document'));
$menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document'));
}
}
if($accessobject->check_controller_access('EditDocument'))
$menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid , 'label'=>getMLText('edit_document_props'));
$menuitems['edit_document_props'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditDocument".$docid , 'label'=>getMLText('edit_document_props'));
if($accessobject->check_controller_access('MoveDocument'))
$menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
$menuitems['move_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
}
else {
$lockingUser = $document->getLockingUser();
if (($lockingUser->getID() == $this->params['user']->getID()) || ($document->getAccessMode($this->params['user']) == M_ALL)) {
if($accessobject->check_controller_access('UpdateDocument'))
$menuitems['update_document'] = array('link'=>"../out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
$menuitems['update_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document'));
if($accessobject->check_controller_access('UnlockDocument'))
$menuitems['unlock_document'] = array('link'=>"../op/op.UnlockDocument".$docid."&formtoken=".createFormKey('unlockdocument'), 'label'=>getMLText('unlock_document'));
$menuitems['unlock_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.UnlockDocument".$docid."&formtoken=".createFormKey('unlockdocument'), 'label'=>getMLText('unlock_document'));
if($accessobject->check_controller_access('EditDocument'))
$menuitems['edit_document_props'] = array('link'=>"../out/out.EditDocument".$docid, 'label'=>getMLText('edit_document_props'));
$menuitems['edit_document_props'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditDocument".$docid, 'label'=>getMLText('edit_document_props'));
if($accessobject->check_controller_access('MoveDocument'))
$menuitems['move_document'] = array('link'=>"../out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
$menuitems['move_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MoveDocument".$docid, 'label'=>getMLText('move_document'));
}
}
if($accessobject->maySetExpires($document)) {
if ($accessobject->check_view_access('SetExpires'))
$menuitems['expires'] = array('link'=>"../out/out.SetExpires".$docid, 'label'=>getMLText('expires'));
$menuitems['expires'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetExpires".$docid, 'label'=>getMLText('expires'));
}
}
if ($accessMode == M_ALL) {
if ($accessobject->check_view_access('RemoveDocument'))
$menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document'));
$menuitems['rm_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document'));
if ($accessobject->check_view_access('DocumentAccess'))
$menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
$menuitems['edit_document_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
}
if ($accessMode >= M_READ && !$this->params['user']->isGuest()) {
if ($accessobject->check_view_access('DocumentNotify'))
$menuitems['edit_existing_notify'] = array('link'=>"../out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
$menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify'));
}
if ($accessobject->check_view_access('TransferDocument')) {
$menuitems['transfer_document'] = array('link'=>"../out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
@ -780,21 +780,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems = array();
if ($accessobject->check_view_access('EditUserData') || !$this->params['disableselfedit'])
$menuitems['edit_user_details'] = array('link'=>"../out/out.EditUserData.php", 'label'=>getMLText('edit_user_details'));
$menuitems['edit_user_details'] = array('link'=>$this->params['settings']->_httpRoot."out/out.EditUserData.php", 'label'=>getMLText('edit_user_details'));
if (!$this->params['user']->isAdmin())
$menuitems['edit_default_keywords'] = array('link'=>"../out/out.UserDefaultKeywords.php", 'label'=>getMLText('edit_default_keywords'));
$menuitems['edit_default_keywords'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UserDefaultKeywords.php", 'label'=>getMLText('edit_default_keywords'));
if ($accessobject->check_view_access('ManageNotify'))
$menuitems['edit_notify'] = array('link'=>"../out/out.ManageNotify.php", 'label'=>getMLText('edit_existing_notify'));
$menuitems['edit_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ManageNotify.php", 'label'=>getMLText('edit_existing_notify'));
$menuitems['2_factor_auth'] = array('link'=>"../out/out.Setup2Factor.php", 'label'=>'2_factor_auth');
if ($this->params['enableusersview']){
if ($accessobject->check_view_access('UsrView'))
$menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>getMLText('users'));
$menuitems['users'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UsrView.php", 'label'=>getMLText('users'));
if ($accessobject->check_view_access('GroupView'))
$menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>getMLText('groups'));
$menuitems['groups'] = array('link'=>$this->params['settings']->_httpRoot."out/out.GroupView.php", 'label'=>getMLText('groups'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
@ -810,17 +810,17 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems = array();
if ($accessobject->check_view_access('MyDocuments')) {
$menuitems['inprocess'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>getMLText('documents_in_process'));
$menuitems['all_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>getMLText('all_documents'));
$menuitems['inprocess'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyDocuments.php?inProcess=1", 'label'=>getMLText('documents_in_process'));
$menuitems['all_documents'] = array('link'=>$this->params['settings']->_httpRoot."out/out.MyDocuments.php", 'label'=>getMLText('all_documents'));
}
if($this->params['workflowmode'] == 'traditional' || $this->params['workflowmode'] == 'traditional_only_approval') {
if ($accessobject->check_view_access('ReviewSummary'))
$menuitems['review_summary'] = array('link'=>"../out/out.ReviewSummary.php", 'label'=>getMLText('review_summary'));
$menuitems['review_summary'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ReviewSummary.php", 'label'=>getMLText('review_summary'));
if ($accessobject->check_view_access('ApprovalSummary'))
$menuitems['approval_summary'] = array('link'=>"../out/out.ApprovalSummary.php", 'label'=>getMLText('approval_summary'));
$menuitems['approval_summary'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ApprovalSummary.php", 'label'=>getMLText('approval_summary'));
} else {
if ($accessobject->check_view_access('WorkflowSummary'))
$menuitems['workflow_summary'] = array('link'=>"../out/out.WorkflowSummary.php", 'label'=>getMLText('workflow_summary'));
$menuitems['workflow_summary'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowSummary.php", 'label'=>getMLText('workflow_summary'));
}
if ($accessobject->check_view_access('ReceiptSummary'))
$menuitems['receipt_summary'] = array('link'=>"../out/out.ReceiptSummary.php", 'label'=>getMLText('receipt_summary'));
@ -843,32 +843,32 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if($accessobject->check_view_access(array('UsrMgr', 'RoleMgr', 'GroupMgr', 'UserList', 'Acl'))) {
$menuitems['user_group_management'] = array('link'=>"#", 'label'=>getMLText('user_group_management'));
if ($accessobject->check_view_access('UsrMgr'))
$menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>getMLText('user_management'));
$menuitems['user_group_management']['children']['user_management'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UsrMgr.php", 'label'=>getMLText('user_management'));
if ($accessobject->check_view_access('RoleMgr'))
$menuitems['user_group_management']['children']['role_management'] = array('link'=>"../out/out.RoleMgr.php", 'label'=>getMLText('role_management'));
$menuitems['user_group_management']['children']['role_management'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RoleMgr.php", 'label'=>getMLText('role_management'));
if ($accessobject->check_view_access('GroupMgr'))
$menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>getMLText('group_management'));
$menuitems['user_group_management']['children']['group_management'] = array('link'=>$this->params['settings']->_httpRoot."out/out.GroupMgr.php", 'label'=>getMLText('group_management'));
if ($accessobject->check_view_access('UserList'))
$menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>getMLText('user_list'));
$menuitems['user_group_management']['children']['user_list'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UserList.php", 'label'=>getMLText('user_list'));
if ($accessobject->check_view_access('Acl'))
$menuitems['user_group_management']['children']['access_control'] = array('link'=>"../out/out.Acl.php", 'label'=>getMLText('access_control'));
$menuitems['user_group_management']['children']['access_control'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Acl.php", 'label'=>getMLText('access_control'));
}
if($accessobject->check_view_access(array('DefaultKeywords', 'Categories', 'AttributeMgr', 'WorkflowMgr', 'WorkflowStatesMgr', 'WorkflowActionsMgr'))) {
$menuitems['definitions'] = array('link'=>"#", 'label'=>getMLText('definitions'));
if ($accessobject->check_view_access('DefaultKeywords'))
$menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>getMLText('global_default_keywords'));
$menuitems['definitions']['children']['default_keywords'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DefaultKeywords.php", 'label'=>getMLText('global_default_keywords'));
if ($accessobject->check_view_access('Categories'))
$menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>getMLText('global_document_categories'));
$menuitems['definitions']['children']['document_categories'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Categories.php", 'label'=>getMLText('global_document_categories'));
if ($accessobject->check_view_access('AttributeMgr'))
$menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions'));
$menuitems['definitions']['children']['attribute_definitions'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions'));
if($this->params['workflowmode'] == 'advanced') {
if ($accessobject->check_view_access('WorkflowMgr'))
$menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows'));
$menuitems['definitions']['children']['workflows'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows'));
if ($accessobject->check_view_access('WorkflowStatesMgr'))
$menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>getMLText('global_workflow_states'));
$menuitems['definitions']['children']['workflow_states'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowStatesMgr.php", 'label'=>getMLText('global_workflow_states'));
if ($accessobject->check_view_access('WorkflowActionsMgr'))
$menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>getMLText('global_workflow_actions'));
$menuitems['definitions']['children']['workflow_actions'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowActionsMgr.php", 'label'=>getMLText('global_workflow_actions'));
}
}
@ -876,47 +876,47 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if($accessobject->check_view_access(array('Indexer', 'CreateIndex', 'IndexInfo'))) {
$menuitems['fulltext'] = array('link'=>"#", 'label'=>getMLText('fullsearch'));
if ($accessobject->check_view_access('Indexer'))
$menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>getMLText('update_fulltext_index'));
$menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php", 'label'=>getMLText('update_fulltext_index'));
if ($accessobject->check_view_access('CreateIndex'))
$menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>getMLText('create_fulltext_index'));
$menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CreateIndex.php", 'label'=>getMLText('create_fulltext_index'));
if ($accessobject->check_view_access('IndexInfo'))
$menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>getMLText('fulltext_info'));
$menuitems['fulltext']['children']['fulltext_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.IndexInfo.php", 'label'=>getMLText('fulltext_info'));
}
}
if($accessobject->check_view_access(array('BackupTools', 'LogManagement'))) {
$menuitems['backup_log_management'] = array('link'=>"#", 'label'=>getMLText('backup_log_management'));
if ($accessobject->check_view_access('BackupTools'))
$menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>getMLText('backup_tools'));
$menuitems['backup_log_management']['children'][] = array('link'=>$this->params['settings']->_httpRoot."out/out.BackupTools.php", 'label'=>getMLText('backup_tools'));
if ($this->params['logfileenable'])
if ($accessobject->check_view_access('LogManagement'))
$menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.LogManagement.php", 'label'=>getMLText('log_management'));
$menuitems['backup_log_management']['children'][] = array('link'=>$this->params['settings']->_httpRoot."out/out.LogManagement.php", 'label'=>getMLText('log_management'));
}
if($accessobject->check_view_access(array('ImportFS', 'ImportUsers', 'Statistic', 'Charts', 'Timeline', 'ObjectCheck', 'ExtensionMgr', 'Info'))) {
$menuitems['misc'] = array('link'=>"#", 'label'=>getMLText('misc'));
if ($accessobject->check_view_access('ImportFS'))
$menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>getMLText('import_fs'));
$menuitems['misc']['children']['import_fs'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ImportFS.php", 'label'=>getMLText('import_fs'));
if ($accessobject->check_view_access('ImportUsers'))
$menuitems['misc']['children']['import_users'] = array('link'=>"../out/out.ImportUsers.php", 'label'=>getMLText('import_users'));
$menuitems['misc']['children']['import_users'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ImportUsers.php", 'label'=>getMLText('import_users'));
if ($accessobject->check_view_access('Statistic'))
$menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>getMLText('folders_and_documents_statistic'));
$menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Statistic.php", 'label'=>getMLText('folders_and_documents_statistic'));
if ($accessobject->check_view_access('Charts'))
$menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>getMLText('charts'));
$menuitems['misc']['children']['charts'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Charts.php", 'label'=>getMLText('charts'));
if ($accessobject->check_view_access('Timeline'))
$menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>getMLText('timeline'));
$menuitems['misc']['children']['timeline'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Timeline.php", 'label'=>getMLText('timeline'));
if ($accessobject->check_view_access('SchedulerTaskMgr'))
$menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>"../out/out.SchedulerTaskMgr.php", 'label'=>getMLText('scheduler_task_mgr'));
$menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SchedulerTaskMgr.php", 'label'=>getMLText('scheduler_task_mgr'));
if ($accessobject->check_view_access('ObjectCheck'))
$menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>getMLText('objectcheck'));
$menuitems['misc']['children']['objectcheck'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ObjectCheck.php", 'label'=>getMLText('objectcheck'));
if ($accessobject->check_view_access('ExpiredDocuments'))
$menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>getMLText('documents_expired'));
$menuitems['misc']['children']['documents_expired'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ExpiredDocuments.php", 'label'=>getMLText('documents_expired'));
if ($accessobject->check_view_access('ExtensionMgr'))
$menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>getMLText('extension_manager'));
$menuitems['misc']['children']['extension_manager'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ExtensionMgr.php", 'label'=>getMLText('extension_manager'));
if ($accessobject->check_view_access('ClearCache'))
$menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>getMLText('clear_cache'));
$menuitems['misc']['children']['clear_cache'] = array('link'=>$this->params['settings']->_httpRoot."out/out.ClearCache.php", 'label'=>getMLText('clear_cache'));
if ($accessobject->check_view_access('Info'))
$menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>getMLText('version_info'));
$menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info'));
}
if ($settings->_enableDebugMode) {
@ -936,15 +936,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
private function calendarOldNavigationBar($d){ /* {{{ */
$accessobject = $this->params['accessobject'];
$ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2];
echo "<id=\"first\"><a href=\"../out/out.CalendarOld.php?mode=y\" class=\"brand\">".getMLText("calendar")."</a>\n";
echo "<id=\"first\"><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=y\" class=\"brand\">".getMLText("calendar")."</a>\n";
echo "<div class=\"nav-collapse col2\">\n";
echo "<ul class=\"nav\">\n";
echo "<li><a href=\"../out/out.CalendarOld.php?mode=w".$ds."\">".getMLText("week_view")."</a></li>\n";
echo "<li><a href=\"../out/out.CalendarOld.php?mode=m".$ds."\">".getMLText("month_view")."</a></li>\n";
echo "<li><a href=\"../out/out.CalendarOld.php?mode=y".$ds."\">".getMLText("year_view")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=w".$ds."\">".getMLText("week_view")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=m".$ds."\">".getMLText("month_view")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.CalendarOld.php?mode=y".$ds."\">".getMLText("year_view")."</a></li>\n";
if($accessobject->check_view_access(array('AddEvent')))
echo "<li><a href=\"../out/out.AddEvent.php\">".getMLText("add_event")."</a></li>\n";
echo "<li><a href=\"".$this->params['settings']->_httpRoot."out/out.AddEvent.php\">".getMLText("add_event")."</a></li>\n";
echo "</ul>\n";
echo "</div>\n";
return;
@ -956,7 +956,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems = array();
if($accessobject->check_view_access(array('AddEvent')))
$menuitems['addevent'] = array('link'=>"../out/out.AddEvent.php", 'label'=>getMLText('add_event'));
$menuitems['addevent'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddEvent.php", 'label'=>getMLText('add_event'));
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('calendarNavigationBar'))
@ -1560,7 +1560,7 @@ $(document).ready(function() {
$content .= $this->getModalBoxLink(
array(
'target' => 'docChooser'.$formid,
'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
'remote' => $this->params['settings']->_httpRoot."out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
'class' => 'btn btn-secondary',
'title' => getMLText('document').'…'
));
@ -1627,7 +1627,7 @@ function folderSelected<?php echo $formid ?>(id, name) {
$content .= $this->getModalBoxLink(
array(
'target' => 'folderChooser'.$formid,
'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
'remote' => $this->params['settings']->_httpRoot."out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
'class' => 'btn btn-secondary',
'title' => getMLText('folder').'…'
));
@ -1702,7 +1702,7 @@ $(document).ready(function() {
$content .= $this->getModalBoxLink(
array(
'target' => 'keywordChooser',
'remote' => "../out/out.KeywordChooser.php?target=".$formName,
'remote' => $this->params['settings']->_httpRoot."out/out.KeywordChooser.php?target=".$formName,
'class' => 'btn btn-secondary',
'title' => getMLText('keywords').'…'
));
@ -1777,7 +1777,7 @@ $(document).ready(function() {
$tmp = array();
foreach($attrs as $attr) {
if($targetfolder = $dms->getFolder(intval($attr)))
$tmp[] = '<a href="../out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1786,7 +1786,7 @@ $(document).ready(function() {
$tmp = array();
foreach($attrs as $attr) {
if($targetdoc = $dms->getDocument(intval($attr)))
$tmp[] = '<a href="../out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1966,7 +1966,7 @@ $(document).ready(function() {
$content .= $this->getModalBoxLink(
array(
'target' => 'dropfolderChooser',
'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
'remote' => $this->params['settings']->_httpRoot."out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
'class' => 'btn btn-secondary',
'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")).'…'
));
@ -2355,19 +2355,19 @@ $(function() {
*/
function __printTreeNavigation($folderid, $showtree){ /* {{{ */
if ($showtree==1){
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"fa fa-minus-circle\"></i></a>", true);
$this->contentHeading("<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"fa fa-minus-circle\"></i></a>", true);
$this->contentContainerStart();
?>
<script language="JavaScript">
function folderSelected(id, name) {
window.location = '../out/out.ViewFolder.php?folderid=' + id;
window.location = '<?= $this->params['settings']->_httpRoot ?>out/out.ViewFolder.php?folderid=' + id;
}
</script>
<?php
$this->printNewTreeNavigation($folderid, M_READ, 0, '');
$this->contentContainerEnd();
} else {
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);
$this->contentHeading("<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);
}
} /* }}} */
@ -2456,7 +2456,7 @@ $(function() {
},
\"callback\": function(result) {
if(result) {
$.get('../op/op.Ajax.php',
$.get('".$this->params['settings']->_httpRoot."op/op.Ajax.php',
{ command: 'deletedocument', id: id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -2536,7 +2536,7 @@ $(function() {
},
\"callback\": function(result) {
if(result) {
$.get('../op/op.Ajax.php',
$.get('".$this->params['settings']->_httpRoot."op/op.Ajax.php',
{ command: 'deletefolder', id: id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -2599,9 +2599,9 @@ $(function() {
$content = '';
$objid = $object->getId();
if($object->isType('document')) {
$content .= '<a class="access-document-btn" href="../out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
$content .= '<a class="access-document-btn" href="'.$this->params['settings']->_httpRoot.'out/out.DocumentAccess.php?documentid='.$objid.'" title="'.getMLText('edit_document_access').'"><i class="fa fa-bolt"></i></a>';
} elseif($object->isType('folder')) {
$content .= '<a class="access-folder-btn" href="../out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
$content .= '<a class="access-folder-btn" href="'.$this->params['settings']->_httpRoot.'out/out.FolderAccess.php?folderid='.$objid.'" title="'.getMLText('edit_folder_access').'"><i class="fa fa-bolt"></i></a>';
}
if($return)
return $content;
@ -2823,7 +2823,7 @@ $(document).ready( function() {
},
\"callback\": function(result) {
if(result) {
$.post('../op/op.AttributeMgr.php',
$.post('".$this->params['settings']->_httpRoot."op/op.AttributeMgr.php',
{ action: 'removeattrvalue', attrdefid: id, attrvalue: attrvalue, formtoken: formtoken },
function(data) {
if(data.success) {
@ -2867,7 +2867,7 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
$(ev.currentTarget).parent().toggleClass('selected');
} else {
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
window.location = '../out/out.ViewDocument.php?documentid=' + attr_id;
window.location = '<?= $this->params['settings']->_httpRoot ?>out/out.ViewDocument.php?documentid=' + attr_id;
}
});
<?php
@ -2894,7 +2894,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
attr_id = $(ev.currentTarget).parent().data('target-id');
if(typeof attr_id == 'undefined')
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
window.location = '../out/out.ViewFolder.php?folderid=' + attr_id;
window.location = '<?= $this->params['settings']->_httpRoot ?>out/out.ViewFolder.php?folderid=' + attr_id;
}
});
<?php
@ -3009,9 +3009,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= "<td>";
if (file_exists($dms->contentDir . $latestContent->getPath())) {
if($accessop->check_controller_access('Download', array('action'=>'version')))
$content .= "<a draggable=\"false\" href=\"../op/op.Download.php?documentid=".$docID."&version=".$version."\">";
$content .= "<a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$docID."&version=".$version."\">";
if($previewer->hasPreview($latestContent)) {
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->params['settings']->_httpRoot."op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
} else {
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" ".($previewwidth ? "width=\"".$previewwidth."\"" : "")."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
}
@ -3025,7 +3025,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
if($onepage)
$content .= "<b".($onepage ? ' title="Id:'.$document->getId().'"' : '').">".htmlspecialchars($document->getName()) . "</b>";
else
$content .= "<a draggable=\"false\" href=\"../out/out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
$content .= "<a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
if(isset($extracontent['below_title']))
$content .= $extracontent['below_title'];
$content .= "<br />";
@ -3103,7 +3103,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
}
}
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= '<a href="../out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
@ -3117,7 +3117,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="../out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3186,11 +3186,11 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content = '';
if(!$skipcont)
$content .= $this->folderListRowStart($subFolder);
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
$content .= "<td><a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
if($onepage)
$content .= "<td class=\"wordbreak\" style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
else
$content .= "<td class=\"wordbreak\"><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
$content .= "<td class=\"wordbreak\"><a draggable=\"false\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
if(isset($extracontent['below_title']))
$content .= $extracontent['below_title'];
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
@ -3244,7 +3244,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
}
if ($accessop->check_view_access('EditFolder')) {
if($subFolderAccessMode >= M_READWRITE) {
$content .= '<a class_="btn btn-mini" href="../out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
$content .= '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
@ -3256,7 +3256,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="../out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3528,14 +3528,14 @@ $(document).ready(function() {
if($accessop->check_controller_access('Download', array('action'=>'review')))
if($rec['file']) {
echo "<br />";
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$document->getID()."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
}
break;
case "approval":
if($accessop->check_controller_access('Download', array('action'=>'approval')))
if($rec['file']) {
echo "<br />";
echo "<a href=\"../op/op.Download.php?documentid=".$document->getID()."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
echo "<a href=\"".$this->params['settings']->_httpRoot."op/op.Download.php?documentid=".$document->getID()."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
}
break;
}

View File

@ -71,7 +71,7 @@ function initMost() {
* strength on each change to the passwod field.
*/
$(".pwd").passStrength({ /* {{{ */
url: "../op/op.Ajax.php",
url: seeddms_webroot+"op/op.Ajax.php",
onChange: function(data, target) {
pwsp = 100*data.score;
$('#'+target+' div.bar').width(pwsp+'%');
@ -114,7 +114,7 @@ function initMost() {
* type: type of object (D=doc, F=folder, S=searchterm)
* name: name of object
*/
$.get('../out/out.Search.php', data, function(data) {
$.get(seeddms_webroot+'out/out.Search.php', data, function(data) {
process(data);
});
},
@ -131,11 +131,11 @@ function initMost() {
updater: function (item) {
if(item.id) {
if(item.type == 'D')
document.location = "../out/out.ViewDocument.php?documentid=" + item.id;
document.location = seeddms_webroot+"out/out.ViewDocument.php?documentid=" + item.id;
else
document.location = "../out/out.ViewFolder.php?folderid=" + item.id;
document.location = seeddms_webroot+"out/out.ViewFolder.php?folderid=" + item.id;
} else
document.location = "../out/out.Search.php?query=" + encodeURIComponent(item.value);
document.location = seeddms_webroot+"out/out.Search.php?query=" + encodeURIComponent(item.value);
return item.value;
},
sorter: function(items) {
@ -190,7 +190,7 @@ function initMost() {
minLength: 3,
source: function(query, process) {
// console.log(this.options);
$.get('../op/op.Ajax.php', { command: 'searchdocument', query: query, limit: 8 }, function(data) {
$.get(seeddms_webroot+'op/op.Ajax.php', { command: 'searchdocument', query: query, limit: 8 }, function(data) {
process(data);
});
},
@ -220,7 +220,7 @@ function initMost() {
minLength: 3,
source: function(query, process) {
// console.log(this.options);
$.get('../op/op.Ajax.php', { command: 'searchfolder', query: query, limit: 8 }, function(data) {
$.get(seeddms_webroot+'op/op.Ajax.php', { command: 'searchfolder', query: query, limit: 8 }, function(data) {
process(data);
});
},
@ -319,12 +319,12 @@ $(document).ready( function() {
attr_msg = $(ev.currentTarget).attr('msg');
type = attr_rel.substring(0, 1) == 'F' ? 'folder' : 'document';
id = attr_rel.substring(1);
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'addtoclipboard', type: type, id: id },
function(data) {
if(data.success) {
$("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard')
$("#main-clipboard").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=menuclipboard')
noty({
text: attr_msg,
type: 'success',
@ -354,12 +354,12 @@ $(document).ready( function() {
attr_msg = $(ev.currentTarget).attr('msg');
type = attr_rel.substring(0, 1) == 'F' ? 'folder' : 'document';
id = attr_rel.substring(1);
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'removefromclipboard', type: type, id: id },
function(data) {
if(data.success) {
$("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard')
$("#main-clipboard").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=menuclipboard')
noty({
text: attr_msg,
type: 'success',
@ -388,12 +388,12 @@ $(document).ready( function() {
attr_rel = $(ev.currentTarget).attr('rel');
attr_msg = $(ev.currentTarget).attr('msg');
id = attr_rel;
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'tooglelockdocument', formtoken: $(ev.currentTarget).data('formtoken'), id: id },
function(data) {
if(data.success) {
//$("#table-row-document-"+id).html('Loading').load('../op/op.Ajax.php?command=view&view=documentlistrow&id='+id)
$("#table-row-document-"+id).html('Loading').load('../out/out.ViewDocument.php?action=documentlistitem&documentid='+id)
$("#table-row-document-"+id).html('Loading').load(seeddms_webroot+'out/out.ViewDocument.php?action=documentlistitem&documentid='+id)
noty({
text: attr_msg,
type: 'success',
@ -423,7 +423,7 @@ $(document).ready( function() {
attr_dest = $(ev.currentTarget).attr('dest');
attr_msg = $(ev.currentTarget).attr('msg');
attr_formtoken = $(ev.currentTarget).attr('formtoken');
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'movefolder', folderid: attr_source, targetfolderid: attr_dest, formtoken: attr_formtoken },
function(data) {
if(data.success) {
@ -448,7 +448,7 @@ $(document).ready( function() {
attr_dest = $(ev.currentTarget).attr('dest');
attr_msg = $(ev.currentTarget).attr('msg');
attr_formtoken = $(ev.currentTarget).attr('formtoken');
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'movedocument', docid: attr_source, targetfolderid: attr_dest, formtoken: attr_formtoken },
function(data) {
if(data.success) {
@ -471,7 +471,7 @@ $(document).ready( function() {
// console.log($(ev.target).parent().children('[name=missing-lang-key]').val());
// console.log($(ev.target).parent().children('[name=missing-lang-lang]').val());
// console.log($(ev.target).parent().children('[name=missing-lang-translation]').val());
$.ajax('../op/op.Ajax.php', {
$.ajax(seeddms_webroot+'op/op.Ajax.php', {
type:"POST",
async:true,
dataType:"json",
@ -586,8 +586,8 @@ $(document).ready( function() {
success: function(data){
if(data.success) {
if(element.data('param1') == 'command=clearclipboard') {
$("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard')
$("#main-clipboard").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=menuclipboard')
}
noty({
text: data.message,
@ -618,7 +618,7 @@ $(document).ready( function() {
$("body").on("blur", "span.editable", function(e) { /* {{{ */
console.log($(this).data('document'));
e.preventDefault();
$.post( "../op/op.Ajax.php", { command: "setdocumentname", id: $(this).data('document'), formtoken: $(this).data('formtoken'), name: $(this).text() })
$.post(seeddms_webroot+"op/op.Ajax.php", { command: "setdocumentname", id: $(this).data('document'), formtoken: $(this).data('formtoken'), name: $(this).text() })
.done(function( data ) {
noty({
text: data.message,
@ -646,12 +646,12 @@ function onAddClipboard(ev) { /* {{{ */
source_id = source_info.id;
formtoken = source_info.formtoken;
if(source_type == 'document' || source_type == 'folder') {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'addtoclipboard', type: source_type, id: source_id },
function(data) {
if(data.success) {
$("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard')
$("#main-clipboard").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=mainclipboard')
$("#menu-clipboard div").html('Loading').load(seeddms_webroot+'out/out.Clipboard.php?action=menuclipboard')
noty({
text: data.message,
type: 'success',
@ -679,7 +679,7 @@ function onAddClipboard(ev) { /* {{{ */
} /* }}} */
(function( SeedDMSUpload, $, undefined ) { /* {{{ */
var ajaxurl = "../op/op.Ajax.php";
var ajaxurl = seeddms_webroot+"op/op.Ajax.php";
var editBtnLabel = "Edit";
var abortBtnLabel = "Abort";
var maxFileSize = 100000;
@ -744,7 +744,7 @@ function onAddClipboard(ev) { /* {{{ */
theme: 'defaultTheme',
timeout: 1500
});
status.statusbar.after($('<a href="../out/out.EditDocument.php?documentid=' + data.data + '" class="btn btn-mini btn-primary">' + editBtnLabel + '</a>'));
status.statusbar.after($('<a href="'+seeddms_webroot+'out/out.EditDocument.php?documentid=' + data.data + '" class="btn btn-mini btn-primary">' + editBtnLabel + '</a>'));
if(callback) {
callback();
}
@ -946,7 +946,7 @@ $(document).ready(function() { /* {{{ */
"label" : "<i class='fa fa-remove'></i> "+trans.move_document,
"className" : "btn-danger",
"callback": function() {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'movedocument', docid: source_id, targetfolderid: target_id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -977,7 +977,7 @@ $(document).ready(function() { /* {{{ */
}
});
url = "../out/out.MoveDocument.php?documentid="+source_id+"&targetid="+target_id;
url = seeddms_webroot+"out/out.MoveDocument.php?documentid="+source_id+"&targetid="+target_id;
// document.location = url;
} else if(source_type == 'folder' && source_id != target_id) {
var bootbox_message = trans.confirm_move_folder;
@ -996,7 +996,7 @@ $(document).ready(function() { /* {{{ */
"label" : "<i class='fa fa-remove'></i> "+trans.move_folder,
"className" : "btn-danger",
"callback": function() {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'movefolder', folderid: source_id, targetfolderid: target_id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -1027,7 +1027,7 @@ $(document).ready(function() { /* {{{ */
}
});
url = "../out/out.MoveFolder.php?folderid="+source_id+"&targetid="+target_id;
url = seeddms_webroot+"out/out.MoveFolder.php?folderid="+source_id+"&targetid="+target_id;
// document.location = url;
}
}
@ -1057,7 +1057,7 @@ $(document).ready(function() { /* {{{ */
"label" : "<i class='fa fa-remove'></i> "+trans.transfer_content,
"className" : "btn-danger",
"callback": function() {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'transfercontent', docid: source_id, targetdocumentid: target_id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -1089,7 +1089,7 @@ $(document).ready(function() { /* {{{ */
"label" : trans.link_document,
"className" : "btn-danger",
"callback": function() {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'linkdocument', docid: source_id, targetdocumentid: target_id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -1119,7 +1119,7 @@ $(document).ready(function() { /* {{{ */
}
});
}
url = "../out/out.MoveDocument.php?documentid="+source_id+"&targetid="+target_id;
url = seeddms_webroot+"out/out.MoveDocument.php?documentid="+source_id+"&targetid="+target_id;
// document.location = url;
}
}
@ -1224,7 +1224,7 @@ $(document).ready(function() { /* {{{ */
"label" : "<i class='fa fa-remove'></i> "+trans.move_document,
"class" : "btn-danger",
"callback": function() {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'movedocument', docid: source_id, targetfolderid: target_id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -1258,14 +1258,14 @@ $(document).ready(function() { /* {{{ */
}
}]);
url = "../out/out.MoveDocument.php?documentid="+source_id+"&targetid="+target_id;
url = seeddms_webroot+"out/out.MoveDocument.php?documentid="+source_id+"&targetid="+target_id;
// document.location = url;
} else if(source_type == 'folder' && source_id != target_id) {
bootbox.dialog(trans.confirm_move_folder, [{
"label" : "<i class='fa fa-remove'></i> "+trans.move_folder,
"class" : "btn-danger",
"callback": function() {
$.get('../op/op.Ajax.php',
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'movefolder', folderid: source_id, targetfolderid: target_id, formtoken: formtoken },
function(data) {
if(data.success) {
@ -1299,7 +1299,7 @@ $(document).ready(function() { /* {{{ */
}
}]);
url = "../out/out.MoveFolder.php?folderid="+source_id+"&targetid="+target_id;
url = seeddms_webroot+"out/out.MoveFolder.php?folderid="+source_id+"&targetid="+target_id;
// document.location = url;
}
});
@ -1356,7 +1356,7 @@ $(document).ready(function() { /* {{{ */
var tasks = Array(
{name: 'checktasks', interval: 15, func:
checkTasks = function() {
$.ajax({url: '../out/out.Tasks.php',
$.ajax({url: seeddms_webroot+'out/out.Tasks.php',
type: 'GET',
dataType: "json",
data: {action: 'mytasks'},