📄 rightside.asp
字号:
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FEE8E8" class="pink_table_bg">
<tr>
<td height="30" background="Images/red_bg.jpg" ><span class="left_align white_title">本月热门</span></td>
</tr>
<%
dim ii
ii = 0
if DbType = "MSSQL" then
rs.Source="select top " & top_txt & " * from "& db_News_Table &" where updatetime>'"& now()-30 &"' and checkked=1 order by click DESC" '选择本月
else
rs.Source="select top " & top_txt & " * from "& db_News_Table &" where (updatetime>now()-30) and checkked=1 order by click DESC" '选择本月
end if
rs.Open rs.Source,conn,1,1
if rs.bof and rs.eof then
response.write "<tr><td align=center><br>暂 无<br><br></td></tr>"
else
do while not rs.eof%>
<tr>
<td height="18"> ·
<%if rs("picnews")=1 then%>
<img src="images/news_img.gif" />
<%end if%>
<a class="middle" href="E_ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=htmlencode4(rs("title"))%>" target="_blank" ><%=CutStr(htmlencode4(rs("title")),20)%></a> </td>
</tr>
<% ii = ii + 1
if ii>top_txt-1 then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing%>
</table>
<%if showvote="1" then%>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FEE8E8">
<tr>
<td height="30" background="Images/red_bg.jpg" ><span class="left_align white_title">社会调查</span></td>
</tr>
<%
set rs=conn.execute("SELECT * FROM " & db_Vote_Table & " where IsChecked=1")
if rs.eof then
%>
<tr>
<td height="25">尚无任何投票</td>
</tr>
<%else%>
<tr>
<td height="25" valign="middle" bgcolor="#FF9595"><span class="vote_title"><%=rs("Title")%></span></td>
</tr>
<form action="E_Vote.asp" method="post" name="research" target="newwindow" id="research">
<tr>
<td>
<%
for i=1 to 8
if rs("Select"&i)<>"" then
%>
<input style="border: 0" <%if i=1 then%>checked<%end if%> name="Options" type="radio" value="<%=i%>" />
<%=i%>.<%=rs("Select"&i)%><br />
<% end if
next
%></td>
</tr>
<tr>
<td height="48" align="center">
<input style="cursor:hand" type="submit" value="投它一票" id="submit1" name="submit1" class="login_username"/>
<input onclick="javascript:vote()" type="button" value="查看结果" id="button1" name="button1" style="cursor:hand" class="login_username" /></td>
</tr>
</form>
<%end if%>
</table>
<%end if%>
<% if showdata=1 then%>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FEE8E8">
<tr>
<td height="30" background="Images/red_bg.jpg" ><span class="left_align white_title">站点统计</span></td>
</tr>
<tr>
<td height="145" valign="top">
<%
function gettipnum()
dim tmprs
tmprs=conn.execute("Select Count(NewsID) from "& db_News_Table &" where checkked=1")
gettipnum=tmprs(0)
set tmprs=nothing
if isnull(gettipnum) then gettipnum=0
end function
function todays()
dim tmprs
tmprs=conn.execute("Select count(NewsID) from "& db_News_Table &" Where checkked=1 and year(updatetime)="& year(date()) &" and month(updatetime)="& month(date()) &" and day(updatetime)="& day(date()) &"")
todays=tmprs(0)
set tmprs=nothing
if isnull(todays) then todays=0
end function
function getusernum()
dim rs
rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &"")
getusernum=rs(0)
set rs=nothing
if isnull(getusernum) then getusernum=0
end function
function getgg()
dim rs
if db_Sex_Select = "EChuang" then
rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where "& db_User_Sex &"='男' ")
getgg=rs(0)
set rs=nothing
else
if db_Sex_Select = "Number" then
rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where "& db_User_Sex &"=1")
getgg=rs(0)
set rs=nothing
end if
end if
if isnull(getgg) then getgg=0
end function
function getmm()
dim rs
if db_Sex_Select = "EChuang" then
rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where "& db_User_Sex &"='女' ")
getmm=rs(0)
set rs=nothing
else
if db_Sex_Select = "Number" then
rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where "& db_User_Sex &"=0")
getmm=rs(0)
set rs=nothing
end if
end if
if isnull(getmm) then getmm=0
end function
function getother()
dim rs
if db_Sex_Select = "EChuang" then
rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &" where "& db_User_Sex &" = '保密' ")
getother=rs(0)
set rs=nothing
else
if db_Sex_Select = "Number" then
rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &" where "& db_User_Sex &" <>1 and "& db_User_Sex &"<>0 ")
getother=rs(0)
set rs=nothing
end if
end if
if isnull(getother) then getother=0
end function
%>
○- 今日文章:<font color="red"><%=todays()%></font><br />
○- 文章总数:<font color="red"><%=gettipnum()%></font><br />
○- 会员总数:<font color="red"><%=getusernum()%></font><br />
<!--#include file=LastMember.asp -->
<br />
<%if showcount=1 then%>
<script src="Cnt.asp"></script>
<!--#include file=zx.asp -->
<br />
○- 当前在线:<font color="red"><%=i%></font><br />
<%end if%></td>
</tr>
</table>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -