Esempio n. 1
0
ini_set('session.gc_maxlifetime', $timelife);
if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
   $config['ie_cookie_lifetime'] == 1) &&
   (!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) ||
   $config['safari_cookie_lifetime'] == 1)) {
    ini_set('session.cookie_lifetime', $timelife);
}
session_start();

//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE  & ~E_WARNING;

//Call Gulliver Classes
Bootstrap::LoadThirdParty("smarty/libs", "Smarty.class");

//Loading the autoloader libraries feature
Bootstrap::registerSystemClasses();

G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['display_errors'] = $filter->validateInput($config['display_errors']);
$config['error_reporting'] = $filter->validateInput($config['error_reporting']);
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
$config['time_zone'] = $filter->validateInput($config['time_zone']);

// Do not change any of these settings directly, use env.ini instead
ini_set( 'display_errors', $config['display_errors']);
ini_set( 'error_reporting', $config['error_reporting']);
 /**
  * JSON decode
  *
  * @author Erik A.O. <erik@gmail.com, aortiz.erik@gmail.com>
  */
 public function json_decode($Json)
 {
     if (function_exists('json_decode')) {
         return json_decode($Json);
     } else {
         Bootstrap::LoadThirdParty('pear/json', 'class.json');
         $oJSON = new Services_JSON();
         return $oJSON->decode($Json);
     }
 }
Esempio n. 3
0
        default:
            if (substr($realPath, 0, 12) == 'rest-service') {
                $isRestRequest = true;
            } else {
                $realPath = explode('?', $realPath);
                $realPath[0] .= strpos(basename($realPath[0]), '.') === false ? '.php' : '';
                //NewRelic Snippet - By JHL
                transactionLog($realPath[0]);
                Bootstrap::streamFile($realPath[0]);
                die;
            }
    }
}
//virtual URI parser
// Call Gulliver Classes
Bootstrap::LoadThirdParty('smarty/libs', 'Smarty.class');
//loading the autoloader libraries feature
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
Bootstrap::registerClass('G', PATH_GULLIVER . "class.g.php");
Bootstrap::registerClass('System', PATH_HOME . "engine/classes/class.system.php");
// the request correspond to valid php page, now parse the URI
Bootstrap::parseURI(getenv("REQUEST_URI"), $isRestRequest);
//Bootstrap::mylog("sys_temp: ".SYS_TEMP);
if (Bootstrap::isPMUnderUpdating()) {
    header("location: /update/updating.php");
    if (DEBUG_TIME_LOG) {
        Bootstrap::logTimeByPage();
    }
    die;
}
// verify if index.html exists