<?php
/**
* PhotoHub Moldova
* Website: http://photo.hub.md/
*
* Copyright (c) 2009 Vartolomei Nicolae <nvartolomei@gmail.com>
* http://barttos.net Barttos <me@barttos.net>
*
* You are not able to use this software until i give you
* right for this. You are not have right to use this code
* in your comercial projects! Only for personal use! For
* any questions you can contact me by email or my site!
*
* @package core
*
*/
error_reporting(E_ALL);
/**
* Initializarea sesiei.
*/
session_start();
/**
* Aratam ca site-ul este accesat in mod normal.
*/
define("inSite", true);
/**
* Definim directoriul curent pentur a include alte fisiere.
*/
define("rootDir", dirname(__FILE__) . "/");
/**
* Definim directoriul tata pentru a accesa fisierele din subdomenii
* Definim backend_dir pentru module, clase si altele
*/
define("backendDir", realpath(rootDir . "../backend") . "/");
/**
* Chemeam fisierul cu configuri pentur a defini in contiunare
* statica si altele.
*/
require_once backendDir . "configs.php";
/**
* Definim staticDir care este setata in backend/configs.php fata de rootDir
*/
define("staticDir", realpath(rootDir . configs::$staticDir) . "/");
/**
* Pornim motorul pentru templateuri
*/
require_once backendDir . "classes/template.class.php";
$tpl = new bts_template;
$tpl->dir = staticDir;
/**
* Incarcam template-ul principal in motor
*/
$tpl->loadTemplate("tpl.html");
/**
* Bagam tot ce ne trebuie in template
*/
$tpl->set("{STATIC_URL}", configs::$staticUrl);
/**
* Compilam template-ul
*/
$tpl->compile("main");
/**
* Afisam user-ului
*/
echo $tpl->result["main"];
/*************************************************************************************/
/***************************** Un fel de debuggin ***********************************/
/*************************************************************************************/
echo "\n\n\n\n\n<!-- debuggin information -->\n\n";
echo " <!-- Este pornit ok? \"" . inSite . "\" -->\n";
echo " <!-- Root directory: \"" . rootDir . "\" -->\n";
echo " <!-- Backend directory: \"" . backendDir . "\" -->\n";
echo " <!-- First static directory: \"" . staticDir . "\" -->\n";
echo "\n";
echo " <!-- Cache is enabled: " . "false -->\n";
echo "<!-- /debuggin information -->";