Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
DownSmallClass_Add.asp
Package: qiyeguanli.rar [view]
Upload User: ahxunteng
Upload Date: 2022-05-16
Package Size: 1606k
Code Size: 4k
Category:
WEB(ASP,PHP,...)
Development Platform:
VBScript
- <!--#include file="bsconfig.asp"-->
- <!--#include file="Inc/Function.asp"-->
- <%
- dim Action,BigClassName,SmallClassName,sqlBig,rsBig,rs,FoundErr,ErrMsg
- Action=trim(Request("Action"))
- BigClassName=trim(request("BigClassName"))
- SmallClassName=trim(request("SmallClassName"))
- sqlBig="select * from DownBigClass where BigClassName='" & BigClassName & "'"
- Set rsBig= Server.CreateObject("ADODB.Recordset")
- rsBig.open sqlBig,conn,1,1
- rsBig.close
- if Action="Add" then
- if BigClassName="" then
- FoundErr=True
- ErrMsg=ErrMsg & "<br><li>下载大类名不能为空!</li>"
- end if
- if SmallClassName="" then
- FoundErr=True
- ErrMsg=ErrMsg & "<br><li>下载小类名不能为空!</li>"
- end if
- if FoundErr<>True then
- Set rs=Server.CreateObject("Adodb.RecordSet")
- rs.open "Select * From DownSmallClass Where BigClassName='" & BigClassName & "'AND SmallClassName='" & SmallClassName & "'",conn,1,3
- if not rs.EOF then
- FoundErr=True
- ErrMsg=ErrMsg & "<br><li>“" & BigClassName & "”中已经存在下载小类“" & SmallClassName & "”!</li>"
- else
- rs.addnew
- rs("BigClassName")=BigClassName
- rs("SmallClassName")=SmallClassName
- rs.update
- rs.Close
- set rs=Nothing
- call CloseConn()
- Response.Redirect "DownClass.asp"
- end if
- end if
- end if
- if FoundErr=True then
- call WriteErrMsg()
- else
- %>
- <script language="JavaScript" type="text/JavaScript">
- function checkSmall()
- {
- if (document.form2.BigClassName.value=="")
- {
- alert("请先添加大类名称!");
- document.form1.BigClassName.focus();
- return false;
- }
- if (document.form2.SmallClassName.value=="")
- {
- alert("小类名称不能为空!");
- document.form2.SmallClassName.focus();
- return false;
- }
- }
- </script>
- <!-- #include file="Inc/Head.asp" -->
- <BR>
- <table cellpadding="2" cellspacing="1" border="0" width="360" align="center" class="a2">
- <tr>
- <td class="a1" height="25" align="center"><strong>下 载 类 别 设 置</strong></td>
- </tr>
- <tr class="a4">
- <td align="center">
- <BR>
- <form name="form2" method="post" action="DownSmallClass_Add.asp" onSubmit="return checkSmall()">
- <table width="350" border="0" align="center" cellpadding="0" cellspacing="2" class="border">
- <tr bgcolor="#999999" class="title">
- <td height="25" colspan="2" align="center"><strong>添加小类</strong></td>
- </tr>
- <tr class="tdbg">
- <td width="126" height="22" bgcolor="#C0C0C0" align=right><strong>所属大类:</strong></td>
- <td width="218" bgcolor="#E3E3E3">
- <select name="BigClassName">
- <%
- dim rsBigClass
- set rsBigClass=server.CreateObject("adodb.recordset")
- rsBigClass.open "Select * From DownBigClass",conn,1,1
- if yzcv<>zcv then response.end
- if rsBigClass.bof and rsBigClass.bof then
- response.write "<option>请先添加文章大类</option>"
- else
- do while not rsBigClass.eof
- if rsBigClass("BigClassName")=BigClassName then
- response.write "<option value='"& rsBigClass("BigClassName") & "'selected>" & rsBigClass("BigClassName") & "</option>"
- else
- response.write "<option value='"& rsBigClass("BigClassName") & "'>" & rsBigClass("BigClassName") & "</option>"
- end if
- rsBigClass.movenext
- loop
- end if
- rsBigClass.close
- set rsBigClass=nothing
- %>
- </select>
- </td>
- </tr>
- <tr class="tdbg">
- <td width="126" height="22" bgcolor="#C0C0C0" align=right><strong>小类名称:</strong></td>
- <td bgcolor="#E3E3E3"><input name="SmallClassName" type="text" size="20" maxlength="30"></td>
- </tr>
- <tr class="tdbg">
- <td height="22" align="center" bgcolor="#C0C0C0"> </td>
- <td height="22" align="center" bgcolor="#E3E3E3"><div align="left"
- ><input name="Action" type="hidden" id="Action3" value="Add"><input name="Add" type="submit" value=" 添 加 "></div></td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- <BR>
- <%htmlend%>
- <%
- end if
- call CloseConn()
- %>