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

📄 hitcount.asp

📁 小说站源代码文件
💻 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(date()))=cstr(year(yearhitstime)) 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(date()))=cstr(month(monthhitstime)) 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(date()))=cstr(weekday(weekdayhitstime)) 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(date()))=cstr(day(dayhitstime)) 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(date()))=cstr(year(yearhitstime)) 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(date()))=cstr(month(monthhitstime)) 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(date()))<>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(date()))=cstr(day(dayhitstime)) 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=CheckSql(trim(request("id")))
CheckSqlnum(id)
id=int(id)
bookcount(id)
if makeJS=1 then
temdj(djNum)
temmdj(mdjNum)
temzdj(zdjNum)
temddj(ddjNum)
end if
%>

⌨️ 快捷键说明

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