blob: 82ca0a78f516360777a7cc1a1b52fc77228b0011 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
<%pre>
#include <vdr/plugin.h>
#include <vdr/channels.h>
#include <vdr/epg.h>
#include <vdr/config.h>
#include <vdr/i18n.h>
#include "setup.h"
#include "tools.h"
using namespace vdrlive;
</%pre>
<%args>
type = "now";
</%args>
<%include>page_init.eh</%include>
<{
cSchedulesLock schedulesLock;
const cSchedules* Schedules = cSchedules::Schedules(schedulesLock);
std::string head;
if (type == "now") {
head = tr("What's running at")+std::string(" ")+FormatDateTime(tr("%I:%M %p"), time(0));
} else {
head = tr("What's on next?");
}
}>
<html>
<head>
<title>VDR-Live - <$ head $></title>
<link rel="stylesheet" type="text/css" href="/styles.css" />
<script type="text/javascript" language="javascript" src="domLib.js"></script>
<script type="text/javascript" language="javascript" src="domTT.js"></script>
<script type="text/javascript" language="javascript">
var domTT_styleClass = 'domTTOverlib';
</script>
</head>
<body>
<div class="left_area">
<img src="logo.png" alt="VDR Live!" border="0" />
<& menu >
</div>
<div class="inhalt">
<& pageelems.header_box content=(head) &>
<{
ReadLock channelsLock( Channels );
if (channelsLock) {
for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep()) {
const cSchedule *Schedule = Schedules->GetSchedule(Channel);
if (Schedule) {
const cEvent *Event = (type == "now" ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent());
if (Event) {
std::string title(Event->Title() ? Event->Title() : "");
std::string channel_name(Channel->Name());
std::string channel_id(*Channel->GetChannelID().ToString());
std::string short_description(Event->ShortText() ? Event->ShortText() : "");
std::string description(Event->Description() ? Event->Description() : "");
std::string start(Event->StartTime() ? FormatDateTime(tr("%I:%M %p"), Event->StartTime()) : "");
std::string end(Event->EndTime() ? FormatDateTime(tr("%I:%M %p"), Event->EndTime()) : "");
std::string start_h(FormatDateTime( "%H", Event->StartTime()));
std::string end_h(FormatDateTime( "%H", Event->EndTime()));
std::string start_m(FormatDateTime( "%M", Event->StartTime()));
std::string end_m(FormatDateTime( "%M", Event->EndTime()));
}>
<table class="event" cellpadding="0" cellspacing="0">
<tr>
<td class="station" colspan="2">
<div><div><div><$ channel_name $></div></div></div>
</td>
</tr>
<tr>
<td class="tools">
<a href="edit_timer.html?channel=<$ channel_id $>&title=<$ title $>&start_h=<$ start_h $>&end_h=<$ end_h $>&start_m=<$ start_m $>&end_m=<$ end_m $>"><img src="/record.png" alt="" <& tooltip_widget tooltip=(tr("Record this")) &> border="0"/></a>
</td>
<td class="content">
<div class="info"><$ start $> - <$ end $></div>
<div class="title"><$ title $></div>
<div class="short"><$ short_description $></div>
<div class="description"><$ description $></div>
</td>
</tr>
</table>
<{
}
}
}
}
}
}>
</div>
</body>
</html>
<%include>page_exit.eh</%include>
|