Guest User

view_profile.php

a guest
May 23rd, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['user']) && !isset($_GET['user']))
  3. {
  4. echo "<script>window.location='view_profile.php?user=$_POST[user]';</script>";
  5. exit();
  6. }
  7.  
  8. if(isset($_GET['user']))
  9. {
  10. $_POST['user'] = $_GET['user'];
  11. }
  12.  
  13. if(isset($_POST['user']))
  14. {
  15. $_POST['user'] = htmlentities($_POST['user']);
  16. $title="3DSPlaza - $_POST[user]s profile";
  17. $keywords="3DSPlaza $_POST[user] profile";
  18. }
  19. else
  20. {
  21. $title = 'Home4DSi - View a profile';
  22. $keywords = '3DSPlaza profile';
  23. }
  24. $location = 'profile';
  25. include("header.php");
  26. include("db_leden.php");
  27. ?>
  28.  
  29.  
  30.  
  31. <?php
  32.  
  33. mysql_connect("$dbhost","$dbuser","$dbpass");
  34. mysql_select_db($db);
  35.  
  36. if(isset($inlogbericht))
  37. {
  38.  
  39. if (strtolower($user) == strtolower($gebruikersnaam)){
  40. ?>
  41. <?php echo $user;
  42. echo $_SESSION['user']; ?>
  43. <a href="../members/send_pm.php?to=<?php echo urlencode($user); ?>">Send <?php echo htmlentities($user);?>
  44. a PM.</a><br><br>
  45. <?php
  46. }}
  47.  
  48. ?>
  49. <?php
  50. if(isset($_POST['user']))
  51. {
  52. $user=$_POST['user'];
  53. if($user==$gebruikersnaam )
  54. {
  55. $viewself="ja";
  56. }
  57. $select_profile_info_request = mysql_query(" select about_me from ledengegevens where gebruikersnaam='$user'");
  58. $row=mysql_fetch_row($select_profile_info_request);
  59. if(empty($row))
  60. {
  61. $bestaatniet="ja";
  62. }
  63. else
  64. {
  65. $col = $row[0];
  66. include("replacer.php");
  67. $about_me=$bericht;
  68. if($friendcode != "none")
  69. {
  70. $hasfc = "yes";
  71. }
  72.  
  73.  
  74. echo "<center><h2>".$user."'s profile</h2>";
  75. if(isset($viewself))
  76. {
  77. echo ' (<a href="profile_edit.php">edit</a>)';
  78. }
  79. echo "</h2>";
  80. echo "<br><br>";
  81.  
  82. echo "</center><span style='color: blue;'>About $user:</span><br>";
  83. if(!empty($about_me))
  84. {
  85. echo "$about_me<br>";
  86. }
  87. else
  88. {
  89. echo "$user has not filled this in yet<br>";
  90. }
  91. echo "<br>";
  92.  
  93. if($user == "ursamajor")
  94. {
  95. echo "<font color=\"blue\">Accomplishments:</font><br><img src=\"http://fc03.deviantart.net/fs70/f/2013/270/a/6/super_smash_bros__logo_vector_by_starjamlegend-d6o640q.png\" width=\"19px\" height=\"19px\"> <u>Won 3rd place in the \"Battle For Mewtwo (B4M2)\" Super Smash Bros. for 3DS tournament</u>";
  96. }
  97.  
  98. if($user == "Michael94")
  99. {
  100. echo "<font color=\"blue\">Accomplishments:</font><br><img src=\"http://fc03.deviantart.net/fs70/f/2013/270/a/6/super_smash_bros__logo_vector_by_starjamlegend-d6o640q.png\" width=\"19px\" height=\"19px\"> <u>Won 1st place in the \"Battle For Mewtwo (B4M2)\" Super Smash Bros. for 3DS tournament</u>";
  101. }
  102.  
  103. if($user == "DrakeJericho")
  104. {
  105. echo "<font color=\"blue\">Accomplishments:</font><br><img src=\"http://fc03.deviantart.net/fs70/f/2013/270/a/6/super_smash_bros__logo_vector_by_starjamlegend-d6o640q.png\" width=\"19px\" height=\"19px\"> <u>Won 2nd place in the \"Battle For Mewtwo (B4M2)\" Super Smash Bros. for 3DS tournament</u>";
  106. }
  107.  
  108.  
  109. }
  110. if(!isset($bestaatniet))
  111. {
  112. echo "<br><br><hr>";
  113. }
  114. }
  115. ?>
  116. <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
  117. <?php if(isset($bestaatniet))
  118. {
  119. echo "<center><font color=\"red\">The username $user doesn't exist!</font></center><br><br>";
  120. }
  121. ?>
  122. <center><h4>View the profile of:</h4><input type="text" maxlength=15 name="user"><input type="submit" value="View"></center></form>
  123.  
  124. <?php
  125.  
  126. include("footer.php");
  127. ?>
Add Comment
Please, Sign In to add comment