<!--#include virtual="/_appDB/db_connection.asp" -->
<!--#include virtual="/_appDB/functions.asp" -->
<!--#include virtual="/super-user/scripts/admin_functions.asp" -->
<!--#include virtual="/super-user/scripts/enc_function.asp" -->
<!--#include virtual="/super-user/scripts/adm_inst.asp" -->
<!--#include virtual="/super-user/scripts/eml_check.asp" -->
<%
IF (checkPermission("pupils")="FAILED") THEN
	response.write("You do not have permission to view this page")
	response.end
END IF
schoolID=sanitizeRequest("sID","querystring")
IF schoolID <> "" AND schoolID <> "0" AND IsNumeric(schoolID) THEN
%>
	<select name="routeID" id="routeID" style="width:81%;min-width:200px;">
	<%
		strRAWarn="0"
		SET rsRR = dbCBK.Execute("SELECT `routeID`,`routename` FROM cbk_routes WHERE `schoolID`='"&schoolID&"' order by `routename` asc")%>
		<%IF rsRR.EOF THEN
		 strBAWarn="1"
		%>
			<option value="none">None Found</option>
		<%ELSE%>
			<option value="none">Please Choose</option>
		<%END IF%>
		<%
		DO WHILE NOT rsRR.EOF%>
			<option value="<%=rsRR("routeID")%>"><%=rsRR("routename")%></option>
		<%
			rsRR.MoveNext
			loop
			rsRR.Close
			SET rsRR = Nothing
		%>
	</select>
<%ELSE%>
	<select name="routeID" id="routeID" style="width:81%;min-width:200px;" disabled>
			<option value="none">Please choose a school first</option>
	</select>&nbsp;<span title="Info: action required" style="font-size:120%;font-weight:bold;cursor:pointer;" onclick="showAppToast('Please choose a school to see related routes','schoolID');">&#x21EA;</span>
<%END IF%>