php PhotoHub Moldova Website http photo hub md Copyright 2009 Vartolom

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?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 -->";