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.

26 lines
696 B

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
  5. header("Cache-Control: post-check=0, pre-check=0", false);
  6. header("Pragma: no-cache");
  7. if(isset( $_POST['PID'] )){
  8. $PID = intval($_POST['PID']);
  9. } else {
  10. $PID = intval($_GET['PID']);
  11. };
  12. if(isset( $_POST['AUX'] )){
  13. $AUX = intval($_POST['AUX']);
  14. } else {
  15. $AUX = intval($_GET['AUX']);
  16. };
  17. $QS = "SELECT * FROM pictures WHERE id={$PID}";
  18. $Result = $DATABASE->Query( $QS, false );
  19. if( count( $Result ) ){
  20. loadPicture( $Result[0] );
  21. } else {
  22. loadNotPicture();
  23. };
  24. } else {
  25. header('location: /');
  26. };
  27. ?>