From 106384d35c47e99b4f2c450be4f7337a9f64e78f Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 29 Apr 2007 09:27:27 +0000 Subject: - new main menu entry "search" to search in the EPG --- i18n.cpp | 68 ++++++- pages/Makefile | 2 +- pages/searchepg.ecpp | 491 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 558 insertions(+), 3 deletions(-) create mode 100644 pages/searchepg.ecpp diff --git a/i18n.cpp b/i18n.cpp index 77164a4..364613c 100644 --- a/i18n.cpp +++ b/i18n.cpp @@ -3000,8 +3000,72 @@ const tI18nPhrase Phrases[] = { "", // Dansk "", // Czech }, - - + { "Search", // English + "Suchen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, + { "Extended search", // English + "Erweiterte Suche", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, + { "Search settings", // English + "Einstellungen zur Suche", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, /* { "", // English "", // Deutsch diff --git a/pages/Makefile b/pages/Makefile index 3d8c541..d9be777 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -20,7 +20,7 @@ OBJS = menu.o channels.o recordings.o schedule.o \ keypress.o remote.o channels_widget.o edit_timer.o \ error.o pageelems.o tooltip.o play_recording.o \ searchtimers.o infobox.o edit_searchtimer.o \ - searchresults.o login.o + searchresults.o login.o searchepg.o ### Default rules: diff --git a/pages/searchepg.ecpp b/pages/searchepg.ecpp new file mode 100644 index 0000000..3aa2a22 --- /dev/null +++ b/pages/searchepg.ecpp @@ -0,0 +1,491 @@ +<%pre> +#include +#include +#include +#include +#include +#include +#include "exception.h" +#include "tools.h" +#include "epgsearch.h" +#include "setup.h" + +using namespace std; +using namespace vdrlive; + + +<%args> + // input parameters + + // form parameters + bool useextendedsearch = false; + string search = ""; + int mode = 0; + bool matchcase = false; + int tolerance = 1; + bool usetitle = false; + bool usesubtitle = false; + bool usedescr = false; + int usechannel = SearchTimer::NoChannel; + tChannelID channelidfrom; + tChannelID channelfrom; + tChannelID channelidto; + tChannelID channelto; + string changrpsel = ""; + bool usetime = false; + string start_h = "00"; + string start_m = "00"; + string stop_h = "00"; + string stop_m = "00"; + bool useduration = false; + int durationmin = 0; + int durationmax = 90; + bool useweekday = false; + bool wday_mon = false; + bool wday_tue = false; + bool wday_wed = false; + bool wday_thu = false; + bool wday_fri = false; + bool wday_sat = false; + bool wday_sun = false; + int blacklistmode = 0; + string blacklistids[]; + bool useextepginfo = false; + string extepgvalues[]; + string blacklistids_internal; + +<%session scope="global"> +bool logged_in(false); + +<%request scope="page"> +SearchTimer* searchtimer; +ExtEPGInfos extEPGInfos; +ChannelGroups channelGroups; +Blacklists blacklists; + +<%include>page_init.eh +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> +<%cpp> + +#define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" ); +#define CHECKIF(x) reply.out() << ( (x) ? "checked=\"checked\"" : "" ); + + searchtimer = 0; + + if ( request.getMethod() == "POST") { + SearchTimer searchtimer; + + searchtimer.SetSearch(search); + searchtimer.SetSearchMode(mode); + searchtimer.SetTolerance(tolerance); + searchtimer.SetMatchCase(matchcase); + searchtimer.SetUseTitle(usetitle); + searchtimer.SetUseSubtitle(usesubtitle); + searchtimer.SetUseDescription(usedescr); + searchtimer.SetUseExtEPGInfo(useextepginfo); + if (useextepginfo) + { + vector< string > infos; + unsigned int i=0; + for (ExtEPGInfos::iterator extinfo = extEPGInfos.begin(); extinfo != extEPGInfos.end(); ++extinfo, i++) + { + ostringstream os; + os << extinfo->Id() << "#" << (i +<& pageelems.doc_type &> + + + <& pageelems.ajax_js &> + <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> + + + VDR Live - <$ tr("Search") $> + + + +
+ <& pageelems.logo &> + <& menu active=("searchepg") &> +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
<$ tr("Search settings") $>
<$ tr("Search term") $>:
<$ tr("Extended search") $>: + onclick="changeduseextendedsearch(this)" id="useextendedsearch"/> + +
+ + +
+
+
+
+ + +<%include>page_exit.eh -- cgit v1.2.3