Guest User

Untitled

a guest
Nov 6th, 2012
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.81 KB | None | 0 0
  1. <?php require_once('Connections/localserver.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6. if (PHP_VERSION < 6) {
  7. $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8. }
  9.  
  10. $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12. switch ($theType) {
  13. case "text":
  14. $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15. break;
  16. case "long":
  17. case "int":
  18. $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19. break;
  20. case "double":
  21. $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22. break;
  23. case "date":
  24. $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25. break;
  26. case "defined":
  27. $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28. break;
  29. }
  30. return $theValue;
  31. }
  32. }
  33.  
  34. $colname_rstUsers = "-1";
  35. if (isset($_GET['hash'])) {
  36. $colname_rstUsers = $_GET['hash'];
  37. }
  38. mysql_select_db($database_localserver, $localserver);
  39. $query_rstUsers = sprintf("SELECT * FROM users WHERE user_hash = %s", GetSQLValueString($colname_rstUsers, "int"));
  40. $rstUsers = mysql_query($query_rstUsers, $localserver) or die(mysql_error());
  41. $row_rstUsers = mysql_fetch_assoc($rstUsers);
  42. $totalRows_rstUsers = mysql_num_rows($rstUsers);
  43.  
  44.  
  45.  
  46.  
  47. if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
  48.  
  49. $_SESSION['valcode'] = $row_rstUsers['password'];
  50. $_SESSION['userguess']= GetSQLValueString($_POST['password'], "text");
  51.  
  52. if (($_SESSION['userguess'])==($_SESSION['valcode'])){ /* both values match */
  53. $updateSQL = sprintf("UPDATE users SET user_level=1 WHERE user_hash=%s", /* Update the user level to 1 where the user hashtag is equal to the one that was sent in the link*/
  54. GetSQLValueString($_POST['user_hash'], "text"));
  55. mysql_select_db($database_DMXZone, $DMXZone);
  56. $Result1 = mysql_query($updateSQL, $DMXZone) or die(mysql_error());
  57. if (isset($_SERVER['QUERY_STRING'])) {
  58. $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
  59. $updateGoTo .= $_SERVER['QUERY_STRING'];
  60. }
  61. header('Location: validated.php');
  62. }}else{ /* If values dont match*/
  63. header( 'Location: validate.php' ) ; /* Where to go if captcha failed, does not update database and goes back to the same page. */
  64. }
  65.  
  66.  
  67.  
  68.  
  69. ?>
  70. <?php require_once('Connections/localserver.php'); ?>
  71. <?php
  72. session_start();
  73.  
  74. ?>
  75. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  76. <html xmlns="http://www.w3.org/1999/xhtml">
  77. <head>
  78. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  79. <title>Validate</title>
  80. <meta name="description" content="This is an experimental site which reviews the latest and greatest titles of the MMORPG genre">
  81. <meta name="keywords" content="Review, Video Game, MMORPG, MMO, Massively, Multiplayer, Online, Roleplaying, Game, World of Warcraft, Guild Wars, Rift, EVE Online, Star Wars: The Old Republic">
  82. <style type="text/css">
  83. body {
  84. background-image: url(includes/Image-Files/Background-Main-1.jpg);
  85. background-repeat: no-repeat;
  86. }
  87. </style>
  88. <link href="includes/redirectstylesheet.css" rel="stylesheet" type="text/css" />
  89. </head>
  90.  
  91. <body>
  92. <div id="Wrapper">
  93. <div id="Header">
  94. <h1>MMORPG Reviews </h1>
  95. </div>
  96. <div id="Navbarone">
  97. <ul>
  98. <li> <h2> <a href="index.php">Home</a></h2> </li>
  99. <li> <h2> <a href="includes/warcraft.php">World of Warcraft</a></h2> </li>
  100. <li> <h2> <a href="includes/guildwars.php">Guild Wars</a></h2> </li>
  101. <li> <h2> <a href="includes/rift.php">Rift</a></h2> </li>
  102. <li> <h2> <a href="includes/eveonline.php">Eve Online</a></h2> </li>
  103. <li> <h2> <a href="includes/starwars.php"> Star Wars: The Old Republic </a></h2> </li>
  104. <li> <h2> <a href="includes/login.php">Login</a></h2> </li>
  105. <li> <h2> <a href="includes/about.php"> About</a></h2> </li>
  106. </ul>
  107. </div>
  108. <div id="Adbar">
  109. <h3>Content for id "Adbar" Goes Here</h3>
  110. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  111. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  112. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  113. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  114. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  115. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  116. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  117. <h3>Content for id &quot;Adbar&quot; Goes Here </h3>
  118. <h3>Content for id &quot;Adbar&quot; Goes Here</h3>
  119. <h3>Content for id &quot;Adbar&quot; Goes Here </h3>
  120. </div>
  121. <div id="Mainareaone">
  122. <p>&nbsp;</p>
  123. <p>Oops! Your URL was incorrect! Please click <a href="index.php">here</a> to return to the home page!
  124. <p>&nbsp;</p>
  125. <?php if ($totalRows_rstUser > 0) { // Show if recordset not empty ?>
  126. <?php if ($row_rstUser['user_level']==0) { // Select between validated or not ?>
  127. <p>&nbsp;</p>
  128. <p>Welcome <?php echo $row_rstUser['user_name']; ?>. To continue validating your account please enter your password below into the box provided and click on Next to continue:</p>
  129. <form id="form1" name="form1" method="post" action="">
  130. <label for="password">Enter Password:</label>
  131. <input type="password" name="password" id="password" />
  132. <input type="submit" name="go" id="go" value="Validate" />
  133. </form>
  134. <p>&nbsp;</p>
  135. <?php } else { ?>
  136. <p>&nbsp;</p>
  137. <p>Oops! Your account has already been validated! Please click <a href="index.php">here</a> to return to the home page! </p>
  138. <p>&nbsp;</p>
  139. <?php } // Select between validated or not ?>
  140. <?php } // Show if recordset not empty ?>
  141. </div>
  142. <div id="Wrapperone">
  143. <div id="Navbar">
  144. <h3><a href="http://eu.battle.net/wow/en/">Official World Of Warcraft Website</a></h3>
  145. <h3><a href="https://www.guildwars2.com/en-gb/">Official Guild Wars Website</a></h3>
  146. <h3><a href="http://eu.riftgame.com/en/">Official Rift Website</a></h3>
  147. <h3><a href="http://www.eveonline.com/">Official EVE Online Website</a></h3>
  148. <h3><a href="http://www.swtor.com/">Official Star Wars: The Old Republic Website</a></h3>
  149. </div>
  150. <div id="Chatbar">
  151. <p>
  152. <embed src="http://www.xatech.com/web_gear/chat/chat.swf" quality="high" width="300" height="666" name="chat" flashvars="id=184909259" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://xat.com/update_flash.shtml" /></p>
  153. </div>
  154. </div>
  155. <div id="Footer">
  156. <h4><a href="includes/sitemap.php">Site Map/</a><a href="includes/admin.php">Administrative Page</a></h4>
  157. </div>
  158. </div>
  159. </body>
  160. </html>
  161. <?php
  162. mysql_free_result($rstUsers);
  163.  
  164. ?>
Advertisement
Add Comment
Please, Sign In to add comment