summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/Makefile2
-rw-r--r--pages/channels_widget.ecpp2
-rw-r--r--pages/edit_searchtimer.ecpp2
-rw-r--r--pages/edit_timer.ecpp17
-rw-r--r--pages/pageelems.ecpp15
-rw-r--r--pages/schedule.ecpp13
-rw-r--r--pages/searchepg.ecpp2
-rw-r--r--pages/searchresults.ecpp10
8 files changed, 34 insertions, 29 deletions
diff --git a/pages/Makefile b/pages/Makefile
index fde3974..09dfd63 100644
--- a/pages/Makefile
+++ b/pages/Makefile
@@ -54,4 +54,4 @@ libpages.a: $(OBJS)
$(AR) r $@ $^
clean:
- @rm -f *~ *.o core* libpages.a $(OBJS:%.o=%.cpp)
+ @rm -f *~ *.o core* libpages.a $(OBJS:%.o=%.cpp) $(DEPFILE)
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp
index fcf8321..5bfe490 100644
--- a/pages/channels_widget.ecpp
+++ b/pages/channels_widget.ecpp
@@ -26,7 +26,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
int lastChannel = LiveSetup().GetLastChannel();
</%cpp>
-<select name="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>>
+<select name="<$ name $>" id="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>>
% for ( cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel; listChannel = Channels.Next( listChannel ) ) {
% if ( listChannel->GroupSep() || *listChannel->Name() == '\0' )
% continue;
diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp
index 4d27b59..9fd1c02 100644
--- a/pages/edit_searchtimer.ecpp
+++ b/pages/edit_searchtimer.ecpp
@@ -453,7 +453,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<& pageelems.logo &>
<& menu active=("searchtimers") &>
<div class="inhalt">
- <form method="POST" name="edit_searchtimer" action="edit_searchtimer.ecpp">
+ <form method="post" name="edit_searchtimer" action="edit_searchtimer.ecpp">
<input type="hidden" name="searchtimerid" value="<$ searchtimerid $>"/>
<input type="hidden" name="blacklistids_internal" value="<$ blacklistids_internal $>" id="blacklistids_internal"/>
<table class="formular" cellpadding="0" cellspacing="0">
diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp
index 6bf3b9c..c389a6d 100644
--- a/pages/edit_timer.ecpp
+++ b/pages/edit_timer.ecpp
@@ -8,6 +8,7 @@
#include "tools.h"
#include "timers.h"
#include "setup.h"
+#include "epg_events.h"
using namespace std;
using namespace vdrlive;
@@ -16,8 +17,7 @@ using namespace vdrlive;
<%args>
// input parameters
string timerid;
- tChannelID channelid;
- tEventID eventid = 0;
+ string epgid;
// form parameters
tChannelID channel;
bool active = true;
@@ -47,11 +47,13 @@ string edit_timerreferer;
cTimer* timer;
</%request>
<%include>page_init.eh</%include>
-<{
-if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
-}>
<%cpp>
- std::string message;
+ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+
+ tChannelID channelid = tChannelID();
+ tEventID eventid = tEventID();
+
+ string message;
cMutexLock timersLock( &LiveTimerManager() );
SortedTimers& timers = LiveTimerManager().GetTimers();
@@ -84,6 +86,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
auto_ptr< cTimer > eventTimer;
if ( timer == 0 ) {
+ EpgEvents::DecodeDomId(epgid, channelid, eventid);
if ( channelid.Valid() && eventid != 0 ) {
cerr << "grabbing event" << endl << endl;
cSchedulesLock schedLock;
@@ -132,7 +135,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<& pageelems.logo &>
<& menu active=("timers") &>
<div class="inhalt">
- <form method="POST" name="edit_timer" action="edit_timer.ecpp">
+ <form method="post" name="edit_timer" action="edit_timer.ecpp">
<input type="hidden" name="timerid" value="<$ timerid $>"/>
<input type="hidden" name="aux" value="<$ aux $>"/>
<table class="formular" cellpadding="0" cellspacing="0">
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index 2cff427..277d84c 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -119,16 +119,19 @@ int update_status(1);
<%def event_timer>
<%args>
+ string epgid;
+</%args>
+<%cpp>
tChannelID channelid;
tEventID eventid;
-</%args>
-<%cpp> const cTimer* timer = LiveTimerManager().GetTimer(eventid, channelid);
+ EpgEvents::DecodeDomId(epgid, channelid, eventid);
+ const cTimer* timer = LiveTimerManager().GetTimer(eventid, channelid);
if (timer) {
</%cpp>
<a href="edit_timer.html?timerid=<$ LiveTimerManager().GetTimers().GetTimerId(*timer) $>">
<img src="<$ LiveSetup().GetThemedLink("img", "record_timer.png") $>" alt="" <& tooltip.hint text=(tr("Edit this")) &> />
<%cpp> } else { </%cpp>
- <a href="edit_timer.html?channelid=<$ channelid $>&eventid=<$ eventid $>">
+ <a href="edit_timer.html?epgid=<$ epgid $>">
<img src="<$ LiveSetup().GetThemedLink("img", "record.png") $>" alt="" <& tooltip.hint text=(tr("Record this")) &> />
<%cpp> } </%cpp>
</a>
@@ -207,7 +210,7 @@ int update_status(1);
EpgEvents::DecodeDomId(epgid, channelId, eventId);
if (detail) { // output for vertical toolbox
</%cpp>
- <& pageelems.event_timer channelid=(channelId) eventid=(eventId) &>
+ <& pageelems.event_timer epgid=(epgid) &>
<%cpp>
if (elapsed > 0) {
</%cpp>
@@ -225,10 +228,10 @@ int update_status(1);
}
else { // table output
</%cpp>
- <td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer channelid=(channelId) eventid=(eventId) &></td>
+ <td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer epgid=(epgid) &></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (elapsed > 0) { </%cpp><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &><%cpp> } </%cpp></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent()) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
- <td class="action <? lastCurrentChanel ? "bottomrow"?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
+ <td class="action <? lastCurrentChanel ? "bottomrow"?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
<%cpp>
}
</%cpp>
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index f427a53..f7560dd 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -78,8 +78,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
string current_day = "";
const cEvent* PresentEvent = Schedule->GetPresentEvent();
time_t now = time(NULL) - ::Setup.EPGLinger * 60;
- tChannelID channel_id(Channel->GetChannelID());
- int evntNr = 0;
+ // tChannelID channel_id(Channel->GetChannelID());
+ // int evntNr = 0;
for (const cEvent *Event = Schedule->Events()->First(); Event; Event = Schedule->Events()->Next(Event)) {
if (Event->EndTime() <= now && Event != PresentEvent)
continue;
@@ -92,7 +92,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
string start(epgEvent->StartTime(tr("%I:%M %p")));
string end(epgEvent->EndTime(tr("%I:%M %p")));
string day(epgEvent->StartTime(tr("%A, %b %d %Y")));
- string strEventID = lexical_cast<string>(Event->EventID());
+ string epgid = EpgEvents::EncodeDomId(Channel->GetChannelID(), Event->EventID());
+ // string strEventID = lexical_cast<string>(Event->EventID());
bool truncated = false;
bool lastEventCurrentDay = false;
@@ -124,9 +125,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
}
</%cpp>
<tr>
- <td class="action leftcol <? lastEventCurrentDay ? "bottomrow" ?>"><& pageelems.event_timer channelid=(channel_id) eventid=(strEventID) &></td>
+ <td class="action leftcol <? lastEventCurrentDay ? "bottomrow" ?>"><& pageelems.event_timer epgid=(epgid) &></td>
<td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() ) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
- <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
+ <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
<td class="topaligned <? lastEventCurrentDay ? "bottomrow" ?>"><div class="withmargin"><$ start $> - <$ end $></div></td>
<td class="<? (Event == PresentEvent) ? "current" ?> topaligned rightcol <? lastEventCurrentDay ? "bottomrow" ?>"><div class="more withmargin"><a <& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + "<br />" + tr("Click to view details.")) &><& tooltip.display domId=(epgEvent->Id()) &>><span class="title"><$ title $></span><br /><span class="short"><%cpp>if (short_description.empty()) { </%cpp>&nbsp;<%cpp> } </%cpp><$ short_description $></span></a></div></td>
</tr>
@@ -143,5 +144,5 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<%include>page_exit.eh</%include>
<%def channel_selection>
-<form name="channels" id="channels"><span><$ tr("Show schedule of channel") $>: </span><& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &></form>
+<form action="." method="get" id="channels"><div><label for="channel"><$ tr("Show schedule of channel") $>: </label><& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &></div></form>
</%def>
diff --git a/pages/searchepg.ecpp b/pages/searchepg.ecpp
index f885d4e..2331074 100644
--- a/pages/searchepg.ecpp
+++ b/pages/searchepg.ecpp
@@ -251,7 +251,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<& pageelems.logo &>
<& menu active=("searchepg") &>
<div class="inhalt">
- <form method="POST" name="searchepg" action="searchepg.ecpp">
+ <form method="post" name="searchepg" action="searchepg.ecpp">
<input type="hidden" name="blacklistids_internal" value="<$ blacklistids_internal $>" id="blacklistids_internal"/>
<table class="formular" cellpadding="0" cellspacing="0">
<tr class="head">
diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp
index dda0d12..dce7520 100644
--- a/pages/searchresults.ecpp
+++ b/pages/searchresults.ecpp
@@ -56,7 +56,7 @@ bool logged_in(false);
% if (results.size() == 0) {
<$ tr("No search results") $>
% }
- <table class="listing" cellspacing="0" callpadding="0">
+ <table class="listing" cellspacing="0" cellpadding="0">
<%cpp>
string current_day = "";
@@ -66,10 +66,8 @@ bool logged_in(false);
string start(result->StartTime() ? FormatDateTime(tr("%I:%M %p"), result->StartTime()) : "");
string end(result->StopTime() ? FormatDateTime(tr("%I:%M %p"), result->StopTime()) : "");
string day(result->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), result->StartTime()) : "");
- tEventID event = result->EventId();
- tChannelID channel_id(result->Channel());
string description = result->Description();
- string epgDomId(EpgEvents::EncodeDomId(result->Channel(), event));
+ string epgid = EpgEvents::EncodeDomId(result->Channel(), result->EventId());
bool truncated = false;
@@ -95,10 +93,10 @@ bool logged_in(false);
% current_day = day;
% }
<tr>
- <td class="action leftcol <? bottom ? "bottomrow"?>"><& pageelems.event_timer channelid=(channel_id) eventid=(event)&></td>
+ <td class="action leftcol <? bottom ? "bottomrow"?>"><& pageelems.event_timer epgid=(epgid) &></td>
<td class="topaligned <? bottom ? "bottomrow"?>"><div class="withmargin"><a href="schedule.html?channel=<$ channelnr $>"><$ channelname $></a></div></td>
<td class="topaligned <? bottom ? "bottomrow"?>"><div class="withmargin"><$ start $> - <$ end $></div></td>
- <td class="topaligned rightcol <? bottom ? "bottomrow"?>"><div class="more withmargin"><a <& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + "<br />" + tr("Click to view details.")) &><& tooltip.display domId=(epgDomId) &>><span class="title"><$ result->Title() $></span><br /><span class="short"><%cpp>if (result->ShortText().empty()) { </%cpp>&nbsp;<%cpp> } </%cpp><$ result->ShortText() $></span></a></div></td>
+ <td class="topaligned rightcol <? bottom ? "bottomrow"?>"><div class="more withmargin"><a <& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + "<br />" + tr("Click to view details.")) &><& tooltip.display domId=(epgid) &>><span class="title"><$ result->Title() $></span><br /><span class="short"><%cpp>if (result->ShortText().empty()) { </%cpp>&nbsp;<%cpp> } </%cpp><$ result->ShortText() $></span></a></div></td>
</tr>
% }
</table>