请各位老师帮忙??有点复杂。
<!--#include file="conn1.asp"--><title>新闻排序</title>
<%response.expires=0%>
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='index.asp';")
response.write("</script>")
response.end
end if
id1=Request("id")
classs=request("class1")
if class3<>"" then
classs=request("class3")
end if
%>
<%Dim action
action=Request.QueryString ("action")
Select Case Lcase(action)
Case "edit"
Call edit
Case "add"
Call add
Case "del"
Call del
Case "type_re"
Call type_re
Case Else
Call main
End Select
Sub main
%>
<body bgcolor="#DFEEFC">
<div align="center">
<table width="600" border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<th><font size="5" color="#FF0000">首页文字新闻排序</font></th></tr>
<tr><td class="forumrow">
<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#800000" bordercolordark="#800000" bgcolor="#3A9CF7" style="border-collapse: collapse">
<tr>
<td width="50" align="center">ID</td>
<td width="400" align="center"> 名 称</td>
<td width="150" align="center">
<p style="margin-top: 0; margin-bottom: 0">排序</p>
<p style="margin-top: 0; margin-bottom: 0">
<font size="2" color="#FF0000">(1—20)0为不显示</font></td>
</tr>
</table>
</td></tr><%
set rs=server.createobject("adodb.recordset")
sql="SELECT * FROM news_wj where class=" &cstr(cint(classs))& " and titlepx<>0 order by titlepx aSC"
rs.Open sql,conn,1,1
i=0
do while not rs.eof
i=i+1
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function SubmitForm(class,id,i) {
//if(confirm("您真的要更新图片新闻排序吗?")){
document.MakeHtml.action="?class="+class+"&action=edit&id="+id+"&i="+i;
document.MakeHtml.submit();
// }
}
//-->
</SCRIPT>
<FORM METHOD=POST name="MakeHtml" action="">
<tr><td class="forumrow">
<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#000000" style="border-collapse: collapse" bordercolordark="#000000" bgcolor="#999966" bordercolor="#00FF00">
<tr>
<td width="50" align=center><%=rs("id")%></td>
<td width="400"><%=rs("title")%></td>
<td width="150">
<input size=5 type="text" name="titlepx" value="<%=rs("titlepx")%>">
<input style="color: #FFFFFF; background-color: #666699; border: 1px solid #FFFFFF" type="submit" value="更 新" onClick="SubmitForm(<%=rs("id")%>,<%=i%>,class=<%=rs("class")%>);">
</td>
</tr>
</table>
</td></tr><%
rs.movenext
loop
rs.Close
set rs=nothing
%></FORM><tr><td class=forumrow><div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<form method="POST" action="?action=add" id=form0 name=form0>
<tr>
<td width="10%" align=center></td>
</tr>
</form>
</table>
</div></a></td></tr>
</table>
</div>
<%
End Sub
Sub edit
titlepx=trim(request.form("titlepx"))
class2=cint(request("class"))
id=cint(request("id"))
i=cint(request("i"))
conn.execute("update news_wj set titlepx='"&trim(split(titlepx,",")(i-1))&"' where id="&id)
response.redirect("titlepx.asp?class3="&class2)
End Sub
%>
一、我想让 "response.redirect("titlepx.asp?class3="&class2) "class2的值在本页面再显示一次,可收到的是0不知道是为什么?
二、还有能把帮忙把这个排序弄成 点图片1新闻标题自动往上走,点图片2新闻标题自动往下走的功能吗?我没看见过此类的源代码,还请高手指教。谢谢!