<%pre> #include "setup.h" using namespace vdrlive; using namespace std; </%pre> <%args> int lastchannel = 0; bool useauth = 0; string login; string pass; string times; </%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); if (useauth) { LiveSetup().SetAdminLogin(login); if (pass != "") LiveSetup().SetAdminPassword(pass); } LiveSetup().SetTimes(times); LiveSetup().SaveSetup(); } pageTitle = tr("Setup"); lastchannel = LiveSetup().GetLastChannel(); login = LiveSetup().GetAdminLogin(); useauth = LiveSetup().UseAuth(); times = LiveSetup().GetTimes(); </%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 &> <script type="text/javascript"><!-- function initform() { changeduseauth(document.getElementById("useauth")); } function changeduseauth(selection) { document.getElementById("authsection").style.display = (selection.checked ? "block" : "none"); } //--></script> </head> <body onload="<& pageelems.infobox_start_update &>; initform()"> <& 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> <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" id="useauth" value="1" <{ reply.out() << ( useauth ? "checked=\"checked\"" : "" ); }> onclick="changeduseauth(this)"/> <div id="authsection" style="display: none"> <table border="0" cellpadding="0" cellspacing="0" class="dependent"> <tr> <td><$ tr("Admin login") $>:</td> <td><input type="text" name="login" value="<$ login $>" id="login" /></td> </tr> <tr> <td><$ tr("Admin password") $>:</td> <td><input type="password" name="pass" value="<$ pass $>" id="pass" /></td> </tr> </table> </div> </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("additional fixed times in 'What's on?'") $>:</td> <td><input type="text" name="times" value="<$ times $>" id="times" /> <& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a colon")) &></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>