mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			76 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| //    SeedDMS (Formerly MyDMS) Document Management System
 | |
| //    Copyright (C) 2002-2005  Markus Westphal
 | |
| //    Copyright (C) 2006-2008 Malcolm Cowe
 | |
| //
 | |
| //    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.LogInit.php");
 | |
| include("inc/inc.Utils.php");
 | |
| include("inc/inc.Language.php");
 | |
| include("inc/inc.Init.php");
 | |
| include("inc/inc.Extension.php");
 | |
| include("inc/inc.DBInit.php");
 | |
| include("inc/inc.Authentication.php");
 | |
| 
 | |
| require "vendor/autoload.php";
 | |
| 
 | |
| $c = new \Slim\Container(); //Create Your container
 | |
| $c['notFoundHandler'] = function ($c) use ($settings) {
 | |
|     return function ($request, $response) use ($c, $settings) {
 | |
|         return $c['response']
 | |
|             ->withStatus(302)
 | |
|             ->withHeader('Location', isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_httpRoot.$settings->_siteDefaultPage : $settings->_httpRoot."out/out.ViewFolder.php");
 | |
|     };
 | |
| };
 | |
| $app = new \Slim\App($c);
 | |
| 
 | |
| if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
 | |
| 	foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
 | |
| 		if (method_exists($hookObj, 'addRoute')) {
 | |
| 			$hookObj->addRoute(array('dms'=>$dms, 'app'=>$app, 'settings'=>$settings));
 | |
| 		}
 | |
| 	}
 | |
| }
 | |
| 
 | |
| /*
 | |
| $app->any('/echo',
 | |
| 	function ($request, $response) use ($app) {
 | |
| 			echo "lasjf".$request->getBody();
 | |
| 	}
 | |
| );
 | |
| 
 | |
| $app->any('/[{path:.*}]', function($request, $response, $path = null) {
 | |
|     return $response->write($path ? 'subroute' : 'index');
 | |
| });
 | |
| */
 | |
| 
 | |
| $app->run();
 | |
| exit;
 | |
| 
 | |
| header("Location: ". (isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php"));
 | |
| ?>
 | |
| <html>
 | |
| <head>
 | |
| 	<title>SeedDMS</title>
 | |
| </head>
 | |
| 
 | |
| <body>
 | |
| 
 | |
| 
 | |
| </body>
 | |
| </html>
 | 
