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

📄 down_classmodifybig.asp

📁 网站的后台管理代码......内容比较全面....新手比较适合
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../inc/adconn.asp"-->
<!--#include file="../css.asp"-->
<%
if session("admin_name")="" then 
response.end
end if%>
<%
dim BigClassID,Action,rs,NewBigClassName,OldBigClassName,FoundErr,ErrMsg
BigClassID=trim(Request("BigClassID"))
Action=trim(Request("Action"))
NewBigClassName=trim(Request("NewBigClassName"))
OldBigClassName=trim(Request("OldBigClassName"))

if BigClassID="" then
  response.Redirect("Down_ClassManage.asp")
end if
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select * from BigClass_down where BigClassID=" & CLng(BigClassID),conn,1,3
if rs.Bof and rs.EOF then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>此下载大类不存在!</li>"
else
	if Action="Modify" then
		if NewBigClassName="" then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>下载大类名不能为空!</li>"
		end if
		if FoundErr<>True then
			rs("BigClassName")=NewBigClassName
    	 	rs.update
			rs.Close
	     	set rs=Nothing
			if NewBigClassName<>OldBigClassName then
				conn.execute "Update SmallClass_Down set BigClassName='" & NewBigClassName & "' where BigClassName='" & OldBigClassName & "'"
				conn.execute "Update download set BigClassName='" & NewBigClassName & "' where BigClassName='" & OldBigClassName & "'"
     		end if		
     		Response.Redirect "Down_ClassManage.asp" 
		end if
	end if
	if FoundErr=True then
		call WriteErrMsg()
	else
%>
<script language="JavaScript" type="text/JavaScript">
function checkBig()
{
  if (document.form1.BigClassName.value=="")
  {
    alert("大类名称不能为空!");
    document.form1.BigClassName.focus();
    return false;
  }
}
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"><table width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
        <tr>
          <td height="30" background="../images/pics/tile_sub.gif">&gt;&gt;修改大类名称</td>
        </tr>
        <tr> 
          <td align="center" valign="top"><br>
          <br> 
          <br> <form name="form1" method="post" action="Down_ClassModifyBig.asp">
              <table width="350" border="1" align="center" cellpadding="0" cellspacing="2" bordercolor="#999999" bgcolor="#ECF5FF" class="border">
                <tr bgcolor="#A4B6D7" class="title"> 
                  <td height="25" colspan="2" align="center"><strong>修改大类名称</strong></td>
                </tr>
                <tr class="tdbg"> 
                  <td width="126" bgcolor="#A4B6D7"><strong>大类ID:</strong></td>
                  <td width="204"><%=rs("BigClassID")%> <input name="BigClassID" type="hidden" id="BigClassID" value="<%=rs("BigClassID")%>"> 
                    <input name="OldBigClassName" type="hidden" id="OldBigClassName" value="<%=rs("BigClassName")%>">                  </td>
                </tr>
                <tr class="tdbg"> 
                  <td width="126" bgcolor="#A4B6D7"><strong>大类名称:</strong></td>
                  <td> 
                    <input name="NewBigClassName" type="text" id="NewBigClassName" value="<%=rs("BigClassName")%>" size="20" maxlength="30">                  </td>
                </tr>
                <tr class="tdbg"> 
                  <td align="center" bgcolor="#A4B6D7">&nbsp;</td>
                  <td align="center"> 
                    <div align="left"> 
                      <input name="Action" type="hidden" id="Action" value="Modify">
                      <input name="Save" type="submit" id="Save" value=" 修 改 ">
                    </div></td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table>
      <%
	end if
end if
rs.close
set rs=nothing
%> </td>
  </tr>
</table>

⌨️ 快捷键说明

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