📄 modifydate.asp
字号:
<%
Option Explicit
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
%>
<!--#Include File="../Conn.asp"-->
<%
Dim Sight_TravelDate, Sight_Person
If ComeURL = "" Then
Response.Write "0"
Call CloseConn()
Response.End()
End If
Call ModifyDate()
Call CloseConn()
Sub ModifyDate()
Sight_TravelDate = Request("Change_TravelDate")
Sight_Person = ELClng(Request("Change_Person"))
If Not IsDate(Sight_TravelDate) Then Sight_TravelDate = DateAdd("d", 1, Date())
If DateDiff("d", Date(), Sight_TravelDate)<1 Then Sight_TravelDate = DateAdd("d", 1, Date())
Sight_TravelDate = FormatDate(Sight_TravelDate)
If Sight_Person < 1 Then Sight_Person = 1
Call SetCookie(EL_Sn, "Sight_TravelDate", Sight_TravelDate, 7)
Call SetCookie(EL_Sn, "Sight_Person", Sight_Person, 7)
Response.Write "1"
End Sub
Function ELClng(ByVal lng)
If IsNumeric(lng) Then
ELClng = CLng(lng)
Else
ELClng = 0
End If
End Function
Function FormatDate(ByVal fDate)
If IsDate(fDate) = False Then fDate = Date()
fDate = FormatDatetime(fDate, 2)
Dim arr
arr = Split(fDate, "-")
FormatDate = arr(0) &"-"& Right("0"& arr(1), 2) &"-"& Right("0"& arr(2), 2)
End Function
Sub SetCookie(ByVal Key, ByVal CookieName, ByVal CookieValue, ByVal CookieExpires)
Dim s, l, i, c, r
s = CookieValue
l = Len(CookieValue)
r = ""
For i = 1 To l
c = AscW(Mid(s, i, 1))
r = Join2String(r, c, "|")
Next
Response.Cookies(Key)(CookieName) = r
If CookieExpires > 0 Then
Response.Cookies(Key).Expires = DateAdd("d", CookieExpires, Now())
End If
End Sub
Function Join2String(ByVal Str1, ByVal Str2, StrDivide)
If Str1="" OR IsNULL(Str1) Then
Join2String = Str2
Else
If Str2="" OR IsNULL(Str2) Then
Join2String = Str1
Else
Join2String = Str1 & StrDivide & Str2
End If
End If
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -