| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 511 人关注过本帖
标题:[求助]有那位高手指点一下?
取消只看楼主 加入收藏
cdmlove
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2005-11-22
收藏
 问题点数:0 回复次数:1 
[求助]有那位高手指点一下?
我只希望显示"类别1"或"类别2"一种有没有办法呢?

<!--#include file="../Conn/Conn.asp"-->
<!--#include file="../Include/md5.asp"-->
<!--#include file="../Function/Function.asp"-->
<!--#include file="../Include/CheckPurview.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文章信息列表</title>
<link href="../Css/Style.css" rel="stylesheet" type="text/css">
<script language='JavaScript' src='../Js/ValiDate.js'></script>
<script language='JavaScript' src='../Js/AlertTxt.js'></script>
<script language='JavaScript' src='../Js/tooltip.js'></script>
<script language='JavaScript' src='../Js/pop.js'></script>
</head>
<body>
<div id="toolTipLayer" style="width:320px;position:absolute; visibility: hidden"></div>
<script>initToolTips()</script>
<%
SearchKeyword = Trim(Request("SearchKeyword"))
SearchSelect = Trim(Request("SearchSelect"))
%>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="3"></td>
</tr>
</table>
<form action="Manage.asp" method="post" name="ArticleSearch" id="ArticleSearch">
<table width="99%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#CAD7F7" onMouseOver="this.bgColor='#EEEEEE'" onMouseOut="this.bgColor=''" class="bgcolor5">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="bgcolor5">
<tr>
<td height="30" colspan="3" class="bgcolor2"><b>[ 查询文章信息 ]</b></td>
</tr>
<tr>
<td height="1" colspan="3" class="bgcolor1"></td>
</tr>
<tr>
<td height="25" align="center" class="bgcolor4">查询关键字:</td>
<td class="bgcolor1"><input name="SearchKeyword" type="text" class="input" id="SearchKeyword" title=" 请输入关键字! " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" value="<% = Server.Htmlencode(SearchKeyword) %>" size="40" maxlength="60" >
<select name="SearchSelect" style="width:110px; font-family: Tahoma; font-size: 12px; " title="请选择查询范围! ">
<option value="" style="background:#FFFFFF" >------请选择------</option>
<option value="ArtTitle" <% if SearchSelect = "ArtTitle" then Response.Write("selected")%> style="background:#E7E7E7">┠—文章标题</option>
<option value="ArtContent" <% if SearchSelect = "ArtContent" then Response.Write("selected")%> style="background:#E7E7E7" >┠—文章内容</option>
</select>
</td>
<td width="25%" align="center" nowrap class="bgcolor4">
<input name="Submit" type="button" class="button" value=" 查 询 " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" onClick="CheckArticleSearch(this.form)" title=" 单击查询文章信息列表! ">
<input name="Submit" type="reset" class="button" value=" 重 置 " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" title=" 单击重置表单! ">
<input name="reload" type="button" class="button" id="reload" title=" 单击刷新当前页面! " onClick="window.location.reload()" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" value=" 刷 新 ">
</td>
</tr>
</table></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="3"></td>
</tr>
</table>
<!------------------------------------------------------------------------------------------------>
<form action="xManage2.asp" method="post" name="ArticleList" id="ArticleList">
<table width="99%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#CAD7F7" onMouseOver="this.bgColor='#EEEEEE'" onMouseOut="this.bgColor=''" class="bgcolor5">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="bgcolor5">
<tr>
<td height="30" colspan="7" class="bgcolor2"><b>[ 文章信息列表 ]</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
</tr>
<tr align="center">
<td width="10%" height="30" class="bgcolor4">文章编号</td>
<td width="35%" class="bgcolor4">文章标题</td>
<td width="15%" class="bgcolor4">发布日期</td>
<td width="10%" class="bgcolor4">浏览次数</td>
<td width="10%" class="bgcolor4">显示顺序</td>
<td width="10%" class="bgcolor4">修改分类</td>
<td width="10%" class="bgcolor4">删除分类</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
</tr>
<%
set RsList = server.CreateObject("adodb.recordset")
SqlList = " select * from ArticleList00 "
SqlList = SqlList + " where ArtID >= 1 "
if SearchKeyword <> "" then
Select Case SearchSelect
Case "ArtTitle"
SqlList = SqlList + " and ArtTitle like '%"&SearchKeyword&"%' "
Case "ArtContent"
SqlList = SqlList + " and ArtContent like '%"&SearchKeyword&"%' "
Case Else
SqlList = SqlList + " and ArtTitle & ArtContent like '%"&SearchKeyword&"%' "
End Select
End If
SqlList = SqlList + " ORDER BY ArtRank, ArtUpdateTime DESC , ArtID "
RsList.open SqlList, objConn, 1, 1
if RsList.eof or RsList.bof then
call subListEof()
else
call subListShow()
end if
RsList.close
set RsList = nothing
%>
<%
Sub subListEof()
%>
<tr>
<td height="64" colspan="7" align="center" class="bgcolor1">没有找到符合条件的信息记录 !</td>
</tr>
<%
End Sub
%>
<%
Sub subListShow()
RsList.pagesize = 20
page = request("page")
If IsNumeric(page) = False Then
page = 1
Else
page = cint(page)
End If
if page < 1 then page = 1
if page > RsList.pagecount then page = RsList.pagecount

RsList.absolutepage = page
for i = 1 to RsList.pagesize
j = RsList.pagesize * ( page - 1) + i
%>
<tr bgcolor="#E4EDF9" onMouseOver="this.bgColor='#E8EFFC'" onMouseOut="this.bgColor='#E4EDF9'">
<td align="center"><% = FormatIntNumber(j,3) %>/<% = RsList("ArtID") %></td>
<td style="padding-left:4px; font-family:Verdana; font-size:12px; ">
<%
if Trim(RsList("ArtType")) = 0 Then
Response.Write("类别1")
else
Response.Write("类别2")
end if %> <a href="Show.asp?ID=<% = RsList("ArtID") %>&SearchKeyword=<% = SearchKeyword %>&SearchSelect=<% = SearchSelect %>&Page=<% = Page %>&Action=Show" title="<% = Server.Htmlencode(RsList("ArtTitle")) %>">
<% = gotTopic( RsList("ArtTitle"), 40 )%>
</a></td>
<td align="center"><% = GetDate(RsList("ArtUpdateTime")) %></td>
<td align="center"><% = RsList("ArtHits")%></td>
<td align="center"><input name="ArtRank_<% = RsList("ArtID") %>" type="text" class="input" id="ArtRank_<% = RsList("ArtID") %>" title=" 显示顺序,越小越靠前,数字0-999999,默认为0 " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" value="<% = RsList("ArtRank")%>" size="8" maxlength="6" onFocus="if(this.value=='<% = RsList("ArtRank")%>')this.value='';" onBlur="if(this.value=='')this.value='<% = RsList("ArtRank")%>';" ></td>
<td align="center"> <a href="xEdit.asp?ID=<% = RsList("ArtID") %>&SearchKeyword=<% = SearchKeyword %>&SearchSelect=<% = SearchSelect %>&Page=<% = Page %>&Action=Edit">修改</a></td>
<td align="center"><input name="DelManageID" type="checkbox" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" value="<% = RsList("ArtID") %>" >
<a href="xManage2.asp?ID=<%=RsList("ArtID")%>&SearchKeyword=<% = SearchKeyword %>&SearchSelect=<% = SearchSelect %>&Page=<% = Page %>&ActionManage=Del">删除</a></td>
</tr>
<%
RsList.movenext
if RsList.eof then exit for
Next
%>
<tr>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height="25" colspan="7" align="center" class="bgcolor4">

<input name="Submit" type="submit" class="button" value="更新排序" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" title=" 单击重新排序及更新文章审核! " onClick="this.form.ActionManage.value='Rank'" >
<input name="Submit" type="submit" class="button" value="删除选定" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" title=" 单击删除选定数据! " onClick="this.form.ActionManage.value='ListDel'" >
<input name="chkall" type="checkbox" value="" class="button" onClick="javascript:CheckAll(this.form)" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" title=" 单击选定文章删除数据! " >
<input name="Submit" type="reset" class="button" value="重置表单" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" title=" 单击重置表单! ">
<input name="reload" type="button" class="button" id="reload" title=" 单击刷新当前页面! " onClick="window.location.reload()" onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" value=" 刷 新 ">
&nbsp;&nbsp;<span class="bgcolor1"><img src="../Images/help.gif" width="16" height="16" onMouseOver="toolTip('大类名称:<br>请您选择大类名称,大类名称为必填项!<br>小类名称:<br>请您输入小类名称,小类名称为必填项,请填写2至60个字符!<br>显示顺序:<br>请您输入显示顺序,显示顺序为必填项,请填写6位内数字!', '#4A4A4A', '#D6DFF7')" onMouseOut="toolTip()"></span>
<input name="ActionManage" type="hidden" id="ActionManage" value="">
<input type="hidden" name="page" value="<% = page %>">
</td>
</tr>
<tr>
<td height="25" colspan="7" align="center" class="bgcolor4">
<%
Call show_page( "ArticleList","Manage.asp",page,RsList, "SearchKeyword#" & (SearchKeyword) & "#SearchSelect#" & (SearchSelect) )
%>
</td>
</tr>
<%
End Sub
%>
</table></td>
</tr>
</table>
</form>
<!--#include file="../Include/Footer.asp"-->
<!------------------------------------------------------------------------------------------------>
</body>
</html>
搜索更多相关主题的帖子: html head content include color 
2005-11-22 14:19
cdmlove
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2005-11-22
收藏
得分:0 
该功能已经自已解决了~~不用回复
2005-11-22 14:45
快速回复:[求助]有那位高手指点一下?
数据加载中...
 
   



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

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