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.

2old.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?PHP
  2. if (isset($_POST['back'])) {
  3. $_SESSION['stage'] = 1;
  4. header('Location: /signup/1');
  5. exit;
  6. }
  7. if (isset($_POST['user']) && isset($_POST['pass'])) {
  8. require_once('../control/lib/database.php');
  9. $pass = md5($_POST['user'].$_POST['pass']);
  10. $user = mysql_real_escape_string($_POST['user']);
  11. $sql = 'SELECT user_id FROM users WHERE user_name = \''.$user.'\' AND user_pass = \''.$pass.'\'';
  12. $res = mysql_query($sql);
  13. if (mysql_num_rows($res) != 1) {
  14. echo '<div id="message">Invalid username or password</div>';
  15. } else {
  16. $row = mysql_fetch_array($res);
  17. $_SESSION['UID'] = $row[0];
  18. $_SESSION['stage'] = 3;
  19. header('Location: /signup/3');
  20. exit;
  21. }
  22. }
  23. ?>
  24. <p>
  25. Please enter your existing UTD-Hosting username and password.
  26. </p>
  27. <form action="/signup/2" method="post">
  28. <table style="margin-bottom: 20px;">
  29. <tr>
  30. <th>Username:</th>
  31. <td><input type="text" name="user"<?PHP if (isset($_POST['user'])) { echo ' value="'.htmlentities($_POST['user']).'"'; } ?>></td>
  32. </tr>
  33. <tr>
  34. <th>Password:</th>
  35. <td><input type="password" name="pass"></td>
  36. </tr>
  37. </table>
  38. <input type="submit" name="forward" value="Next" style="float: right;">
  39. </form>
  40. <form action="/signup/2" method="post">
  41. <input type="submit" name="back" value="Previous">
  42. </form>