mirror of
https://codeberg.org/SeedDMS/paperless
synced 2024-11-26 07:22:08 +00:00
70 lines
2.5 KiB
PHP
70 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* MyDMS. Document Management System
|
|
* Copyright (C) 2002-2005 Markus Westphal
|
|
* Copyright (C) 2006-2008 Malcolm Cowe
|
|
* Copyright (C) 2010-2011 Matteo Lucarelli
|
|
* Copyright (C) 2010-2024 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.
|
|
*/
|
|
|
|
if(!empty($_SERVER['SEEDDMS_HOME']))
|
|
require_once($_SERVER['SEEDDMS_HOME'].'/inc/inc.Settings.php');
|
|
else
|
|
require_once("../../../inc/inc.Settings.php");
|
|
require_once("inc/inc.Utils.php");
|
|
require_once("inc/inc.LogInit.php");
|
|
require_once("inc/inc.Language.php");
|
|
require_once("inc/inc.Init.php");
|
|
require_once("inc/inc.Extension.php");
|
|
require_once("inc/inc.DBInit.php");
|
|
require_once("inc/inc.ClassUI.php");
|
|
require_once("inc/inc.Authentication.php");
|
|
|
|
require_once('ext/paperless/class.PaperlessView.php');
|
|
|
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
|
$view = UI::factory($theme, $tmp[1], array('dms' => $dms, 'user' => $user));
|
|
|
|
$v = new SeedDMS_Version();
|
|
if($v->majorVersion() > 5) {
|
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
|
if (!$accessop->check_view_access($view, $_GET)) {
|
|
UI::exitError(getMLText("admin_tools"), getMLText("access_denied"));
|
|
}
|
|
} else
|
|
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
|
|
|
|
$pview = null;
|
|
if (isset($_GET["view"])) {
|
|
$pview = SeedDMS_PaperlessView::getInstance($_GET['view'], $dms);
|
|
}
|
|
|
|
if($view) {
|
|
$view->setParam('accessobject', $accessop);
|
|
$view->setParam('showtree', showtree());
|
|
$view->setParam('pview', $pview);
|
|
$view->setParam('fulltextservice', $fulltextservice);
|
|
$view->setParam('logger', $logger);
|
|
$view->setParam('conversionmgr', $conversionmgr);
|
|
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
|
$view->setParam('previewconverters', $settings->_converters['preview']);
|
|
$view->setParam('timeout', $settings->_cmdTimeout);
|
|
$view($_GET);
|
|
exit;
|
|
}
|
|
|