<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="tuzh_pri.asp"-->
<!--#include file="../connadmin.asp"-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../img/css.css"><title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<script language="javascript">
function checklogin()
{
	for (var i=0; i<form1.yiorder.length; i++)
	{
        if (form1.yiorder[i].value=="") 
	{
		alert("没有填写顺序号");
		form1.yiorder[i].focus();
		return false;
		break;
	}
		
	}
	return true;
}
function checklogin2()
{
	for (var i=0; i<form2.erorder.length; i++)
	{
        if (form2.erorder[i].value=="") 
	{
		alert("没有填写顺序号");
		form2.erorder[i].focus();
		return false;
		break;
	}
		
	}
	return true;
}
</script>
<%
If Request.Form<>"" and request("dook")="yi" Then
	yiordertxt=request("yiorder")
	'response.Write yiordertxt&"<br>"
	yiordertxt=replace(yiordertxt," ","")
	str=split(yiordertxt,",")
	'response.Write str(0)
	i=0
	set rsq=server.createobject("ADODB.recordset")
	sql="select * from yikind order by yiorder"
	rsq.open sql,conn,3,3
	do while not rsq.eof
	rsq("yiorder")=cint(str(i))
	i=i+1
	rsq.update
	rsq.movenext
	loop
	rsq.close
end if
%>
<%
If Request.Form<>"" and request("dook")="er" Then
	erordertxt=request("erorder")
	ernumtxt=request("ernum")
	'response.Write yiordertxt&"<br>"
	ernumtxt=replace(ernumtxt," ","")
	str2=split(erordertxt,",")
	str3=split(ernumtxt,",")
	'response.Write str(0)
	i=0
	set rsq=server.createobject("ADODB.recordset")
	sql="select * from erkind where yiid="& request("bigid") &" order by erorder"
	rsq.open sql,conn,3,3
	do while not rsq.eof
	rsq("erorder")=cint(str2(i))
	rsq("ernum")=cint(str3(i))
	i=i+1
	rsq.update
	rsq.movenext
	loop
	rsq.close
end if
%>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>
</head>

<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr> 
    <td height="565" align="center" valign="top" class="bg_low"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>菜单显示顺序设置</b></font> 
          </td>
        </tr>
      </table>
      <br>
      <table width="95%" border="5" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
        <tr>
          <td align="center">设置一级栏目的顺序： 
            <form id="form1" name="form1" method="post" action="?dook=yi" onsubmit="return checklogin()">
              <table border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <%
set rs=server.createobject("ADODB.recordset")
sql="select * from yikind order by yiorder"
rs.open sql,conn,1,1
do while not rs.eof
if rs("show")=true then 
mark="true"
end if
%>
                  <td valign="top"> <table border="1" align="left" cellpadding="2" cellspacing="1" bordercolor="#468DAC">
                      <tr> 
                        <td align="center" valign="top" bgcolor="#468DAC" class="style3"> 
                          <a href="?bigid=<%=rs("yiid")%>"><%=rs("yiname")%></a></td>
                      </tr>
                      <tr> 
                        <td align="center" valign="top">顺序 
                          <input name="yiorder" type="text" value="<%=rs("yiorder")%>" size="3" checked="checked"  <%if rs("show")=true then%> <%end if%> /></td>
                      </tr>
                    </table></td>
                  <%rs.movenext
loop
rs.close%>
                </tr>
              </table>
              <br />
              <input type="submit" name="Submit2" value="提交" />
            </form>
            <br /> <br />
            <br /> </td>
        </tr>
      </table>
      <br /> <br />
      <table width="95%" border="5" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
        <tr>
          <td align="center">设置二级栏目顺序：（请选择要设置的栏目）<br />
            <br /> <table border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <%
set rs=server.createobject("ADODB.recordset")
sql="select * from yikind order by yiorder"
rs.open sql,conn,1,1
do while not rs.eof
if rs("show")=true then 
mark="true"
end if
%>
                <td valign="top"> <table border="1" align="left" cellpadding="2" cellspacing="1" bordercolor="#468DAC">
                    <tr> 
                      <td align="center" valign="top" bgcolor="#468DAC" class="style3"> 
                        <a href="?bigid=<%=rs("yiid")%>"><%=rs("yiname")%></a></td>
                    </tr>
                  </table></td>
                <%rs.movenext
loop
rs.close%>
              </tr>
            </table>
            <br /> 
            <%
if request("bigid")<>"" then%>
            <form action="?dook=er&bigid=<%=request("bigid")%>" method="post" name="form2" id="form2" onsubmit="return checklogin2()">
              自上而下的顺序: 
              <table width="264" border="1" cellspacing="1" cellpadding="0" bordercolor="#468DAC">
                <%set rs2=server.createobject("ADODB.recordset")
		sql="select * from erkind where yiid="&request("bigid") &" order by erorder"
		rs2.open sql,conn,1,1
		do while not rs2.eof%>
                <tr> 
                  <td width="155">&nbsp;<%=rs2("ername")%>&nbsp;&nbsp; <input name="erorder" type="text" value="<%=rs2("erorder")%>" size="3" />
                  </td>
                  <td width="100">调用数量
                    <input name="ernum" type="text" value="<%=rs2("ernum")%>" size="3" /></td>
                </tr>
                <%
   rs2.movenext
   loop
   rs2.close%>
              </table>
              <input type="submit" name="Submit" value="提交" />
            </form>
            <%
end if

%>
          </td>
        </tr>
      </table>
      <br /></td>
  </tr>
</table>
</body>
</html>