<% Response.ClearContent() Response.ContentType = "text/xml" Dim RID As Integer = Val(Request.QueryString("ID")) Dim Tm1 As String = FilterStr(Request.QueryString("Tm1")) Dim Tm2 As String = FilterStr(Request.QueryString("Tm2")) If Not IsDate(Tm1) Then Tm1 = GetCookies("tm1") If Not IsDate(Tm1) Then Tm1 = Date.Today End If End If If Not IsDate(Tm2) Then Tm2 = GetCookies("tm2") If Not IsDate(Tm2) Then Tm2 = DateAdd(DateInterval.Day, 1, CDate(Tm1)) End If End If If DateDiff(DateInterval.Day, CDate(Tm1), CDate(Tm2)) < 1 Then Tm2 = DateAdd(DateInterval.Day, 1, CDate(Tm1)) End If SetCookies("tm1", Tm1) SetCookies("tm2", Tm2) Dim Week, Days, TempPrice, TempBonus, PriceCount, S, BonusCount As Integer Dim SpecialPrice, Temp As String Dim TempDate As Date Days = DateDiff(DateInterval.Day, CDate(Tm1), CDate(Tm2)) - 1 Dim Dt As DataTable = RoomData.GetData(RID, "R_Price,R_Breakfast,R_Internet,R_Bonus,R_Friday,R_Saturday,R_Weekend,R_SpecialPrice") Response.Write("") PriceCount = 0 BonusCount = 0 If Dt.Rows.Count > 0 Then SpecialPrice = "|" & Dt.Rows(0)("R_SpecialPrice") & "|" For j As Integer = 0 To Days Response.Write(" 0 Then Temp = Mid(SpecialPrice, InStr(S, SpecialPrice, ":") + 1) TempPrice = Val(Left(Temp, InStr(Temp, "|"))) ElseIf Week > 4 OrElse Week < 1 Then If Week = 5 Then TempPrice = Dt.Rows(0)("R_Friday") ElseIf Week = 6 Then TempPrice = Dt.Rows(0)("R_Saturday") Else TempPrice = Dt.Rows(0)("R_Weekend") End If End If PriceCount += TempPrice TempBonus = CInt(TempPrice * Dt.Rows(0)("R_Bonus") / 100) BonusCount += TempBonus Response.Write("price=""" & TempPrice & """ bonus=""" & TempBonus & """ date=""" & TempDate.ToString("yyyy-MM-dd") & """ breakfast=""" & Dt.Rows(0)("r_breakfast") & """ internet=""" & Dt.Rows(0)("r_internet") & """ ") Response.Write("/>") Next End If Dt.Clear() Response.Write("") Response.Write("") %>