<%pre>

#include <setup.h>

using namespace vdrlive;

</%pre>
<%args>
  pageTitle;
  errorTitle = tr("Page error");
  errorMessage;
</%args>
<%session scope="global">
bool logged_in(false);
</%session>
<{
if (!logged_in && LiveSetup().UseAuth()) {
  cToSvConcat targetUrl = "/login.html?redirect=";
  targetUrl.appendUrlEscaped(request.getQuery());
  return reply.redirect(targetUrl.data());
}
}>
<& pageelems.doc_type &>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>VDR-Live - <$ pageTitle $></title>
    <& pageelems.stylesheets &>
  </head>
  <body onpagehide="saveScrollPosition('content')" onpageshow="restoreScrollPosition()">
    <& pageelems.logo &>
    <& menu &>
    <div id="content">
      <div class="spacebar"><# spacer with fade-out effect #></div>
      <& error.error_widget errorTitle=(errorTitle) errorMessage=(errorMessage) &>
      <div class="spacebar"><# spacer with fade-out effect #></div>
    </div>
  </body>
</html>
<%def error_widget>
  <%args>
    errorTitle;
    errorMessage;
  </%args>
  <table class="error" cellpadding="0" cellspacing="0">
    <tr><td class="title"><$ errorTitle $></td></tr>
    <tr><td class="message"><$ errorMessage $></td></tr>
  </table>
</%def>
