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.

process.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. } elseif((!isset($_POST['history']) || !is_numeric($_POST['history']) || $_POST['history']>0) && !isset($_SESSION['client']['__history_id__'])) {
  27. Epesi::alert('Too many tabs open - session expired, restarting '.EPESI);
  28. Epesi::redirect();
  29. Epesi::send_output();
  30. define('SESSION_EXPIRED',1);
  31. EpesiSession::destroy_client(session_id(),CID);
  32. } else {
  33. Epesi::process($_POST['url'],isset($_POST['history'])?$_POST['history']:false);
  34. }
  35. $content = ob_get_contents();
  36. ob_end_clean();
  37. require_once('libs/minify/HTTP/Encoder.php');
  38. $he = new HTTP_Encoder(array('content' => $content));
  39. if (MINIFY_ENCODE)
  40. $he->encode();
  41. $he->sendAll();
  42. ?>