Esempio n. 1
0
 function html_start_sub1()
 {
     extract(tep_load('defs', 'http_validator', 'database', 'message_stack'));
     // check if the install directory exists, and warn of its existence
     if (DEFAULT_WARNING_INSTALL_EXISTS == 'true') {
         $check_dir = tep_path() . 'install';
         if (is_dir($check_dir)) {
             $install_string = sprintf(WARNING_INSTALL_DIRECTORY_EXISTS, $check_dir);
             $msg->add($install_string, 'error', 'header');
         }
     }
     switch ($cDefs->script) {
         default:
             break;
     }
     $http->send_cookies();
     $http->set_headers('Content-Type: text/html; charset=' . CHARSET, 'P3P: CP="NOI ADM DEV PSAi COM NAV STP IND"');
     $http->send_headers();
 }
Esempio n. 2
0
            $base = implode('/', $tmp_array) . '/';
            if (!strlen(ini_get('date.timezone')) && function_exists('date_default_timezone_get')) {
                date_default_timezone_set(@date_default_timezone_get());
            }
        }
        $full = $base . $file;
        return $full;
    }
}
tep_path();
// include server parameters
if (is_file(tep_path('includes/configure.php'))) {
    require_once tep_path('includes/configure.php');
}
if (!defined('DB_SERVER') || strlen(DB_SERVER) < 1) {
    if (is_dir(tep_path('install'))) {
        header('Location: install/index.php');
        exit;
    }
    die('Critical: Invalid configuration file - Could not locate installation folder for the I-Metrics CMS.');
}
if (isset($g_exit_path)) {
    return;
}
// Initialize database and basic functions
require_once DIR_FS_INCLUDES . 'init_early.php';
if (defined('HTTP_EXTERNAL_PATH')) {
    $g_external_path = HTTP_EXTERNAL_PATH;
}
define('PLUGINS_AJAX_PREFIX', 'ajax_');
require DIR_FS_CLASSES . 'plugins_front.php';
Esempio n. 3
0
$_GET['w'] = (int) $_GET['w'];
$_GET['h'] = (int) $_GET['h'];
if (!$_GET['w'] || !$_GET['h']) {
    header('Content-type: image/jpeg');
    $src = imagecreate(75, 150);
    // Create a blank image
    $bgc = imagecolorallocate($src, 255, 255, 255);
    $tc = imagecolorallocate($src, 0, 0, 0);
    imagefilledrectangle($src, 0, 0, 75, 150, $bgc);
    imagestring($src, 1, 5, 5, 'Error', $tc);
    imagejpeg($src, '', 75);
    exit;
}
$image_name = $base_image . $pre_ext . $_GET['w'] . '-' . $_GET['h'];
$image_time = filemtime($local_image);
$filename = tep_path($image_name . '.jpg');
if (is_file($filename)) {
    $thumb_time = filemtime($filename);
    if ($thumb_time < $image_time) {
        unlink($filename);
    }
}
$oldtime = time() - 86400;
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
    $if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']);
    $expiry = strtotime($if_modified_since);
    if ($expiry > $oldtime) {
        $expiry = gmdate('D, d M Y H:i:s', $expiry + 86400) . ' GMT';
        header('Pragma: private');
        header("Expires: " . $expiry);
        header('Cache-Control: must-revalidate, max-age=86400, s-maxage=86400, private');
Esempio n. 4
0
 function display_common_content($input_array, $pos)
 {
     $cStrings =& $this->strings;
     $method = $this->options['download_method'];
     for ($i = 0, $j = count($input_array); $i < $j; $i++) {
         $name = $input_array[$i]['content_name'];
         $text = $input_array[$i]['content_text'];
         $filename = $input_array[$i]['filename'];
         $downloads = $input_array[$i]['downloads'];
         // Clear empty entries
         if (empty($filename) || !is_file(tep_path($filename))) {
             unset($input_array[$i]);
         }
     }
     if ($pos == 0 || $pos == 1) {
         require $this->form_box;
     } else {
         require $this->form_text;
     }
 }
Esempio n. 5
0
            $base = rtrim($base, '/');
            $tmp_array = explode('/', $base);
            array_pop($tmp_array);
            $base = implode('/', $tmp_array) . '/';
            if (!strlen(ini_get('date.timezone')) && function_exists('date_default_timezone_get')) {
                date_default_timezone_set(@date_default_timezone_get());
            }
        }
        $full = $base . $file;
        return $full;
    }
}
tep_path();
// include server parameters
if (is_file(tep_path('includes/configure.php'))) {
    require_once tep_path('includes/configure.php');
    // include web-front parameters
    include_once DIR_FS_INCLUDES . 'configure_site.php';
}
if (!defined('DB_SERVER') || strlen(DB_SERVER) < 1) {
    die('<b>Critical</b>: Invalid configuration file - Make sure you installed the I-Metrics CMS');
}
$g_media = array();
$g_ajax = false;
require DIR_FS_INCLUDES . 'init_early.php';
$g_debug->get('reset_timer', 'start_timer');
// Compatibility functions
require_once DIR_FS_FUNCTIONS . 'compatibility.php';
if (GZIP_COMPRESSION == 'true') {
    //ob_start('ob_gzhandler');
    ob_start();