compiladmin.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. exit;
  4. ini_set('soap.wsdl_cache_enabled', 0);
  5. ini_set('default_socket_timeout', '1000');
  6. require_once '../../inc/global.inc.php';
  7. $compilatio = new Compilatio();
  8. $use_space = number_format($quotas->usedSpace / 1000000, 2);
  9. $total_space = $quotas->space / 1000000;
  10. echo "<h3>".get_lang('compilatioDescription')."</h3>";
  11. echo "<b>"
  12. .get_lang('compilatioQuota')
  13. .":"
  14. ." </b><br>"
  15. .get_lang('compilatioCredit')
  16. .": "
  17. .$quotas->usedCredits
  18. .get_lang('compilatioOn')
  19. .$quotas->credits;
  20. ?>
  21. <br><br>
  22. <?php
  23. if (!isset($_GET['action'])) {
  24. ?>
  25. <body style="margin:0px;padding:0px">
  26. <form style="margin:0px;" method="GET">
  27. <input type="submit" name="action" value="Test de Connexion SOAP">
  28. </form>
  29. <?php
  30. } else {
  31. echo get_lang('compilatioConnectionTestSoap')."<br>";
  32. echo "1) ".get_lang('compilatioServerConnection')."<br>";
  33. $compilatio = new Compilatio();
  34. if ($compilatio) {
  35. echo get_lang('compilatioConnectionAccomplished')."<br>";
  36. echo "2) ".get_lang('compilatioSendTextToServer')."<br>";
  37. $text = get_lang('compilatioTestSendText').$compilatio->getKey();
  38. $id_compi = $compilatio->SendDoc(
  39. 'Doc de test',
  40. 'test',
  41. 'test',
  42. 'text/plain',
  43. $text
  44. );
  45. if (Compilatio::isMd5($id_compi)) {
  46. echo get_lang('compilatioSuccessfulTransfer')."<br>";
  47. } else {
  48. echo get_lang('compilatioFailedTransfer')."<br>";
  49. }
  50. } else {
  51. echo get_lang('compilatioNotConnection')."<br>";
  52. echo get_lang('compilatioParamVerification')."<br>";
  53. }
  54. }
  55. ?>
  56. </body>