<% 'Option Explicit 'Dim strConnection 'Dim Conn Dim ArrDayType Dim ArrTimeType Dim sqlOn_Air Dim strShow Dim dtComment Dim strPresenter Dim strShowType Dim adoOn_Air Dim strCurrentDay Dim strfull_day_of_week Dim strCurrent_Short_Time Dim strPresenter1 %> <% Select case weekday(now()) Case 1 strCurrentDay = "Sunday" Case 2 strCurrentDay = "Monday" Case 3 strCurrentDay = "Tuesday" Case 4 strCurrentDay = "Wednesday" Case 5 strCurrentDay = "Thursday" Case 6 strCurrentDay = "Friday" Case 7 strCurrentDay = "Saturday" End Select Function full_day_of_week() Dim ArrDayType ArrDayType = split(formatdatetime(now(),1)," ") strfull_day_of_week = ArrDayType(1) End Function Set adoOn_Air = Server.CreateObject("ADODB.Recordset") sqlOn_Air = "select * from program_schedule where showday = '"& strCurrentDay &"' and #"& formatdatetime(now(),vbshorttime) &"# between start_time_slot and end_time_slot" set adoOn_Air = Conn.Execute(sqlOn_Air) If Not (adoOn_Air.EOF) then strShow = adoOn_Air("Start_Time_Slot") & "-" & adoOn_Air("End_Time_Slot") dtComment = adoOn_Air("Host_comment") strPresenter = adoOn_Air("Host_name") strPresenter1=adoOn_Air("Host_Name1") strShowType = adoOn_Air("showtype") End If adoOn_Air.Close() Set adoOn_Air = nothing conn.close set conn=nothing %>
<%=strShowType%>
<%=strPresenter%>
<%=strPresenter1%>
<%=strShow%>