compiladmin.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. ini_set('soap.wsdl_cache_enabled', 0);
  4. ini_set('default_socket_timeout', '1000');
  5. require_once '../../inc/global.inc.php';
  6. $compilatio = new Compilatio();
  7. $use_space = number_format($quotas->usedSpace / 1000000, 2);
  8. $total_space = $quotas->space / 1000000;
  9. echo "<h3>".get_lang('compilatioDescription')."</h3>";
  10. echo "<b>"
  11. .get_lang('compilatioQuota')
  12. .":"
  13. ." </b><br>"
  14. .get_lang('compilatioCredit')
  15. .": "
  16. .$quotas->usedCredits
  17. .get_lang('compilatioOn')
  18. .$quotas->credits;
  19. ?>
  20. <br><br>
  21. <?
  22. if (!isset($_GET['action']))
  23. {
  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. <?
  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>