📄 vbs.asp
字号:
<%
'Ok3w新闻系统内核文件 vbs.asp
'作者:zhengbi
'邮箱:zhengbi888@yahoo.com.cn
'QQ: 124895502
'演示:http://www.glzy8.com/ok3w/
%>
<%
Private Sub Ok3w_Article_List(ClassID,TopN,LeftN,IsCommend,DisTime,DisHits,OrderType)
Sql="select top " & TopN & " Id,Title,AddTime,Hits from Ok3w_Article where ChannelID=1 and IsPass=1 and IsDelete=0"
If ClassID<>"" Then Sql=Sql & " and SortPath like '%," & ClassID & ",%'"
If IsCommend Then Sql=Sql & " and IsCommend=1"
Select Case OrderType
Case "hot"
Sql = Sql & " order by Hits desc,AddTime desc,ID desc"
Case "rnd"
Randomize
Sql = Sql & " order by Rnd(-(ID+"&Rnd()&")),ID desc"
Case "new"
Sql = Sql & " order by AddTime desc,ID desc"
Case Else
Sql = Sql & " order by IsTop desc,IsCommend desc,AddTime desc,ID desc"
End Select
Rs.Open Sql,Conn,0,1
Do While Not Rs.Eof
%>·<a href="article/<%=Rs("Id")%>.html" title="<%=Server.HTMLEncode(Rs("Title"))%>"><%=LeftX(Rs("Title"),2*LeftN)%></a><%If DisTime Then%> <font color="#999999"><%=Format_Time(Rs("AddTime"),1)%></font><%End If%><%If DisHits Then%> <font color="#999999">查看:<%=Rs("Hits")%></font><%End If%><br />
<%
Rs.MoveNext
Loop
Rs.Close
End Sub
%>
<%
Private Sub Ok3w_Article_PreNext(ClassID,ID)
Sql="select ID,Title from Ok3w_Article where SortPath like '%," & ClassID & ",%' and IsPass=1 and IsDelete=0 and ID>" & ID & " order by ID asc"
Set oRs = Conn.Execute(Sql)
If oRs.Eof And oRs.bof Then
Response.Write("·上一条:没有了")
Else
Response.Write("·<a href=""article/" & oRs("Id") & ".html"">上一条:" & oRs("Title") & "</a>")
End If
Sql="select ID,Title from Ok3w_Article where SortPath like '%," & ClassID & ",%' and IsPass=1 and IsDelete=0 and ID<" & ID & " order by ID desc"
Set oRs = Conn.Execute(Sql)
If oRs.Eof And oRs.bof Then
Response.Write("<br />·下一条:没有了")
Else
Response.Write("<br />·<a href=""article/" & oRs("Id") & ".html"">下一条:" & oRs("Title") & "</a>")
End If
End Sub
%>
<%Private Sub Ok3w_GG_News(ClassID,TopN)%>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="pro_demo1" height="40"><table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<%
Sql="select top 10 Id,Title from Ok3w_Article where ChannelID=1 and IsPass=1 and IsDelete=0 and IsMove=1"
If ClassID<>"" Then Sql=Sql & " and SortPath like '%," & ClassID & ",%'"
Sql=Sql & " order by IsTop desc,IsCommend desc,Id desc"
Rs.Open Sql,Conn,0,1
Do While Not Rs.Eof
%>
<td class="gray" nowrap="nowrap"> ·<a href="article/<%=Rs("Id")%>.html" title="<%=Rs("Title")%>"><%=Rs("Title")%></a></td>
<%
Rs.MoveNext
Loop
Rs.Close
%>
</tr>
</table></td>
<td id="pro_demo2"></td>
</tr>
</table>
<script language="javascript" src="images/marquee.js"></script>
<%End Sub%>
<%Private Sub Ok3w_Img_News(ClassID,Width,Height)%>
<%
Sql="select top 5 Id,Title,PicFile from Ok3w_Article where ChannelID=1 and IsPass=1 and IsPic=1 and IsPlay=1 and IsDelete=0"
If ClassID<>"" Then Sql=Sql & " and SortPath like '%," & ClassID & ",%'"
Sql=Sql & " order by IsCommend desc,Id desc"
Rs.Open Sql,Conn,0,1
If Rs.Eof And Rs.Bof Then
Response.Write("没有添加图片新闻。")
Else
arrNews=Rs.GetRows
rowsNews=Ubound(arrNews,2)
%>
<style type="text/css">
.bigon{background:url(images/newsb-02.gif);color:#FFF; line-height:18px;}
.bigoff{background:url(images/newsb-03.gif);color:#000; line-height:18px;}
a.bla{color:#000; text-decoration:none}
a.bla:hover{color:#F00; text-decoration:underline}
</style>
<table width="<%=Width%>" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="<%=Width%>"><div id="fc" style="width:<%=Width%>px;height:<%=Height-26%>px;">
<%For i=0 To rowsNews%>
<div style="display:<%If i=0 Then%>block<%Else%>none<%End If%>;">
<div style="width:<%=Width%>px; height:<%=Height-26%>px; overflow:hidden;"><a href="article/<%=arrNews(0,i)%>.html"><img src="<%=arrNews(2,i)%>" border="0"
onmouseover="clearAuto();" onmouseout="setAuto()" width="<%=Width%>" /></a></div>
</div>
<%Next%>
</div></td>
</tr>
<tr>
<td height="26" background="images/newsb-01.gif"><table width="<%=Width%>" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" onmouseover="clearAuto();" onmouseout="setAuto()"><div id="con" style="padding-left:5px;">
<%For i=0 To rowsNews%>
<div style="display:<%If i=0 Then%>block<%Else%>none<%End If%>;"> <a href="article/<%=arrNews(0,i)%>.html" class="bla"><%=arrNews(1,i)%></a></div>
<%Next%>
</div></td>
<td align="right" width="100"><table border="0" cellpadding="0" cellspacing="3" class="lhn" id="num">
<tr>
<%For i=0 To rowsNews%>
<td width="14" height="18" align="center" background="<%If i=0 Then%>images/newsb-02.gif<%Else%>images/newsb-03.gif<%End If%>" class="<%If i=0 Then%>bigon<%Else%>bigoff<%End If%>" onclick="Mea(<%=i%>);" onmouseover="clearAuto();" onmouseout="setAuto()" style="cursor:pointer;"><%=i+1%></td>
<%Next%>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<script language="javascript">
var n=0;
var rowsNews = <%=rowsNews%>;
</script>
<script language="javascript" src="images/imgplay.js"></script>
<%
End If
Rs.Close
End Sub%>
<%Private Sub Class_Nav(SortPath)
cTmp = Left(SortPath,Len(SortPath)-1)
Sql="select ID,SortName from Ok3w_Class where ID in(" & cTmp & ") order by ID"
Set oRs = Conn.Execute(Sql)
Do While Not oRs.Eof
Response.Write("<a href=""article/list_" & oRs("ID") & "_1.html"">" & oRs("SortName") & "</a>")
oRs.MoveNext
If Not oRs.Eof Then Response.Write(" >> ")
Loop
oRs.Close
Set oRs = Nothing
End Sub
%>
<%Private Sub Class_PageTitle(SortPath)
cTmp = Left(SortPath,Len(SortPath)-1)
Sql="select ID,SortName from Ok3w_Class where ID in(" & cTmp & ") order by ID desc"
Set oRs= Conn.Execute(Sql)
Do While Not oRs.Eof
Response.Write(oRs("SortName"))
oRs.MoveNext
If Not oRs.Eof Then Response.Write(" - ")
Loop
oRs.Close
Set oRs = Nothing
End Sub
%>
<%
Private Sub News_Hits(ID)
%><span id="News_Hits"></span><iframe style="display:none;" src="hits.asp?type=news&id=<%=ID%>"></iframe><%
End Sub
%>
<%Private Sub Ok3w_Site_Link(TopN,oT)
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td style=" line-height:220%;"><%
Sql = "select top " & TopN & " * from Ok3w_Link order by Lorder,Lid"
Rs.Open Sql,Conn,1,1
Do While Not Rs.Eof
%>
<a href="<%=Rs("Lurl")%>" target="_blank"><%=Rs("Lname")%></a>
<%
Rs.MoveNext
If Not Rs.Eof Then Response.Write(" <font color=""#999999"">|</font> ")
Loop
Rs.Close
%>
</td>
</tr>
</table>
<%End Sub%>
<%
Function Ok3w_Site_Tongji()
Response.Write(SysSiteTongji)
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -