?? 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 "您無權操作?。。?quot;
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 + -