EPESI BIM • Business Information Manager • Cloud CRM/ERP http://epe.si/
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.
 
 
 
 
 
 

46 lines
1.1 KiB

  1. <?php
  2. /**
  3. * @author Paul Bukowski <pbukowski@telaxus.com>
  4. * @copyright Copyright &copy; 2006, Telaxus LLC
  5. * @license MIT
  6. * @version 1.0
  7. * @package epesi-base
  8. */
  9. ob_start();
  10. header("Content-type: text/javascript");
  11. header("Cache-Control: no-cache, must-revalidate");
  12. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // date in the past
  13. if(!isset($_POST['url']) || !isset($_SERVER['HTTP_X_CLIENT_ID']))
  14. die('alert(\'Invalid request\');');
  15. define('JS_OUTPUT',1);
  16. define('EPESI_PROCESS',1);
  17. require_once('include.php');
  18. if (epesi_requires_update()) {
  19. die ('window.location = "index.php";');
  20. }
  21. if(!isset($_SESSION['num_of_clients'])) {
  22. Epesi::alert('Session expired, restarting epesi');
  23. Epesi::redirect();
  24. Epesi::send_output();
  25. define('SESSION_EXPIRED',1);
  26. //session_commit();
  27. //DBSession::destroy(session_id());
  28. } else {
  29. Epesi::process($_POST['url'],isset($_POST['history'])?$_POST['history']:false);
  30. }
  31. $content = ob_get_contents();
  32. ob_end_clean();
  33. require_once('libs/minify/HTTP/Encoder.php');
  34. $he = new HTTP_Encoder(array('content' => $content));
  35. if (MINIFY_ENCODE)
  36. $he->encode();
  37. $he->sendAll();
  38. ?>