变量传送不到,想了很久,试过很多种方法,还是不行.

kong佳 2005-09-15 08:43:31
<table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
<tr>
<th align=left colspan=7 height=23>新闻管理</th>
</tr>
<tr>
<td width=20% class=txlrow>注意事项</td>
<td width=80% class=txlrow colspan=6 style="line-height: 150%">①点删除按钮将删除所选定的新闻,此操作是不可逆的,请谨慎操作;<br>②点击相应语言的新闻编号,可以对该产品的参数等进行修改。<br>
③进行操作时,先在最后选上该项,然后进行统一操作;④请务必注意语言的选择。
</td>
</tr>
<form action="" method=post>
<tr>
<td width="20%" class=txlrow>请选择所属语言</td>
<td width="80%" colspan=6 class=txlrow>
中文(CN)<input type="radio" name="lclass" value="1" <%if lclass=1 then%>checked<%end if%>>英文(EN)<input type="radio" name="lclass" value="2" <%if lclass=2 then%>checked<%end if%>>
</td>
</tr>
<tr>
<td width="20%" class=txlrow>新闻所属系列</td>
<td width="80%" colspan=6 class=txlrow>
<select name=newsclass onchange="javascript:submit()">
<option value="">请新闻类型</option>
<option value="1" <%if request("newsclass")=1 then%> selected<%end if%>>最新消息</option>
<option value="2" <%if request("newsclass")=2 then%> selected<%end if%>>行业信息</option>
<option value="3" <%if request("newsclass")=3 then%> selected<%end if%>>会展新闻</option>
</select>
</td>
</tr>
</form>
<%if request("action")="" then
dim lclass
if request("lclass")="" then
lclass=1
else
lclass=request("lclass")
end if

%>
<tr>
<th colspan=7 align=left height=23>搜索结果</th>
</tr>
<%
dim currentpage,page_count,Pcount
dim totalrec,endpage
currentPage=request("page")
if currentpage="" or not isInteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
Set rs= Server.CreateObject("ADODB.Recordset")
select case request("newsclass")
case 1
sql="select newsid,title,addtime,classid,postuser from news where l_class="&lclass&" and classid=1 order by newsid desc"
case 2
sql="select newsid,title,addtime,classid,postuser from news where l_class="&lclass&" and classid=2 order by newsid desc"
case 3
sql="select newsid,title,addtime,classid,postuser from news where l_class="&lclass&" and classid=3 order by newsid desc"
case else
sql="select newsid,title,addtime,classid,postuser from news order by newsid desc"
end select
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td colspan=6 class=txlrow>没有找到相关记录。</td></tr>"
else
%>
<FORM METHOD=POST ACTION="?action=modify">
<tr align=center>
<td class=txlHeaderBackgroundAlternate><B>ID</B></td>
<td class=txlHeaderBackgroundAlternate><B>标题</B></td>
<td class=txlHeaderBackgroundAlternate><B>类别</B></td>
<td class=txlHeaderBackgroundAlternate><B>添加时间</B></td>
<td class=txlHeaderBackgroundAlternate><B>书写人</B></td>
<td class=txlHeaderBackgroundAlternate><B>编辑</B></td>
<td class=txlHeaderBackgroundAlternate><B>操作</B></td>
</tr>
<%
rs.PageSize = 3
rs.AbsolutePage=currentpage
page_count=0
totalrec=rs.recordcount
while (not rs.eof) and (not page_count = 3)
%>
<tr>
<td class=txlrow align=center width="17%"><a href="../n_detail.asp?id=<%=rs("newsid")%>"><%=rs("newsid")%></a></td>
<td class=txlrow align=center width="15%"><a href="../n_detail.asp?id=<%=rs("newsid")%>"><%=rs("title")%></a></td>
<td class=txlrow width=10% align=center><%call classname()%></a></td>
<td class=txlrow width=15% align=center><%=rs("addtime")%></td>
<td class=txlrow width=23% align=center><%=rs("postuser")%></td>
<td class=txlrow width=10% align=center><a href="admin_newsindex.asp?action=edit&id=<%=rs("newsid")%>">编辑</a></td>
<td class=txlrow align=center width="10%"><input type="checkbox" name="picid" value="<%=rs("newsid")%>" ></td>
</tr>
<%
page_count = page_count + 1
rs.movenext
wend
Pcount=rs.PageCount
%>
<tr>
<td colspan=7 class=txlrow align=center><B>请选择您需要进行的操作</B>: <input type="radio" name="useraction" value=3 checked> 修改 <input type="radio" name="useraction" value=2> 锁定<input type="radio" name="useraction" value=1> 删除</td>
</tr>
<tr>
<td colspan=7 class=txlrow align=center><input type=submit name=submit1 value="执行选定的操作" onclick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}"></td>
</tr>
</FORM>
<tr><td colspan=7 class=txlrow align=center>分页:
<%
if currentpage > 4 then
response.write "<a href=?page=1&lclass="&lclass&"&newsclass="&request("newsclass")&">[1]</a> ..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color=#ce0000>["&i&"]</font>"
else
response.write " <a href=?page="&i&"&lclass="&lclass&"&newsclass="&request("newsclass")&">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "... <a href=?page="&Pcount&"&lclass="&lclass&"&newsclass="&request("newsclass")&">["&Pcount&"]</a>"
end if
%>
</td>
</tr>
关键就是分页的代码&lclass="&lclass&"&newsclass="&request("newsclass")&"
...全文
75 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
gaochao79 2005-09-15
  • 打赏
  • 举报
回复
太长了 把你问题说出来
yiyioo 2005-09-15
  • 打赏
  • 举报
回复
什么意思??
不懂~~

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧