You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
<?php
|
|
error_reporting( E_ALL );
|
|
require_once('settings.php');
|
|
require_once('defines.php');
|
|
|
|
// SET DATA CONNECTION AND GLOBAL USER VARIABLES
|
|
/*
|
|
$TT_123 = explode( '.', PHP_VERSION );
|
|
if( $TT_123[0] == '4' ){
|
|
require_once( 'php/db/MySQL_class.php' );
|
|
$DATABASE = new MySQL_DB($DBHost, $DBName, $DBUser, $DBPassword);
|
|
} elseif( $TT_123[0] > '4' ){
|
|
require_once( 'php/db/MySQLi_class.php' );
|
|
$DATABASE = new MySQLi_DB($DBHost, $DBName, $DBUser, $DBPassword);
|
|
} else {
|
|
exit();
|
|
};
|
|
*/
|
|
|
|
|
|
|
|
require_once( 'php/db/SQLite_Class.php');
|
|
$DATABASE = new SQLite_DB( 'lib/controller/data/mysqlitedb.db');
|
|
|
|
$str = @file_get_contents('/proc/uptime');
|
|
$num = floatval($str);
|
|
$secs = fmod($num, 60); $num = (int)($num / 60);
|
|
$mins = $num % 60; $num = (int)($num / 60);
|
|
$hours = $num % 24; $num = (int)($num / 24);
|
|
$days = $num;
|
|
|
|
if( !$DATABASE->isConnected && $secs > 120 ) {
|
|
header( 'location: /setup/');
|
|
exit();
|
|
};
|
|
|
|
//$DATABASE->SetCacheDir( $DBCacheDir );
|
|
session_start();
|
|
require_once('php/db/logio_class.php');
|
|
$LOG = new Logio( LOG_LVL_ALL );
|
|
require_once('php/db/user_class.php');
|
|
require_once('php/auth/web.php');
|
|
require_once('php/db/language_class.php');
|
|
//require_once('php/sys/SYSTEM_functions.php');
|
|
require_once('php/ui/UI_functions.php');
|
|
//require_once('php/web/WEB_functions.php');
|
|
|
|
|
|
|
|
if( isset($_GET['Lang'])){
|
|
$UCL=$_GET['Lang']/1;
|
|
if ($UCL) $_SESSION['userlang']=$UCL; else $_SESSION['userlang']=$UserLang;
|
|
}
|
|
if( isset($_SESSION['userlang']) )$Labels=new Language( $_SESSION['userlang'] ); // '_php');
|
|
else $Labels=new Language( $UserLang );// '_php');
|
|
|
|
if( $UserLang == 3 || $UserLang == 255 ){
|
|
$RTL_SITE = true;
|
|
} else {
|
|
$RTL_SITE = false;
|
|
};
|
|
|
|
|
|
?>
|