<%@import="com.disco.tvlist.ScheduleLine" %> <%@import="java.util.*" %> <%@import="java.text.*" %> <%@import="com.dci.common.Environment" %> <% // declare the variables String network, networkName, baseURL, domainAlias, netAbbrevLow, netAbbrevCap, cableType, timeZone, tophatBgcolor, trHighliteBgcolor; String outerFrameBgcolor, timeBgcolor, outerFrameText, innerFrameBgcolor, gridBgcolor, innerFrameText; // set variables network= networkName= baseURL= domainAlias= netAbbrevLow= netAbbrevCap= cableType= timeZone= tophatBgcolor= trHighliteBgcolor= " "; outerFrameBgcolor= timeBgcolor= outerFrameText= innerFrameBgcolor= gridBgcolor= innerFrameText= " "; // get enviroment network info from server instance Environment env = new Environment(); network = env.getProperty("SERVER_INSTANCE"); if (network.equalsIgnoreCase("APL")) { networkName = "Animal Planet"; baseURL = "http://animal.discovery.com"; domainAlias = "animal"; netAbbrevLow = "apl"; netAbbrevCap = "APL"; cableType = "analog"; timeZone = "et"; tophatBgcolor = "#669900"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#99cc33"; outerFrameText = "#000000"; innerFrameBgcolor = gridBgcolor = "#669900"; innerFrameText = "#ffffff"; } if (network.equalsIgnoreCase("DHC")) { networkName = "Discovery Health"; baseURL = "http://health.discovery.com"; domainAlias = "health"; netAbbrevLow = "dhc"; netAbbrevCap = "DHC"; cableType = "analog"; timeZone = "et"; tophatBgcolor = "#ff9900"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#ffcc33"; outerFrameText = "#000000"; innerFrameBgcolor = gridBgcolor = "#ff9900"; innerFrameText = "#000000"; } if (network.equalsIgnoreCase("DHD")) { networkName = "Discovery HD Theater"; baseURL = "http://dhd.discovery.com"; domainAlias = "dhd"; netAbbrevLow = "dhd"; netAbbrevCap = "DHD"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#ffffff"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#497bb5"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#c0c8d7"; innerFrameText = "#000000"; } if (network.equalsIgnoreCase("DSC")) { networkName = "Discovery Channel"; baseURL = "http://dsc.discovery.com"; domainAlias = "dsc"; netAbbrevLow = "dsc"; netAbbrevCap = "DSC"; cableType = "analog"; timeZone = "et/pt"; tophatBgcolor = "#0066ff"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#0066ff"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#3399ff"; innerFrameText = "#000000"; } if (network.equalsIgnoreCase("DTC")) { networkName = "Discovery Times"; baseURL = "http://times.discovery.com"; domainAlias = "times"; netAbbrevLow = "dtc"; netAbbrevCap = "DTC"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#f3f3f4"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#cfcee0"; outerFrameText = "#000000"; innerFrameBgcolor = gridBgcolor = "#e5e5e5"; innerFrameText = "#000000"; } if (network.equalsIgnoreCase("FIT")) { networkName = "Fit TV"; baseURL = "http://fittv.discovery.com"; domainAlias = "fittv"; netAbbrevLow = "fit"; netAbbrevCap = "FIT"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#64be38"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#64be38"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#008dc1"; innerFrameText = "#ffffff"; } if (network.equalsIgnoreCase("HOM")) { networkName = "Discovery Home"; baseURL = "http://home.discovery.com"; domainAlias = "home"; netAbbrevLow = "hom"; netAbbrevCap = "HOM"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#ffffff"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#4a318c"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#a59ac5"; innerFrameText = "#000000"; } if (network.equalsIgnoreCase("KID")) { networkName = "Discovery Kids"; baseURL = "http://kids.discovery.com"; domainAlias = "kids"; netAbbrevLow = "kid"; netAbbrevCap = "KID"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#840884"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#840884"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#009999"; innerFrameText = "#ffffff"; } if (network.equalsIgnoreCase("MIL")) { networkName = "Military Channel"; baseURL = "http://military.discovery.com"; domainAlias = "military"; netAbbrevLow = "mil"; netAbbrevCap = "MIL"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#002d62"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#002d62"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#929497"; innerFrameText = "#ffffff"; } if (network.equalsIgnoreCase("TLC")) { networkName = "TLC"; baseURL = "http://tlc.discovery.com"; domainAlias = "tlc"; netAbbrevLow = "tlc"; netAbbrevCap = "TLC"; cableType = "analog"; timeZone = "et/pt"; tophatBgcolor = "#cc0000"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#cc0000"; outerFrameText = "#ffffff"; innerFrameBgcolor = gridBgcolor = "#b7b7b7"; innerFrameText = "#000000"; } if (network.equalsIgnoreCase("TRV")) { networkName = "Travel Channel"; baseURL = "http://travel.discovery.com"; domainAlias = "travel"; netAbbrevLow = "trv"; netAbbrevCap = "TRV"; cableType = "analog"; timeZone = "et"; tophatBgcolor = "#b6d0e9"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#b6d0e9"; outerFrameText = "#000000"; innerFrameBgcolor = gridBgcolor = "#336799"; innerFrameText = "#ffffff"; } if (network.equalsIgnoreCase("SCI")) { networkName = "The Science Channel"; baseURL = "http://science.discovery.com"; domainAlias = "science"; netAbbrevLow = "sci"; netAbbrevCap = "SCI"; cableType = "digital"; timeZone = "et"; tophatBgcolor = "#9cc03c"; trHighliteBgcolor = "#f0f0f0"; outerFrameBgcolor = timeBgcolor = "#9cc03c"; outerFrameText = "#000000"; innerFrameBgcolor = gridBgcolor = "#b7b7b7"; innerFrameText = "#000000"; } %> <% final String pageName = "schedule.jsp: "; // ScheduleLine object used everywhere to get each line of schedule. ScheduleLine sl = new ScheduleLine(); StringBuffer url = javax.servlet.http.HttpUtils.getRequestURL(request); listingbean.debugLog(pageName + "url=" + url); String urlStr = new String(url); String channel = request.getParameter("channel"); String date = request.getParameter("date"); String yyyy = request.getParameter("yyyy"); String mm = request.getParameter("mm"); String dd = request.getParameter("dd"); boolean showCheckBox = false; Vector sched = new Vector(); int year, month, day = 0; // Default to today's date GregorianCalendar gc = new GregorianCalendar(); year = gc.get(Calendar.YEAR); month = gc.get(Calendar.MONTH) + 1; day = gc.get(Calendar.DAY_OF_MONTH); if (yyyy==null) { date = "today"; } if (date==null) { year = Integer.valueOf(yyyy).intValue(); month = Integer.valueOf(mm).intValue(); day = Integer.valueOf(dd).intValue(); // Gregorian Calendar has the month range from 0(Jan) to 11(Dec) // so create the calender with (month - 1) for the given month query string GregorianCalendar gcgiven = new GregorianCalendar(year, (month - 1), day); // check if the given date is AFTER today's date.. and its not KIDS if (gcgiven.after(gc)&& !(network.equalsIgnoreCase("KID"))) { // yes it is.. Show check boxes. showCheckBox = true; } else { // NO it isn't.. Do NOT how check boxes. showCheckBox = false; } listingbean.loadSchedule(month,day,year,channel,sched); } else { // date=today. NO check box showCheckBox = false; listingbean.loadRelativeSchedule(date,channel,sched); } String leftlink = listingbean.getLink("yesterday",sched); String rightlink = listingbean.getLink("tomorrow",sched); String nicedate = "none"; if (!sched.isEmpty()) { sl = (ScheduleLine) sched.elementAt(1); nicedate = sl.nicedate ; } else { response.sendRedirect("/utilities/about/error.html?jspError"); } %> <%= netAbbrevCap %> :: Daily TV Schedule :: <% out.print(nicedate); %>
<% String calendarURL = "/common/tvlisting/calendar/calendar.jsp?schedurl=schedule.jsp" + "&channel=" + channel + "&yyyy=" + year + "&mm=" + month; %>
TV schedule daily
tv schedule
daily schedule
weekly schedule
calendar
corner corner
previous day
<% out.print(nicedate); %>
next day
Our TV Channels:
<% if (showCheckBox) { %> <% } else { %><% } %>
Time (<%= timeZone %>)
Series Title
Episode Title
CC
TV
remind me
<% String title1="", title1Query="", title1JSP= ""; String primaryURL="", primaryTitle="", secondaryURL="", secondaryTitle= ""; int rowCount = 1; boolean display3Titles = false; if (!sched.isEmpty()) { for (int i=0; i< sched.size(); i++) { sl = (ScheduleLine) sched.elementAt(i); if (sl.episodeid > 0 && sl.isanthology.equalsIgnoreCase("Y")) { if(sl.gridtitle != null || sl.series != null) { display3Titles = true; if(sl.gridtitle == null ||sl.gridtitle.length()<2) { title1 = sl.series; } else { title1= sl.gridtitle; } } else { display3Titles=false; title1 = sl.anthologytitle; title1Query= sl.anthologyquery; title1JSP="anthology.jsp"; } } else if (sl.episodeid == 0 && sl.isanthology.equalsIgnoreCase("Y")) { display3Titles=false; title1 = sl.anthologytitle; title1Query= sl.anthologyquery; title1JSP="anthology.jsp"; } else if (sl.isanthology.equalsIgnoreCase("N")) { display3Titles=false; title1Query = sl.seriesquery; title1JSP = "series.jsp"; if (sl.gridtitle == null ||sl.gridtitle.length()<2) { title1 = sl.series; } else { title1= sl.gridtitle; } if (sl.gridtitle == null && sl.series == null) { title1 = " "; title1Query = " "; title1JSP = " "; } } if (display3Titles) { primaryURL = "anthology.jsp?" + sl.anthologyquery; primaryTitle = sl.anthologytitle; secondaryURL = "series.jsp?" + sl.seriesquery; if (sl.gridtitle == null ||sl.gridtitle.length()<2) { secondaryTitle = sl.series; } else { secondaryTitle= sl.gridtitle; } if (sl.gridtitle == null && sl.series == null) { secondaryTitle = " "; } } else { primaryURL = title1JSP + "?" + title1Query; primaryTitle = title1; } %> <% if (showCheckBox) { %> <% } else { %><% } %>
<% out.print(sl.nicetime); %>
<% if ((sl.closedcaption == null) || (sl.closedcaption == "null")) { out.print(" "); } else { out.print(sl.closedcaption); }%>
<% if ((sl.parentalcode == null) || (sl.parentalcode == "null")) { out.print(" "); } else { out.print(sl.parentalcode); }%>
<% rowCount = rowCount + 2; } %> <% if (showCheckBox) { %> <% } else { %><% } %>
<% } else { %>
none

We're sorry. The schedule information that you have requsted is currnetly not available.
Error: query => [0]

Click [ here ] to return to the previous page.

<% } %>
get the channel

Picture(s): DCI |

Discovery Channel | TLC | Animal Planet | Discovery Health | Science Channel | Planet Green
Discovery Kids | Military Channel | Investigation Discovery | HD Theater | Turbo | FitTV

HowStuffWorks | TreeHugger | Petfinder | PetVideo | Discovery Education

Visit the Discovery Store: Toys & Games | Telescopes | DVD Sets | Planet Earth DVD | Gift Ideas

By visiting this site, you agree to the terms and conditions
of our Visitor Agreement. Please read. Privacy Policy.
ATTENTION! We recently updated our privacy policy. The changes are effective as of Tuesday, October 30, 2007.
To see the new policy, click here. Questions? See the policy for the contact information.

Copyright © 2008 Discovery Communications, LLC.

Note: Six months after airing, shows are removed from your personal schedule.
The leading global real-world media and entertainment company.

Advertisement

Sponsored Links
newsletter