summaryrefslogtreecommitdiffstats
path: root/pages/Login.c.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/Login.c.xml')
-rw-r--r--pages/Login.c.xml32
1 files changed, 32 insertions, 0 deletions
diff --git a/pages/Login.c.xml b/pages/Login.c.xml
new file mode 100644
index 0000000..5175136
--- /dev/null
+++ b/pages/Login.c.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Login</name>
+ <template>phpexec</template>
+ <access>01</access>
+ <type>c</type>
+ </info>
+ <data>
+ <code>
+ <![CDATA[
+<?PHP
+ if($_POST['name'] && $_POST['password'] && $_POST['page']) {
+ require_once('code/user.inc.php');
+ require_once('code/links.inc.php');
+ require_once('code/message.inc.php');
+ require_once('code/util.inc.php');
+
+ if($GLOBALS['user']->Login(Unquote($_POST['name']), Unquote($_POST['password']))) {
+ header('Location: ' . $GLOBALS['links']->GetNeonLink($_POST['page'], null, false));
+ exit();
+ }
+ }
+
+ $title = Message('Error');
+
+ echo '<span class="error">' . Message('LoginError') . '</span>';
+?>
+ ]]>
+ </code>
+ </data>
+</page>