<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file="../setup.asp"-->
<!--#include file ="../connadmin.asp"-->
<%
act=request.QueryString("act")
select case act
    case "paixu"  call paixu()
end select
'***********************************************************
sub paixu()
	If Request.Form<>"" and request.form("txt_paixu")<>"" Then
	erordertxt=request.form("txt_paixu")
	erordertxt=replace(erordertxt," ","")
	str2=split(erordertxt,",")
	'response.Write str(0)
	i=0
	set rsq=server.createobject("ADODB.recordset")
	sql="select * from com where yiid="& cint(request.QueryString("yiid")) &" order by paixu asc"
	rsq.open sql,conn,3,3
	do while not rsq.eof
		if isnumeric(str2(i)) then
		rsq("paixu")=str2(i)
		end if
		i=i+1
		rsq.update
		rsq.movenext
	loop
	rsq.close
	end if
end sub
'***********************************************************
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../img/css.css"><title></title>
<script language=javascript>

function SureDel(id,yiid)
{
    if ( confirm("警告!你是否真的要删除？"))
        {
            window.location.href = "com_newsdo.asp?action=delenews&id=" + id +"&yiid="+ yiid
        }
}
function checkform2()
{var ch=window.confirm("你确定要删除这些产品？这个操作是不可恢复的。")
if(ch){
return true;}
else
{return false;}
}

</script>
</head>
<body>
<form name="form1" method="post" action="?act=paixu&yiid=<%=request.QueryString("yiid")%>">
  <table class="border" width="95%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr> 
      <td height="49" valign="top" class="bg_low"> 
        <%
''''''''创建记录集///////////////////////////////////////////////////////////////////////////////////////
set rs=server.createobject("ADODB.recordset")
 sql="select * from com order by paixu asc"
rs.open sql,conn,1,1
if  rs.eof then
response.Write("暂无信息")
response.End()
end if%>
        <table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <%do while not rs.eof%>
          <tr> 
            <td width="20%">编号<%=rs("id")%>；排序 
              <input name="txt_paixu" type="text"  value="<%=rs("paixu")%>" size="2" width="3">
            </td>
            <td width="52%">标题：<%=rs("title")%></td>
            <td width="5%"><a class="xiahua" href="com_addnews.asp?yiid=<%=request.QueryString("yiid")%>&action=modi&id=<%=rs("id")%>">编辑</a></td>
            <td width="10%"> <a class="xiahua" href='javascript:SureDel(<%=rs("id")%>,<%=rs("yiid")%>)'> 删除</a></td>
            <td width="20%">&nbsp; </td>
          </tr>
          <%rs.movenext
loop%>
        </table></td>
    </tr>
  </table>
  <table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center"><br>
        <input type="submit" name="Submit" value="修改顺序提交">
        <br> <br>
        * 输入排序顺序即可调整在前台页面的显示顺序 </td>
    </tr>
  </table>
</form>
<%conn.close
set conn=nothing
%>
</body>
</html>
