]> git.wh0rd.org - tt-rss.git/blobdiff - login.php
fix indent
[tt-rss.git] / login.php
index 6dcaf6ec3d71cac1860857716b8f3c6c86041ba8..3609622f87ca57a3290cdb94ee01342720047231 100644 (file)
--- a/login.php
+++ b/login.php
@@ -9,6 +9,7 @@
        $error_msg = "";
 
        $url_path = get_script_urlpath();
+       $return_to = $_REQUEST["rt"];
 
        if (ENABLE_LOGIN_SSL) {         
                $redirect_base = "https://" . $_SERVER["SERVER_NAME"] . $url_path;
@@ -16,7 +17,7 @@
                $redirect_base = "http://" . $_SERVER["SERVER_NAME"] . $url_path;
        }
 
-       if (SINGLE_USER_MODE) {
+       if (SINGLE_USER_MODE && $return_to != "none") {
                header("Location: $redirect_base/tt-rss.php");
                exit;
        }
 
        $login = $_POST["login"];
        $password = $_POST["password"];
-       $return_to = $_POST["rt"];
        $action = $_POST["action"];
 
-       if ($_COOKIE[get_session_cookie_name()]) {
+       if ($_COOKIE[get_session_cookie_name()] && $return_to != "none") {
                require_once "sessions.php";
                if ($_SESSION["uid"]) {
                        initialize_user_prefs($link, $_SESSION["uid"]); 
@@ -76,6 +76,7 @@
 <head>
        <title>Tiny Tiny RSS : Login</title>
        <link rel="stylesheet" type="text/css" href="tt-rss.css">
+       <link rel="shortcut icon" type="image/png" href="images/favicon.png">
        <!--[if gte IE 5.5000]>
                <script type="text/javascript" src="pngfix.js"></script>
        <![endif]-->
@@ -128,16 +129,14 @@ window.onload = init;
                        <tr><td colspan="2" align="right" class="innerLoginCell">
                                <input type="submit" class="button" value="Login">
                                <input type="hidden" name="action" value="login">
-                               <input type="hidden" name="rt" value="<?php echo $_GET['rt'] ?>">
+                               <input type="hidden" name="rt" 
+                                       value="<?php if ($return_to != 'none') { echo $return_to; } ?>">
                        </td></tr>
                </table>
        </td>
 </tr><tr>
        <td align="center" class="loginBottom">
-               <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
-               <?php if (WEB_DEMO_MODE) { ?>
-               <br>Running in demo mode, some functionality is disabled.
-               <?php } ?>
+               <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> &copy; 2005-2007 <a href="http://bah.org.ru/">Andrew Dolgov</a>
        </td>
 </tr>