Web UI for ARGUS server
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.

56 lines
1.6 KiB

6 years ago
​
​
5 years ago
6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
5 years ago
​
6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
​
​
​
​
​
​
  1. <?php
  2. error_reporting( E_ALL );
  3. require_once('settings.php');
  4. require_once('defines.php');
  5. // SET DATA CONNECTION AND GLOBAL USER VARIABLES
  6. $TT_123 = explode( '.', PHP_VERSION );
  7. if( $TT_123[0] == '4' ){
  8. require_once( 'php/db/MySQL_class.php' );
  9. $DATABASE = new MySQL_DB($DBHost, $DBName, $DBUser, $DBPassword);
  10. } elseif( $TT_123[0] > '4' ){
  11. require_once( 'php/db/MySQLi_class.php' );
  12. $DATABASE = new MySQLi_DB($DBHost, $DBName, $DBUser, $DBPassword);
  13. } else {
  14. exit();
  15. };
  16. $str = @file_get_contents('/proc/uptime');
  17. $num = floatval($str);
  18. $secs = fmod($num, 60); $num = (int)($num / 60);
  19. $mins = $num % 60; $num = (int)($num / 60);
  20. $hours = $num % 24; $num = (int)($num / 24);
  21. $days = $num;
  22. if( !$DATABASE->isConnected && $secs > 120 ) {
  23. header( 'location: /setup/');
  24. exit();
  25. };
  26. //$DATABASE->SetCacheDir( $DBCacheDir );
  27. session_start();
  28. require_once('php/db/logio_class.php');
  29. $LOG = new Logio( LOG_LVL_ALL );
  30. require_once('php/db/user_class.php');
  31. require_once('php/auth/web.php');
  32. require_once('php/db/language_class.php');
  33. //require_once('php/sys/SYSTEM_functions.php');
  34. require_once('php/ui/UI_functions.php');
  35. //require_once('php/web/WEB_functions.php');
  36. if( isset($_GET['Lang'])){
  37. $UCL=$_GET['Lang']/1;
  38. if ($UCL) $_SESSION['userlang']=$UCL; else $_SESSION['userlang']=$UserLang;
  39. }
  40. if( isset($_SESSION['userlang']) )$Labels=new Language( $_SESSION['userlang'] ); // '_php');
  41. else $Labels=new Language( $UserLang );// '_php');
  42. if( $UserLang == 3 || $UserLang == 255 ){
  43. $RTL_SITE = true;
  44. } else {
  45. $RTL_SITE = false;
  46. };
  47. ?>