lizhonggeng吧 关注:21贴子:2,460
  • 0回复贴,共1

关于ASP排序的问题!

只看楼主收藏回复

在后台对分类进行用数字自由排序,数字,越大越靠前!以下是代码!请高手帮忙!急!

<!--#include file="mdb/conn.asp" -->
<!--#include file="config.asp" -->
<!--#include file="check.asp" -->
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="INDEX.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.xzy {border: <%=xcolor%> solid; border-width: 0px 1px 1px}
-->
</style>
</head>

<body bgcolor="<%=bgcolor%>" text="#000000">
<!--#include file="top.asp" -->
</td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#FFFFFF">
<tr>
<td height="5"></td>
</tr>

<tr>
<td valign="top"><!--#include file="admintop.asp" --></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td class="table-xia" bgcolor="#FFFFFF">
<%
if IsNumeric(Request.QueryString("typeid"))=False then
Response.Redirect"info.asp?info=错误的参数"
else
typeid=cint(Request.QueryString("typeid"))
end if
sql = "SELECT * FROM zhuanti where id="&typeid
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1
if rs.eof and rs.bof then
Response.Redirect"info.asp?info=没有该主题"
else
%>



<form name="form3" method="post" action="saveadminzhuanti.asp">  修 改 专 题 相 册:<br>所属分类:<select name="flid" class="cp">
<%
sql = "SELECT * FROM type"
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.OPEN sql,Conn,1,1
if rs1.eof and rs1.bof then
Response.Write"<option>还没有任何分类</option>"
else
do while not rs1.eof
Response.Write"<option value='"&rs1("id")&"'"
if rs("pl")=rs1("id") then Response.Write" selected"
Response.Write">"&rs1("name")&"</option>"
rs1.movenext
loop
end if
rs1.close
set rs1=nothing
%>
</select><br>相册名称:<input type="text" name="zhuantiname" class="cp" size="15" maxlength="50" value="<%=rs("name")%>"><br>分类排序:<input type="text" name="type_order" class="an" size="5" maxlength="10" value="<%=type_order%>" style="ime-mode:disabled" 
onkeydown="if(event.keyCode==13)event.keyCode=9" onKeyPress="if 
((event.keyCode<48 || event.keyCode>57)) event.returnValue=false">(只能输入数字,越大越靠前)<br>拍摄日期:<input type="text" name="riqi" class="cp" size="15" maxlength="50" value="<%=rs("data")%>"><br>心情音乐:<input type="text" name="music" class="cp" size="35" maxlength="100" value="<%=rs("music")%>"><br>显示方式:<input type="checkbox" name="view" value="1" <%if rs("view") =true then response.write "checked" end if%>>强制直接列表显示  (不选择则为缩图形式显示)<br>相关介绍:<br><textarea maxLength=60 cols=43 name=js rows=7 class="form">
<%if rs("js")<>"" then
                content=replace(rs("js"),"<br>",chr(13))
                content=replace(content," "," ")    
            response.write content
        end if%></textarea><br><select name="zt" class="cp">
<option value="delzhuanti">删除</option>
<option value="editzhuanti" selected>修改</option>
</select><br>密码:<input type="text" name="pass" class="cp" size="15" maxlength="50" value="<%=rs("pass")%>">
 <input type="hidden" name="typeid" value="<%=typeid%>"> 
<input type="submit" name="Submit3" value="确定">
</form>
<%
end if
rs.close
set rs=nothing
%>
</td>
</tr>
<tr>
<td height="12" bgcolor="#FFFFFF" class="bk"> </td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="foot.asp" -->
</body>
</html>


1楼2007-09-25 02:29回复