⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hitcount.asp

📁 本源代码为终点小说连载系统 v1.15 Build 0430 SQL清风修改版,欢迎大家下载,学习与交流
💻 ASP
字号:
<!-- #include file="conn.asp" -->
<%
Function bookcount(id)
if session("book_ID")<>"" then 
if session("book_ID")<>cstr(id) then
dim yearhitstime,monthhitstime,weekdayhitstime,dayhitstime
set rshit=server.CreateObject("ADODB.recordset")
sqlhit="select yearhitstime,monthhitstime,weekdayhitstime,dayhitstime,list_hit,list_yhit,list_mhit,list_zhit,list_dhit from [list_book] where id="&cstr(id)
rshit.open sqlhit,conn,1,3
if not rshit.eof then
yearhitstime=rshit("yearhitstime")
monthhitstime=rshit("monthhitstime")
weekdayhitstime=rshit("weekdayhitstime")
dayhitstime=rshit("dayhitstime")
end if
rshit("list_hit")=rshit("list_hit")+1
rshit.update

if cstr(year(formatdatetime(now(),1)))=cstr(year(formatdatetime(yearhitstime,1))) then
rshit("list_yhit")=rshit("list_yhit")+1
rshit.update
else
rshit("list_yhit")=1
rshit("yearhitstime")=now()
rshit.update
end if

if cstr(month(formatdatetime(now(),1)))=cstr(month(formatdatetime(monthhitstime,1))) then
rshit("list_mhit")=rshit("list_mhit")+1
rshit.update
else
rshit("list_mhit")=1
rshit("monthhitstime")=now()
rshit.update
end if

if cstr(weekday(formatdatetime(now(),1)))=cstr(weekday(formatdatetime(weekdayhitstime,1))) then
rshit("list_zhit")=rshit("list_zhit")+1
rshit.update
else
rshit("list_zhit")=1
rshit("weekdayhitstime")=now()
rshit.update
end if

if cstr(day(formatdatetime(now(),1)))=cstr(day(formatdatetime(dayhitstime,1))) then
rshit("list_dhit")=rshit("list_dhit")+1
rshit.update
else
rshit("list_dhit")=1
rshit("dayhitstime")=now()
rshit.update
end if
rshit.close
set rshit=nothing
else
end if
else
set rshit=server.CreateObject("ADODB.recordset")
sqlhit="select yearhitstime,monthhitstime,weekdayhitstime,dayhitstime,list_hit,list_yhit,list_mhit,list_zhit,list_dhit from [list_book] where id="&cstr(id)
rshit.open sqlhit,conn,1,3
if not rshit.eof then
yearhitstime=rshit("yearhitstime")
monthhitstime=rshit("monthhitstime")
weekdayhitstime=rshit("weekdayhitstime")
dayhitstime=rshit("dayhitstime")
end if
rshit("list_hit")=rshit("list_hit")+1
rshit.update

if cstr(year(formatdatetime(now(),1)))=cstr(year(formatdatetime(yearhitstime,1))) then
rshit("list_yhit")=rshit("list_yhit")+1
rshit.update
else
rshit("list_yhit")=1
rshit("yearhitstime")=now()
rshit.update
end if

if cstr(month(formatdatetime(now(),1)))=cstr(month(formatdatetime(monthhitstime,1))) then
rshit("list_mhit")=rshit("list_mhit")+1
rshit.update
else
rshit("list_mhit")=1
rshit("monthhitstime")=now()
rshit.update
end if

if cstr(weekday(formatdatetime(now(),1)))=cstr(weekday(formatdatetime(weekdayhitstime,1))) then
rshit("list_zhit")=rshit("list_zhit")+1
rshit.update
else
rshit("list_zhit")=1
rshit("weekdayhitstime")=now()
rshit.update
end if

if cstr(day(formatdatetime(now(),1)))=cstr(day(formatdatetime(dayhitstime,1))) then
rshit("list_dhit")=rshit("list_dhit")+1
rshit.update
else
rshit("list_dhit")=1
rshit("dayhitstime")=now()
rshit.update
end if
rshit.close
set rshit=nothing
session("book_ID")=cstr(id)
end if
End Function
%>
<%
id=replace(trim(request("id")),"'","")
bookcount(id)
%>

⌨️ 快捷键说明

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