<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="config.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <h1>ASP会员登退系统</h1> <hr> <!----ASP代码---> <% if request.querystring("act")="login" then '获取地址,成立则输出 '登陆 sql="select * from uid where i_uid='"&request.form("i_uid")&"'" sql=sql & "and i_code='"&request.form("i_code")&"'" rst.open sql,conn,1,1 if rst.recordcount > 0 then session("name")=rst("i_uid") '用这个session变量表示用户是否已经登陆 session("acc")=true else %> 用户密码出错,不能登陆 <% end if rst.close elseif request.querystring("act")="loginout" then '退出登陆 session("name")="" session("acc")=flase end if %> <!--结束--> <% if not session("acc") then %> <form id="form1" name="form1" method="post" action="login.asp?act=login"> <p>会员登陆: <input type="text" name="i_uid" id="i_uid" /> </p> <p>用户密码: <input type="text" name="i_code" id="i_code" /> </p> <p> <input type="submit" name="button" id="button" value="提交" /> <input type="reset" name="button2" id="button2" value="重置" /> </p> </form> <%else %> <%=session("name")%> 欢迎你回来 <p> <a href="login.asp?act=loginout">退出登陆</a> </p> <% end if %> <% if not session("acc") then%> <p> 你还没有登陆,不能查看 </p> <% else %> <p> </p> <table width="734" height="51" border="1"> <tr> <% rst.open "uid",conn,1,1 for i=0 to rst.fields.count-1 %>
<td height="23">字段名</td> <td>字段类型</td> <td>字段数据长度</td> <td>允许存储的最大数字位</td> </tr> <tr> <td><%=rst.fields(i).name%></td> <td><%=rst.fields(i).type%></td> <td><%=rst.fields(i).actualsize%></td> <td><%=rst.fields(i).precision%></td> </tr> <%next%>
</table> <%end if%> <p> </p> <% set rst=nothing conn.close set conn=nothing %> </body> </html> |