diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-23 14:32:23 +0000 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-23 14:32:23 +0000 |
commit | 2a543304c089a0e8f942fe23fe3db59017b84a20 (patch) | |
tree | 7f1006c100e85ba2f3d1c3428487c8e5dd6af6f9 /pages | |
parent | 1b91c1d54e59178d4d095a05cc1da33605ac568f (diff) | |
download | vdr-plugin-live-2a543304c089a0e8f942fe23fe3db59017b84a20.tar.gz vdr-plugin-live-2a543304c089a0e8f942fe23fe3db59017b84a20.tar.bz2 |
- setup page
Diffstat (limited to 'pages')
-rw-r--r-- | pages/Makefile | 2 | ||||
-rw-r--r-- | pages/menu.ecpp | 3 | ||||
-rw-r--r-- | pages/setup.ecpp | 92 |
3 files changed, 95 insertions, 2 deletions
diff --git a/pages/Makefile b/pages/Makefile index 92a4932..6768cc5 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -22,7 +22,7 @@ OBJS = menu.o channels.o recordings.o schedule.o \ searchtimers.o edit_searchtimer.o searchresults.o \ searchepg.o login.o ibox.o xmlresponse.o \ play_recording.o pause_recording.o stop_recording.o \ - ffw_recording.o rwd_recording.o + ffw_recording.o rwd_recording.o setup.o ### Default rules: diff --git a/pages/menu.ecpp b/pages/menu.ecpp index ac31d79..acae70c 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -38,7 +38,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <a href="searchtimers.html" <& menu.setactive current=("searchtimers") &>><$ tr("Searchtimers") $></a> | % } <a href="recordings.html" <& menu.setactive current=("recordings") &>><$ tr("Recordings") $></a> | - <a href="remote.html" <& menu.setactive current=("remote") &>><$ tr("Remote Control") $></a> + <a href="remote.html" <& menu.setactive current=("remote") &>><$ tr("Remote Control") $></a> | + <a href="setup.html" <& menu.setactive current=("setup") &>><$ tr("Setup") $></a> <# --- Used by D.H. to test infobox (not part of the released version) | <a href="ibox_status.html" <& menu.setactive current=("status") &>><$ tr("Status Test") $></a> --- #> diff --git a/pages/setup.ecpp b/pages/setup.ecpp new file mode 100644 index 0000000..e69ef66 --- /dev/null +++ b/pages/setup.ecpp @@ -0,0 +1,92 @@ +<%pre> +#include "setup.h" + +using namespace vdrlive; +using namespace std; + +</%pre> +<%args> + int lastchannel = 0; + bool useauth = 0; + string login; + string pass; + int passLength = 0; +</%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> + if ( request.getMethod() == "POST") { + LiveSetup().SetLastChannel(lastchannel); + LiveSetup().SetUseAuth(useauth); + LiveSetup().SetAdminLogin(login); + LiveSetup().SetAdminPassword(pass); + return reply.redirect("setup.html"); + } + pageTitle = tr("Setup"); + lastchannel = LiveSetup().GetLastChannel(); + login = LiveSetup().GetAdminLogin(); + useauth = LiveSetup().UseAuth(); +</%cpp> +<& pageelems.doc_type &> +<html> + <head> + <title>VDR-Live - <$ pageTitle $></title> + <link rel="stylesheet" type="text/css" href="/styles.css" /> + <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> + <& pageelems.ajax_js &> + </head> + <body onload="<& pageelems.infobox_start_update &>"> + <& pageelems.logo &> + <& menu active=("setup") &> + <div class="inhalt"> + <form method="POST" name="setup" action="setup.ecpp"> + <table class="edit" cellpadding="0" cellspacing="0"> + <tr> + <td class="head" colspan="4"><div class="boxheader"><div><div><$ tr("Setup") $></div></div></div></td> + </tr> <!-- Last channel --> + <tr> + <td class="border" style="border-left: 1px solid black"></td> + <td class="label"><$ tr("Last channel to display") $>:</td> + <td><input type="text" name="lastchannel" value="<$ lastchannel $>" id="lastchannel" /></td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + <tr> + <td class="border" style="border-left: 1px solid black"></td> + <td class="label"><$ tr("Use authentication") $>:</td> + <td><input type="checkbox" name="useauth" value="1" <{ reply.out() << ( useauth ? "checked=\"checked\"" : "" ); }>/></td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + <tr> + <td class="border" style="border-left: 1px solid black"></td> + <td class="label"><$ tr("Admin login") $>:</td> + <td><input type="text" name="login" value="<$ login $>" id="login" /></td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + <tr> + <td class="border" style="border-left: 1px solid black"></td> + <td class="label"><$ tr("Admin password") $>:</td> + <td><input type="text" name="pass" value="<$ pass $>" id="pass" /></td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + + <tr> + <td class="border" style="border-left: 1px solid black"></td> + <td class="buttonpanel" colspan="2"> + <button class="green" type="submit" name="save" onclick="return checksearch();"><$ tr("Save") $></button> + </td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + </table> + </form> + </div> + </body> +</html> + +<%include>page_exit.eh</%include> + + |