<?php

$_url = $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")) . "/";
if (!isset($_root))
	$_root = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']) . "/";

$_path = Array (
	/* BASE */
	"root" => $_root,
	"root_here" => $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']) . "/",
	"http" => "http://" . $_url,
	"https" => "https://" . $_url,
	"url" => "http".(array_key_exists("HTTPS",$_SERVER) ? "s" : "")."://" . $_url,
);

$_path = array_merge($_path,Array (
	/* ENGINE */
	"core" => $_path['root'] . "core/",
	"plugins" => $_path['root_here'] . "plugins/",
	"html" => $_path['root_here'] . "html/",
	"plugins_url" => $_path['url'] . "plugins/",
	"styles" => $_path['url'] . "styles/",
	"images" => $_path['url'] . "images/",
	"image" => $_path['root_here'] . "images/",
	)
);

$_path = array_merge($_path,Array (
	/* CORE */
	"core_error" => $_path['core'] . "error/",
	"core_class" => $_path['core'] . "class/",
	"core_tmpl" => $_path['core'] . "tmpl/",
	"core_flags" => $_path['core'] . "flags/",
	"core_flags_url" => $_path['url'] . $_root . "core/flags/",
	"core_plugin" => $_path['core'] . "plugin/",
	"core_plugin_url" => $_path['url'] . $_root . "core/plugin/",
	"core_modules" => $_path['core'] . "modules/",
	"core_modules_url" => $_path['url'] . $_root . "core/modules/",
	
	/* IMAGES */
	"image_design" => $_path['images'] . "design/",
	"image_icon" => $_path['images'] . "icons/",
	)
);

?>