-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
35 lines (31 loc) · 905 Bytes
/
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
<?php
session_name("sistema");
date_default_timezone_set("America/Sao_Paulo");
mb_internal_encoding("UTF-8");
header('Content-Type: text/html; charset=utf-8');
ini_set('default_socket_timeout', '30');
ini_set("display_errors", "1");
ini_set("log_errors", "1");
ini_set("error_log", getcwd() . '/error.log');
ini_set('memory_limit', '1024M');
try
{
require 'config.php';
\DataHandle\Config::set('theme', 'Sample');
\DataHandle\Config::set('defaultPage', \DataHandle\Session::get('user') ? 'page\home\main' : '');
require 'sample.php';
App::getInstance()->handle();
}
catch (\Exception $e)
{
\Log::exception($e);
if (\DataHandle\Server::getInstance()->isAjax())
{
toast($e->getMessage(), 'danger');
echo App::prepareResponse();
}
else
{
echo 'Error: ' . $e->getMessage() . ' file: ' . $e->getFile() . ' line: ' . $e->getLine();
}
}