mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-11 18:56:21 +00:00
29 lines
880 B
PHP
29 lines
880 B
PHP
<?php
|
|
|
|
define('DS', DIRECTORY_SEPARATOR);
|
|
define('ROOT', dirname(__FILE__));
|
|
define('CLI', true);
|
|
define('PATH',((dirname($_SERVER['PHP_SELF'])=='/'||dirname($_SERVER['PHP_SELF'])=='/index.php')?'/':dirname($_SERVER['PHP_SELF']).'/'));
|
|
|
|
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']);
|
|
error_reporting(E_ALL & ~E_NOTICE);
|
|
if(SHOW_ERRORS)
|
|
ini_set('display_errors','On');
|
|
else ini_set('display_errors','Off');
|
|
include_once(ROOT.DS.'inc'.DS.'core.php');
|
|
|
|
$action = $argv[2];
|
|
$params = $argv;
|
|
|
|
//lose first param (self name)
|
|
array_shift($params);
|
|
|
|
$model = new PictshareModel();
|
|
$model->backend($params); |