Better layout in Form setup
[fa-stable.git] / includes / session.inc
index 0e7d31138d0d35d32eb9e774fad08fcddc5584fe..3f4d7cd4e219138101f1d1ca2f2c64a2563eac4e 100644 (file)
@@ -1,14 +1,14 @@
 <?php
-       /*--------------------------------------------------\
-       |               |               | session.inc       |
-       |---------------------------------------------------|
-    | front_accounting                                                                         |
-    | http://open-accounting.sourceforge.net/                          |
-    | by KylieTech Consulting                           |
-    | http://frontaccounting.com/                              |
-    | by Joe Hunt Consulting         |
-       \--------------------------------------------------*/
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
        function output_html($text)
        {
          global $before_box, $Ajax, $messages;
         if (!isset($_POST["user_name_entry_field"]) or $_POST["user_name_entry_field"] == "")
         {
                include($path_to_root . "/access/login.php");
-               $Ajax->redirect($path_to_root . "/access/login.php");
+                       $Ajax->redirect($path_to_root . "/access/login.php");
             exit;
         }
        }
                $succeed = $_SESSION["wa_current_user"]->login($_POST["company_login_name"],
                        $_POST["user_name_entry_field"],
                        md5($_POST["password"]));
-
+               // select full vs fallback ui mode on login
+               $_SESSION["wa_current_user"]->ui_mode = $_POST['ui_mode'];
                if (!$succeed)
                {
                        // Incorrect password