-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.php
46 lines (39 loc) · 1.04 KB
/
index.php
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
<?PHP
/**
* Rapida CMS
*
* @link http://github.com/legale/rapida
* @author @Rumilan
*
*/
// Засекаем время
$time_start = microtime(true);
//включаем буффер
ob_start();
//запускаем наш главный контроллер, он выберет, что делать дальше
require_once('api/Simpla.php');
$simpla = new Simpla();
$simpla->root->action();
//Выход из админки
if(isset($_GET['logout']))
{
unset($_SESSION['admin']);
header("Location: ");
die;
}
// Отладочная информация
//показываем отладочную информацию из dtimer
if(dtimer::$enabled){
dtimer::show();
}
if( isset($_SESSION['admin']) ){
$time_end = microtime(true);
$exec_time = $time_end-$time_start;
$out = "<!--\r\n";
if(function_exists('memory_get_peak_usage')){
$out .= "memory peak usage: ".convert(memory_get_peak_usage(true))."\r\n";
}
$out .= "page generation time: ".convert_time($exec_time)."\r\n";
$out .= "-->";
print $out;
}