<%pre> #include #include #include #include "epgsearch.h" #include "tools.h" using namespace vdrlive; using namespace std; <%args> // input parameters int searchtimerid; <%include>page_init.eh <%cpp> pageTitle = tr("Search results"); SearchResults results(searchtimerid); <& pageelems.doc_type &> VDR-Live - <$ pageTitle $> <& pageelems.ajax_js &> <& pageelems.logo &> <& menu active=("searchresults") &>
% if (results.size() == 0) { <$ tr("No search results") $> % } <{ string current_day = ""; bool active_line = false; for (SearchResults::iterator result = results.begin(); result != results.end(); ++result) { // active_line = !active_line; string channelname = Channels.GetByChannelID(result->Channel())->Name(); 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()); if (current_day != day) { if (current_day != "") { }> <{ } }> % current_day = day; % } "> % } % if (results.size() > 0) { % }
 
<$ day $>
<& pageelems.event_timer channelid=(channel_id) eventid=(event) &> <$ channelname $> <$ start $> - <$ end $> <$ result->Title() $>
<$ result->ShortText() $>
 
 
<%include>page_exit.eh