Anti-Theft Chain | anti-theft chain
Anti-Theft chain
<%
Http=request.servervariables ("Http_referer")
Http2=cstr (Request.ServerVariables ("SERVER_NAME"))
If Mid (Http,8,len (HTTP2)) <>HTTP2 Then
Response.Write "This site is prohibited from downloading from the external site!" "
Else
Response.Redirect "Download.doc" ' Download.doc for download filename
End If
%>
-------------------------------------------------------
Judge how many days of the week
<%
Yue=month (date ())
Nian=year (date ())
thismon=nian& "-" &yue& "-1"
Nextmon=dateadd ("M", 1,thismon)
Tiancount=datediff ("D", Thismon,nextmon) ' Days of the Month
Wek= Weekday (date ())
Select Case Wek
Case 1
Response.Write "Sunday"
Case 2
Response.Write "Monday"
Case 3
Response.Write "Tuesday"
Case 4
Response.Write "Wednesday"
Case 5
Response.Write "Thursday"
Case 6
Response.Write "Friday"
Case 7
Response.Write "Saturday"
End Select
Yue=month (date ())
Nian=year (date ())
thismon=nian& "-" &yue& "-1"
Nextmon=dateadd ("M", 1,thismon)
Tiancount=datediff ("D", Thismon,nextmon) ' Days of the Month
Dim wek,wekday
Wek= Weekday (date ())
Select Case Wek
Case 1
Wekday= "Sunday"
Case 2
Wekday= "Monday"
Case 3
Wekday= "Tuesday"
Case 4
Wekday= "Wednesday"
Case 5
Wekday= "Thursday"
Case 6
Wekday= "Friday"
Case 7
Wekday= "Saturday"
End Select
"Response.Write" This Month "&tiancount&" Day, Today is "&wekday&"
%>