<%
import "/js/utility.js"

    var oDvr = new Dvr();
    var oMyth = new Myth();

    var list = oDvr.GetRecordedList( true, 0, 20, "", "", "" );
%>

<br>
<h3>Sample Server Side Script Page... List of Recorded Programs</h3>
<hr>
<div>Showing <%=list.Count%> of <%=list.TotalAvailable%> total available recordings</div>
<table border="1">
<tr>
  <th>Preview</th>
  <th>Title - SubTitle</th>
  <th>StartTime</th>
  <th>Description</th>
</tr>
<%
    for (var nIdx=0; nIdx < list.Programs.length; nIdx++)
    {
        var program = list.Programs[ nIdx ];
%>
  <tr>
    <td><img src="/Content/GetPreviewImage?RecordedId=<%= program.Recording.RecordedId%>&amp;Format=JPG&amp;width=100" /></td>


    <td><%= program.Title %><% if (program.SubTitle.length) os.write(" - " + program.SubTitle); %></td>
    <td><%= oMyth.GetFormatDate(program.StartTime) %>, <%= oMyth.GetFormatTime(program.StartTime) %></td>
    <td><%= escapeHTML(program.Description) %></td>
  </tr>
<%
    } 

%>
</table>
<div>Showing <%=list.Count%> of <%=list.TotalAvailable%> total available recordings</div>
</div>
<div id="debug" > </div>
</div> <!-- content -->

