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

📄 edit_class_di3.asp

📁 一套企业全站
💻 ASP
字号:
<!--#include file=inc/conn.asp-->
<!--#include file=../../inc/checkadmin.asp-->
<!--#include file=../../../ajaxLIB/ajaxLIB.asp-->







<%
AJAXshowLoader()
AJAXshowSweetTitles2()
%>





<%


set rsq=server.createobject("adodb.recordset")
sql = "select * from sys_data_aboutus_di2cen_class"
rsq.open sql,conn,1,1
%>
<script language="javascript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rsq.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rsq("class_name"))%>","<%= trim(rsq("di1_parent_id"))%>","<%= trim(rsq("ID"))%>");
        <%
        count = count + 1
        rsq.movenext
        loop
        rsq.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
var ddd=0;
            if (subcat[i][1] == locationid)
            { 
ddd=ddd+1;
 document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }     



        }


if( ddd==0)  {

document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option("请先添加第二级分类","" );
           


} 
    }  



</script>








<link href="css/my.css" rel="stylesheet" type="text/css">

<!------------------------------------------------div:new------------------------>



<div  id="edit" style="filter:blendTrans(duration=1); position:absolute;visibility:hidden; width:774px; z-index:-1; left: 3px; top: 12px; ">



<table width="400" height="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999" bgcolor="#D1D1D1">


<tr>
 
<td width="350" height="20" bordercolor="#999999" background="../../images/titbg.gif">

   
</td>
  
<td width="44" align="center" bordercolor="#999999" background="../../images/titbg.gif">

</td>
</tr>

<tr><td colspan=2>








<form method="POST" name="myform" action="di3_class_edit_chk.asp" target="_self">
<table width="650" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr align="center">
    <th height="30" colspan="2"><strong>修改第三级分类</strong>&nbsp;      </th>
  </tr>











  <tr bgcolor="#FFFFFF">
    
    <td width=200>&nbsp;属于哪个第一级分类</td>





<td>
<% 		


	set Ers=server.CreateObject("adodb.recordset")
	Ers.open "select * from sys_data_aboutus_di3cen_class where id="&request("cid")&"",conn,1,1

set rs=server.createobject("adodb.recordset")



        sql = "select * from sys_data_aboutus_class"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加一级分类"
		else
		%>
                    <select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
                      

                      <%
			

		    selclass=rs("ID")
        	

		    do while not rs.eof
			%>
                      <option 
<%

if cstr(rs("id"))=Ers("parent_id_of_di1") then 
selclass=rs("ID")
response.Write("selected")

end if

%> value="<%=trim(rs("ID"))%>"><%=trim(rs("news_type_name"))%></option>
                      <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%></select>


</td></tr>

  <tr bgcolor="#FFFFFF">
    
    <td>&nbsp;属于哪个第二级分类</td>


<td>
    <select name="SmallClassName">
      <option value="">请选择二级分类</option>
                      <%
			sql="select * from sys_data_aboutus_di2cen_class where  di1_parent_id='" & selclass & "'"
			rs.open sql,conn,1,1
			if not(rs.eof and rs.bof) then
			%>
                    

				<%do while not rs.eof%>
                      <option


<%

if cstr(rs("id"))=Ers("parent_id_of_di2") then 


response.Write("selected")

end if

%> 


 value="<%=rs("ID")%>"><%=rs("class_name")%></option>
                      <%
			    	rs.movenext


				loop
else

%>

  <option value="">请先添加第二级分类</option>


<%
			end if
	        rs.close
			%>
    </select></td>
  </tr>

























    <tr bgcolor="#FFFFFF">
    <td width="87" height="30" align="right">分类名:</td>
    <td width="560">&nbsp;&nbsp;<input name="title" type="text" id="title" value="<%=ers("class_name")%>"></td>
  </tr>
    


  <tr bgcolor="#FFFFFF">
    <td height="30" align="right"><input name="cid" type="hidden" id="cid" value="<%=request("cid")%>"></td>
    <td>&nbsp;&nbsp;
    <input type="submit" name="Submit" value=" 修  改 "></td>
  </tr>
</table>
</form>






</td></tr>
</table>

</div>
<!----------------------------end------div:new------------------------>









<script language=javascript>
AJAXfade(1,'edit')
</script>



<%
AJAXcloseLoader()
%>






⌨️ 快捷键说明

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