📄 hover_down_classaddsmall.asp
字号:
<!--#include file="toptable.asp"-->
<%
'=================================
' 良精科技企业管理系统
' QQ在线客服:65961930 82993936
' 咨询定购Tel:010-81991660
' asp3721@hotmail.com
' www.liangjing.net
' copyright(c)2001-2008 HoverCms 2007特别版
'=================================
%>
<%
dim Action,BigClassName,SmallClassName,rs,FoundErr,ErrMsg
Action=trim(Request("Action"))
BigClassName=trim(request("BigClassName"))
SmallClassName=trim(request("SmallClassName"))
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 Hover_SmallClass_down 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 "Hover_Down_ClassManage.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 width="97%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<form name="form2" method="post" action="Hover_Down_ClassAddSmall.asp" onSubmit="return checkSmall()">
<tr> <td height="25" colspan="3" align="center" valign="top" class="title"><STRONG>下 载 类 别 设 置</STRONG> </td>
</tr>
<tr> <td height="25" colspan="3" align="center" valign="top" class="title2">下载小类</td>
</tr>
<tr >
<td width="471" height="22" align="right" class="table">所属大类:</td>
<td width="514" class="table">
<select name="BigClassName">
<%
dim rsBigClass
set rsBigClass=server.CreateObject("adodb.recordset")
rsBigClass.open "Select * From Hover_BigClass_down",conn,1,1
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="471" height="22" align="right" class="table">小类名称:</td>
<td class="table">
<input name="SmallClassName" type="text" size="20" maxlength="30"> </td>
</tr>
<tr class="tdbg">
<td height="22" colspan="2" align="center" class="table">
<input name="Action" type="hidden" id="Action3" value="Add">
<input name="Add" type="submit" class="btn" value=" 添 加 ">
</td>
</tr>
</form></table>
<%
end if
%>
<BR>
<%htmlend%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -