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.

22 lines
651 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. //Check Time Sync - disabled
  5. /*
  6. $MTS = time();
  7. $CTS = intval( $_POST['CTS'] );
  8. // If difference more then 2 minutes
  9. if( abs( $MTS-$CTS ) > 120 ){
  10. //Push Kernel Command -> Sync Time
  11. $RBASE = new SQLite_DB( '/dev/shm/argus/mem_db.db');
  12. $QS = "INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES(1,252,0,'{$CTS}')";
  13. $RBASE->Query( $QS, false );
  14. // Logout user to perform time sync
  15. echo "{'sessionIsValid': false }";
  16. exit();
  17. };
  18. */
  19. echo "{'sessionIsValid': true }";
  20. } else {
  21. echo "{'sessionIsValid': false }";
  22. };
  23. ?>