www.pudn.com > Zhwebcode.rar > ClassManage.asp, change:2008-10-30,size:3533b


<%@language=vbscript codepage=936 %> 
<!--#include file="Conn.asp"--> 
<!--#include file="Admin.asp"--> 
<% 
dim sql,rsBigClass,rsSmallClass,ErrMsg 
set rsBigClass=server.CreateObject("adodb.recordset") 
rsBigClass.open "Select * From BigClass",conn,1,3 
%> 
<script language="JavaScript" type="text/JavaScript"> 
function checkBig() 
{ 
  if (document.form1.BigClassName.value=="") 
  { 
    alert("品种名称不能为空!"); 
    document.form1.BigClassName.focus(); 
    return false; 
  } 
} 
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; 
  } 
} 
function ConfirmDelBig() 
{ 
   if(confirm("确定要删除此品种吗?一旦删除将不能恢复!")) 
     return true; 
   else 
     return false; 
	  
} 
 
function ConfirmDelSmall() 
{ 
   if(confirm("确定要删除此品种吗?一旦删除将不能恢复!")) 
     return true; 
   else 
     return false; 
	  
} 
</script> 
<!-- #include file="Inc/Head.asp" --> 
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> 
  <tr>  
    <td align="center" valign="top"> <br> <br> 
      <strong>品 种 类 别 设 置</strong> <br> <br> <br>  
      <table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#666666" class="border"> 
        <tr bgcolor="EFEFEF" class="title">  
          <td height="25" align="center"><strong>品种名称</strong></td> 
          <td height="20" align="center"><strong>操作选项</strong></td> 
        </tr> 
        <tr bgcolor="EFEFEF" class="title">  
          <td width="260" height="25" align="center"> </td> 
          <td width="251" height="20" align="center"><a href="ClassAddBig.asp">添加品种分类</a></td> 
        </tr> 
        <% 
	do while not rsBigClass.eof 
%> 
        <tr bgcolor="FCFCFC">  
          <td width="260" height="22"><img src="Image/plus.gif"><%=rsBigClass("BigClassName")%></td> 
          <td align="center"><!--<a href="ClassAddSmall.asp?BigClassName=<%=rsBigClass("BigClassName")%>">添加子栏目</a>  
            | --><a href="ClassModifyBig.asp?BigClassID=<%=rsBigClass("BigClassID")%>">修改</a>  
            | <a href="ClassDelBig.asp?BigClassName=<%=rsBigClass("BigClassName")%>" onClick="return ConfirmDelBig();">删除</a></td> 
        </tr> 
        <% 
	  set rsSmallClass=server.CreateObject("adodb.recordset") 
	  rsSmallClass.open "Select * From SmallClass Where BigClassName='" & rsBigClass("BigClassName") & "'",conn,1,3 
	  if not(rsSmallClass.bof and rsSmallClass.eof) then 
		do while not rsSmallClass.eof 
	%> 
        <tr bgcolor="#FFFFFF">  
          <td width="160" height="22">  <img src="Image/nofollow.gif"><%=rsSmallClass("SmallClassName")%></td> 
          <td align="center">              
            <a href="ClassModifySmall.asp?SmallClassID=<%=rsSmallClass("SmallClassID")%>">修改</a>  
            | <a href="ClassDelSmall.asp?SmallClassID=<%=rsSmallClass("SmallClassID")%>" onClick="return ConfirmDelSmall();">删除</a></td> 
        </tr> 
		<% 
		rsSmallClass.movenext 
		loop 
	    end if 
	    rsSmallClass.close 
	    set rsSmallClass=nothing	 
	    rsBigClass.movenext 
	    loop 
        %> 
      </table></td> 
  </tr> 
</table> 
<!-- #include file="Inc/Foot.asp" --> 
 
<% 
rsBigClass.close 
set rsBigClass=nothing 
call CloseConn() 
%>