Newer
Older
backup-commander / html / post_handler.php
  1. <?php
  2. /**
  3. * COPYRIGHT © 2024 JOHN PEARCEY
  4. * All rights reserved
  5. */
  6.  
  7. //error_log("POST: " . print_r($_POST, true) );
  8.  
  9. include_once __DIR__ . "/inc/paths.php";
  10.  
  11. function debug_print( $msg ){
  12. error_log( $msg );
  13. }
  14.  
  15. include __DIR__."/lib/sysVcom.php";
  16. rpc_setGlobals( 'procName', 'svc/BU-commander' );
  17. rpc_setGlobals( 'max_chan', 8182 );
  18.  
  19. include_once __DIR__ . "/inc/secure.php";
  20. include_once __DIR__ . "/shd/common.php";
  21.  
  22. if( !isset($_POST['action']) ){
  23. error_log("Post Error: Missing value for 'action'");
  24. exit;
  25. }
  26.  
  27. include_once __DIR__ . "/inc/pagemap.php";
  28. if( invokeCommand( $_POST['action'], $_POST ) ) exit;
  29. error_log( "Error: Illegal value for action: ". $_POST['action'] );
  30. sendHtmlError( "Illegal call to " . __FILE__ );
  31. ?>