Advertisement
AndreiMikalov

Untitled

Sep 14th, 2011
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. <?php
  2. ob_start(); //fixes something with headers
  3. include "config.php"; //include the config.php file to get the main data
  4. /*
  5. Basic PHP Usersystem system coded by m0nsta.
  6. www.mark-eriksson.com
  7. www.forum.ragezone.com/f282
  8. www.clubhabboforum.net
  9. */
  10. if(isset($_GET['id'])){ //a user id has been set in the url
  11. $id = clean($_GET['id']); //remove any bad content from the users id
  12. if(!userExists($id)){ //the user does not exist
  13. $title = 'User does not exist';
  14. }else{ //user exists
  15. $title = userRow($id, 'username'); //get their username
  16. }
  17. }else{
  18. $title = 'User does not exist';
  19. }
  20. ?>
  21. <html>
  22. <head>
  23. <title><?php echo $site[title]; ?> - View Profile: <?php echo $title; ?></title>
  24. <style type="text/css">
  25. body {
  26. margin: 0 auto;
  27. background-color: white;
  28. }
  29. div#container {
  30. width: 650px;
  31. margin: 0 auto;
  32. }
  33. body, input, select, textarea {
  34. font-family: Verdana;
  35. font-size: 11px;
  36. color: black;
  37. padding: 3px;
  38. }
  39. div#content {
  40. width: 650px;
  41. border: 1px solid black;
  42. border-bottom: 2px solid black;
  43. -moz-border-radius: 3px;
  44. padding: 4px;
  45. }
  46. a {
  47. color: inherit;
  48. text-decoration: none;
  49. }
  50. a:hover {
  51. text-decoration: underline;
  52. font-weight: bold;
  53. }
  54. label {
  55. cursor: pointer;
  56. font-weight: bold;
  57. }
  58. th {
  59. font-weight: bold;
  60. padding: 8px;
  61. background-color: #e6e6e6;
  62. }
  63. td {
  64. padding: 4px;
  65. background-color: #f5f5f5;
  66. }
  67. td, th {
  68. border: 1px solid black;
  69. }
  70. </style>
  71. </head>
  72. <body>
  73. <div id="container">
  74. <h2><center><?php echo $site[title]; ?> - View Profile: <?php echo $title; ?></center></h2>
  75. <center><a href="index.php">Go Home</a></center>
  76. <div id="content">
  77. <?php
  78. if($in["username"]){ //check if logged in
  79. if(userExists($id)){ //the user exists
  80. echo '<h3>'.userRow($id, 'username').'\'s Profile</h3>';
  81. echo '<fieldset><legend><strong>User Details</strong></legend>
  82. <p>
  83. <label>Username</label><br>
  84. &nbsp;&nbsp;&nbsp;'.userRow($id, 'username').'
  85. </p>
  86. <p>
  87. <label>User ID</label><br>
  88. &nbsp;&nbsp;&nbsp;'.userRow($id, 'id').'
  89. </p>
  90. <p>
  91. <label>E-mail</label><br>
  92. &nbsp;&nbsp;&nbsp;'.userRow($id, 'email').'
  93. </p>
  94. <p>
  95. <label>Rank</label><br>
  96. &nbsp;&nbsp;&nbsp;'.userRow($id, 'rank').'
  97. </p>
  98. <p>
  99. <label>Join Date</label><br>
  100. &nbsp;&nbsp;&nbsp;'.userRow($id, 'joindate').'
  101. </p>
  102. </fieldset>';
  103. }else{ //user does not exist
  104. echo 'This user does not exist!<br><br>&laquo; <a href="index.php">Home</a>';
  105. }
  106. }else{ //they are not logged in
  107. echo 'You are not logged in! Therefore you can not view this profile.<br><br>&laquo; <a href="index.php">Home</a>';
  108. }
  109. ?>
  110. </div>
  111. <?php echo $site[copyright]; ?>
  112. </div>
  113. </div>
  114. <?php
  115. ob_flush(); //fixes something with headers
  116. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement