mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-11 18:56:21 +00:00
moved config to extra file so you can update without re-writing your config every time. Just don't forget to reame it
This commit is contained in:
16
backend.php
16
backend.php
@@ -1,10 +1,20 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
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',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
define('ROOT', dirname(__FILE__));
|
||||
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
|
||||
|
||||
require_once (ROOT . DS . 'inc' . DS . 'core.php');
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
if(SHOW_ERRORS)
|
||||
ini_set('display_errors','On');
|
||||
else ini_set('display_errors','Off');
|
||||
|
||||
|
||||
$pm = new PictshareModel();
|
||||
|
||||
20
inc/example.config.inc.php
Normal file
20
inc/example.config.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
// shall we log all uploaders IP addresses?
|
||||
define('LOG_UPLOADER', true);
|
||||
|
||||
//how many resizes may one image have?
|
||||
//-1 = infinite
|
||||
//0 = none
|
||||
define('MAX_RESIZED_IMAGES',20);
|
||||
|
||||
//when the user requests a resize. Can the resized image be bigger than the original?
|
||||
define('ALLOW_BLOATING', false);
|
||||
|
||||
//Force a specific domain for this server. If set to false, will autodetect.
|
||||
//Format: https://your.domain.name/
|
||||
define('FORCE_DOMAIN', false);
|
||||
|
||||
//Shall errors be displayed to the user?
|
||||
//For dev environments: true, in production: false
|
||||
define('SHOW_ERRORS', false);
|
||||
22
index.php
22
index.php
@@ -1,22 +1,20 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// shall we log all uploaders IP addresses?
|
||||
define('LOG_UPLOADER', true);
|
||||
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');
|
||||
|
||||
//how many resizes may one image have? set it to -1 for infinite resizes
|
||||
define('MAX_RESIZED_IMAGES',4);
|
||||
|
||||
//when the user requests a resize. Can the resized image be bigger than the original?
|
||||
define('ALLOW_BLOATING', false);
|
||||
|
||||
|
||||
//don't change stuff beyond this point
|
||||
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
|
||||
if(FORCE_DOMAIN)
|
||||
define('DOMAINPATH',FORCE_DOMAIN);
|
||||
else
|
||||
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
define('ROOT', dirname(__FILE__));
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
ini_set('display_errors','On');
|
||||
if(SHOW_ERRORS)
|
||||
ini_set('display_errors','On');
|
||||
else ini_set('display_errors','Off');
|
||||
|
||||
include_once(ROOT.DS.'inc'.DS.'core.php');
|
||||
$url = $_GET['url'];
|
||||
|
||||
Reference in New Issue
Block a user