<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="TourEx.BLL" %>
<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        If Member.CheckLogin = 0 Then
            Response.Write("请先登陆!")
            Exit Sub
        End If
        If IsDate(GetSession("SendDate")) Then
            Dim s As Integer = DateDiff(DateInterval.Second, GetSession("SendDate"), Now)
            If s < 60 Then
                Response.Write("请" & s & "秒后再发送!")
                Exit Sub
            End If
        End If
        SetSession("SendDate", Now)
        Dim UserMobile As String = GetCookies("UserMobile")
        If UserMobile.Length = 0 Then
            Response.Write("手机号码错误!")
            Exit Sub
        End If
        Dim HotelID As Integer = Val(Request.QueryString("ID"))
        Dim Dt As DataTable = HotelData.GetData(HotelID)
        If Dt.Rows.Count = 0 Then
            Response.Write("酒店编号错误!")
            Exit Sub
        End If
        Dim Str As New StringBuilder()
        Str.Append(Dt.Rows(0)("H_Name")).Append("，")
        Str.Append("地址：").Append(Dt.Rows(0)("H_Add")).Append("。")
        Str.Append(WebSet.Name)
        Dt.Clear()
        Response.Write(Sms.Send(UserMobile, Str.ToString()))
    End Sub
</script>