'4' ){ require_once( 'php/db/MySQLi_class.php' ); $DATABASE = new MySQLi_DB($DBHost, $DBName, $DBUser, $DBPassword); } else { exit(); }; $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_json_class.php'); require_once('php/ui/UI_functions.php'); $UserLang = 1; if( isset($_GET['Lang']) ){ $UCL=intval( $_GET['Lang'] ); if( $UCL == 0 ) $UCL = 1; if( ( $UserLang != $UCL ) && ( $UserID > 1 ) ){ $QS = "UPDATE `users` SET `language`={$UCL} WHERE `id`={$UserID}"; $DATABASE->Query( $QS ); }; header( 'location: /' ); exit(); }; $Labels=new Language_json( $SYSPath .'/lib/'.$UserLang.'.json'); if( $UserLang == 3 || $UserLang == 255 ){ $RTL_SITE = true; } else { $RTL_SITE = false; }; ?>