📄 spzzsadmin.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Inc/Dataconn.asp" -->
<!--#include file="Inc/Funcs.asp" -->
<script language="JavaScript">
function DelRecord(ZZSID)
{
var ifDel = window.confirm("真的要删除吗?单击取消停止!");
if (ifDel) {
window.location="SPZZSAdmin.asp?Action=DeleteSPZZS&ZZSID=" + ZZSID
}else window.alert("删除操作被取消!");
}
</script>
<%
Call CheckAdmin
Dim LBName,LBSM,SQLStr
If Request.QueryString("Action")="DeleteSPZZS" Then
ZZSID=Request.QueryString("ZZSID")
SQLStr="Delete from ZZS where ZZSID="&ZZSID
conn.execute SQLStr
End If
If request("Action")="AddZZS" Then
ZZSName=Request.Form("ZZSName")
If ZZSName="" Then
Call eMessage("制造商名称不能为空!")
end if
ZZSSM=Request.Form("ZZSSM")
SQLStr="Insert Into ZZS(ZZSName,ZZSSM) Values('"&ZZSName&"','"&ZZSSM&"')"
conn.execute SQLStr
Call Message("类别添加成功!")
End If
If Request.Form("Action")="SaveZZS" Then
ZZSID=Request.Form("ZZSID")
ZZSName=Request.Form("ZZSName")
if ZZSName="" then
Call eMessage("制造商名称不能为空!")
end if
ZZSSM=Request.Form("ZZSSM")
SQLStr="Update ZZS Set ZZSName='"&ZZSName&"',ZZSSM='"&ZZSSM&"' Where ZZSID="&ZZSID
conn.execute SQLStr
Call Message("制造商修改成功!")
End if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>商品制造商管理</title>
<link href="Inc/css.css" rel="stylesheet" type="text/css" />
<!--#include file="Inc/hlink.asp" -->
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE4 {color: #000033}
-->
</style></head>
<body>
<table width="612" height="450" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<table width="350" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<form name="form1" method="post" action="SPZZSAdmin.asp">
<tr>
<td height="20" bgcolor="#FFFFFF">
<input name="Action" type="hidden" value="ShowAddZZS" />
<input type="submit" class="Button2" value="添加商品制造商" /></td>
</tr>
</form>
<%if request("Action")="ShowAddZZS" then%>
<tr>
<td height="25" align="center" background="Images/tbtitle.jpg"><span class="Txt STYLE4">添加商品制造商</span></td>
</tr>
<form name="form2" method="post" action="SPZZSAdmin.asp">
<tr>
<td height="20" bgcolor="#FFFFFF"><span class="Txt"> 制造商名称:
<input name="ZZSName" type="text" class="InputStyle2" id="ZZSName" />
</span></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><span class="Txt"> 制造商说明:
<textarea name="ZZSSM" rows="5" class="InputStyle2" id="ZZSSM"></textarea>
</span></td>
</tr>
<tr>
<td height="20" align="center" bgcolor="#FFFFFF"><span class="Txt">
<input name="Action" type="hidden" id="Action" value="AddZZS" />
<input name="Submit" type="submit" class="Button1" value=" 添 加 " />
<input name="Submit2" type="reset" class="Button1" value=" 重 填 " />
</span></td>
</tr>
</form>
<%end if%>
</table>
<%if request("Action")="EditZZS" then
ZZSID=request("ZZSID")
SQLStr="Select * from ZZS where ZZSID="&ZZSID
rS.open SQLStr,conn,1,1
%>
<table width="350" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<form name="form3" method="post" action="SPZZSAdmin.asp">
<tr>
<td height="25" align="center" background="Images/tbtitle.jpg" class="Txt STYLE4">编辑商品制造商</td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><span class="Txt"> 制造商名称:
<input name="ZZSName" type="text" class="InputStyle2" id="ZZSName" value="<%=trim(rS(1))%>" />
</span></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF" class="Txt"><span class="Txt"> 制造商说明:
<textarea name="ZZSSM" rows="5" class="InputStyle2" id="ZZSSM"><%=trim(rS(2))%></textarea></span></td>
</tr>
<tr>
<td height="20" align="center" bgcolor="#FFFFFF">
<input name="ZZSID" type="hidden" id="ZZSID" value="<%=rS(0)%>" />
<input name="Action" type="hidden" id="Action" value="SaveZZS" />
<input name="Submit3" type="submit" class="Button1" value="保存" /></td>
</tr>
</form>
</table>
<%
rS.close
end if%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="25" align="center" background="Images/tbtitle.jpg" class="Txt"><span class="STYLE4">制造商编号</span></td>
<td height="25" align="center" background="Images/tbtitle.jpg" class="Txt"><span class="STYLE4">制造商名称</span></td>
<td height="25" align="center" background="Images/tbtitle.jpg" class="Txt"><span class="STYLE4">制造商说明</span></td>
<td height="25" colspan="2" align="center" background="Images/tbtitle.jpg" class="Txt"><span class="STYLE4">操作</span></td>
</tr>
<%
SQLStr="Select * from ZZS"
rS.open SQLStr,conn,1,1
for i=1 to rS.recordcount
%>
<tr>
<td height="20" align="center" bgcolor="#FFFFFF" class="Txt"><%=rS(0)%></td>
<td align="center" bgcolor="#FFFFFF" class="Txt"><%=rS(1)%></td>
<td align="center" bgcolor="#FFFFFF" class="Txt"><%=rS(2)%></td>
<td align="center" bgcolor="#FFFFFF" class="Txt"><a href="SPZZSAdmin.asp?Action=EditZZS&ZZSID=<%=rS(0)%>">编 辑</a></td>
<td align="center" bgcolor="#FFFFFF" class="Txt"><a href="#" onClick="DelRecord(<%=rS(0)%>)">删 除</a></td>
</tr>
<%rS.movenext
next%>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -