浏览主站 | 站长合租 | 新闻资讯 | 站长学院 | 站长盈利 | HTML教程 | 网址导航 | 站长周刊 | 会员投稿 | 滚动新闻 | RSS
发新话题
打印

[已经解决] 静态页中调用动态asp的问题

本主题由 站长中国 于 2008-1-23 04:04 设置高亮

静态页中调用动态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 编辑 ]

TOP

他这个是框架调用会员登陆  你在里面写进去   跳出框架   应该可以了
如果还是不行  告诉你个简单的办法  你看看他们官方的是不是也是在框架内登陆   
如果不是  你看看他的代码是怎么回事就明白了
blank   应该可以的哈
雪灾我们怪天,撞车我们怪别人,地震我们怪地........
习惯了怪天怪地怪别人,浮躁的站长兄弟们,你能把心沉下来做点实际的事情不,源码不像金疙瘩可以增值,反倒有点像地雷,收的越多越迷茫,唉

TOP

引用:
原帖由 seaky 于 2008-1-21 07:54 发表
他这个是框架调用会员登陆  你在里面写进去   跳出框架   应该可以了
如果还是不行  告诉你个简单的办法  你看看他们官方的是不是也是在框架内登陆   
如果不是  你看看他的代码是怎么回事就明白了
blank   应该可 ...
我试过的但还是那样,你能示范一下不?官方没有生成静态的

TOP

说着费事。提供脚本我来给你修改。

TOP

引用:
原帖由 kaoshe 于 2008-1-21 09:33 发表
说着费事。提供脚本我来给你修改。
源码已供,在index.asp中34行,它是用<!--#include file="logins.asp"-->调用

生成的静态首页见根目录的index.htm

我其实本意是如何实现在静态页面中调用动态的会员登陆模块,但我用<iframe src=/logins.asp height=190 width=190></iframe>替换调换后,在生成的静态页面中使用时就出现了上述问题

上传的图中最后一张是正确的,其它在点击注册、退出、进入会员中心时都跑进那个框内了

[ 本帖最后由 kangmile 于 2008-1-21 10:01 编辑 ]

TOP

在logout.asp文件里加上
<%response.Write "<script language=javascript>alert('您已成功注销!');window.location.href='9.asp';</script>"%>
登陆的也一样
这样登陆或者退出的时候内容页就不会跑到跑到框里去了

TOP

response.Write "<script language=javascript>alert('您已成功注销!');window.location.href='index.htm';</script>"

改成response.Write "<script language=javascript>alert('您已成功注销!');window.location.href='logins.asp';</script>"

你都写错了href='index.htm'

[ 本帖最后由 夜的告退 于 2008-1-21 15:32 编辑 ]

TOP

发新话题