Web Interface For Lite Argus Control modules
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.

51 lines
1.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. */
  17. require_once( 'php/db/SQLite_Class.php');
  18. $DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/mysqlitedb.db');
  19. //$DATABASE->SetCacheDir( $DBCacheDir );
  20. session_start();
  21. require_once('php/db/logio_class.php');
  22. $LOG = new Logio( LOG_LVL_ALL );
  23. require_once('php/db/user_class.php');
  24. require_once('php/auth/web.php');
  25. require_once('php/db/language_class.php');
  26. require_once('php/sys/r-goose_sys.php');
  27. require_once('php/argus/mojo.php');
  28. if( isset($_GET['Lang'])){
  29. $UCL=$_GET['Lang']/1;
  30. if ($UCL) $_SESSION['userlang']=$UCL; else $_SESSION['userlang']=$UserLang;
  31. }
  32. $LDB = new SQLite_DB( '/srv/www/web/lib/controller/data/lang_en_US.db');
  33. if( isset($_SESSION['userlang']) ){
  34. $Labels=new Language( $_SESSION['userlang'],'', $LDB );
  35. } else {
  36. $Labels=new Language( $UserLang ,'', $LDB );
  37. };
  38. if( $UserLang == 3 || $UserLang == 255 ){
  39. $RTL_SITE = true;
  40. } else {
  41. $RTL_SITE = false;
  42. };
  43. ?>