So far, I'v managed to add this into my theme, so it will Say "Welcome back Switch17, and provide a link to your account.
But I want to continue it a little further, and have it say 'Welcome back Switch17, you have 2 new message(s). Now of course the number of messages would vary.
Here's the code I have right now:
Code
<?
if (pnUserLoggedIn()) {
echo "Welcome Back $username - <a href=\"user.php\">Your Account</a> | <a href=\"user.php?module=NS-User&op=logout\">Logout</a></td>";
} else {
echo "<form action=\"user.php\" method=\"post\"><a href=\"user.php\">Create an Account</a> :: Username <input type=\"text\" name=\"uname\" size=\"10\" maxlength=\"50\"> Password <input type=\"password\" name=\"pass\" size=\"10\" maxlength=\"25\"><input type=\"checkbox\" value=\"1\" name=\"rememberme\" /> Remember me <input type=\"hidden\" name=\"module\" value=\"NS-User\" /><input type=\"hidden\" name=\"op\" value=\"login\" /><input type=\"hidden\" name=\"url\" value=\"index.php\"><input type=\"submit\" value=\"Login\"></td></form>";
}
?>
if (pnUserLoggedIn()) {
echo "Welcome Back $username - <a href=\"user.php\">Your Account</a> | <a href=\"user.php?module=NS-User&op=logout\">Logout</a></td>";
} else {
echo "<form action=\"user.php\" method=\"post\"><a href=\"user.php\">Create an Account</a> :: Username <input type=\"text\" name=\"uname\" size=\"10\" maxlength=\"50\"> Password <input type=\"password\" name=\"pass\" size=\"10\" maxlength=\"25\"><input type=\"checkbox\" value=\"1\" name=\"rememberme\" /> Remember me <input type=\"hidden\" name=\"module\" value=\"NS-User\" /><input type=\"hidden\" name=\"op\" value=\"login\" /><input type=\"hidden\" name=\"url\" value=\"index.php\"><input type=\"submit\" value=\"Login\"></td></form>";
}
?>
One other thing I may want to do as well is perhaps have it say "Welcome back Switch17, you last visited on XXXXX?
Can anyone give some pointers as to how I would continue in editing the code for this?
Thanks
Switch
