Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1.  
  2.  
  3. class account {
  4. function register() {
  5. // Create a new user
  6. }
  7.  
  8. function modify($type,$data) {
  9. switch($type) {
  10. case "account":
  11. include_once("./resources/library/db.php");
  12. $db = new db();
  13.  
  14. $username = $db->SQL_Safe($data['username']);
  15. $email = $db->SQL_Safe($data['email']);
  16.  
  17. $db->SQL_Connect("main");
  18. $db->SQL_Query("UPDATE users SET email='$email' WHERE username='$username'");
  19. $db->SQL_Close("main");
  20.  
  21. break;
  22.  
  23. case "password":
  24. echo "Password: $data[previous_password]";
  25. // NOTE: Preform MD5 here
  26. // Preform check for matching passwords
  27.  
  28. break;
  29.  
  30. case "notifications":
  31. echo "You would like notifications for: <br />
  32. Email on msg: $data[email_on_message]<br />
  33. Email on friend request: $data[email_on_friend]<br />
  34. Email on new referral: $data[email_on_ref]<br />
  35. Email when you reach cashout: $data[email_on_cashout]<br />";
  36. break;
  37.  
  38. case "payments":
  39. echo "Your payment email is: $data[payment_email]<br /><br />";
  40. echo "Your prefered payment processor is:<br />";
  41. if($data['paypal']==true) echo "Paypal!";
  42. if($data['alertpay']==true) echo "Alertpay!";
  43. break;
  44.  
  45. }
  46. }
  47.  
  48. function activate() {
  49. // Confirm account activation link
  50. }
  51.  
  52. function whois($usernmae) {
  53. // Pull up details about an account
  54.  
  55. }
  56.  
  57. function permissions($username) {
  58. /* Access Levels:
  59. 1 - Admin
  60. 2 - Super Mod
  61. 3 - Mod
  62. 4 - User
  63. */
  64. $access_level=1;
  65. return $access_level;
  66. }
  67.  
  68. }
  69. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement