Login_inc2.php
Code:
<?php
// Edit the line below to show path to your forums
$forumpath = "/forums/";
// You dont have to edit anything underneath here,
// but you can if you wish to style the login box
// to match the style of your site.
// We check if user is logged in
if ($vbulletin->userinfo['userid']!=0) {
// If Logged in display welcome back message
echo "Welcome Back, ";
echo $vbulletin->userinfo['username'];
echo " !<br />";
} else { // If user is not logged in, we do this stuff
// Display login boxes + button
// You can style this with html or CSS as normal if desired.
echo"
<form action=\"".$forumpath."/login.php\" method=post onsubmit=md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)>
<script type=text/javascript src=\"".$forumpath."/clientscript/vbulletin_md5.js\"></script>
User Name:
<input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == '$vbphrase[username]') this.value = ''; size=10 />
<br />
Password:<input name=vb_login_password type=password size=10 />
<br />
<label for=cb_cookieuser_navbar><input name=cookieuser type=checkbox id=cb_cookieuser_navbar value=1 checked=checked />
Remember Me?<br /></label>
<input type=submit title=$vbphrase[enter_username_to_login_or_register] value=\"Log In\" />
<input type=hidden name=s value=$session[sessionhash] />
<input type=hidden name=do value=login />
<input type=hidden name=vb_login_md5password />
<input type=hidden name=vb_login_md5password_utf />
</form>
";
}
?>
login_inc.php
Code:
<?php
// Edit the line below to show path to your forums
$forumpath = "/forums/";
// You dont have to edit anything underneath here,
// but you can if you wish to style the login box
// to match the style of your site.
// We check if user is logged in
if ($vbulletin->userinfo['userid']!=0) {
// If Logged in display welcome back message
echo "Welcome Back, <b>";
echo $vbulletin->userinfo['username'];
echo " !</b><br>";
// If logged in display logout link
echo "<a href=\"".$forumpath."login.php?$session[sessionurl]do=logout&logouthash=$logouthash";
echo $vbulletin->userinfo['logouthash'];
echo "\">";
echo "<font size=\"1\" face=\"verdana\">Log Out</font></a>
";
} else { // If user is not logged in, we do this stuff
// Display login boxes + button
// You can style this with html or CSS as normal if desired.
echo"
<form action=\"".$forumpath."/login.php\" method=post onsubmit=md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)>
<script type=text/javascript src=\"".$forumpath."/clientscript/vbulletin_md5.js\"></script>User Name:
<input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == '$vbphrase[username]') this.value = ''; size=10 />
<br />
Password:<input name=vb_login_password type=password size=10 />
<br />
<label for=cb_cookieuser_navbar><input name=cookieuser type=checkbox id=cb_cookieuser_navbar value=1 checked=checked />
Remember Me?<br /></label>
<input type=submit title=$vbphrase[enter_username_to_login_or_register] value=\"Log In\" />
<input type=hidden name=s value=$session[sessionhash] />
<input type=hidden name=do value=login />
<input type=hidden name=vb_login_md5password />
<input type=hidden name=vb_login_md5password_utf />
</form>
";
}
?>
Bookmarks