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.

editpref.php 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <div class="block">
  2. <h2>Edit preference</h2>
  3. <?PHP
  4. if ($_GET['n'] != 2) {
  5. $sql = 'SELECT '.$fields[($_GET['n'])].' FROM users NATURAL JOIN userdetails';
  6. $sql .= ' WHERE user_id = '.UID;
  7. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  8. $row = mysql_fetch_array($res);
  9. ?>
  10. <div class="innerblock">
  11. <p>
  12. Please enter your <?PHP echo $prefs[($_GET['n'])]; ?>.
  13. </p>
  14. <form action="<?PHP echo CP_PATH; ?>editpref/<?PHP echo $_GET['n']; ?>" method="post">
  15. <input type="text" name="value" value="<?PHP echo htmlentities($row[0]); ?>">
  16. <input type="submit" value="Submit">
  17. </form>
  18. <p>Please be aware that providing false information may lead to termination
  19. of your UTD-Hosting account.</p>
  20. </div>
  21. <?PHP } else {
  22. $sql = 'SELECT mail_announce, mail_tickets, mail_warning, mail_over FROM ';
  23. $sql .= 'users WHERE user_id = '.UID;
  24. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  25. $row = mysql_fetch_array($res);
  26. ?>
  27. <div class="innerblock">
  28. <p>Please select your mailing preferences</p>
  29. <form action="<?PHP echo CP_PATH; ?>editpref/2" method="post">
  30. <input type="hidden" name="mail" value="tr00">
  31. <table class="form">
  32. <tr>
  33. <td><input type="checkbox" name="mail_announce"<?PHP if ($row['mail_announce']) { echo ' checked="checked"'; } ?>></td>
  34. <td>Announcements</td>
  35. <td>Low volume announcements about UTD-Hosting</td>
  36. </tr>
  37. <tr>
  38. <td><input type="checkbox" name="mail_tickets"<?PHP if ($row['mail_tickets']) { echo ' checked="checked"'; } ?>></td>
  39. <td>Tickets</td>
  40. <td>Notification of replies to your tickets</td>
  41. </tr>
  42. <tr>
  43. <td><input type="checkbox" name="mail_warning"<?PHP if ($row['mail_warning']) { echo ' checked="checked"'; } ?>></td>
  44. <td>Warnings</td>
  45. <td>Automatic warning when you near your HDD or BW limit</td>
  46. </tr>
  47. <tr>
  48. <td><input type="checkbox" name="mail_over"<?PHP if ($row['mail_over']) { echo ' checked="checked"'; } ?></td>
  49. <td>Overrings</td>
  50. <td>Automatic message when you exceed your HDD or BW limit</td>
  51. </tr>
  52. <tr>
  53. <td></td>
  54. <td>
  55. <input type="submit" value="Update">
  56. </td>
  57. </tr>
  58. </table>
  59. <p>Note that Warnings and Overrings are currently not implemented. This
  60. functionality will be added at a future time.</p>
  61. </div>
  62. <?PHP } ?>
  63. </div>