add files to manager extensions

This commit is contained in:
Uwe Steinmann 2013-05-02 18:28:23 +02:00
parent a776d2eb0c
commit e7e89aba94
2 changed files with 96 additions and 0 deletions

37
out/out.ExtensionMgr.php Normal file
View File

@ -0,0 +1,37 @@
<?php
// SeedDMS. Document Management System
// Copyright (C) 2013 Uwe Steinmann
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
include("../inc/inc.DBInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.Extension.php");
if (!$user->isAdmin()) {
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
}
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
if($view) {
$view->show();
exit;
}
?>

View File

@ -0,0 +1,59 @@
<?php
/**
* Implementation of ExtensionMgr view
*
* @category DMS
* @package SeedDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2013 Uwe Steinmann
* @version Release: @package_version@
*/
/**
* Include parent class
*/
require_once("class.Bootstrap.php");
/**
* Class which outputs the html page for ExtensionMgr view
*
* @category DMS
* @package SeedDMS
* @author Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2013 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$logfileenable = $this->params['logfileenable'];
$enablefullsearch = $this->params['enablefullsearch'];
$this->htmlStartPage(getMLText("admin_tools"));
$this->globalNavigation();
$this->contentStart();
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
$this->contentContainerStart();
echo "<table class=\"table-condensed\">\n";
print "<thead>\n<tr>\n";
print "<th>".getMLText('name')."</th>\n";
print "<th>".getMLText('version')."</th>\n";
print "<th>".getMLText('author')."</th>\n";
print "</tr></thead>\n";
foreach($GLOBALS['EXT_CONF'] as $extname=>$extconf) {
echo "<tr>";
echo "<td>".$extconf['title']."<br /><small>".$extconf['description']."</small></td>";
echo "<td>".$extconf['version']."</td>";
echo "<td><a href=\"mailto:".$extconf['author']['email']."\">".$extconf['author']['name']."</a><br /><small>".$extconf['author']['company']."</small></td>";
echo "</tr>\n";
}
echo "</table>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>