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.

43 lines
837 B

15 years ago
15 years ago
15 years ago
  1. <?php
  2. /**
  3. * @file jajax.php
  4. * This file is part of MOVIM.
  5. *
  6. * @brief This is movim's ajax server.
  7. *
  8. * @author Etenil <etenil@etenilsrealm.nl>
  9. *
  10. * @version 1.0
  11. * @date 7 November 2010
  12. *
  13. * Copyright (C)2010 MOVIM team
  14. *
  15. * See the file `COPYING' for licensing information.
  16. */
  17. define('DOCUMENT_ROOT', dirname(__FILE__));
  18. define('DOCTYPE','application/json');
  19. require_once(DOCUMENT_ROOT.'/bootstrap.php');
  20. try {
  21. $bootstrap = new Bootstrap();
  22. $booted = $bootstrap->boot();
  23. set_time_limit(200);
  24. $polling = true;
  25. $rpc = new RPC();
  26. $rpc->handle_json();
  27. // Closing stuff
  28. WidgetWrapper::destroyInstance();
  29. } catch(\Exception $e) {
  30. if(isset($_GET['fail_safe']) && (int)$_GET['fail_safe']) {
  31. $rpc = new RPC();
  32. $rpc->handle_json();
  33. }
  34. print $e->getMessage();
  35. }
  36. ?>