File: error.ecpp

package info (click to toggle)
vdr-plugin-live 3.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,116 kB
  • sloc: cpp: 12,988; javascript: 3,220; makefile: 241; sh: 40
file content (49 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<%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>