?? community_qna.asp
字號(hào):
<%menutype = "community"%>
<!-- #include virtual = /common/top.asp -->
<%menu_down1 = "yes"%>
<%menu_down1_3 = "yes"%>
<!-- #include virtual = /community/community_menu.asp -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="/community/images/bg_subbody.gif" height="100%">
<tr>
<td>
<div align="center"><img src="images/community_title_board_qna.gif"></div>
</td>
</tr>
<tr>
<td valign="top">
<!-- #include virtual="/common/BombConnDB.asp" -->
<%
stype = trim(request("stype"))
if stype = "" then stype = "ALL"
searchstr = trim(request("searchstr"))
sql = "SELECT count(*) as count FROM QnaBBS "
sql = sql & " WHERE idx > 0 "
if stype = "title" then
sql = sql & " and title like '%" & searchstr & "%'"
elseif stype = "author" then
sql = sql & " and name like '%" & searchstr & "%'"
elseif stype = "text" then
sql = sql & " and comment like '%" & searchstr & "%'"
end if
set cnt_rs = DbCon.Execute(sql)
totalNum = cnt_rs("count")
PageSize = 15
curPage = request("page")
if curPage = "" then curPage = 1
sql = "SELECT Top " & PageSize * curPage & " * FROM QnaBBS "
sql = sql & " WHERE idx > 0 "
if stype = "title" then
sql = sql & " and title like '%" & searchstr & "%'"
elseif stype = "author" then
sql = sql & " and name like '%" & searchstr & "%'"
elseif stype = "text" then
sql = sql & " and comment like '%" & searchstr & "%'"
end if
sql = sql & " ORDER BY ref desc, ref_step "
set rs = DbCon.Execute (sql)
if not rs.EOF then
rs.Move ((curPage-1) * PageSize)
LastPage = Round((totalNum-1) / PageSize + 0.51)
if LastPage < 1 then LastPage = 1
%>
<table width="550" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> </td>
</tr>
<tr>
<td>
<div align="right" class="boardtext01"> 殿廢等 臂: <%=totalNum%> 俺, 泅犁 <%=curPage%>/<%=LastPage%> 其撈瘤
</div>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="boardtext03">
<tr bgcolor="#D0D0D0">
<td colspan="5" height="4"></td>
</tr>
<tr bgcolor="#4780A3" valign="bottom">
<td width="8%" height="26" class="boardtitle" align="center">No.</td>
<td width="57%" class="boardtitle" align="center">Title</td>
<td width="15%" class="boardtitle" align="center">Name</td>
<td width="15%" class="boardtitle" align="center">Date</td>
<td width="5%" class="boardtitle" align="center">Hit</td>
</tr>
<tr bgcolor="#D0D0D0">
<td colspan="5" height="3"></td>
</tr>
<%while not rs.EOF
index = rs("idx")
if rs("ref_level") <> 0 then index = " "
title = rs("title")
if len(title) > 23 then
if rs("ref_level") <> 0 then
title = "<img src=/community/images/re.gif border=0>" & left(title,23) & "..."
else
title = "<img src=/community/images/icon.gif width=16 height=13 border=0>" & left(title,23) & "..."
end if
else
if rs("ref_level") <> 0 then
title = "<img src=/community/images/re.gif border=0>" & left(title,23)
else
title = "<img src=/community/images/icon.gif width=16 height=13 border=0>" & left(title,23)
end if
end if
name = trim(rs("name"))
if (name = "包府磊" or name = "nako") then name = "<a href=mailto:admin@bombgame.com><img src=/common/images/bomi.gif border=0></a>"
writeday = left(rs("date"),10)
tmp_year = CStr(Year(Date()))
tmp_month = CStr(Month(Date()))
if len(tmp_month) = 1 then tmp_month = "0" & tmp_month
tmp_day = CStr(Day(Date()))
if len(tmp_day) = 1 then tmp_day = "0" & tmp_day
cur_day = tmp_year & "-" & tmp_month & "-" & tmp_day
if cur_day = writeday then title = title & " <img src=/community/images/new.gif width=23 height=14 border=0>"
count = rs("readNum")
%>
<tr>
<td height="25" align="center"><%=index%></td>
<td><a href="community_qna_view.asp?index=<%=rs("idx")%>&page=<%=curPage%>&stype=<%=stype%>&searchstr=<%=searchstr%>"><img src="/community/images/no.gif" width="<%=(rs("ref_level") * 10 + 3)%>" height=1 border="0"><%=title%></a></td>
<td align="center"><%=name%></td>
<td align="center"><%=writeday%></td>
<td align="center"><%=count%></td>
</tr>
<tr>
<td colspan="5"><img src="/community/images/line.gif" width="550" height="1"></td>
</tr>
<%rs.MoveNext
wend%>
</table>
</td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="60" align="left"><a href="community_qna.asp"><img src="/community/images/list.gif" width="51" height="20" border="0"></a></td>
<td valign="bottom" align="center" class="boardtext02">
<!-- page 何盒 甸絹哎 鎊 -->
<%
count = 0
start = curPage - 5
if start < 1 then start = 1
response.write ("<a href=""community_qna.asp?page=1&stype=" & stype & "&searchstr=" & searchstr & """>" & "[貿(mào)瀾]</a> ")
for i=start to LastPage
if (CLng(i) <> CLng(curPage)) then
response.write ("<a href=""community_qna.asp?page=" & i & "&stype=" & stype & "&searchstr=" & searchstr & """>[" & i & "]</a> ")
else
response.write ("<b>[" & i & "]</b> ")
end if
count = count + 1
if (count > 9) then exit for
next
response.write ("<a href=""community_qna.asp?page=" & LastPage & "&stype=" & stype & "&searchstr=" & searchstr & """>[付瘤阜]</a>")
%>
<!-- page 何盒 甸絹哎 鎊 -->
</td>
<td width="60" align="right"><a href="community_qna_modify.asp?mode=insert"><img src="/community/images/write.gif" width="51" height="20" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="550" border="0" cellspacing="0" cellpadding="0" bgcolor="#E1E1E1">
<tr>
<td height="10"></td>
</tr>
<tr>
<td>
<table width="48%" border="0" cellspacing="0" cellpadding="0" align="center">
<form name="search" action="community_qna.asp" method="post">
<tr>
<td width="26%">
<select name="stype" size="1">
<option value="title"<%if stype="title" then response.write(" selected")%>>力格</option>
<option value="author"<%if stype="author" then response.write(" selected")%>>臂敬撈</option>
<option value="text"<%if stype="text" then response.write(" selected")%>>郴儈</option>
</select>
</td>
<td width="58%">
<input type="text" name="searchstr" style="background-color:#FFFFFF; border:1 solid #7D7D7D" value="<%=searchstr%>">
</td>
<td width="16%"><input type="image" src="/community/images/search.gif" width="39" height="20" border="0"></td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
</td>
</tr>
</table>
<%
else
%>
<script language="javascript">
<!--
alert("臂撈 絕嚼聰促.");
location.href = "community_qna.asp";
//-->
</script>
<%
end if
%>
</td>
</tr>
</table>
<!-- #include virtual = /common/bottom.asp -->
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -