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.

21 lines
641 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. if( $CUser->Data['access'] > 5 ){
  5. //Check Time Sync
  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. //$QS = "INSERT INTO `command_bus`(`target_id`,`cmd`,`status`,`parameter`) VALUES(1,252,0,'{$CTS}')";
  12. //$DATABASE->Query( $QS, false );
  13. // Logout user to perform time sync
  14. //echo "{'sessionIsValid': false }";
  15. //exit();
  16. };
  17. };
  18. echo "{'sessionIsValid': true }";
  19. } else {
  20. echo "{'sessionIsValid': false }";
  21. };
  22. ?>