=' ) ) { error_reporting( E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_RECOVERABLE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_USER_WARNING ); } else { error_reporting( E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR | E_USER_ERROR | E_USER_WARNING ); } //-------------------------------------------------------------------------- // XX NOTHING USER CONFIGURABLE XX NOTHING USER CONFIGURABLE XX //-------------------------------------------------------------------------- /** * IN IPB */ define( 'IN_IPB', 1 ); /** * SAFE MODE */ if ( IPS_AREA != 'public' ) { if ( function_exists('ini_get') ) { $test = @ini_get("safe_mode"); define( 'SAFE_MODE_ON', ( $test === TRUE OR $test == 1 OR $test == 'on' ) ? 1 : 0 ); } else { define( 'SAFE_MODE_ON', 1 ); } } else { define( 'SAFE_MODE_ON', 0 ); } //-------------------------------------------------------------------------- // NON-CONFIGURABLE: Attempt to sort out some defaults //-------------------------------------------------------------------------- if ( @function_exists("set_time_limit") == 1 and SAFE_MODE_ON == 0 ) { if ( defined('IPS_IS_SHELL') AND IPS_IS_SHELL ) { @set_time_limit(0); } else { @set_time_limit( IPS_AREA == 'public' ? 30 : 0 ); } } /** * Fix for PHP 5.1.x warning * * Sets default time zone to server time zone * @since 2.2.0.2006-05-19 */ if ( function_exists( 'date_default_timezone_set' ) ) { date_default_timezone_set( 'UTC' ); } //-------------------------------------------------------------------------- // NON-CONFIGURABLE: Global Functions //-------------------------------------------------------------------------- /** * Get an environment variable value * * Abstract layer allows us to user $_SERVER or getenv() * * @param string Env. Variable key * @return string * @since 2.2 */ function my_getenv($key) { $return = array(); if ( is_array( $_SERVER ) AND count( $_SERVER ) ) { if( isset( $_SERVER[$key] ) ) { $return = $_SERVER[$key]; } } if ( ! $return ) { $return = getenv($key); } return $return; } /** * json_encode function if not available in PHP * * @param mixed Anything, really * @return string * @since 3.0 */ if (!function_exists('json_encode')) { function json_encode( $a ) { require_once( IPS_KERNEL_PATH . 'PEAR/JSON/JSON.php' ); $json = new Services_JSON(); return $json->encode( $a ); } } /** * json_encode function if not available in PHP * * @param mixed Anything, really * @return string * @since 3.0 */ if (!function_exists('json_decode')) { function json_decode( $a, $assoc=false ) { require_once( IPS_KERNEL_PATH . 'PEAR/JSON/JSON.php' ); if ( $assoc === TRUE ) { $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE ); } else { $json = new Services_JSON(); } return $json->decode( $a ); } } /** * Exception error handler */ function IPS_exception_error( $error ) { @header( "Content-type: text/plain" ); print $error; exit(); } mb_internal_encoding('UTF-8'); ?>