Hvorfor virker autologin ikke ?
Jeg har et login som ligger i en includeret fil, for at det skal fylde mindere!Men hvorfor kan jeg ikke klikke på min checkbox, så bruger bliver husket næste gang der logges ind?? Sådan som det er nu, husker den ikke noget??
Her er koderne, sorry - men det fylder lidt:)
<% If Request.QueryString("checkbox") = "autologon" Then
'så lav en cookie, der husker brugernavn
Response.Cookies("huskbruger")("navn") = strBrugernavn
Response.Cookies("huskbruger")("autologon") = Request.QueryString("autologon")
'få cookien til at eksistere i 2 år
Response.Cookies("huskbruger").Expires = Date + 720
End If
If Request.Cookies("huskbruger").HasKeys Then
Session("Brugernavn") = Request.Cookies("huskbruger")("navn")
Session("login")=Request.Cookies("huskbruger")("autologon")
End If
%>
<% If Session("logget_ind") <> "ja" Then %>
<Form name="bruger" method="POST" action="logxx_db.asp?mode=login" style="margin:0px;">
<table width="170" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="billeder/site/ramme_midt_left2.gif" width="4" height="4"></td>
<td width="162" background="billeder/site/ramme_top_midt.gif" height="4" colspan="5"></td>
<td background="billeder/site/ramme_top_right.gif" width="4" height="4"></td>
</tr>
<tr>
<td background="billeder/site/ramme_left.gif" width="4"></td>
<td colspan="5">
<table width="162" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="billeder/site/sidemenulaas.gif" height="13" width="15"></td>
<td background="billeder/site/sidemenugroen2.gif" height="13" width="144">
<div align="center"><img src="billeder/site/bruger.gif" width="43" height="9"></div>
</td>
<td background="billeder/site/sidemenugroen3.gif" height="13" width="3" ></td>
</tr>
</table>
</td>
<td background="billeder/site/ramme_right.gif" width="4"></td>
</tr>
<tr>
<td background="billeder/site/ramme_midt_left2.gif" width="4" height="4"></td>
<td width="162" background="billeder/site/ramme_top_midt.gif" height="4" colspan="5"></td>
<td background="billeder/site/ramme_midt_right.gif" width="4" height="4"></td>
</tr>
<tr>
<td background="billeder/site/ramme_left.gif" width="4"></td>
<td colspan="5">
<table width="161" border="0" cellspacing="5" cellpadding="0" class="sidemenu_bg">
<tr>
<td>
<table width="151" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2">
<table width="80" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="billeder/site/brugernavn.gif" width="80" height="7"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="4" colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<%
if thispage = "" then
response.write "<INPUT TYPE='hidden' NAME='denneside' VALUE='home-side'>"
else
response.write "<INPUT TYPE='hidden' NAME='denneside' VALUE='"& thispage &"'>"
end if
%>
<div align="center">
<Input type="text" name="brugernavn" class="soeg">
</div>
</td>
</tr>
<tr>
<td height="4" colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<table width="59" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="billeder/site/kodeord.gif" width="59" height="7"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="4" colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<Input type="password" name="kodeord" class="soeg">
</div>
</td>
</tr>
<tr>
<td height="3" colspan="2"></td>
</tr>
<%
Select Case Request.QueryString("mode")
Case "check"
%>
<tr>
<td width="20">
<input type="checkbox" name="autologon" Value="autologon" checked>
</td>
<%=("<td width=""131"" class=""hovedtekst""><a onFocus=""this.blur()"" href=""" & thispage & ".asp"">Husk mig</a></td></tr>")%>
<% Case Else %>
<tr>
<td width="20">
<input type="checkbox" name="autologon" Value="autologon">
</td>
<%=("<td width=""131"" class=""hovedtekst""><a onFocus=""this.blur()"" href=""" & thispage & ".asp?mode=check"">Husk mig</a></td></tr>")%>
<% End select %>
</table>
</td>
</tr>
</table>
</td>
<td background="billeder/site/ramme_right.gif" width="4"></td>
</tr>
<tr>
<td background="billeder/site/ramme_midt_left2.gif" width="4" height="4"></td>
<td width="60" background="billeder/site/ramme_top_midt.gif" height="4"></td>
<td background="billeder/site/ramme_midt_midt.gif" width="4" height="4"></td>
<td width="60" background="billeder/site/ramme_top_midt.gif" height="4"></td>
<td background="billeder/site/ramme_midt_midt.gif" width="4" height="4"></td>
<td width="34" background="billeder/site/ramme_top_midt.gif" height="4"></td>
<td background="billeder/site/ramme_midt_midt2.gif" width="4" height="4"></td>
</tr>
<tr>
<td background="billeder/site/ramme_left.gif" width="4"></td>
<td>
<table width="60" border="0" cellspacing="0" cellpadding="0" height="12">
<tr>
<td background="billeder/site/datografik4.gif" height="12" width="2"></td>
<td><a onFocus="this.blur()" href="#" onclick="document.bruger.submit()" onMouseOver="document.images['login'].src='/hovedprojekt/billeder/site/login2.gif'" onmouseout="document.images['login'].src='/hovedprojekt/billeder/site/login1.gif'"><img name="login" border="0" src="billeder/site/login1.gif" width="55" height="12" value="submit"></a><td background="billeder/site/datografik3.gif" height="12" width="3"></td>
</tr>
</table>
</td>
<td background="billeder/site/ramme_right.gif" width="4"></td>
<td>
<table width="60" border="0" cellspacing="0" cellpadding="0" height="12">
<tr>
<td background="billeder/site/datografik4.gif" height="12" width="2"></td>
<td><a onFocus="this.blur()" href="opret.asp" onMouseOver="document.images['opret'].src='/hovedprojekt/billeder/site/opret2.gif'" onmouseout="document.images['opret'].src='/hovedprojekt/billeder/site/opret1.gif'"><img name="opret" border="0" src="billeder/site/opret1.gif" width="55" height="12"></a><td background="billeder/site/datografik3.gif" height="12" width="3"></td>
</tr>
</table>
</td>
<td background="billeder/site/ramme_right.gif" width="4"></td>
<td colspan="2"></td>
</tr>
<tr>
<td background="billeder/site/ramme_midt_left2.gif" width="4" height="4"></td>
<td width="60" background="billeder/site/ramme_top_midt.gif" height="4"></td>
<td background="billeder/site/ramme_midt_midt4.gif" width="4" height="4"></td>
<td width="60" background="billeder/site/ramme_top_midt.gif" height="4"></td>
<td background="billeder/site/ramme_midt_midt2.gif" width="4" height="4"></td>
<td colspan="2"></td>
</tr>
</table>
</Form>
<% Else %>
<% If Session("logget_ind") = "ja" Then %>
<Form name="bruger_logaf" method="POST" action="logxx_db.asp?mode=logaf" style="margin:0px;">
HER ER BRUGER LOGGET IND... </table>
</Form>
<%
End If
End If
%>
