<html> <head> <meta http-equiv="Content-Language" content="zh-cn"> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>查询物资</title> </head> <body bgcolor="#3399FF"> <% set objconn=server.createobject("adodb.connection") objconn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("login.mdb") set rs=server.createobject("adodb.recordset") dim user dim password dim sql user=request("username") secret=request("mima") sql="select userid,password,power from usertable where password='"&secret&"' and userid='"&user&"'" rs.open sql,objconn,1,1 %> <% if rs.eof then response.write "用户名或密码错误,请重新登陆" %> <% else %> <form method="post" action="search.asp"> <p> <p> <p> <p align="center"> <font size="6" face="华文琥珀">物资查询系统</font><p align="center"> <font size="2"><a href="index.htm">回首页</a> <a href="showall.asp"> 总览记录</a> 帮助 </font> <p>请选择搜寻类别: <br> <p> <input type="radio" name="sort" value="物资编号">物资编号 <input type="radio" name="sort" value="物资名称">物资名称 <input type="radio" name="sort" value="物资价格">物资价格 <input type="radio" name="sort" value="物资类型">物资类型 <% select case rs("power") case "superadmin" response.write "<input type="radio" name="sort" value="购进日期">购进日期&_ <input type="radio" name="sort" value="最后借出日期">最后借出日期&_ <input type="radio" name="sort" value="最后借出人">最后借出人<p><hr><br>" case "admin" response.write "<input type="radio" name="sort" value="购进日期">购进日期<p><hr><br>" case else response.write "<p><hr><br>" end select %> <p>请输入关键字:<input type="text" name="keyword" size="50"></p> <input type="submit" value="开始查询"> <input type="reset" value="重新输入"> </form> <% end if %> </body> </html>
我是想根据前一个网页输入的用户名,再查找其权限字段“power”,然后再根据其权限有选择性的生成一些单选按纽,在response语法上有错,望指点~谢谢
[此贴子已经被作者于2004-11-17 15:45:39编辑过]