麻烦大家帮我解决一下这个问题
http://www.softemail.net/hy/index001-2.asp
用户名:666666,密码:666666
为什么在这个网页的右边会员登陆框里登陆后,刷新一下就显示没有登陆了呢???
好你在右边登陆框里登陆后没有真正的写入cookiess一样
index001-2.asp里是iframe了huiyuan.asp
huiyuan.asp代码如下:
<link href="../images/index.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style><table width="135" height="180" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="index01">
<tr>
<td width="148" height="30" bordercolor="#FFFFFF" bgcolor="0214B6"><div align="center" class="index">:: <b>会员登陆</b> ::</div></td>
</tr>
<tr>
<td width="141" height="100" bordercolor="#FFFFFF" class="index01">
<!--#include file="inc.asp"-->
<!--#include file="md5.asp"-->
<%
if request("action")="loginok" then
lgname=Replace(Request.Form("lgname"),"'","")
lgpwd=Replace(Request.Form("lgpwd"),"'","")
lgtype=Replace(Request.Form("lgtype"),"'","")
lgpwd=md5(lgpwd)
set lg=myconn.execute("select * from user where name='"&lgname&"' and password='"&lgpwd&"'")
if lg.eof and lg.bof then
Response.Cookies(cn)("lgname")=""
Response.Cookies(cn)("lgpwd")=""
Response.Cookies(cn)("lgtype")=""
response.cookies(cn&"2")("admin")=1
response.write"<span class='index01'><center>·登陆失败·</center></span><span class='index01'><center>你的用户名或密码错误</center></span>"
%>
<%
else
call getadmin()
response.write"<center><span class='index01'><b>·登陆成功·</b></span></center><span class='index01'><center>欢迎光临Softemail.net</center></span>"
end if
%>
<%end if%>
<!--#include file="conn.asp"-->
<form method="POST" name="login" action="huiyuan.asp?action=loginok">
<table width="135" height="100" border="0" cellpadding="0" cellspacing="0" class="index01">
<tr>
<%
set lg=myconn.execute("select * from user where name='"&lgname&"' and password='"&lgpwd&"'")
if lg.eof and lg.bof then
Response.Cookies(cn)("lgname")=""
Response.Cookies(cn)("lgpwd")=""
Response.Cookies(cn)("lgtype")=""
response.cookies(cn&"2")("admin")=1
%>
<td colspan="2"><%if lgname="" then%>
<span class='index01'>游客,您好。请登陆:</span></td>
<%
end if
%>
</tr>
<tr>
<td width="51">用户名:</td>
<td width="88"><input name="lgname" type="text" id="lgname" size="8"></td>
</tr>
<tr>
<td>密 码:</td>
<td><input name="lgpwd" type="text" id="lgpwd" size="8"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重写">
</div></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="12" bordercolor="#FFFFFF" class="index01"><div align="center">
<table width="135" height="21" border="0" cellpadding="0" cellspacing="0">
<tr>
<%
set bbs1=myconn.execute("select * from bbsinfo")
regno=bbs1("usernum")
set bbs1=nothing
%>
<td><span class='index01'>注册会员:<%=regno%>人</span></td>
<%
riqi=now+timeset/24
myconn.execute("delete*from online where ltime<now+"×et&"/24-0.05")
if lgname="" then
set jilu=myconn.execute("select ip from online where ip='"&ip&"'")
if jilu.eof then
myconn.execute("insert into online (ip,ltime,pic)VALUES('"&ip&"','"&riqi&"',"&admin&")")
else
myconn.execute("update online set ltime='"&riqi&"' where ip='"&ip&"'")
end if
set jilu=nothing
end if
if lgname<>"" then
set ujilu=myconn.execute("select name from online where name='"&lgname&"'")
if ujilu.eof then
myconn.execute("delete*from online where ip='"&ip&"'")
myconn.execute("insert into online (name,ip,ltime,pic)VALUES('"&lgname&"','"&ip&"','"&riqi&"',"&admin&")")
else
myconn.execute("update online set ltime='"&riqi&"' where name='"&lgname&"'")
end if
set ujilu=nothing
end if