View file altacms/includes/functions.php

File size: 1.66Kb
<?

/*
            _______________________________________
   ________|                                       |_________
  \        |             ALTA MINI CMS             |        /
   \       |            Программирование           |       /
    \      |        Алексей Тафинцев © 2006        |      /
    /      |_______________________________________|      \
   /___________)                               (___________\


*/

////////////////////////////////////////////////////////
// Описание: Extract info secure & fast

if ($HTTP_SESSION_VARS) {extract($HTTP_SESSION_VARS, EXTR_SKIP); }
if ($_SESSION) {extract($_SESSION, EXTR_SKIP); }
if ($HTTP_COOKIE_VARS) {extract($HTTP_COOKIE_VARS, EXTR_SKIP); }
if ($_COOKIE) {extract($_COOKIE, EXTR_SKIP); }
if ($HTTP_POST_VARS) {extract($HTTP_POST_VARS, EXTR_SKIP); }
if ($_POST) {extract($_POST, EXTR_SKIP); }
if ($HTTP_GET_VARS) {extract($HTTP_GET_VARS, EXTR_SKIP); }
if ($_GET) {extract($_GET, EXTR_SKIP); }
if ($HTTP_ENV_VARS) {extract($HTTP_ENV_VARS, EXTR_SKIP); }
if ($_ENV) {extract($_ENV, EXTR_SKIP); }

////////////////////////////////////////////////////////
// Описание: Notice fix

if(!isset($i)) $i = NULL;	
if(!isset($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = NULL;
if(!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];


////////////////////////////////////////////////////////
// Описание: Генерация страницы

$start_time = microtime();
$start_array = explode(" ",$start_time);
$start_time = $start_array[1] + $start_array[0];
$end_time = microtime();
$end_array = explode(" ",$end_time);
$end_time = $end_array[1] + $end_array[0];
$time = $end_time - $start_time;

?>