<%pre>
#include <vdr/plugin.h>
#include <vdr/timers.h>
#include <vdr/config.h>
#include <vdr/i18n.h>
#include "sortedtimers.h"
#include "tools.h"

using namespace vdrlive;

</%pre>
<%args>
</%args>
<{


}>
<html>
	<head>
		<title>VDR-Live - <$ tr("Timers") $></title>
		<link rel="stylesheet" type="text/css" href="/styles.css" />
	</head>
	<body>
		<div class="left_area">
			<img src="logo.png" alt="VDR Live!" border="0" />
<& menu >
		</div>
		<div class="inhalt">
			<div class="head_box">
				<$ tr("Timers") $>
			</div>
%			if (Timers.Count() == 0) {
			Keiner Timer definiert
%			} else {
			<table class="timers" cellspacing="0" cellpadding="0">
				<tr>
					<td class="head"><$ tr("Active") $></td>
					<td class="head"><$ tr("Channel") $></td>
					<td class="head"><$ tr("Date") $></td>
					<td class="head"><$ tr("Start") $></td>
					<td class="head"><$ tr("Stop") $></td>
					<td class="head">&nbsp;</td>
					<td class="head"><$ tr("File") $></td>
				</tr>
<{
				bool active = false;
				SortedTimers timers;
				for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) {
}>
				<tr class="<$ active ? "active" : "" $>">
					<td><img src="/<$ (timer->Flags() & 1) ? "active" : "inactive" $>.png" alt="Aktiv?" /></td>
					<td><$ timer->Channel()->Name() $></td>
					<td><$ FormatDateTime(tr("%a, %b %d"), timer->Day()) $></td>
					<td><$ FormatDateTime(tr("%I:%M %p"), timer->StartTime()) $></td>
					<td><$ FormatDateTime(tr("%I:%M %p"), timer->StopTime()) $></td>
					<td><{ if (timer->Flags() & 8) { }><img src="/record.png" alt="Record" /><{ } }></td>
					<td><$ timer->File() $></td>
				</tr>
<{
					active = !active;
				}
			}
}>
			</table>
		</div>
	</body>
</html>
