📄 edit_special.asp
字号:
<%@ LANGUAGE="VBScript"%>
<%response.buffer=true%>
<%const title="修改物品状态"%>
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title><%=title%></title>
<link rel=stylesheet type=text/css href=../data/forum.css>
</head>
<body topmargin=0 onload="javascript:form1.name.focus();">
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!-- #include file=../data/myPrg.asp-->
<!-- #include file=../data/flag.inc-->
<%
Showtitle(title)
'检测ID是否为整数
if isnumeric(trim(request("id"))) = false then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""id需为整数!!!"");history.go(-1);"
Response.Write "</script>"
Response.End
end if
if flag > 3 then
call closedatabase
Response.Write "您无权操作!!!"
Response.End
end if
sql="select * from stat where id= "&request("id")
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
dc_id = rs("stat_dc_id")
prod_id=rs("stat_prod_id")
end if
rs.Close
set rs = nothing
sql="select * from product where prod_id= "&prod_id
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
prod_pinming = rs("prod_pinming")
prod_type=rs("prod_type")
end if
rs.Close
set rs = nothing
dim action
action=request("action")
if action="edit" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from stat where id="&request("id"), conn, 1, 3
rs("stat_prod_sn")=request("prod_sn")
rs("stat")=trim(request("stat"))
rs("stat_where")=trim(request("where"))
rs.Update
rs.Close
set rs=nothing
end if
if flag = 3 then
sql="select * from stat where id="&request("id")&" "
elseif flag < 3 then
sql="select * from stat where id="&request("id")
else
call closedatabase
Response.Write "您无权限操作!"
Response.End
end if
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
%>
<form action="edit_special.asp?action=edit" method="POST" name="form1">
<p align=center><font color=red>请在以下的表格中修改数据</font>
<p>
<table align=center border=0>
<input type=hidden name=id value=<%=request("id")%>>
<tr>
<td nowrap><font color=blue>物品名称:</td>
<td><%=prod_pinming%> </td>
</tr>
<tr>
<td nowrap><font color=blue>物品型号:</td>
<td><%=prod_type%></td>
</tr>
<tr>
<td nowrap><font color=blue>序列号:</td>
<td><input style="text" name="prod_sn" value="<%=rs("stat_prod_sn")%>" size="20"></td>
</tr>
<tr>
<td nowrap><font color=blue>物品状况:</td>
<td><select name="stat">
<option selected value="<%=rs("stat")%>"><%=rs("stat")%></option>
<option value="1">良好</option>
<option value="0">损坏</option>
</select></td>
</tr>
<tr>
<td nowrap><font color=blue>入库单号:</td>
<td><%=rs("stat_sia")%></td>
</tr>
<tr>
<td nowrap><font color=blue>去向:</td>
<td><input style="text" name="where" value="<%=rs("stat_where")%>" size="20"></td>
</tr>
<tr>
<td>
<td ><br>
<input type="submit" name="Submit" value="确定">
<input class=buttonface type=reset name=reset value=复原>
<input name="companyid" type="hidden" value="1">
</td>
</tr>
</table>
</form>
<%
rs.close
set rs = nothing
call closedatabase
end if%>
<!--#include file=../data/copyright.asp-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -