📄 o_newmodify.asp
字号:
<!-- #include File="../../inc/imis.inc"-->
<%
set rs=server.createobject("ADODB.Recordset")
if request("pagename")="donewmodify" then
sql="select * from office_setup where name='"&request("name")&"'"
rs.open sql,source,3,3
if rs.eof then
%>
<script language=javascript>
alert("数据异常,请咨询系统管理员!");
window.close();
</script>
<%
response.end
else
rs("name")=request("name")
rs("price")=request("price")
rs("unit")=request("unit")
rs("brief")=request("brief")
rs.update
rs.close
%>
<script language=javascript>
alert("已成功修改了新办公用品!");
window.opener.location.reload()
window.close();
</script>
<%
end if
end if
rs.open "select * from office_setup where id="&request("id"),source,3,3
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>办公用品</title>
<LINK href="../../<%=session("color")%>.css" rel=stylesheet type=text/css>
<script language="JavaScript">
function amsub(form)
{
if(form.name.value=="")
{
alert("请输入办公用品名!")
return false
}
if (form.unit.value=="")
{ alert("请输入该用品单位!")
return false
}
return true
}
</script>
</head>
<body topmargin="0">
<form method="post" action="o_newmodify.asp" name="form1" onsubmit="return amsub(this)">
<br>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="4" align="center">修改办公用品(价格单位:元)</td>
</tr>
<tr>
<td align="right">品名:</td>
<td>
<input type="text" name="name" size="20" maxlength="20" value="<%=rs("name")%>">
</td>
</tr>
<tr>
<td align="right">单位:</td>
<td>
<input type="text" name="unit" size="20" maxlength="20" value="<%=rs("unit")%>">
</td>
</tr>
<tr>
<td align="right">单价:</td>
<td>
<input type="text" name="price" size="20" maxlength="20" value="<%=rs("price")%>">
</td>
</tr>
<tr>
<td align="right">备注:</td>
<td>
<textarea name="brief" cols="20" rows="4"><%=rs("brief")%></textarea>
</td>
</tr>
<% rs.close %>
<tr>
<td colspan="4" align="center" height="50">
<input type="submit" name="Submit" value="确定修改">
<input type="hidden" name="pagename" value="donewmodify">
<input type="hidden" name="id" value="<%=request("id")%>">
<input type="button" name="wcl" value="关闭窗口" onclick="window.close()">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -