⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add_sort.asp

📁 后台管理系统
💻 ASP
字号:
<!--#include file="cookies.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>爱斯特淋浴设备有限公司管理后台</title>
<link href="../file/css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/validator.js"></script>
</head>

<body>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="100" colspan="2"><!--#include file="top.htm"--></td>
  </tr>
  <tr>
    <td width="210" align="center" valign="top" background="../img/leftbg.gif"><!--#include file="menu.htm"-->
<br>
<br>
<br>
<br></td>
    <td align="center" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2">&nbsp;</td>
        </tr>
      <tr>
        <td width="20">&nbsp;</td>
        <td>
 	      <form name="form1" method="post" action="?action=save" onSubmit="return Validator.Validate(this,2)"><table width="96%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#f0f0f0">
            <tr bgcolor="#f0f0f0">
              <td height="25" colspan="2">&nbsp;&nbsp;<img src="../img/title.gif" width="14" height="14">&nbsp;添加产品类别</td>
            </tr>
            <tr align="center" bgcolor="#FFFFFF">
              <td height="30">产品类别:</td>
              <td align="left"><input name="sort" type="text" class="form2" id="sort" datatype="Require"  msg="产品类别不能为空!">
                <font color="red">*</font></td>
            </tr>
            <tr align="center" bgcolor="#FFFFFF">
              <td width="100" height="30">排列序号:</td>
              <td align="left">
			  <% set rs=server.CreateObject("adodb.recordset")
			  rs.open "select sx from product_sort order by sx desc",conn,1,1 %>
			  <input name="sx" type="text" class="form2" id="sx" value="<% if rs.recordcount=0 then %>1<% Else %>
<%= rs("sx")+1 %><% End If %>" size="10" datatype="Number"  msg="请填写产品类别排列序号!">
<% rs.close
set rs=nothing
%>
                <font color="red">*填数字(如:5,值越小,越前排)</font></td>
              </tr>
            <tr bgcolor="#FFFFFF">
              <td height="30" align="center">&nbsp;</td>
              <td align="left"><input type="submit" name="Submit" value=" 提 交 ">
			    <input type="reset" name="Submit" value=" 重 置 ">
			    <input type="button" name="Submit" value=" 返 回 " onClick="history.go(-1);"></td>
              </tr>
          </table>
 	        </form>
        </td>
      </tr>
    </table>      
      <p>&nbsp;</p>
    </td>
  </tr>
</table>
</body>
</html>
<% if request.querystring("action")="save" then
if trim(request.form("sort"))="" then
response.Write "<script language=javascript>alert('请填写类别名称!');window.location.href='add_sort.asp';</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from product_sort"
rs.open sql,conn,1,3
rs.addnew
rs("sort")=trim(request.form("sort"))
rs("sx")=trim(request.form("sx"))
rs.update
response.Write "<script language=javascript>alert('添加类别成功!');window.location.href='add_sort.asp';</script>"
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -