游戏茶苑双扣 手机认证:ASP用户登陆代码,大家请帮我看看

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 10:34:56
<!--#include file="userfunc.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=222 border=0>
<TR>
<TD width=9><IMG height=9 src="images/vipasp_cornerl.gif" width=9></TD>
<TD width=204 background=images/vipasp_top.gif></TD>
<TD width=10><IMG height=9
src="images/vipasp_cornerr.gif" width=9></TD></TR>
<TR>
<TD width=9 background=images/vipasp_l.gif></TD>
<TD vAlign=top width=204>
<% if request.cookies("timesshop")("username")="" then
Dim url %>
<table width=100% border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
<form name=loginfo method=post action=chkuser.asp>
<tr bgcolor=#ffffff>
<td width=38% height=19 align=right nowrap style='padding-left:1px'>用户
</td>
<td width=62% style='padding-left:1px'><input name=username type=text id=username size=9>
</td>

<td width=62% nowrap style='padding-left:1px' align="center">密 码</td>
<td width=62% style='padding-left:1px'><input name=password type=password id=password3 size=10></td>
</tr>
<tr bgcolor=#ffffff>
<td height=18 style='padding-left:1px' align=right>验证 </td>
<td style='padding-left:1px'><input name=passcode type=text id=passcode size=9></td>
<td style='padding-left:1px'><img src="code.asp"></td>
<td style='padding-left:1px'>
<input type=submit name=Submit value="登录" onClick="return checkuu();"> <a href="reg.asp">注册</a>
<input name=comeurl type=hidden value=<% = url %>></td>
</tr>
</form>
</table>
<%
else
dim shop,rsvip,username,shopjiage
set rs=server.CreateObject("adodb.recordset")
rs.open "select product.price2,product.vipprice,product.price1,orders.productnum from product inner join orders on product.id=orders.id where orders.state=2 and orders.username='"&trim(request.Cookies("timesshop")("username"))&"' ",conn,1,1
set shop=server.CreateObject("adodb.recordset")
shop.Open "select distinct(goods) from orders where username='"&request.Cookies("timesshop")("username")&"' and state=2 ",conn,1,1

if shop.recordcount=0 then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2">欢迎 <font color=ff0000><% = Request.Cookies("timesshop")("username") %></font> 光临 您是<font color=red>普通</font>用户</td>
</tr>

问题1:

--------<% if request.cookies("timesshop")("username")="" then
Dim url %>

timeshop 是什么意思?cookies("timesshop")("username")为空后,声明一个Dim url 是什么含义?

timesshop是自己定义的~避免和别的同名cookie重复吧,怕别的地方也用到cookies("username")
最后定义url是为了登陆成功之后指向到某个网址
不过里面并没有给url赋值,可能是预留吧。一般来说是要写个
url=request("url")吧。

timesshop??是自己定义的一个cookie,应该是记录上次登陆或者购买的时间吧

dim url这个应该是为了后面用url做声明,不过到表单提交的时候他也没有对url作出处理,的确令人费解,可能是当初打算用他做点什么,可是一直没有用吧

timeshop 应该是定义的COOKIES有效时限