mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-11 18:56:21 +00:00
stage 1 of v2
This commit is contained in:
28
index.php
28
index.php
@@ -1,27 +1,21 @@
|
||||
<?php
|
||||
session_cache_limiter("public");
|
||||
$expiry = 90; //days
|
||||
session_cache_expire($expiry * 24 * 60);
|
||||
session_start();
|
||||
// basic path definitions
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
define('ROOT', dirname(__FILE__));
|
||||
define('PATH',((dirname($_SERVER['PHP_SELF'])=='/'||dirname($_SERVER['PHP_SELF'])=='\\'||dirname($_SERVER['PHP_SELF'])=='/index.php'||dirname($_SERVER['PHP_SELF'])=='/backend.php')?'/':dirname($_SERVER['PHP_SELF']).'/'));
|
||||
|
||||
//loading default settings if exist
|
||||
if(!file_exists(ROOT.DS.'inc'.DS.'config.inc.php'))
|
||||
exit('Rename /inc/example.config.inc.php to /inc/config.inc.php first!');
|
||||
include_once(ROOT.DS.'inc'.DS.'config.inc.php');
|
||||
|
||||
if(FORCE_DOMAIN)
|
||||
define('DOMAINPATH',FORCE_DOMAIN);
|
||||
else
|
||||
define('DOMAINPATH',(($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST']);
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
if(SHOW_ERRORS)
|
||||
ini_set('display_errors','On');
|
||||
else ini_set('display_errors','Off');
|
||||
|
||||
//loading core and controllers
|
||||
include_once(ROOT.DS.'inc'.DS.'core.php');
|
||||
require_once(ROOT . DS . 'controllers' . DS. 'image'. DS . 'image.controller.php');
|
||||
require_once(ROOT . DS . 'controllers' . DS. 'text'. DS . 'text.controller.php');
|
||||
require_once(ROOT . DS . 'controllers' . DS. 'url'. DS . 'url.controller.php');
|
||||
require_once(ROOT . DS . 'controllers' . DS. 'video'. DS . 'video.controller.php');
|
||||
|
||||
|
||||
//send the URL to the architect. It'll know what to do
|
||||
$url = $_GET['url'];
|
||||
removeMagicQuotes();
|
||||
$GLOBALS['params'] = explode('/', $_GET['url']);
|
||||
callHook();
|
||||
architect($url);
|
||||
Reference in New Issue
Block a user