Inserted Copyright Notice and fixed graphic items
[fa-stable.git] / admin / users.php
index f7ed20759be203ad9ea3b1a6b023970d04e4cb2a..d99edc62e673b657060f6fee3f2fffb2eb3b8b05 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    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>.
+***********************************************************************/
 $page_security=15;
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
@@ -55,7 +64,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
        {
                update_user($_POST['user_id'], $_POST['real_name'], $_POST['phone'],
                        $_POST['email'], $_POST['Access'], $_POST['language'], 
-                               $_POST['profile']);
+                               $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
 
                if ($_POST['password'] != "")
                        update_user_password($_POST['user_id'], md5($_POST['password']));
@@ -66,7 +75,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
        {
                add_user($_POST['user_id'], $_POST['real_name'], md5($_POST['password']),
                                $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'],
-                               $_POST['profile']);
+                               $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
 
                        display_notification_centered(_("A new user has been added."));
        }
@@ -122,7 +131,7 @@ while ($myrow = db_fetch($result))
        edit_button_cell("Edit".$myrow["user_id"], _("Edit"));
     if (strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username) &&
        $_SESSION["wa_current_user"]->access == 2)
-               edit_button_cell("Delete".$myrow["user_id"], _("Delete"));
+               delete_button_cell("Delete".$myrow["user_id"], _("Delete"));
        else
                label_cell('');
        end_row();
@@ -150,6 +159,8 @@ if ($selected_id != '')
                $_POST['Access'] = $myrow["full_access"];
                $_POST['language'] = $myrow["language"];
                $_POST['profile'] = $myrow["print_profile"];
+               $_POST['rep_popup'] = $myrow["rep_popup"];
+               $_POST['pos'] = $myrow["pos"];
        }
        hidden('selected_id', $selected_id);
        hidden('user_id');
@@ -160,6 +171,7 @@ if ($selected_id != '')
 else 
 { //end of if $selected_id only do the else when a new record is being entered
        text_row(_("User Login:"), "user_id",  null, 22, 20);
+       $_POST['rep_popup'] = 1;
 }
 $_POST['password'] = "";
 start_row();
@@ -182,9 +194,14 @@ security_headings_list_row(_("Access Level:"), 'Access', null);
 
 languages_list_row(_("Language:"), 'language', null);
 
+pos_list_row(_("User's POS"). ':', 'pos', null);
+
 print_profiles_list_row(_("Printing profile"). ':', 'profile', null,
        _('Browser printing support'));
 
+check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'],
+       false, _('Set this option to on if your browser directly supports pdf files'));
+
 end_table(1);
 
 submit_add_or_update_center($selected_id == '', '', true);