diff options
author | Michael Brückner <mb (plus) vdr (at) gekrumbel (dot) de> | 2007-04-26 18:13:40 +0000 |
---|---|---|
committer | Michael Brückner <mb (plus) vdr (at) gekrumbel (dot) de> | 2007-04-26 18:13:40 +0000 |
commit | d6e81adf9841989ca33f331637563cc8de8906e2 (patch) | |
tree | 109c4d6c52a256fa7804c841eef61f3611020676 | |
parent | 08e7642de2193889057796cbdaae62a20f6c4323 (diff) | |
download | vdr-plugin-live-d6e81adf9841989ca33f331637563cc8de8906e2.tar.gz vdr-plugin-live-d6e81adf9841989ca33f331637563cc8de8906e2.tar.bz2 |
- added login protection to the following pages: edit_searchtimer.ecpp
edit_timer.ecpp login.ecpp recordings.ecpp remote.ecpp schedule.ecpp
searchresults.ecpp searchtimers.ecpp timers.ecpp whats_on.ecpp
- replaced DOCTYPE at login.ecpp and whats_on.ecpp with page element
"<& pageelems.doc_type &>"
-rw-r--r-- | pages/edit_searchtimer.ecpp | 7 | ||||
-rw-r--r-- | pages/edit_timer.ecpp | 7 | ||||
-rw-r--r-- | pages/login.ecpp | 2 | ||||
-rw-r--r-- | pages/recordings.ecpp | 7 | ||||
-rw-r--r-- | pages/remote.ecpp | 6 | ||||
-rw-r--r-- | pages/schedule.ecpp | 6 | ||||
-rw-r--r-- | pages/searchresults.ecpp | 7 | ||||
-rw-r--r-- | pages/searchtimers.ecpp | 7 | ||||
-rw-r--r-- | pages/timers.ecpp | 7 | ||||
-rw-r--r-- | pages/whats_on.ecpp | 2 |
10 files changed, 56 insertions, 2 deletions
diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp index 84a4fde..1085be5 100644 --- a/pages/edit_searchtimer.ecpp +++ b/pages/edit_searchtimer.ecpp @@ -8,6 +8,7 @@ #include "exception.h" #include "tools.h" #include "epgsearch.h" +#include "setup.h" using namespace std; using namespace vdrlive; @@ -73,6 +74,9 @@ using namespace vdrlive; bool usevps = false; string blacklistids_internal; </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%request scope="page"> SearchTimer* searchtimer; ExtEPGInfos extEPGInfos; @@ -81,6 +85,9 @@ Blacklists blacklists; </%request> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> #define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" ); diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp index 9d6fd9f..734a531 100644 --- a/pages/edit_timer.ecpp +++ b/pages/edit_timer.ecpp @@ -7,6 +7,7 @@ #include "exception.h" #include "tools.h" #include "timers.h" +#include "setup.h" using namespace std; using namespace vdrlive; @@ -38,10 +39,16 @@ using namespace vdrlive; int lifetime = 0; string aux = ""; </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%request scope="page"> cTimer* timer; </%request> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> cMutexLock timersLock( &LiveTimerManager() ); SortedTimers& timers = LiveTimerManager().GetTimers(); diff --git a/pages/login.ecpp b/pages/login.ecpp index 90c1bff..afa7a15 100644 --- a/pages/login.ecpp +++ b/pages/login.ecpp @@ -31,7 +31,7 @@ if (action == "login") { if (logged_in || !LiveSetup().UseAuth()) return reply.redirect("whats_on.html"); }> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<& pageelems.doc_type &> <html> <head> <title>VDR-Live - Login</title> diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 96562f7..d9c620d 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -7,6 +7,7 @@ #include "epg_events.h" #include "recordings.h" +#include "setup.h" using namespace vdrlive; using namespace std; @@ -14,11 +15,17 @@ using namespace std; </%pre> <%args> </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%request scope="page"> RecordingsTree recordingsTree(LiveRecordingsManager()); EpgEvents epgEvents; </%request> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> pageTitle = tr("Recordings"); </%cpp> diff --git a/pages/remote.ecpp b/pages/remote.ecpp index 2a5fcbe..9b405a6 100644 --- a/pages/remote.ecpp +++ b/pages/remote.ecpp @@ -5,7 +5,13 @@ using namespace vdrlive; </%pre> +<%session scope="global"> +bool logged_in(false); +</%session> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> pageTitle = tr("Remote Control"); </%cpp> diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index 2ee7ed0..db775d3 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -14,10 +14,16 @@ using namespace vdrlive; <%args> int channel = -1; </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%request scope="page"> cChannel* Channel; </%request> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> pageTitle = tr("Schedule"); diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp index 15ce030..37de16a 100644 --- a/pages/searchresults.ecpp +++ b/pages/searchresults.ecpp @@ -4,6 +4,7 @@ #include <vdr/epg.h> #include "epgsearch.h" #include "tools.h" +#include "setup.h" using namespace vdrlive; using namespace std; @@ -13,7 +14,13 @@ using namespace std; // input parameters int searchtimerid; </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> pageTitle = tr("Search results"); diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index 82cace5..c81f30f 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -3,6 +3,7 @@ #include <vdr/i18n.h> #include "epgsearch.h" #include "tools.h" +#include "setup.h" using namespace vdrlive; using namespace std; @@ -13,7 +14,13 @@ using namespace std; string searchtimerid; string action; </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> pageTitle = tr("Searchtimers"); SearchTimers timers; diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 415b8df..021778f 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -2,6 +2,7 @@ #include <vdr/i18n.h> #include "timers.h" #include "tools.h" +#include "setup.h" using namespace std; using namespace vdrlive; @@ -12,10 +13,16 @@ using namespace vdrlive; string timerid; string action; </%args> +<%session scope="global"> +bool logged_in(false); +</%session> <%request scope="page"> cTimer* timer; </%request> <%include>page_init.eh</%include> +<{ +if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +}> <%cpp> pageTitle = tr("Timers"); diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index daf09d4..68ad112 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -35,7 +35,7 @@ if (type == "now") { } }> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<& pageelems.doc_type &> <html> <head> <title>VDR-Live - <$ head $></title> |