%@ 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 "
SQLStmt = SQLStmt & " from (select distinct shift_date from secretary.shift_names "
SQLStmt = SQLStmt & " where 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 ((firstname1='" & firstname & "' and lastname1='" & lastname & "') "
SQLStmt = SQLStmt & " or ( firstname2='" & firstname & "' and 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 ) Select Case CStr(RS("dtime")) Case "04:00" Response.write("4:00-12:00 noon") Case "12:00" Response.write("12 noon-20:00") Case "20:00" Response.write("20:00-4:00") End Select Response.write(rfmt & " | " & vbCrLf) Response.write("