Hum, if you want you use the cookie of punbb (it use a cookie, is'nt it ?) to log into your website by a form like that :
<form method="post" action="login.php?action=in" id="login" onsubmit="return process_form(this)">
<input type="hidden" name="form_sent" value="1">
<input type="hidden" name="redirect_url" value="http://you/index.php">
<table class="punmain" cellspacing="1" cellpadding="4">
<tr class="punhead">
<td class="punhead" colspan="2">Connexion</td>
</tr>
<tr>
<td class="puncon1right" style="width: 140px; white-space: nowrap"><b>Nom d'utilisateur</b> </td>
<td class="puncon2"> <input type="text" name="req_username" size="25" maxlength="25"></td>
</tr>
<tr>
<td class="puncon1right" style="width: 140px; white-space: nowrap"><b>Mot de passe</b> </td>
<td class="puncon2"> <input type="password" name="req_password" size="16" maxlength="16"></td>
</tr>
<tr>
<td class="puncon1right" style="width: 140px; white-space: nowrap">Actions </td>
<td class="puncon2">
<br> <input type="submit" name="login" value="Connexion"><br><br>
<a href="register.php">Toujours pas enregistré?</a><br>
<a href="login.php?action=forget">Mot-de-passe perdu?</a><br><br>
</td>
</tr>
</table>
</form>
pointing on your login.php
The Javascript fonction is
function process_form(theform)
{
var element_names = new Object()
element_names["req_username"] = "Nom d\'utilisateur"
element_names["req_password"] = "Mot de passe"
// Check for required elements
if (document.images) {
for (i = 0; i < theform.length; ++i) {
if (theform.elements[i].name.substring(0, 4) == "req_") {
if ((theform.elements[i].type=="text" || theform.elements[i].type=="textarea" || theform.elements[i].type=="password" || theform.elements[i].type=="file") && theform.elements[i].value=='') {
alert("\"" + element_names[theform.elements[i].name] + "\" doit être ecrit")
return false
}
}
}
}
// Disable any submit buttons we find
if (document.all || document.getElementById) {
for (i = 0; i < theform.length; ++i) {
var elem = theform.elements[i]
if (elem.type.toLowerCase() == "submit")
elem.disabled = true
}
return true
}
return true
}
French PunBB Support Forum :
http://punbb-fr.ircme.net