主题:  ☆★☆★看代码☆★☆★

qingkui_5d

职务:普通成员
等级:1
金币:0.0
发贴:138
注册:2001/3/12 19:50:29
#12003/12/1 9:45:22
下面的代码中那个是控制弹出窗口的,有点着急,请帮忙。




<!--#include file="inc/syscode_article.asp"-->
<%
'请勿改动下面这三行代码
const ChannelID=1
Const ShowRunTime="Yes"
MaxPerPage=20
SkinID=0
PageTitle="首页"
Set rsArticle= Server.CreateObject("ADODB.Recordset"
Set rsPic= Server.CreateObject("ADODB.Recordset"
%>
<html>
<head>
<title><%=strPageTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="inc/Skin_CSS.asp"-->
<%call MenuJS()%>
</head>
<body <%=Body_Label%> onmousemove='HideMenu()'>
<div id=menuDiv style='Z-INDEX: 1000; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8'></div>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr>
<td> <table width="100%" align="center" cellpadding="0" cellspacing="0">
<tr><td height="4"></td></tr><tr>
<td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="180"> <% call ShowLogo() %> </td>
<td width="500">
<div align="center">
<% call ShowBanner() %>
</div></td>
<td width="80" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" align="center">
<tr valign="middle">
<td align="center"><img src="Images/home.gif" align="absmiddle" width="16" height="16"></td>
<td align="center"><a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=SiteUrl%>')">设为首页</a></td>
</tr>
<tr valign="middle">
<td align="center"><img src="Images/email.gif" align="absmiddle" width="16" height="17"></td>
<td align="center"><a href="mailto:<%=WebmasterEmail%>">联系站长</a></td>
</tr>
<tr valign="middle">
<td align="center"><img src="Images/bookmark.gif" align="absmiddle" width="16" height="16"></td>
<td align="center"><a href="javascript:window.external.addFavorite('<%=SiteUrl%>','<%=SiteName%>')">加入收藏</a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr valign="middle" class="nav_top">
<td valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td width="600" class="title_maintxt">
<%
    if ShowSiteChannel="Yes" then
        response.write strChannel
    else
        response.write "&nbsp;"
    end if
    if ShowMyStyle="Yes" then
        response.write "<a href='#' onMouseOver='ShowMenu(menu_skin,100)'>自选风格&nbsp;</a>|"
    end if
    %>
</td>
</tr>
</table></td>
</tr>
<tr Class="nav_main">
<td></td>
</tr>
<tr>
<td class="nav_bottom"></td>
</tr></table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt_css">
<tr valign="middle">
<td width=46> <div align="right"><img src="Images/arrow3.gif" width="29" height="11" align="absmiddle">
</div></td>
<td width="596">
<%call ShowPath()%>
&nbsp;</td>
<td width="118"><font color="#CC0000">MY POWER</font> WEB <font color="#CC0000">&copy;</font></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr valign="middle">
<td width=95><div align="center"><strong><img src="Images/announce.gif" width="20" height="16" align="absmiddle">&nbsp;<font color="#FF0000">最新公告</font></strong>
</div></td>
<td width=507><div align="right">
<MARQUEE scrollAmount=1 scrollDelay=4 width=500
align="left" onmouseover="this.stop()" onmouseout="this.start()">
<% call ShowAnnounce(2,5) %>
</MARQUEE>
</div></td>
<td width=158 align=right> <script language="javascript" type="text/javascript">
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate();
myyear= mydate.getYear();
year=(myyear > 200) ? myyear : 1900 + myyear;
if(myweekday == 0)
weekday=" 星期日 ";
else if(myweekday == 1)
weekday=" 星期一 ";
else if(myweekday == 2)
weekday=" 星期二 ";
else if(myweekday == 3)
weekday=" 星期三 ";
else if(myweekday == 4)
weekday=" 星期四 ";
else if(myweekday == 5)
weekday=" 星期五 ";
else if(myweekday == 6)
weekday=" 星期六 ";
document.write(year+"年"+mymonth+"月"+myday+"日 "+weekday);
</script> &nbsp;</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="760" height="108" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr>
<td colspan="2" valign="middle"><table width="99%" border="0" cellpadding="0" cellspacing="0" class="title_right2">
<tr>
<td width="44">&nbsp;</td>
<td width="416" class="title_maintxt"><strong>本站最新文章</strong></td>
<td width="82" class="title_maintxt"><div align="right"><a href="Article_Index.asp"><font color="#999999">more...</font></a>&nbsp;</div></td>
</tr>
</table>
</td>
<td width="4" rowspan="2" valign="top" background="Images/index_01.gif">&nbsp;</td>
<td width="209" rowspan="2" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="61" colspan="2" valign="bottom" background="Images/index_02.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="10">
<tr>
<td class="title_lefttxt"><img src="Images/UserLogin.gif" width="19" height="12"> <strong><font color="#9900FF">用
户 登 录</font></strong></td>
</tr>
</table></td>
</tr>
<tr>
<td width="4%">&nbsp; </td>
<td width="96%">
<% call ShowUserLogin() %>
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="185" align="center" valign="middle">
<table width="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10"><img src="Images/bg_0ltop.gif" width="10" height="10"></td>
<td height="10" background="Images/bg_01.gif"></td>
<td height="10"><img src="Images/bg_0rtop.gif" width="10" height="10"></td>
</tr>
<tr>
<td width="10" background="Images/bg_03.gif">&nbsp;</td>
<td width="130" align="center" valign="middle" bgcolor="#FFFFFF"> <% call ShowPicArticle(0,1,16,1,1,120,92,200,false,false) %> </td>
<td width="10" background="Images/bg_04.gif">&nbsp;</td>
</tr>
<tr>
<td height="10"><img src="Images/bg_0lbottom.gif" width="10" height="10"></td>
<td height="10" background="Images/bg_02.gif"></td>
<td height="10"><img src="Images/bg_0rbottom.gif" width="10" height="10"></td>
</tr>
</table>

</td>
<td width="362" valign="top">
<% call ShowNewArticle(9,40) %>
</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg" style="border-top:#cccccc 1px solid;">
<tr>
<td height="15"></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr valign="middle">
<td width="249" class="title_main"><strong>   下载更新</strong>           <a href="Soft_Index.asp"><font color="#999999">more</font></a>
</td>
<td width="7" rowspan="2" background="Images/D_2.gif">&nbsp;</td>
<td width="249" class="title_main"><strong>   论坛新贴</strong>           <a href="bbs/index.asp"><font color="#999999">more</font></a>
</td>
<td width="7" rowspan="2" background="Images/D_2.gif">&nbsp;</td>
<td width="249" class="title_main"><strong>   最新留言          </strong><a href="guestbook.asp"><font color="#999999">more</font></a><strong>
</strong></td>
</tr>
<tr>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td>
<%call ShowNewSoft(8,30)%>
</td>
</tr>
</table>

</td>
<td width="249" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><script src='bbs/newtopic.asp?boardid=all&lock=0&bname=0&tlen=10&n=8&sdate=1&orders=2&info=3&action=1&reply=0'></script></td>
</tr>
</table>

</td>
<td width="249" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td>
<% call showGuest(26,8) %>
</td>
</tr>
</table>

</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg" style="border-top:#cccccc 1px solid;">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr>
<td align="center">
<% call ShowAD(1) %>
</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg" style="border-bottom:#cccccc 1px solid;">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border2">
<tr>
<td width="180" valign="top" class="tdbg_leftall"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="Images/left01.gif"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr class="title_left" >
<td class="title_lefttxt"><div align="center"><strong>站 内 搜 索</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="tdbg_left"> <table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td height="100" align="center" valign="middle"> <form name="search" method="post" action="Article_search.asp">
<input name="Keyword" type="text" id="Keyword" value="关键字" size="16" maxlength="50">
<input name="Submit" type="submit" id="Submit" value="搜索">
<br>
<br>
<input name="Channel" type="radio" value="Article" style="border:0" checked onClick="javascriptocument.search.action='Article_search.asp';document.search.Field.value='Title';">
文章&nbsp;&nbsp;&nbsp;
<input type="radio" name="Channel" value="Soft" style="border:0" onClick="javascriptocument.search.action='soft_search.asp';document.search.Field.value='SoftName';">
下载<br>
<input type="radio" name="Channel" value="Photo" style="border:0" onClick="javascriptocument.search.action='photo_search.asp';document.search.Field.value='PhotoName';">
图片 &nbsp;&nbsp;
<input type="radio" name="Channel" value="bbs" style="border:0" onClick="javascriptocument.search.action='bbs/queryresult.asp?sType=2&pSearch=1&SearchDate=ALL&Stable=bbs1&boardid=0';document.search.Field.value='Title';">
论坛<br>
<input name="Field" type="hidden" id="Field3" value="Title">
</form></td>
</tr>
</table></td>
</tr>
<tr>
<td class="title_left2"></td>
</tr>
<tr>
<td background="Images/left02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="title_left">
<td class="title_lefttxt"><div align="center"><strong>最 新 热 门</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td class="tdbg_left"><table width="100%" border="0" cellpadding="8">
<tr>
<td> <% call ShowHot(10,14) %> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="title_left2"></td>
</tr>
<tr>
<td background="Images/left03.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="title_left">
<td class="title_lefttxt"><div align="center"><strong>专 题 栏 目</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="tdbg_left"> <table width="100%" border="0" cellpadding="8">
<tr>
<td> <% call ShowSpecial(10) %> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="title_left2"></td>
</tr>
<tr>
<td background="Images/left04.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="title_left">
<td class="title_lefttxt"><div align="center"><strong>本 站 统 计</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="tdbg_left"> <table width="100%" border="0" cellpadding="8">
<tr>
<td> <% call ShowSiteCountAll() %> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="title_left2"></td>
</tr>
<tr>
<td background="Images/left05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="title_left">
<td class="title_lefttxt"><div align="center"><strong>用 户 排 行</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="tdbg_left"> <table width="100%" border="0" cellspacing="0" cellpadding="8">
<tr>
<td> <% call ShowTopUser(5) %> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="title_left2"></td>
</tr>
<tr>
<td background="Images/left07.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="title_left">
<td class="title_lefttxt"><div align="center"><strong>友 情 链 接</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top" class="tdbg_left"><table width="100%" border="0" cellpadding="3">
<tr>
<td> <div align="center">
<% call ShowFriendSite(1,10,1,1) %>
<br>
<% call ShowFriendSite(2,10,1,3) %>
<br>
<a href='FriendSiteReg.asp'> 申请</a>&nbsp;&nbsp;<a href='FriendSite.asp'>更多&gt;&gt;&gt;</a>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td class="title_left2"></td>
</tr>
</table> </td>
<td width="5">&nbsp;</td>
<td width="575" valign="top"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td valign="middle" class="title_right2">   <strong>最新栏目文章</strong></td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td valign="top"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
    dim sqlRoot,rsRoot,trs,arrClassID,TitleStr,ClassCount,iClassID
    sqlRoot="select top 6 C.ClassID,C.ClassName,C.RootID,L.LayoutFileName,L.LayoutID,C.Child From ArticleClass C inner join Layout L on C.LayoutID=L.LayoutID where C.ParentID=0 and IsElite=True and LinkUrl='' order by C.RootID"
    Set rsRoot= Server.CreateObject("ADODB.Recordset"
    rsRoot.open sqlRoot,conn,1,1

    dim sqlClassAD,rsClassAD,ClassAD
    sqlClassAD="select * from Advertisement where IsSelected=True"
    sqlClassAD=sqlClassAD & " and (ChannelID=0 or ChannelID=" & ChannelID & ""
    sqlClassAD=sqlClassAD & " and ADType=2 order by ID Desc"
    set rsClassAD=server.createobject("adodb.recordset"
    rsClassAD.open sqlClassAD,conn,1,1
    
    if rsRoot.bof and rsRoot.eof then
        response.Write("还没有任何栏目,请首先添加栏目。"
    else
        ClassCount=rsRoot.recordcount
        iClassID=0
        do while not rsRoot.eof
%>
<td valign="top" width="282"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tdbg_rightall">
<tr>
<td width="68">&nbsp;</td>
<td width="468" class="title_maintxt"> <%
                arrClassID=rsRoot(0)
                response.write "<a href='" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "'>" & rsRoot(1) & "</a>"
                if rsRoot(5)>0 then
                    set trs=conn.execute("select ClassID from ArticleClass where RootID=" & rsRoot(2) & " and Child=0 and LinkUrl=''"
                    do while not trs.eof
                        arrClassID=arrClassID & "," & trs(0)
                        trs.movenext
                    loop
                end if
                %> </td>
<td width="39" class="title_maintxt"> <%response.write "<a href='" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "'><font color='#999999'>more...</font></a>&nbsp;"%> </td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="100" valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td height="152" valign="top">
<%
sql="select top 8 A.ArticleID,A.ClassID,L.LayoutID,L.LayoutFileName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType,"
sql=sql & "A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl from Article A"
sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=False and A.Passed=True and A.ClassID in (" & arrClassID & " order by A.OnTop,A.ArticleID desc"
rsArticle.open sql,conn,1,1
if rsArticle.bof and rsArticle.eof then
    response.write "<li>没有任何文章</li>"
else
    call ArticleContent(20,True,True,False,1,False,False)
end if
rsArticle.close
                %>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="15" align="center" valign="top"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13" Class="tdbg_left2"></td>
</tr>
</table></td>
</tr>
</table></td>
<%
            iClassID=iClassID+1
            if iClassID mod 2=0 then
                response.write "</tr><tr><td colspan='3' align='center'>"
                if not rsClassAD.bof and not rsClassAD.eof then
                    if rsClassAD("isflash"=true then
                        ClassAD= "<object classid='clsid27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'"
                        if rsClassAD("ImgWidth">0 then ClassAD = ClassAD & " width='" & rsClassAD("ImgWidth" & "'"
                        if rsClassAD("ImgHeight">0 then ClassAD = ClassAD & " height='" & rsClassAD("ImgHeight" & "'"
                        ClassAD = ClassAD & "><param name='movie' value='" & rsClassAD("ImgUrl" & "'><param name='quality' value='high'><embed src='" & rsClassAD("ImgUrl" & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'"
                        if rsClassAD("ImgWidth">0 then ClassAD = ClassAD & " width='" & rsClassAD("ImgWidth" & "'"
                        if rsClassAD("ImgHeight">0 then ClassAD = ClassAD & " height='" & rsClassAD("ImgHeight" & "'"
                        ClassAD = ClassAD & "></embed></object>"
                    else
                        ClassAD ="<a href='" & rsClassAD("SiteUrl" & "' target='_blank' title='" & rsClassAD("SiteName" & ":" & rsClassAD("SiteUrl" & vbcrlf & rsClassAD("SiteIntro" & "'><img src='" & rsClassAD("ImgUrl" & "'"
                        if rsClassAD("ImgWidth">0 then ClassAD = ClassAD & " width='" & rsClassAD("ImgWidth" & "'"
                        if rsClassAD("ImgHeight">0 then ClassAD = ClassAD & " height='" & rsClassAD("ImgHeight" & "'"
                        ClassAD = ClassAD & " border='0'></a>"
                    end if
                    response.write ClassAD
                    rsClassAD.movenext
                end if
                response.write "</td><tr><td height='5'></td></tr><tr>"
            else
                response.write "<td width='5'></td>"
            end if
            rsRoot.movenext
        loop
    end if
    rsRoot.close
    set rsRoot=nothing
%>
</tr>
</table></td>
</tr>
<tr>
<td><table width='100%' border='0'cellpadding='0' cellspacing='0'>
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg_right2">
<tr>
<td width="36">&nbsp;</td>
<td width="418" valign="middle" class="title_maintxt"><strong>图片更新</strong>
</td>
<td width="121" class="title_maintxt"><font color="#999999">www.asp163.net</font></td>
</tr>
</table></td>
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="border">
<tr>
<td align="center" valign="middle"> <%call ShowNewPhoto(4,True,18)%> </td>
</tr>
</table>

</td>
</tr>
<tr>
<td height="15" align="center" valign="top"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13" Class="tdbg_left2"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="380" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tdbg_rightall">
<tr>
<td class="title_lefttxt"><div align="center"><strong>最新图片文章</strong></div></td>
</tr>
</table></td>
<td width="5" valign="top" background="Images/D_2.gif">&nbsp;</td>
<td width="180" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tdbg_rightall">
<tr>
<td class="title_lefttxt"><div align="center"><strong>最 新 调 查</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td valign="top"> <% call ShowPicArticle(0,2,14,2,1,100,90,106,false,false) %> </td>
</tr>
</table></td>
<td background="Images/D_2.gif">&nbsp;</td>
<td width="180" valign="top"><table width="100%" border="0" cellpadding="8">
<tr>
<td>
<% call ShowVote() %>
</td>
</tr>
</table></td>
</tr>
</table>

</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg">
<tr>
<td height="13" align="center" valign="top"><table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13" Class="tdbg_left2"></td>
</tr>
</table></td>
</tr>
</table>
<% call Bottom() %>
<% call PopAnnouceWindow(400,300) %>
<% call ShowAD(0) %>
<% call ShowAD(4) %>
<% call ShowAD(5) %>
</body>
</html>
<%
call CloseConn()

'=================================================
'过程名:ShowNewSoft
'作 用:显示最新更新
'参 数:SoftNum ----最多显示多少个软件
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowNewSoft(SoftNum,TitleLen)
    dim sqlNew,rsNew
    if SoftNum>0 and SoftNum<=100 then
        sqlNew="select top " & SoftNum
    else
        sqlNew="select top 10 "
    end if
    sqlNew=sqlNew & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True "
    sqlNew=sqlNew & " order by S.SoftID desc"
    Set rsNew= Server.CreateObject("ADODB.Recordset"
    rsNew.open sqlNew,conn,1,1
    if TitleLen<0 or TitleLen>255 then TitleLen=100
    if rsNew.bof and rsNew.eof then
        response.write "<li>没有下载</li>"
    else
        do while not rsNew.eof
            response.Write "<li><a href='Soft_Show.asp?SoftID=" & rsNew("Softid" & "' title='软件名称:" & rsNew("SoftName" & vbcrlf & "软件版本:" & rsNew("SoftVersion" & vbcrlf & "文件大小:" & rsNew("SoftSize" & " K" & vbcrlf & "作 者:" & rsNew("Author" & vbcrlf & "更新时间:" & rsNew("UpdateTime" & vbcrlf & "下载次数:今日:" & rsNew("DayHits" & " 本周:" & rsNew("WeekHits" & " 本月:" & rsNew("MonthHits" & " 总计:" & rsNew("Hits" & "' target='_blank'>" & gotTopic(rsNew("SoftName" & " " & rsNew("SoftVersion",TitleLen) & "</li><br>"
    rsNew.movenext
        loop
    end if
    rsNew.close
    set rsNew=nothing
end sub

'=================================================
'过程名:ShowNewPhoto
'作 用:显示最近更新的图片
'参 数:PhotoNum ----最多显示多少个图片
' ShowTitle ----是否显示图片名称,True为显示,False为不显示
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowNewPhoto(PhotoNum,ShowTitle,TitleLen)
    dim sqlNew,rsNew,i
    if PhotoNum>0 and PhotoNum<=100 then
        sqlNew="select top " & PhotoNum
    else
        sqlNew="select top 10 "
    end if
    sqlNew=sqlNew & " P.PhotoID,P.PhotoName,P.PhotoUrl_Thumb,P.Author,P.Keyword,P.UpdateTime,P.Editor,P.Hits,P.DayHits,P.WeekHits,P.MonthHits,P.PhotoSize,P.PhotoLevel,P.PhotoPoint from Photo P where P.Deleted=False and P.Passed=True "
    sqlNew=sqlNew & " order by P.PhotoID desc"
    Set rsNew= Server.CreateObject("ADODB.Recordset"
    rsNew.open sqlNew,conn,1,1
    if TitleLen<0 or TitleLen>255 then TitleLen=100
    response.write "<table border='0' cellpadding='0' cellspacing='5'><tr>"
    if rsNew.bof and rsNew.eof then
        response.write "<td width='135' align='center'>没有图片</td>"
    else
        i=1
        do while not rsNew.eof
            if i mod 5=0 then
                resposne.write "</tr><tr>"
            end if
            response.Write "<td align='center' width='135'>"
            response.write "<table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='10'><img src='Images/bg_0ltop.gif' width='10' height='10'></td>"
            response.write "<td height='10' background='Images/bg_01.gif'></td>"
            response.write "<td height='10'><img src='Images/bg_0rtop.gif' width='10' height='10'></td></tr><tr>"
            response.write "<td width=10 background=Images/bg_03.gif>&nbsp;</td>"
            response.write "<td align='center' valign='middle' bgcolor='#FFFFFF'>"
            response.write "<a href='Photo_Show.asp?PhotoID=" & rsNew("Photoid" & "' title='图片名称:" & rsNew("PhotoName" & vbcrlf & "图片大小:" & rsNew("PhotoSize" & vbcrlf & "作 者:" & rsNew("Author" & vbcrlf & "更新时间:" & rsNew("UpdateTime" & vbcrlf & "下载次数:今日:" & rsNew("DayHits" & " 本周:" & rsNew("WeekHits" & " 本月:" & rsNew("MonthHits" & " 总计:" & rsNew("Hits" & "' target='_blank'><img width='105' height='90' border='0' src='" & rsNew("PhotoUrl_Thumb" & "'></a>"
            response.write "</td><td width='10' background='Images/bg_04.gif'>&nbsp;</td></tr>"
            response.write "<tr><td height='10'><img src='Images/bg_0lbottom.gif' width='10' height='10'></td>"
            response.write "<td height='10' background='Images/bg_02.gif'></td>"
            response.write "<td height='10'><img src='Images/bg_0rbottom.gif' width='10' height='10'></td></tr></table>"
            if ShowTitle=True then
                response.write "<a href='Photo_Show.asp?PhotoID=" & rsNew("Photoid" & "' title='图片名称:" & rsNew("PhotoName" & vbcrlf & "图片大小:" & rsNew("PhotoSize" & vbcrlf & "作 者:" & rsNew("Author" & vbcrlf & "更新时间:" & rsNew("UpdateTime" & vbcrlf & "下载次数:今日:" & rsNew("DayHits" & " 本周:" & rsNew("WeekHits" & " 本月:" & rsNew("MonthHits" & " 总计:" & rsNew("Hits" & "' target='_blank'>" & gotTopic(rsNew("PhotoName",TitleLen) & "</a>"
            end if
            response.write "</td>"
            i=i+1
    rsNew.movenext
        loop
    end if
    response.write "</tr></table>"
    rsNew.close
    set rsNew=nothing
end sub

'=================================================
'过程名:ShowClassNavigation
'作 用:显示栏目导航
'参 数:无
'=================================================
sub ShowSiteNavigation(TableName)
    dim rsNavigation,sqlNavigation,strNavigation,PrevRootID,i
    sqlNavigation="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.RootID,C.LinkUrl,C.Child From " & TableName & " C"
    sqlNavigation= sqlNavigation & " inner join Layout L on C.LayoutID=L.LayoutID where C.Depth<=1 order by C.RootID,C.OrderID"
    Set rsNavigation= Server.CreateObject("ADODB.Recordset"
    rsNavigation.open sqlNavigation,conn,1,1
    if rsNavigation.bof and rsNavigation.eof then
        response.write "没有任何栏目"
    else
        strNavigation="<table border='0' cellpadding='0' cellspacing='2' width='100%'><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "'>" & rsNavigation(1) & "</a>】</td><td>"
        PrevRootID=rsNavigation(4)
        rsNavigation.movenext
        i=1
        do while not rsNavigation.eof
            if PrevRootID=rsNavigation(4) then
                if i mod 6=0 then
                    strNavigation=strNavigation & ""
                end if
                strNavigation=strNavigation & "<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "'>" & rsNavigation(1) & "</a>&nbsp;&nbsp;"
                i=i+1
            else
                strNavigation=strNavigation & "</td></tr><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "'>" & rsNavigation(1) & "</a>】</td><td>"
                i=1
            end if
            PrevRootID=rsNavigation(4)
            rsNavigation.movenext
        loop
        strNavigation=strNavigation & "</td></tr></table>"
        response.write strNavigation
    end if
    rsNavigation.close
    set rsNavigation=nothing
end sub

'=================================================
'过程名:ShowSiteCountAll
'作 用:显示站点统计信息
'参 数:无
'=================================================
sub ShowSiteCountAll()
    dim sqlCount,rsCount
    Set rsCount= Server.CreateObject("ADODB.Recordset"

    sqlCount="select count(ArticleID) from Article where Deleted=False"
    rsCount.open sqlCount,conn,1,1
    response.write "文章总数:" & rsCount(0) & "篇<br>"
    rsCount.close

    sqlCount="select count(SoftID) from Soft where Deleted=False"
    rsCount.open sqlCount,conn,1,1
    response.write "下载总数:" & rsCount(0) & "个<br>"
    rsCount.close
    
    sqlCount="select count(PhotoID) from Photo where Deleted=False"
    rsCount.open sqlCount,conn,1,1
    response.write "图片总数:" & rsCount(0) & "个<br>"
    rsCount.close
    
    'sqlCount="select sum(Hits) from article"
    'rsCount.open sqlCount,conn,1,1
    'response.write "文章阅读:" & rsCount(0) & "人次<br>"
    'rsCount.close
    
    'sqlCount="select sum(Hits) from Soft"
    'rsCount.open sqlCount,conn,1,1
    'response.write "文件下载:" & rsCount(0) & "人次<br>"
    'rsCount.close

    'sqlCount="select sum(Hits) from Photo"
    'rsCount.open sqlCount,conn,1,1
    'response.write "图片查看:" & rsCount(0) & "人次<br>"
    'rsCount.close

    sqlCount="select count(UserID) from " & db_User_Table
    rsCount.open sqlCount,Conn_User,1,1
    response.write "注册用户:" & rsCount(0) & "名<br>"
    rsCount.close
    
    set rsCount=nothing
    
    response.write "<script src='count/mystat.asp?style=all'></script>"
end sub

%>



qingkui_5d

职务:普通成员
等级:1
金币:0.0
发贴:138
注册:2001/3/12 19:50:29
#22003/12/1 10:45:54
可以加滚动条吗?在这段编码里,麻烦哪位之间帮我修改了好吗,我对ASP实在是不熟悉。

<%
dim ID
dim sqlAnnounce
dim rsAnnounce
dim AnnounceNum
dim ChannelID
ID=Trim(request("ID")
ChannelID=Trim(request("ChannelID")
sqlAnnounce="select * from Announce where IsSelected=True and (ChannelID=0 or ChannelID=" & ChannelID & ""
if ID<>"" then
    sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=1) and ID=" & Clng(ID)
else
    sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=2)"
end if
sqlAnnounce=sqlAnnounce & " order by ID Desc"
Set rsAnnounce= Server.CreateObject("ADODB.Recordset"
rsAnnounce.open sqlAnnounce,conn,1,1
%>
<html>
<head>
<title>本站通告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
a:active { text-decoration: none; color: #0000FF}
a:hover { text-decoration: none; color: #FF0000}
a:link { text-decoration: none; color: #0000FF}
a:visited { text-decoration: none; color: #990000}
BODY { text-decoration: none; font-size: 12px}
TABLE { text-decoration: none; font-size: 12px}
</style>
<link href="file:///E|/&#25945;&#31243;&#36164;&#28304;/&#38378;&#21160;&#22320;&#24102;/Admin_STYLE.CSS" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table cellspacing=0 cellpadding=0 border=0 align="center" width="334">
<tbody>
<tr>
<td colspan=4><img height=56 src="images/nw_tp.gif" width=332
border=0></td>
</tr>
<tr>
<td width="24" valign="top" background="file:///E|/&#25945;&#31243;&#36164;&#28304;/&#38378;&#21160;&#22320;&#24102;/Images/nw_lt2.gif"><img src="images/nw_lt1.gif" width="24" height="54"></td>
<td width=286 rowspan="2" valign=top noWrap> <%
if rsAnnounce.bof and rsAnnounce.eof then
    response.write "<p>&nbsp;&nbsp;没有通告或找不到指定的通告</p>"
else
    AnnounceNum=rsAnnounce.recordcount
    dim i
    do while not rsAnnounce.eof
        response.Write "<p align='center'>" & rsAnnounce("title" & "</p><p align='left'>" & ubbcode(dvHTMLEncode(rsAnnounce("Content")) & "</p><p align='right'>" & rsAnnounce("Author" & "&nbsp;&nbsp;<br>" & FormatDateTime(rsAnnounce("DateAndTime",1) & "</p>"
        rsAnnounce.movenext
        i=i+1
        if i<AnnounceNum then response.write "<hr>"
    loop    
end if
%> </td>
<td width="11" rowspan="2">&nbsp;</td>
<td width="13" rowspan="2" background="images/nw_rt.gif">&nbsp;</td>
</tr>
<tr>
<td background="images/nw_lt2.gif">&nbsp;</td>
</tr>
<tr>
<td colspan=4><img height=9 src="images/nw_bt.gif" width=332
border=0></td>
</tr>
</tbody>
</table>
</body>
</html>
<%
rsAnnounce.close
set rsAnnounce=nothing
call CloseConn()
%>