/gui/tools/filemanager/skins/omega/advanced_webserver1.template.php

https://github.com/BenBE/ispCP · PHP · 108 lines · 93 code · 15 blank · 0 comment · 35 complexity · 8e86ad9e2702a1564b9c6006e0018325 MD5 · raw file

  1. <?php defined("NET2FTP") or die("Direct access to this location is not allowed."); ?>
  2. <!-- Template /skins/omega/advanced_webserver1.template.php begin -->
  3. <ul>
  4. <li>
  5. <?php echo __("Checking if the FTP module of PHP is installed: "); ?>
  6. <?php if (function_exists("ftp_connect") == true) { ?> <span style="color: green; font-weight: bold;"><?php echo __("yes"); ?></span> <?php }
  7. else { ?> <span style="color: red; font-weight: bold;"><?php echo __("no - please install it!"); ?></span> <?php } ?>
  8. </li>
  9. <li><?php echo __("Checking the permissions of the directory on the web server: a small file will be written to the /temp folder and then deleted."); ?></li>
  10. <li><ul>
  11. <li>
  12. <?php echo __("Creating filename: "); ?>
  13. <?php if ($tempfilename == true) { ?> <span style="color: green; font-weight: bold;"><?php echo __("OK. Filename: %1\$s", $tempfilename); ?></span> <?php }
  14. else { ?> <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span> <?php } ?>
  15. </li>
  16. <li>
  17. <?php echo __("Opening the file in write mode: "); ?>
  18. <?php if ($handle == true) { ?> <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span> <?php }
  19. else { ?> <span style="color: red; font-weight: bold;"><?php echo __("not OK. Check the permissions of the %1\$s directory"); ?></span> <?php } ?>
  20. </li>
  21. <li>
  22. <?php echo __("Writing some text to the file: "); ?>
  23. <?php if ($success1 == true) { ?> <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span> <?php }
  24. else { ?> <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span> <?php } ?>
  25. </li>
  26. <li>
  27. <?php echo __("Closing the file: "); ?>
  28. <?php if ($success2 == true) { ?> <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span> <?php }
  29. else { ?> <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span> <?php } ?>
  30. </li>
  31. <li>
  32. <?php echo __("Deleting the file: "); ?>
  33. <?php if ($success3 == true) { ?> <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span> <?php }
  34. else { ?> <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span> <?php } ?>
  35. </li>
  36. </ul></li>
  37. <li><?php echo __("Testing the FTP functions"); ?></li>
  38. <li><ul>
  39. <li>
  40. <?php echo __("Connecting to a test FTP server: "); ?>
  41. <?php if ($conn_id == true) { ?>
  42. <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span>
  43. <?php } else { ?>
  44. <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span>
  45. <?php } // end if else ?>
  46. </li>
  47. <li>
  48. <?php echo __("Logging into the FTP server: "); ?>
  49. <?php if ($ftp_login_result == true) { ?>
  50. <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span>
  51. <?php } else { ?>
  52. <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span>
  53. <?php } // end if else ?>
  54. </li>
  55. <li>
  56. <?php echo __("Setting the passive mode: "); ?>
  57. <?php if ($ftp_pasv_result == true) { ?>
  58. <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span>
  59. <?php } else { ?>
  60. <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span>
  61. <?php } // end if else ?>
  62. </li>
  63. <li>
  64. <?php echo __("Getting the FTP server system type: "); ?>
  65. <?php if ($ftp_systype_result != false) { ?>
  66. <span style="color: green; font-weight: bold;"><?php echo $ftp_systype_result; ?></span>
  67. <?php } else { ?>
  68. <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span>
  69. <?php } // end if else ?>
  70. </li>
  71. <li>
  72. <?php echo __("Changing to the directory %1\$s: ", $troubleshoot_directory); ?>
  73. <?php if ($ftp_chdir_result == true) { ?>
  74. <span style="color: green; font-weight: bold;"><?php echo __("OK"); ?></span>
  75. <?php } else { ?>
  76. <span style="color: red; font-weight: bold;"><?php echo __("not OK"); ?></span>
  77. <?php } // end if else ?>
  78. </li>
  79. <li>
  80. <?php echo __("Getting the raw list of directories and files: "); ?><br />
  81. <?php print_r($ftp_rawlist_result); ?>
  82. </li>
  83. <li>
  84. <?php echo __("Getting the raw list of directories and files: "); ?><br />
  85. <?php for($i=0; $i<count($parsedlist); $i++) {
  86. echo "<u>Line $i</u><br />\n";
  87. print_r($parsedlist[$i]);
  88. echo "<br />";
  89. } // End for
  90. ?>
  91. </li>
  92. </ul></li>
  93. <!-- Template /skins/omega/advanced_webserver1.template.php end -->