default.asp

来自「以朱朱相册为程序原型整合开发winds相册」· ASP 代码 · 共 97 行

ASP
97
字号
<%@ CODEPAGE=65001 %>
<%
'///////////////////////////////////////////////////////////////////////////////
'//              Z-Blog
'// 作    者:    朱煊(zx.asd)
'// 版权所有:    RainbowSoft Studio
'// 技术支持:    rainbowsoft@163.com
'// 程序名称:    
'// 程序版本:    
'// 单元名称:    default.asp
'// 开始时间:    2004.07.25
'// 最后修改:    
'// 备    注:    主页
'///////////////////////////////////////////////////////////////////////////////
%>
<% Option Explicit %>
<% On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<!-- #include file="c_option.asp" -->
<!-- #include file="function/c_function.asp" -->
<!-- #include file="function/c_function_md5.asp" -->
<!-- #include file="function/c_system_lib.asp" -->
<!-- #include file="function/c_system_base.asp" -->
<!-- #include file="function/c_system_event.asp" -->
<!-- #include file="function/c_system_plugin.asp" -->
<!-- #include file="plugin/p_config.asp" -->
<%
If InStr(LCase(Request.ServerVariables("HTTP_ACCEPT")),"text/vnd.wap.wml") > 0 Then Response.Redirect "wap.asp"

'向导部分wizard
If ZC_DATABASE_PATH="data/zblog.mdb" Then Response.Redirect "wizard.asp?verify=" & MD5(ZC_DATABASE_PATH & Replace(LCase(Request.ServerVariables("PATH_TRANSLATED")),"default.asp",""))

Call System_Initialize_WithOutDB()

'plugin node
For Each sAction_Plugin_Default_Begin in Action_Plugin_Default_Begin
	If Not IsEmpty(sAction_Plugin_Default_Begin) Then Call Execute(sAction_Plugin_Default_Begin)
Next


Dim ArtList
Set ArtList=New TArticleList

ArtList.LoadCache

ArtList.template="DEFAULT"

If ArtList.ExportByCache("","","","","","") Then

	ArtList.Build
	Dim Html
	Html=ArtList.html
	Html=Replace(Html,"<#WINDSPHOTO_CATALOG#>",getSort())
	Response.Write Html

End If

Function getSort()
dim db,wConn,myconn,rs,sql,rsss
db="plugin/windsphoto/data/winds.mdb"
Set wConn = Server.CreateObject("ADODB.Connection")
myconn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
wConn.Open MyConn
sql = "SELECT * FROM type ORDER BY id ASC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,wConn,0,1
if rs.eof and rs.bof then
getSort="还没有分类"
else
do while not rs.eof

sql = "SELECT count(*) as C FROM zhuanti where pl="&rs("id")
Set rsss = Server.CreateObject("ADODB.Recordset")
rsss.OPEN sql,wConn,0,1
getSort=getSort&"<li><a href='photo.asp?typeid="&rs("id")&"'>"&rs("name")&"("&rsss("C")&")</a></li>"
rsss.close
Set rsss=Nothing
rs.movenext
loop
end if
rs.close
Set rs=Nothing
end Function

'plugin node
For Each sAction_Plugin_Default_End in Action_Plugin_Default_End
	If Not IsEmpty(sAction_Plugin_Default_End) Then Call Execute(sAction_Plugin_Default_End)
Next

Call System_Terminate_WithOutDB()

%><!-- <%=RunTime()%>ms --><%
If Err.Number<>0 then
	Call ShowError(0)
End If
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?