📄 editinfo.asp
字号:
<% @ language="vbscript" %>
<HTML>
<HEAD>
<TITLE>修改设备资料</TITLE>
</HEAD>
<BODY bgcolor="#aabbaa">
<%
if session("hy_id")="" then
response.redirect "1.htm"
end if
if session("hy_id")="" or session("level")<2 then
response.write "<p>您没有访问本页的权限!</p>"
response.end
end if
%>
<font color="red" face="幼圆">
<p><a href="vod1.asp">返回首页</a>|
<% if session("level")>1 then%>
<a href="browseinfo.asp">查询资料</a>|
<a href="addinfo.asp">添加资料</a>|
<a href="deleteinfo.asp">删除资料</a>|
<% end if %></p>
<hr width="100%" noshade size="1" color="red">
</font>
<div align="center">
<form name="form1" method="post" action="editinfo.asp">
<p><font color="#551166">查询要修改的设备资料:
<select size="1" name="1stfld">
<option selected value="all">全部显示</potion>
<option selected value="equ_department">所在部门</potion>
<option selected value="equ_data">购买日期</potion>
<option selected value="equ_id">设备编号</potion>
<option selected value="equ_name">设备名称</potion>
</select>
值:<input name="txtvalue" type="text" size="10">
<input name="btnsubmit" type="submit" value=" 提 交 "></font></p>
</form>
<%
dim cnn,rst,ssql,currentpage,rowcount,i
if request.form("btnsubmit")="" then
response.end
end if
currentpage=request.querystring("currentpage")
if currentpage="" then
currentpage=1
end if
set cnn=server.createobject("adodb.connection")
set rst= server.createobject("adodb.recordset")
cnn.connectionstring="provider=sqloledb;data source=(local);"&_
"uid=sa;pwd=0335;database=vod"
cnn.open
rst.CursorType=adOpenStatic
rst.pagesize=8
field=trim(request.form("1stfld"))
value=trim(request.form("txtvalue"))
if field="all" then
ssql="select * from shebei order by equ_id"
end if
if field<>"all" and value="" then
response.redirect"editinfo.asp"
end if
if field<>"all" and value<>"" then
ssql="select * from shebei where "&field&"='"&value&"' order by equ_id"
end if
rst.open ssql, cnn,1
if rst.eof then
response.write"<p><font color=red>没有找到符合条件的记录!</font></p>"
end if
%>
<table border="1" bgcolor="#bbdddd" width="78%">
<caption><b>查询结果:</b>共<%=rst.recordcount %>件设备
<tr>
<th width="200">设备号</th><th width="200">设备名称</th><th width="200">所属部门</th><th width="200">设备价格</th>
</tr>
<% while not rst.eof %>
<tr>
<td><a href=editinfo1.asp?equ_id=<% =rst("equ_id") %>>
<% =rst("equ_id") %></a></td>
<td><% =rst("equ_name") %></td>
<td><% =rst("equ_department") %></td>
<td><% =rst("equ_value") %></td>
</tr>
<%
rowcount=rowcount+1
rst.movenext
wend
%>
</table>
</p></div>
</body>
<html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -