| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 654 人关注过本帖
标题:[求助]怎么让栏目名与标题名都循环
只看楼主 加入收藏
kyan54
Rank: 1
等 级:新手上路
帖 子:100
专家分:0
注 册:2006-4-7
收藏
 问题点数:0 回复次数:2 
[求助]怎么让栏目名与标题名都循环

(代码发上来就乱掉了。。所以就上传了过来)

这个标题是不循环的。。
如果弄循环了,那些标题就不能循环,想要在增加一个栏目的话需要在改写代码,我想在后台增加一个栏目,然后这个栏目会在原来的这写栏目下面了。。
怎么才能做到这个效果??
就是可以达到增加与删除栏目的功能,
高手指教下

数据库名:news
表名:
content (字段:ID,biaoti, data,zuozhe,laiyuan,cont,type,times,tuijian即:ID,标题,时间,作者,来源,内容,
栏目,点击次数,推荐 )
type(字段:typename即栏目名)


请高手指教下。怎么栏目循环。然后里面的标题也会循环,而且是一一对应的

rRgW3yy7.txt (5.89 KB) [求助]怎么让栏目名与标题名都循环


[此贴子已经被作者于2007-1-9 13:53:03编辑过]

搜索更多相关主题的帖子: 名都 栏目 
2007-01-09 13:46
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
收藏
得分:0 
一个字"乱"
头疼.
2007-01-09 13:53
wanglff
Rank: 2
等 级:新手上路
威 望:5
帖 子:375
专家分:0
注 册:2005-12-21
收藏
得分:0 
你是要做新闻列表吧
我这里有我做的一个列表
你拿过去看下
看能不能有帮助
<% @language="vbscript" %>
<% Response.Expires=-1 %>
<% Response.Buffer=true %>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<html>
<head>
<title>新闻列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../inc/default.css" rel="stylesheet" type="text/css">
<script language="javascript">
function changeCatalog(){
window.location="newslist.asp?catalogid="+catalog.value;
}
</script>
</head>

<body>
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%" height="16" align="center"><strong>
<%catalogid=CInt(Request("catalogid"))%>
选择栏目:<%=showCatalogTree(catalogid)%>
</strong></td>
<td width="36%">&nbsp;</td>
<td width="28%"><a href="addnews.asp?catalogid=<%=catalogid%>"><strong>添加新闻</strong></a>
<a href="addnews_img.asp?catalogid=<%=catalogid%>"><strong>添加有图片的新闻</strong></a>
</td>
</tr>
</table>
<hr size="1" noshade>
<%
sql="select a.*,b.name catalog from newsinfo a,catalog b where a.catalogid=b.id"
If catalogid<>0 Then
sql=sql&" and a.catalogid="&catalogid
End If
sql=sql&" order by a.pubtime desc"
Set Rs=GetRecordSet(sql)
If Rs.Eof Then
response.write "<div align='center'><font color='red'>目前没有新闻</font></div>"
Else
Page=1 ' 设置变量PAGE=1
Rs.PageSize = 20 '每页显示记录数
If Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
End If
If Page > Rs.PageCount then '如果接收的页数大于总页数
Page = Rs.PageCount '设置当前显示页等于最后页
End If
If Page <= 0 then '如果page小于等于0
Page = 1 '设置PAGE等于第一页
End If
Rs.AbsolutePage = Page '如果大于零,显示当前页等于接收的页数
%>

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr align="center" bgcolor="#CCCCCC">
<td width="26%" height="23"><strong>发布时间</strong></td>
<td width="38%" height="23"><strong>新闻标题</strong></td>
<td width="17%" height="23"><strong>栏目</strong></td>
<td width="19%" height="23"><strong>操作</strong></td>
</tr>
<%
i=0
While Not Rs.Eof And i<Rs.PageSize
%>
<tr bgcolor="#FFFFFF">
<td height="23"><%=Rs("pubtime")%></td>
<td height="23"><%=Rs("title")%></td>
<td height="23" align="center"><%=Rs("catalog")%></td>
<td height="23" align="center"><a href="modifynews.asp?catalogid=<%=catalogid%>&id=<%=Rs("id")%>">修改
</a><a href="newsdelete.asp?catalogid=<%=catalogid%>&id=<%=Rs("id")%>">删除</a></td>
</tr>
<%
Rs.MoveNext
i=i+1
Wend
%>
</table>
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=1%>">首页</a></strong></td>
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=Page-1%>">上一页</a></strong></td>
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=Page+1%>">下一页</a></strong></td>
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=Rs.PageCount%>">尾页</a></strong></td>
<td height="23"><strong>共<%=Rs.RecordCount%>条记录 每页<%=Rs.PageSize%>条 共<%=Rs.PageCount%>页 当前<%=Page%>页</strong></td>
</tr>
</table>
<%
End If
%>
</body>
</html>


自强不息:)
2007-01-09 13:56
快速回复:[求助]怎么让栏目名与标题名都循环
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016126 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved