The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#3
|
|||
|
|||
![]()
That worked perfectly. I had to modify my code to retrieve $salt first, so for anyone else who needs it.
Code:
// connect to mysql $mysql = mysql_connect('localhost','adminusername','adminpassword'); // fail on database errors if (!$mysql) { die('false|Could not connect to MySQL'); } // connect to the database mysql_select_db('forumdb', $mysql); $username = $_POST['username']; $password = $_POST['password']; $query = mysql_query("SELECT salt FROM tvgvbuser WHERE username='". $username ."'"); $row = mysql_fetch_array($query); $salt = $row["salt"]; $password = md5(md5($password) . $salt); $query = mysql_query("SELECT * FROM tvgvbuser WHERE username='". $username ."' AND password='". $password ."'"); $result = mysql_num_rows($query); $row = mysql_fetch_array($query); if ($result == 1) { $_SESSION["user"] = $row["username"]; echo 'Welcome, '. $row["username"].' . Please fill out our spam verification and post your comments. <p> <label for="comment-email">Email Address:</label> <input id="comment-email" name="email" size="30" /> </p> </div> <p> <label for="comment-url">URL:</label> <input id="comment-url" name="url" size="30" /> </p> <p> <label for="comment-bake-cookie"><input type="checkbox" id="comment-bake-cookie" name="bakecookie" onClick="if (!this.checked) forgetMe(document.comments_form)" value="1" /> Remember personal info?</label> </p> </div> <p id="comments-open-text"> <label for="comment-text">Comments: </label> <textarea id="comment-text" name="text" rows="15" cols="50"></textarea> </p> <div id="comments-open-footer" class="comments-open-footer"> <input type="submit" accesskey="v" name="preview" id="comment-preview" value="Preview" /> <input type="submit" accesskey="s" name="post" id="comment-post" value="Post" /> '; } else { echo 'Wrong combination of User Name and Password. Did you forget your Password? <a href="http://forums.tvgasm.com/login.php?do=lostpw" target="_blank"> Click here to retrieve it.</a>'; } ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|