index.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. session_start();
  3. include("config.php");
  4. function tomb($size, $precision = 2)
  5. {
  6. $base = log($size) / log(1024);
  7. $suffixes = array('', 'KB', 'MB', 'GB', 'TB');
  8. return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];
  9. }
  10. $webspace = tomb($config_var[1]);
  11. $max_upload = tomb($config_var[2]);
  12. include_once("header.php");
  13. echo "<div class='ptitle'>$title: $desc</div>\n";
  14. ?>
  15. <?php
  16. echo "<div id='ctrlnav'>\n";
  17. if(!isset($_SESSION['hostz-user']) && !isset($_SESSION['hostz-passwd'])) {
  18. ?>
  19. <a href="register.php">Register</a> &bull; <a href="login.php">Login</a>
  20. <?php
  21. } else {
  22. ?>
  23. <a href="ctrl.php">My Drive</a> &bull; <a href="logout.php">Logout</a>
  24. <?php
  25. }
  26. echo "</div>\n";
  27. ?>
  28. <table style="margin:auto;">
  29. <tr>
  30. <td>
  31. <div id="packages">
  32. <?php echo $title; ?> was developed while influenced by ads, so we're extremely
  33. grateful to bring a 100% ad-free, cost-free hosting platform. We plan to stay, to
  34. show people that free hosting can still exist without the invasive ads or fees.
  35. The shared location for each users static storage / web hosting is secured by SSL (https).
  36. The downside is, CGI is disabled for users. <?php echo $title; ?> is more-so here
  37. for static hosting, but do remember if you have a small repository, or want to use
  38. for mirroring FOSS (free and open source software); please feel to do so! <br />
  39. <a href="https://ho.st.us.to/suckless">dl.suckless.org mirror</a> (example)<br /><br />
  40. If you're looking for FreeBox, we sincerely apologize for the shut-down of our free
  41. VPS hosting services... Due to DMCA contact over piracy of copyrighted data, we've
  42. ceased usage to all users. If you were using FreeBox for web hosting, freehost is
  43. always an option.<br /><br />
  44. Remember, we charge absolutely no one, so if you like our services; please consider
  45. donating to cover a cup of coffee and maybe that internet bill!
  46. <br /><br />
  47. <form action="https://www.paypal.com/donate" method="post" target="_top">
  48. <input type="hidden" name="cmd" value="_donations" />
  49. <input type="hidden" name="business" value="cdorm245@gmail.com" />
  50. <input type="hidden" name="currency_code" value="USD" />
  51. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
  52. <img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
  53. </form>
  54. <br />
  55. Web Space: <?php echo $webspace; ?><br />
  56. Max Upload: <?php echo $max_upload; ?><br />
  57. User count: <?php
  58. $totalUsers = count( glob("users/*", GLOB_ONLYDIR) );
  59. echo $totalUsers;
  60. ?><br /><br />
  61. Allowed upload extensions:
  62. <?php
  63. $array = $allowedExts;
  64. for ($i = 0; $i < count($array); $i++) {
  65. echo $array[$i];
  66. if($i < (count($array)-1)) {
  67. echo ", ";
  68. }
  69. }
  70. ?>.<br />
  71. </div>
  72. </td>
  73. </tr>
  74. </table>
  75. <?php
  76. include_once("footer.php");
  77. ?>