有没有点留言后如果没有登陆就弹出登陆框的那种

dandanlovelove 2009-06-25 09:46:10
有没有点留言后如果没有登陆就弹出登陆框的那种,可以实现无刷新登陆的代码?
...全文
49 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dandanlovelove 2009-06-25
  • 打赏
  • 举报
回复
怎么把

用户名:
<input name="username" type="text" class="text" id="username" />
密码:
<input name="password" type="password" class="text" id="password"/>
<input type="submit" value="登录" class="bt"/>
<a href="./Reg.asp" target="_blank"> <font color="#990000">注册 </font> </a>
<a href="./passbao.asp" target="_blank">忘记密码 </a>
加到上面代码内?
fengqipiaobo 2009-06-25
  • 打赏
  • 举报
回复
参考一楼的!
hongmaohouzi 2009-06-25
  • 打赏
  • 举报
回复
可以验证一下,用户的session值,这个值为空,跳转到登录页面。
ttt2 2009-06-25
  • 打赏
  • 举报
回复
用javascrpt 结合xmlhttp验证下,就可以
dandanlovelove 2009-06-25
  • 打赏
  • 举报
回复
<!--#include file=CONN.ASP-->
<%
dim id,username,ts,m
m=trim(request("m"))
id=trim(request("id"))
ts=trim(request("ts"))
if not isnumeric(id) or id="" then
response.write "<li>参数错误!"
cl
response.end
end if
if request.cookies("fox")("username")="" or request.cookies("fox")("domain")="" or request.cookies("fox")("id")="" then
response.write "<br>"
response.write "<li>你还没有登陆!"
cl
response.end
end if
if request("fox")="chk" then
call fox()
response.end
end if
%>

<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="fox.CSS">
<title>我要回复</title>
<style type="text/css">
<!--
body {
background-color: #F2F2F2;
}
-->
</style><body topmargin="3" leftmargin="0">
<div align="center">
<center>
<br>
<br>

<table width="352" height="64" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#F2F2F2" style="border-collapse: collapse">
<form action="?id=<%=id%>&ts=<%=ts%>&m=<%=m%>&fox=chk" method="POST">
<tr>
<td width="80" height="25" style="border-bottom-style: none; border-bottom-width: medium">
<p align="center"><font color="#FF6600">回复内容:</font></td>
<td width="273" height="25" style="border-bottom-style: none; border-bottom-width: medium">
<textarea class="inputa" crows="16" name="neirong" cols="37" style="height:150 "></textarea></td>
</tr>
<tr>
<td width="353" height="35" colspan="2" style="border-top-style: none; border-top-width: medium">
<p align="center">
<input class="inputb" type="submit" value="提交回复" name="B1"></td>
</tr>
</form>
</table>
</center>
</div>
<%
sub fox()
dim rs,sql,neirong
if len(trim(request("neirong")))<2 then
response.write "<li>回复内容没有填写!"
cl
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "select * from FOX_hf "
rs.open sql,conn,1,3
rs.addnew
rs("addname")=request.cookies("fox")("username")
rs("neirong")=trim(request("neirong"))
rs("xxid")=id
rs("ts")=ts
rs("username")=m
rs.update
rs.close
set rs=nothing
if ts>2 then
Conn.Execute("Update FOX_shop Set hfcs=hfcs+1 where id="&cstr(id))
else
Conn.Execute("Update FOX_xinxi Set hfcs=hfcs+1 where id="&cstr(id))
end if
response.write "<li>回复成功!"
closedb
cl
end sub
%>
<%sub cl()%>
<body onLoad="setTimeout(window.close, 1000)">
<%end sub%>




怎么把用户名:
<input name="username" type="text" class="text" id="username" />
密码:
<input name="password" type="password" class="text" id="password"/>
<input type="submit" value="登录" class="bt"/>
<a href="./Reg.asp" target="_blank"><font color="#990000">注册</font></a>
<a href="./passbao.asp" target="_blank">忘记密码</a>
加到上面代码内?

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧