* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Class which outputs the html page for LogManagement view * * @category DMS * @package LetoDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class LetoDMS_View_LogManagement extends LetoDMS_Bootstrap_Style { function filelist($entries) { /* {{{ */ $print_header = true; foreach ($entries as $entry){ if ($print_header){ print "\n"; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n\n\n"; $print_header=false; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } if ($print_header) printMLText("empty_notify_list"); else print "
".getMLText("creation_date")."".getMLText("file_size")."
".$entry."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry)).""; print " ".getMLText("rm_file").""; print " "; print " ".getMLText("download").""; print " "; print " ".getMLText('view')." …"; print "
\n"; } /* }}} */ function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $contentdir = $this->params['contentdir']; $logname = $this->params['logname']; if(!$logname) { $this->htmlStartPage(getMLText("backup_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("log_management")); $handle = opendir($contentdir); $entries = array(); $wentries = array(); while ($e = readdir($handle)){ if (is_dir($contentdir.$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); $this->contentContainerEnd(); ?>
contentContainerStart(); $this->filelist($wentries); $this->contentContainerEnd(); ?>
htmlEndPage(); } elseif(file_exists($contentdir.$logname)){ // $this->htmlStartPage(getMLText("backup_tools")); // $this->contentSubHeading(sanitizeString($logname)); echo $logname."
\n";
			readfile($contentdir.$logname);
			echo "
\n"; // echo "\n\n"; } } /* }}} */ } ?>