静态页中调用动态asp的问题
我一动态页面带会员登陆,会员登陆处是这样调用的:
<iframe marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src=/logins.asp height=190 width=190 name="i1"></iframe>
在生成静态页面后,我查看了静态页的源码,会员登陆处还是这段代码。
在静态实际使用中,用正确的用户名可以登陆,
1,但在进入会员中心时内容页跑到框内了????
2,点退出时无法正常退出返回??
请教各位了,谢谢!
----------------------------------------login.asp代码:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<link href="/skin/skin<%=skinid%>/css.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<%if request.cookies("Cnhww")("username")="" then%>
</tbody>
<form action="/checkuserlogin.asp" method="post" name="userlogin" id="userlogin">
<tr>
<td height="10" colspan="2" class="unnamed2"><div align="center">顾客您好,购买商品请先登录</div></td>
</tr>
<tr>
<td width="35%" class="unnamed2"><div align="right">账 号:</div></td>
<td width="65%"><div align="left">
<input name="username" class="form2" type="text" id="username2" maxlength="18" size="12" />
</div></td>
</tr>
<tr>
<td class="unnamed2"><div align="right">密 码:</div></td>
<td><div align="left">
<input name="userpassword" class="form2" type="password" id="userpassword2" maxlength="18" size="12" />
<input class="wenbenkuang" type="hidden" name="linkaddress2" value="<%=request.servervariables("http_referer")%>" />
<br />
</div></td>
</tr>
<tr>
<td class="unnamed2"><div align="right">验证码:</div></td>
<td><div align="left">
<input class="form2" name="verifycode" type="text" value="<%If GetCode=9999 Then Response.Write "9999"%>" maxlength="4" size="6" />
<img src="/GetCode.asp" /></div></td>
</tr>
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
<td height="17" colspan="2">
<div align="center">
<input name="imageField" src="/skin/skin<%=skinid%>/login.gif" width="53" height="17" border="0" type="image" />
<a href="/register.asp"><img src="/skin/skin<%=skinid%>/reg.gif" width="53" height="17" hspace="5" vspace="0" border="0" /></a></div></td>
</tr>
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
<td colspan="2"><div align="center"><img src="/images/dot03.gif" width="9" height="9" hspace="5" /><a href="#" ><font color=8F6040>密码丢失/找回密码</font></a></div></td>
</tr>
</form>
<%else%>
<tr>
<td colspan="2"class="unnamed2" ><div align="center">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select jifen,yucun,reglx,vipdate from [YX_User] where name='"&request.cookies("Cnhww")("username")&"'",conn,1,3
if rs("vipdate")<>"" then
if rs("vipdate")<date and rs("reglx")=2 then
rs("reglx")=1
rs.update
end if
end if
response.cookies("Cnhww")("yucun")=rs("yucun")
response.cookies("Cnhww")("jifen")=rs("jifen")
response.cookies("Cnhww")("reglx=")=rs("reglx")
rs.close
set rs=nothing
if request.cookies("Cnhww")("reglx")=2 then
response.write ""&request.cookies("Cnhww")("username")&" VIP贵宾您好<br>您目前有 <font color=red>"&request.cookies("Cnhww")("jifen")&"</font> 积分<br>预存款 <font color=red>"&request.cookies("Cnhww")("yucun")&"</font> 元 "
else
response.write ""&request.cookies("Cnhww")("username")&" 您好<br>您目前有 <font color=red>"&request.cookies("Cnhww")("jifen")&"</font> 积分<br>预存款 <font color=red>"&request.cookies("Cnhww")("yucun")&"</font> 元 "
end if
response.write "<br><a href=user.asp><font color=red>进入会员中心</font></a>"
response.write "<br><a href=logout.asp>注销/退出</a>"
%>
</div></td>
</tr>
<%end if%>
</table>
---------------------------------------logout.asp代码:
<!--#include file="conn.asp"-->
<%
username=request.cookies("Cnhww")("username")
'shjianame=request.cookies("Cnhww")("shjianame")
response.Cookies("shangcheng").Expires = NOW() -1
response.cookies("Cnhww")("username")=""
response.cookies("Cnhww")("shjianame")=""
response.cookies("Cnhww")("jifen")=0
response.cookies("Cnhww")("yucun")=0
response.cookies("Cnhww")("reglx")=0
response.cookies("Cnhww")("jiaoyijine")=0
response.Cookies("cnhww")("dingdanusername")=""
session("userid")=""
conn.execute("delete from orders where username='"&username&"' and zhuangtai=7")
conn.execute("delete from ordersaward where username='"&username&"' and zhuangtai=7")
'response.redirect index.asp
response.Write "<script language=javascript>alert('您已成功注销!');window.location.href='index.htm';</script>"
%>
[ 本帖最后由 kangmile 于 2008-1-22 14:06 编辑 ]