%@ LANGUAGE="VBScript" %>
<%
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Mode = adModeRead
Connection.Open phdb_rd
If Not IsEmpty(Request("firstname")) Then
firstname=Ucase(Left(CStr(Request("firstname")),1)) & Right(CStr(Request("firstname")),len(CStr(Request("firstname")))-1)
Else
firstname=""
End If
If Not IsEmpty(Request("lastname")) Then
lastname=Ucase(Left(CStr(Request("Lastname")),1)) & Right(CStr(Request("Lastname")),len(CStr(Request("Lastname")))-1)
Else
lastname=""
End If
'
' check last update time
'
SQLStmt="select to_char(logdate,'MM/DD/YYYY HH24:MI:SS') udate from secretary.latest_shift_update"
Set RS = Connection.Execute(SQLStmt)
udate=RS("udate")
Set RS=nothing
'
' get shifts for this person
'
SQLStmt = " select to_char(shift_date,'Day') dname,to_char(shift_date,'MM/DD/YYYY') ddate, "
SQLStmt = SQLStmt & " to_char(shift_date,'HH24:MI') dtime, "
SQLStmt = SQLStmt & " 24*(shift_date-sysdate) hdif,shift_type "
SQLStmt = SQLStmt & " from (select distinct sn.shift_date,st.shift_type from secretary.shift_names sn,secretary.shift_types st "
SQLStmt = SQLStmt & " where sn.shift_date between to_date(to_char(sysdate,'MM/YYYY'),'MM/YYYY') "
SQLStmt = SQLStmt & " and add_months(to_date(to_char(sysdate,'MM/YYYY'),'MM/YYYY'),2) "
SQLStmt = SQLStmt & " and sn.shift_date=st.shift_date "
SQLStmt = SQLStmt & " and ((sn.firstname1='" & firstname & "' and sn.lastname1='" & lastname & "') "
SQLStmt = SQLStmt & " or ( sn.firstname2='" & firstname & "' and sn.lastname2='" & lastname & "'))) "
SQLStmt = SQLStmt & " order by shift_date "
' Response.write(SQLStmt & "
")
Set RS = Connection.Execute(SQLStmt)
%>
Last updated on <%=udate%>
|
Day |
Time and Date |
| " & lfmt ) Response.write(CStr(RS("ddate")) & ", " & CStr(RS("dname"))) Response.write(rfmt & " | " & vbCrLf) Response.write("" & lfmt ) daytime="" Select Case CStr(RS("dtime")) Case "04:00" daytime="4:00-12:00 noon" Case "12:00" daytime="12 noon-20:00" Case "20:00" daytime="20:00-4:00" End Select If shift_type="A" Then daytime="Cancelled" End If response.Write(daytime) Response.write(rfmt & " | " & vbCrLf) Response.write("