📄 syscode_article.asp
字号:
if lngTemp6>BeginPoint and lngTemp6<BeginPoint+lngBound then
BeginPoint=lngTemp6+4
end if
end if
end if
end if
end if
if CurrentPage=pages then
EndPoint=ContentLen
else
EndPoint=rs("MaxCharPerPage")*CurrentPage
if EndPoint>=ContentLen then
EndPoint=ContentLen
else
lngTemp1_1_1=instr(EndPoint,strContent,"</table>",1)
lngTemp1_1_2=instr(EndPoint,strContent,"</TABLE>",1)
lngTemp1_1_3=instr(EndPoint,strContent,"</Table>",1)
if lngTemp1_1_1>0 then
lngTemp1_1=lngTemp1_1_1
elseif lngTemp1_1_2>0 then
lngTemp1_1=lngTemp1_1_2
elseif lngTemp1_1_3>0 then
lngTemp1_1=lngTemp1_1_3
else
lngTemp1_1=0
end if
lngTemp1_2_1=instr(EndPoint,strContent,"<table",1)
lngTemp1_2_2=instr(EndPoint,strContent,"<TABLE",1)
lngTemp1_2_3=instr(EndPoint,strContent,"<Table",1)
if lngTemp1_2_1>0 then
lngTemp1_2=lngTemp1_2_1
elseif lngTemp1_2_2>0 then
lngTemp1_2=lngTemp1_2_2
elseif lngTemp1_2_3>0 then
lngTemp1_2=lngTemp1_2_3
else
lngTemp1_2=0
end if
if lngTemp1_1=0 and lngTemp1_2=0 then
lngTemp1=EndPoint
else
if lngTemp1_1>lngTemp1_2 then
lngtemp1=lngTemp1_2-1
else
lngTemp1=lngTemp1_1+7
end if
end if
lngTemp2_1_1=instr(EndPoint,strContent,"</p>",1)
lngTemp2_1_2=instr(EndPoint,strContent,"</P>",1)
if lngTemp2_1_1>0 then
lngTemp2_1=lngTemp2_1_1
elseif lngTemp2_1_2>0 then
lngTemp2_1=lngTemp2_1_2
else
lngTemp2_1=0
end if
lngTemp2_2_1=instr(EndPoint,strContent,"<p",1)
lngTemp2_2_2=instr(EndPoint,strContent,"<P",1)
if lngTemp2_2_1>0 then
lngTemp2_2=lngTemp2_2_1
elseif lngTemp2_2_2>0 then
lngTemp2_2=lngTemp2_2_2
else
lngTemp2_2=0
end if
if lngTemp2_1=0 and lngTemp2_2=0 then
lngTemp2=EndPoint
else
if lngTemp2_1>lngTemp2_2 then
lngTemp2=lngTemp2_2-1
else
lngTemp2=lngTemp2_1+3
end if
end if
lngTemp3_1_1=instr(EndPoint,strContent,"</ur>",1)
lngTemp3_1_2=instr(EndPoint,strContent,"</UR>",1)
if lngTemp3_1_1>0 then
lngTemp3_1=lngTemp3_1_1
elseif lngTemp3_1_2>0 then
lngTemp3_1=lngTemp3_1_2
else
lngTemp3_1=0
end if
lngTemp3_2_1=instr(EndPoint,strContent,"<ur",1)
lngTemp3_2_2=instr(EndPoint,strContent,"<UR",1)
if lngTemp3_2_1>0 then
lngTemp3_2=lngTemp3_2_1
elseif lngTemp3_2_2>0 then
lngTemp3_2=lngTemp3_2_2
else
lngTemp3_2=0
end if
if lngTemp3_1=0 and lngTemp3_2=0 then
lngTemp3=EndPoint
else
if lngTemp3_1>lngTemp3_2 then
lngtemp3=lngTemp3_2-1
else
lngTemp3=lngTemp3_1+4
end if
end if
if lngTemp1<lngTemp2 then
lngTemp=lngTemp2
else
lngTemp=lngTemp1
end if
if lngTemp<lngTemp3 then
lngTemp=lngTemp3
end if
if lngTemp>EndPoint and lngTemp<=EndPoint+lngBound then
EndPoint=lngTemp
else
lngTemp4_1_1=instr(EndPoint,strContent,"</li>",1)
lngTemp4_1_2=instr(EndPoint,strContent,"</LI>",1)
if lngTemp4_1_1>0 then
lngTemp4_1=lngTemp4_1_1
elseif lngTemp4_1_2>0 then
lngTemp4_1=lngTemp4_1_2
else
lngTemp4_1=0
end if
lngTemp4_2_1=instr(EndPoint,strContent,"<li",1)
lngTemp4_2_1=instr(EndPoint,strContent,"<LI",1)
if lngTemp4_2_1>0 then
lngTemp4_2=lngTemp4_2_1
elseif lngTemp4_2_2>0 then
lngTemp4_2=lngTemp4_2_2
else
lngTemp4_2=0
end if
if lngTemp4_1=0 and lngTemp4_2=0 then
lngTemp4=EndPoint
else
if lngTemp4_1>lngTemp4_2 then
lngtemp4=lngTemp4_2-1
else
lngTemp4=lngTemp4_1+4
end if
end if
if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then
EndPoint=lngTemp4
else
lngTemp5_1=instr(EndPoint,strContent,"<img",1)
lngTemp5_2=instr(EndPoint,strContent,"<IMG",1)
if lngTemp5_1>0 then
lngTemp5=lngTemp5_1-1
elseif lngTemp5_2>0 then
lngTemp5=lngTemp5_2-1
else
lngTemp5=EndPoint
end if
if lngTemp5>EndPoint and lngTemp5<EndPoint+lngBound then
EndPoint=lngTemp5
else
lngTemp6_1=instr(EndPoint,strContent,"<br>",1)
lngTemp6_2=instr(EndPoint,strContent,"<BR>",1)
if lngTemp6_1>0 then
lngTemp6=lngTemp6_1+3
elseif lngTemp6_2>0 then
lngTemp6=lngTemp6_2+3
else
lngTemp6=EndPoint
end if
if lngTemp6>EndPoint and lngTemp6<EndPoint+lngBound then
EndPoint=lngTemp6
end if
end if
end if
end if
end if
end if
response.write mid(strContent,BeginPoint,EndPoint-BeginPoint)
response.write "</p><p align='center'><b>"
if CurrentPage>1 then
response.write "<a href='" & strFileName & "?ArticleID=" & ArticleID & "&ArticlePage=" & CurrentPage-1 & "'>上一页</a> "
end if
for i=1 to pages
if i=CurrentPage then
response.write "<font color='red'>[" & cstr(i) & "]</font> "
else
response.write "<a href='" & strFileName & "?ArticleID=" & ArticleID & "&ArticlePage=" & i & "'>[" & i & "]</a> "
end if
next
if CurrentPage<pages then
response.write " <a href='" & strFileName & "?ArticleID=" & ArticleID & "&ArticlePage=" & CurrentPage+1 & "'>下一页</a>"
end if
response.write "</b></p>"
end if
end sub
Sub ShowPic()
Dim tmp
Randomize
tmp = Rnd * 10
If tmp < 1 Then
Response.Write "0"
Else
Response.Write Left(tmp, 1)
End If
End Sub
%>
<% Sub search()%>
<form name="search" method="post" action="Article_search.asp">
<div align="center">
<br>
<input name="Keyword" type="text" id="Keyword" value="关键字" size="16" maxlength="50" class="input">
<input name="Channel" type="hidden" value="Article" style="border:0" checked onClick="javascript:document.search.action='Article_search.asp';document.search.Field.value='Title';">
<input name="Submit" type="submit" id="Submit" value="查询" class="input">
</div>
<br>
<input name="Field" type="hidden" id="Field3" value="Title">
</form>
<%end sub
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
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> </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'> </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
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> "
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
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
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -