* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Class which outputs the html page for LogManagement view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style { function filelist($entries, $mode) { /* {{{ */ $accessop = $this->params['accessobject']; $print_header = true; foreach ($entries as $entry){ if ($print_header){ print "
\n"; print "\n"; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n\n\n"; $print_header=false; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } if ($print_header) printMLText("empty_list"); else print "
".getMLText("name")."".getMLText("creation_date")."".getMLText("file_size")."
".$entry."".getLongReadableDate(filectime($this->logdir.$entry))."".SeedDMS_Core_File::format_filesize(filesize($this->logdir.$entry)).""; if($accessop->check_view_access('RemoveLog')) { print " ".getMLText("rm_file").""; } if($accessop->check_controller_access('Download', array('action'=>'log'))) { print " "; print " ".getMLText("download").""; } print " "; print " ".getMLText('view')." …"; print "
\n"; } /* }}} */ function js() { /* {{{ */ header('Content-Type: application/javascript'); ?> $(document).ready( function() { $('i.icon-arrow-up').on('click', function(e) { //var checkBoxes = $("input[type=checkbox]"); //checkBoxes.prop("checked", !checkBoxes.prop("checked")); $('input[type=checkbox]').prop('checked', true); }); }); params['dms']; $user = $this->params['user']; $accessop = $this->params['accessobject']; $this->logdir = $this->params['logdir']; $logname = $this->params['logname']; $mode = $this->params['mode']; if(!$logname) { $this->htmlStartPage(getMLText("log_management")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("log_management")); $entries = array(); $wentries = array(); $handle = opendir($this->logdir); if($handle) { while ($e = readdir($handle)){ if (is_dir($this->logdir.$e)) continue; if (strpos($e,".log")==FALSE) continue; if (strcmp($e,"current.log")==0) continue; if(substr($e, 0, 6) == 'webdav') { $wentries[] = $e; } else { $entries[] = $e; } } closedir($handle); sort($entries); sort($wentries); $entries = array_reverse($entries); $wentries = array_reverse($wentries); } ?>
contentContainerStart(); $this->filelist($entries, 'web'); $this->contentContainerEnd(); ?>
contentContainerStart(); $this->filelist($wentries, 'webdav'); $this->contentContainerEnd(); ?>
contentEnd(); $this->htmlEndPage(); } elseif(file_exists($this->logdir.$logname)){ echo $logname."
\n";
			readfile($this->logdir.$logname);
			echo "
\n"; } else { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } } /* }}} */ } ?>