<%pre> #include "setup.h" #include "tools.h" using namespace vdrlive; using namespace std; <%args> string lastchannel; bool useauth = 0; string login; string pass; string times; string startscreen; string localnetmask; <%session scope="global"> bool logged_in(false); <%include>page_init.eh <{ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); }> <%cpp> #define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" ); if ( request.getMethod() == "POST") { LiveSetup().SetLastChannel(lastchannel != "" ? lexical_cast< int >(lastchannel):0); LiveSetup().SetUseAuth(useauth); if (useauth) { LiveSetup().SetAdminLogin(login); if (pass != "") LiveSetup().SetAdminPassword(pass); LiveSetup().SetLocalNetMask(localnetmask); } LiveSetup().SetTimes(times); LiveSetup().SetStartScreen(startscreen); LiveSetup().SaveSetup(); } pageTitle = tr("Setup"); int ilastchannel = LiveSetup().GetLastChannel(); if (ilastchannel == std::numeric_limits< int >::max()) lastchannel = ""; else lastchannel = lexical_cast(ilastchannel); login = LiveSetup().GetAdminLogin(); useauth = LiveSetup().GetUseAuth(); times = LiveSetup().GetTimes(); startscreen = LiveSetup().GetStartScreen(); localnetmask = LiveSetup().GetLocalNetMask(); <& pageelems.doc_type &> VDR-Live - <$ pageTitle $> <& pageelems.stylesheets &> <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> <& pageelems.logo &> <& menu active=("setup") &>
<$ tr("Setup") $>
<$ tr("Last channel to display") $>:
<$ tr("Use authentication") $>: onclick="changeduseauth(this)"/>
<$ tr("additional fixed times in 'What's on?'") $>: <& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a colon")) &>
<$ tr("Start page") $>:
<%include>page_exit.eh