Unsupported scripts and control panel web app for a hosting company
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.

4.php 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?PHP
  2. if (isset($_POST['back'])) {
  3. $_SESSION['stage'] = 3;
  4. header('Location: /signup/3');
  5. exit;
  6. }
  7. if (isset($_POST['slot'])) {
  8. $_SESSION['slot'] = $_POST['slot'];
  9. $_SESSION['discount'] = $_POST['discount'];
  10. if ($_SESSION['type'] != 'newuser') {
  11. $_SESSION['action'] = 'deferred';
  12. mysql_query('INSERT INTO signups (signup_ip, signup_time, signup_data) VALUES (\''.$_SERVER['REMOTE_ADDR'].'\', '.time().', \''.mysql_real_escape_string(serialize($_SESSION)).'\')');
  13. logger::log('Deferred signup (type: '.$_SESSION['type'].'; slots: '.$_SESSION['slot'].')',logger::important);
  14. } else {
  15. addUser($_SESSION['data']['user'], $_SESSION['data']['email'], $_SESSION['data']['pass1'], $_SESSION['tac'], $_POST['slot']);
  16. logger::log('Autoprocessed signup for user '.$_SESSION['data']['user'].' ['.$_POST['slot'].' slots]',logger::normal);
  17. $name = $_SESSION['data']['name'];
  18. $user = strtolower($_SESSION['data']['user']);
  19. $message = "Dear $name,
  20. Thank you for signing up for UTD-Hosting. Your account has been created, and as soon as you've paid you will be able to start uploading your website.
  21. Your username is $user
  22. To log in to the customer control panel, go to https://secure.utd-hosting.com/control (don't worry if your browser gives you an error message about the ssl certificate - the connection is still encrypted), and enter your username as it appears above, and the password you used during the signup procedure.
  23. When you are ready to upload your site, use an FTP client to connect to asimov.utd-hosting.com, using your control panel login details. A default site has been created for you, which can be accessed via the address http://$user.utd-hosting.com/. To upload files to this site, navigate to the public_html directory once you are connected.
  24. If you have any questions, please check the support section of the control panel at https://secure.utd-hosting.com/control/support. If you still have queries, please raise a ticket via the control panel, or e-mail support@utd-hosting.com.
  25. -- UTD-Hosting support
  26. [ If you did not sign up to UTD-Hosting, please e-mail admins@utd-hosting.com and we will remove your e-mail address ]";
  27. mail($_SESSION['data']['email'], 'Your UTD-Hosting account', $message, "From: support@utd-hosting.com");
  28. $_SESSION['action'] = 'processed';
  29. mysql_query('INSERT INTO signups (signup_ip, signup_time, signup_data, signup_processed) VALUES (\''.$_SERVER['REMOTE_ADDR'].'\', '.time().', \''.mysql_real_escape_string(serialize($_SESSION)).'\', 1)');
  30. }
  31. $_SESSION['stage'] = 5;
  32. header('Location: /signup/5');
  33. exit;
  34. }
  35. ?>
  36. <form action="/signup/4" method="post">
  37. <p class="blurb">
  38. Please select the amount of
  39. <?PHP if ($_SESSION['type'] != 'newuser') { echo 'additional'; } ?>
  40. server slots you would like to purchase
  41. </p>
  42. <table>
  43. <tr>
  44. <td><input type="radio" name="slot" value="1" checked="checked"></td>
  45. <td>One slot</td>
  46. <td>£35 / year</td>
  47. <td>3.5 GB Storage</td>
  48. <td>50 GB Transfer / month</td>
  49. </tr>
  50. <tr>
  51. <td><input type="radio" name="slot" value="2"></td>
  52. <td>Two slots</td>
  53. <td>£70 / year</td>
  54. <td>7.0 GB Storage</td>
  55. <td>100 GB Transfer / month</td>
  56. </tr>
  57. <tr>
  58. <td><input type="radio" name="slot" value="3"></td>
  59. <td>Three slots</td>
  60. <td>£100 / year</td>
  61. <td>10.5 GB Storage</td>
  62. <td>150 GB Transfer / month</td>
  63. </tr>
  64. </table>
  65. <p class="blurb">
  66. If you have a discount code, please enter it in the text box below.
  67. </p>
  68. <input type="text" name="discount" style="width: 300px; margin: 10px;">
  69. <br>
  70. <input type="submit" name="forward" value="Next" style="float: right;">
  71. </form>
  72. <form action="/signup/4" method="post">
  73. <input type="submit" name="back" value="Previous">
  74. </form>