summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas Keil <tkeil (at) datacrystal (dot) de>2007-04-26 16:18:37 +0000
committerThomas Keil <tkeil (at) datacrystal (dot) de>2007-04-26 16:18:37 +0000
commitc4306bb47f02324e709b1f254a1b1d082eab7d81 (patch)
tree3c3a80b23ca693767e9bed9f37f1eb49def8e48e /pages
parentda83671faaaaf84ebcfb171745166952ddb2d46c (diff)
downloadvdr-plugin-live-c4306bb47f02324e709b1f254a1b1d082eab7d81.tar.gz
vdr-plugin-live-c4306bb47f02324e709b1f254a1b1d082eab7d81.tar.bz2
New
Diffstat (limited to 'pages')
-rw-r--r--pages/login.ecpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/pages/login.ecpp b/pages/login.ecpp
new file mode 100644
index 0000000..90c1bff
--- /dev/null
+++ b/pages/login.ecpp
@@ -0,0 +1,68 @@
+<%pre>
+#include "tools.h"
+#include "setup.h"
+
+using namespace std;
+using namespace vdrlive;
+
+</%pre>
+<%args>
+std::string login;
+std::string password;
+std::string action;
+</%args>
+<%session scope="global">
+bool logged_in(false);
+</%session>
+<{
+
+std::string message;
+
+if (action == "login") {
+ if ((login == LiveSetup().GetAdminLogin()) && (password == LiveSetup().GetAdminPassword())) {
+ logged_in = true;
+ } else {
+ message = "Username oder Passwort falsch";
+ }
+} else if (action == "logout") {
+ logged_in = false;
+}
+
+if (logged_in || !LiveSetup().UseAuth()) return reply.redirect("whats_on.html");
+
+}>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <title>VDR-Live - Login</title>
+ <link rel="stylesheet" type="text/css" href="styles.css" />
+ <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &>
+ <& pageelems.ajax_js &>
+ </head>
+ <body>
+ <div style="width: 440px; margin: 0 auto; text-align: center; padding: 20px">
+ <div class="boxheader"><div><div>VDR Live Login</div></div></div>
+ <div style="border: 1px solid black; padding: 15px">
+ <img src="logo_login.png" alt="VDR Live"></img>
+ <form name="auth">
+ <input type="hidden" name="action" value="login" />
+ <table class="login">
+ <tr>
+ <td><$ tr("Login") $></td>
+ <td><input type="text" name="login" value="<$ login $>" /></td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td><$ tr("Password") $></td>
+ <td><input type="password" name="password" value="<$ password $>" /></td>
+ <td><button type="submit" class="blue"><$ tr("Login") $></td>
+ </tr>
+ </table>
+ </form>
+ <div style="color: red; margin: 0 auto; padding: 10px">
+ <$ message $>
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file