diff options
| author | Ben Webb <[email protected]> | 2008-11-29 16:40:06 +0000 |
|---|---|---|
| committer | Ben Webb <[email protected]> | 2008-11-29 16:40:06 +0000 |
| commit | 401278fa8b27e15788ed9e8bfd3bc77f9d648724 (patch) | |
| tree | d881f39aff34348bfe92cbb0f47145b91c3fd2a3 | |
| parent | 2af49c7f8a1417f15b8382e91d309d044637e132 (diff) | |
| download | agplmail-master.tar.gz | |
| -rw-r--r-- | functions.php | 10 | ||||
| -rw-r--r-- | index.php | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/functions.php b/functions.php index 1053883..de483b1 100644 --- a/functions.php +++ b/functions.php @@ -396,14 +396,14 @@ if (mysql_select_db($db_db, $con)); else die(mysql_error()); session_start(); if ($_POST['username']) { - $_SESSION['username'] = $_POST['username']; - $_SESSION['password'] = $_POST['password']; + $_SESSION['la-username'] = $_POST['username']; + $_SESSION['la-password'] = $_POST['password']; } if ($_POST['domain']) $_SESSION['domain'] = $_POST['domain']; elseif (sizeof($domain) == 1) $_SESSION['domain'] = $domain[0]; -$user = $_SESSION['username'].$_SESSION['domain']; -$uname = $_SESSION['username']; -$pass = $_SESSION['password']; +$user = $_SESSION['la-username'].$_SESSION['domain']; +$uname = $_SESSION['la-username']; +$pass = $_SESSION['la-password']; $view = $_GET['view']; if ($view) $_SESSION['view'] = $view; @@ -82,12 +82,13 @@ if ($libreapps) { if ($_GET['do'] == logout) { session_destroy(); ?> -<div id="la-content"><h2>Logged out</h2> <a href="<?php echo $me ?>">Return to login</a>?</div> +<div id="la-content"><h2>Logged out</h2> <a href="<?php echo $me ?>">Return</a>?</div> <?php } -elseif (!$_SESSION['username']) { +elseif (!$_SESSION['la-username']) { echo "<div id=\"la-content\">".$customhome; -?> +if ($libreapps) { ?> +<?php } else { ?> <h2>Login</h2> <form method="post" action="<?php echo $me ?>"><div id="form"> User: <input name="username"></input> @@ -104,6 +105,7 @@ if ($domain) { Password: <input name="password" type="password"></input><br/> <button type="submit">Submit</button> </div></form> +<?php } ?> </div> <?php } |
