<% ' System: Jamar ' File: /schedules/index.asp ' Description: Schedules page ' Author: Matt Parker ' Version: 1.0 ' Created: 11/04/2004 ' Version Info: Initial version ' Version Author: Manley ' Include the system config script %><% ' Include the text formatting functions library script %><% Dim arrSchedules: arrSchedules = DBGetRows(GetConnectionString(), _ "SELECT tblSchedule.SchedulePKID," _ & " tblAgent.AgentName, tblAgent.AgentInfo, tblSchedule.ScheduleRoute," _ & " tblSchedule.ScheduleVessel1, tblSchedule.ScheduleDate1," _ & " tblSchedule.ScheduleVessel2, tblSchedule.ScheduleDate2," _ & " tblSchedule.ScheduleVessel3, tblSchedule.ScheduleDate3," _ & " tblSchedule.ScheduleVessel4, tblSchedule.ScheduleDate4" _ & " FROM tblAgent INNER JOIN tblSchedule" _ & " ON tblAgent.AgentPKID=tblSchedule.ScheduleFKAgentID" _ & " WHERE tblAgent.AgentPKID=" & DBGetNumeric(Request("agentid"))) Dim strPortSQL: strPortSQL = "SELECT tblPort.PortPKID, tblPort.PortName," _ & " tblPort.PortX, tblPort.PortY FROM tblPort" If IsArray(arrSchedules) Then strPortSQL = strPortSQL _ & " INNER JOIN lnkAgentPort" _ & " ON (tblPort.PortPKID=lnkAgentPort.AgentPortFKPortID" _ & " AND lnkAgentPort.AgentPortFKAgentID=" & DBGetNumeric(Request("agentid")) & ")" Dim arrPorts: arrPorts = DBGetRows(GetConnectionString(), strPortSQL) Dim intPos, intNum, strTitle: strTitle = "Liner Agent Schedule" If IsArray(arrSchedules) Then strTitle = "Liner Agent Schedule - " & Server.HTMLEncode("" & arrSchedules(1, 0)) Call SiteHeaderPreScript(strTitle, "", "", "") %> <% Call SiteHeaderPostScript("", "", "setPortMarkers();", "", "", "") %>

Liner Agent Schedules

<% If IsArray(arrSchedules) Then %>

<%=Server.HTMLEncode("" & arrSchedules(1, 0))%>

<% End If %> <% If IsArray(arrSchedules) Then %> <% intNum = UBound(arrSchedules, 2) For intPos = 0 To intNum %> <% If intPos = 0 Then %> <% End If %> <% Next %>
Schedule - <%=Server.HTMLEncode("" & arrSchedules(1, 0))%>
Liner Agent Route Vessels Dates
<%=Server.HTMLEncode("" & arrSchedules(1, intPos))%> <% If Trim("" & arrSchedules(2, intPos)) <> "" Then %>

<%=fmtPrepareTextForOutput(arrSchedules(2, intPos), False, 1, 0, "", "", "")%>

<% End If %>
<%=Replace(Server.HTMLEncode("" & arrSchedules(3, intPos)), VbCrLf, "
")%>
<%=Server.HTMLEncode("" & arrSchedules(4, intPos))%><% If arrSchedules(6, intPos) <> "" Then %>
<%=Server.HTMLEncode("" & arrSchedules(6, intPos))%><% End If If arrSchedules(8, intPos) <> "" Then %>
<%=Server.HTMLEncode("" & arrSchedules(8, intPos))%><% End If If arrSchedules(10, intPos) <> "" Then %>
<%=Server.HTMLEncode("" & arrSchedules(10, intPos))%><% End If %>
<%=Server.HTMLEncode("" & arrSchedules(5, intPos))%><% If arrSchedules(6, intPos) <> "" Then %>
<%=Server.HTMLEncode("" & arrSchedules(7, intPos))%><% End If If arrSchedules(8, intPos) <> "" Then %>
<%=Server.HTMLEncode("" & arrSchedules(9, intPos))%><% End If If arrSchedules(10, intPos) <> "" Then %>
<%=Server.HTMLEncode("" & arrSchedules(11, intPos))%><% End If %>
<% End If Dim arrAgents: arrAgents = DBGetRows(GetConnectionString(), _ "SELECT AgentPKID, AgentName FROM tblAgent ORDER BY AgentName ASC") If IsArray(arrAgents) Then %>

Please select a liner agent from the list below to view their schedule.

<% Else %>

Schedule data is currently unavailable. Please try again later.

<% End If intNum = UBound(arrPorts, 2) For intPos = 0 To intNum %>
" > 
<% Next Call SiteFooter() %>