Switch to new access levels system
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 31 Aug 2009 13:52:42 +0000 (13:52 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 31 Aug 2009 13:52:42 +0000 (13:52 +0000)
170 files changed:
access/logout.php
access/timeout.php
admin/attachments.php
admin/backups.php
admin/change_current_user_password.php
admin/company_preferences.php
admin/create_coy.php
admin/db/users_db.inc
admin/display_prefs.php
admin/fiscalyears.php
admin/forms_setup.php
admin/gl_setup.php
admin/inst_lang.php
admin/inst_module.php
admin/inst_upgrade.php
admin/payment_terms.php
admin/print_profiles.php
admin/printers.php
admin/shipping_companies.php
admin/users.php
admin/view_print_transaction.php
admin/void_transaction.php
applications/application.php
applications/setup.php
config.php
dimensions/dimension_entry.php
dimensions/inquiry/search_dimensions.php
dimensions/view/view_dimension.php
gl/bank_account_reconcile.php
gl/bank_transfer.php
gl/gl_bank.php
gl/gl_budget.php
gl/gl_journal.php
gl/inquiry/bank_inquiry.php
gl/inquiry/gl_account_inquiry.php
gl/inquiry/gl_trial_balance.php
gl/inquiry/journal_inquiry.php
gl/inquiry/tax_inquiry.php
gl/manage/bank_accounts.php
gl/manage/currencies.php
gl/manage/exchange_rates.php
gl/manage/gl_account_classes.php
gl/manage/gl_account_types.php
gl/manage/gl_accounts.php
gl/manage/gl_quick_entries.php
gl/view/bank_transfer_view.php
gl/view/gl_deposit_view.php
gl/view/gl_payment_view.php
gl/view/gl_trans_view.php
includes/access_levels.inc
includes/current_user.inc
includes/session.inc
index.php
inventory/adjustments.php
inventory/cost_update.php
inventory/inquiry/stock_movements.php
inventory/inquiry/stock_status.php
inventory/manage/item_categories.php
inventory/manage/item_codes.php
inventory/manage/item_units.php
inventory/manage/items.php
inventory/manage/locations.php
inventory/manage/movement_types.php
inventory/manage/sales_kits.php
inventory/prices.php
inventory/purchasing_data.php
inventory/reorder_level.php
inventory/transfers.php
inventory/view/view_adjustment.php
inventory/view/view_transfer.php
manufacturing/inquiry/bom_cost_inquiry.php
manufacturing/inquiry/where_used_inquiry.php
manufacturing/manage/bom_edit.php
manufacturing/manage/work_centres.php
manufacturing/search_work_orders.php
manufacturing/view/wo_issue_view.php
manufacturing/view/wo_production_view.php
manufacturing/view/work_order_view.php
manufacturing/work_order_add_finished.php
manufacturing/work_order_costs.php
manufacturing/work_order_entry.php
manufacturing/work_order_issue.php
manufacturing/work_order_release.php
purchasing/allocations/supplier_allocate.php
purchasing/allocations/supplier_allocation_main.php
purchasing/inquiry/po_search.php
purchasing/inquiry/po_search_completed.php
purchasing/inquiry/supplier_allocation_inquiry.php
purchasing/inquiry/supplier_inquiry.php
purchasing/manage/suppliers.php
purchasing/po_entry_items.php
purchasing/po_receive_items.php
purchasing/supplier_credit.php
purchasing/supplier_invoice.php
purchasing/supplier_payment.php
purchasing/view/view_grn.php
purchasing/view/view_po.php
purchasing/view/view_supp_credit.php
purchasing/view/view_supp_invoice.php
purchasing/view/view_supp_payment.php
reporting/includes/pdf_report.inc
reporting/prn_redirect.php
reporting/rep101.php
reporting/rep102.php
reporting/rep103.php
reporting/rep104.php
reporting/rep105.php
reporting/rep106.php
reporting/rep107.php
reporting/rep108.php
reporting/rep109.php
reporting/rep110.php
reporting/rep201.php
reporting/rep202.php
reporting/rep203.php
reporting/rep204.php
reporting/rep209.php
reporting/rep301.php
reporting/rep302.php
reporting/rep303.php
reporting/rep304.php
reporting/rep305.php
reporting/rep401.php
reporting/rep409.php
reporting/rep501.php
reporting/rep601.php
reporting/rep701.php
reporting/rep702.php
reporting/rep704.php
reporting/rep705.php
reporting/rep706.php
reporting/rep707.php
reporting/rep708.php
reporting/rep709.php
reporting/rep710.php
reporting/reports_main.php
sales/allocations/customer_allocate.php
sales/allocations/customer_allocation_main.php
sales/create_recurrent_invoices.php
sales/credit_note_entry.php
sales/customer_credit_invoice.php
sales/customer_delivery.php
sales/customer_invoice.php
sales/customer_payments.php
sales/inquiry/customer_allocation_inquiry.php
sales/inquiry/customer_inquiry.php
sales/inquiry/sales_deliveries_view.php
sales/inquiry/sales_orders_view.php
sales/manage/credit_status.php
sales/manage/customer_branches.php
sales/manage/customers.php
sales/manage/recurrent_invoices.php
sales/manage/sales_areas.php
sales/manage/sales_groups.php
sales/manage/sales_people.php
sales/manage/sales_points.php
sales/manage/sales_types.php
sales/sales_order_entry.php
sales/view/view_credit.php
sales/view/view_dispatch.php
sales/view/view_invoice.php
sales/view/view_receipt.php
sales/view/view_sales_order.php
sql/alter2.2.php
sql/alter2.2.sql
sql/en_US-demo.sql
sql/en_US-new.sql
taxes/item_tax_types.php
taxes/tax_groups.php
taxes/tax_types.php

index 59eae7128938a46f2f4f3a925c88606b5e250f75..a8af023967167eafeba89d2c4eaf0709ee37e13c 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
+$page_security = 'SA_OPEN';
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/ui/ui_view.inc");
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/ui/ui_view.inc");
index 61e28a08c7fa521fb441d9521b047e1f176cd90c..c91dbc085f8314cd956e28d491b87380bc6796bb 100644 (file)
@@ -13,7 +13,7 @@
        User authentication page popped up after login timeout during ajax call.
 */
 $path_to_root = '..';
        User authentication page popped up after login timeout during ajax call.
 */
 $path_to_root = '..';
-$page_security = 1;
+$page_security = 'SA_OPEN';
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root .'/access/login.php');
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root .'/access/login.php');
index 8a7dba1cabc8330e9bea5683f7033cbbedd17bb0..6febfb70c92c77b922204d9162178abc65472275 100644 (file)
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $path_to_root="..";
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $path_to_root="..";
-$page_security = 8;
+$page_security = 'SA_ATTACHDOCUMENT';
 
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
index 18ca997279f7f38ab3b7f7f07c983bfa3d3cafbd..450f1df57113694391926257f0d22d1a678c56dd 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 15;
+$page_security = 'SA_BACKUP';
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
index f2b270c8138a38dc0241f501be4d6b69e7587364..9b205e19f2299d27b79d14b410fff0443b8c03b0 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=1;
+$page_security = 'SA_CHGPASSWD';
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
index 74b878e20dea8bd44b5b7f0d4566ed5db627884d..66a11281fa9cabb3711b2440bf36ec3961d2bd12 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security =10;
-$path_to_root="..";
+$page_security = 'SA_SETUPCOMPANY';
+$path_to_root = "..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Company Setup"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Company Setup"));
index eec636487124d29189ea3176a75d149372529ad3..5200f2df910e1bce356ca3c4599c3f47eaad4e8f 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 20;
+$page_security = 'SA_CREATECOMPANY';
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
index ebb9c8f6936e716fb1b9c1c2186bda3c2a4cbf75..1f0703dd8b339694964f899e45a2ba6028631a62 100644 (file)
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 
-function add_user($user_id, $real_name, $password, $phone, $email, $full_access
+function add_user($user_id, $real_name, $password, $phone, $email, $role_id
        $language, $profile, $rep_popup, $pos)
 {
        $sql = "INSERT INTO ".TB_PREF."users (user_id, real_name, password"
        $language, $profile, $rep_popup, $pos)
 {
        $sql = "INSERT INTO ".TB_PREF."users (user_id, real_name, password"
-               .", phone, email, full_access, language, pos, print_profile, rep_popup)
+               .", phone, email, role_id, language, pos, print_profile, rep_popup)
                VALUES (".db_escape($user_id).", 
                ".db_escape($real_name).", ".db_escape($password) .",".db_escape($phone).",
                VALUES (".db_escape($user_id).", 
                ".db_escape($real_name).", ".db_escape($password) .",".db_escape($phone).",
-                ".db_escape($email).", $full_access, ".db_escape($language).",
+                ".db_escape($email).", $role_id, ".db_escape($language).",
                 $pos,".db_escape($profile).",$rep_popup)";
 
        db_query($sql, "could not add user for $user_id");
                 $pos,".db_escape($profile).",$rep_popup)";
 
        db_query($sql, "could not add user for $user_id");
@@ -35,13 +35,13 @@ function update_user_password($id, $user_id, $password)
 
 //-----------------------------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------------------------
 
-function update_user($id, $user_id, $real_name, $phone, $email, $full_access
+function update_user($id, $user_id, $real_name, $phone, $email, $role_id
        $language, $profile, $rep_popup, $pos)
 {
        $sql = "UPDATE ".TB_PREF."users SET real_name=".db_escape($real_name).
        ", phone=".db_escape($phone).",
                email=".db_escape($email).",
        $language, $profile, $rep_popup, $pos)
 {
        $sql = "UPDATE ".TB_PREF."users SET real_name=".db_escape($real_name).
        ", phone=".db_escape($phone).",
                email=".db_escape($email).",
-               full_access=$full_access,
+               role_id=$role_id,
                language=".db_escape($language).",
                print_profile=".db_escape($profile).",
                rep_popup=$rep_popup,
                language=".db_escape($language).",
                print_profile=".db_escape($profile).",
                rep_popup=$rep_popup,
@@ -89,9 +89,10 @@ function update_user_display_prefs($id, $price_dec, $qty_dec, $exrate_dec,
 
 function get_users($all=false)
 {
 
 function get_users($all=false)
 {
-       $sql = "SELECT * FROM ".TB_PREF."users";
-       if (!$all) $sql .= " WHERE !inactive";
-
+       $sql = "SELECT u.*, r.role FROM ".TB_PREF."users u, ".TB_PREF."security_roles r
+               WHERE u.role_id=r.id";
+       if (!$all) $sql .= " AND !u.inactive";
+       
        return db_query($sql, "could not get users");
 }
 
        return db_query($sql, "could not get users");
 }
 
index 1d77d28614b157fd4105cb62f8c4ce6bcaef53d0..407952857ce5d848cafc19eb63f70c1b7c64cab9 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
+$page_security = 'SA_SETUPDISPLAY';
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
index 3df3205fa84d96e457bee748395cc8006e75de6e..a0cb0ced0ca90fa159b09b8cc59fb6c6a9681074 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 9;
-$path_to_root="..";
+$page_security = 'SA_FISCALYEARS';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index a15cfe4a72171390e88a2b1b78e9adb0215ff40e..33982b1e4c7cd48f0b06b4255a4a69d09454bca0 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security =10;
-$path_to_root="..";
+$page_security = 'SA_FORMSETUP';
+$path_to_root = "..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Forms Setup"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Forms Setup"));
index 81de1be779e11516b4831e84bf266c8e753d3ece..6aea5d3b9db5ab3aee3fd80c71806ca2b84c06d9 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security =10;
+$page_security = 'SA_GLSETUP';
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
index b5d5c16a33f816a38766d5ae7e373eade7357ff5..1020d770fcc47c15b22d9019943dcabef04ccaa7 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 20;
+$page_security = 'SA_CREATELANGUAGE';
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
index 342c3e7f811007c99313f64ff52889a95b352e74..00ab1adc90f5a08b4bc378b5c6e69c4125ffda8b 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 20;
+$page_security = 'SA_CREATEMODULES';
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
index 9166a59240c8f45fd1c71cb394abf204cd62eb77..d0cb4b1a35fd81a4ef362a2a556a26d865d5786b 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 20;
+$page_security = 'SA_SOFTWAREUPGRADE';
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
index ddc4c50945fca768af030f114027629028e7d0fa..7bc52c7c63da4a3cc37de9d659ffd29887eb6787 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
+$page_security = 'SA_PAYTERMS';
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
index f22c19416920932ed1fb5ef11d32a1d955c93818..99ef82e1d5144c6e1e9645f616751c8974708177 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 15;
-$path_to_root="..";
+$page_security = 'SA_PRINTPROFILE';
+$path_to_root = "..";
 include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/admin/db/printers_db.inc");
 include($path_to_root . "/includes/ui.inc");
 include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/admin/db/printers_db.inc");
 include($path_to_root . "/includes/ui.inc");
index a9137161a2a2763c5084a1ce264d3826a1a8220c..8104f1729beffb9a2a146bf8cabd56fd3c70e97e 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 15;
+$page_security = 'SA_PRINTERS';
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 
index 720c526476affa2efaa25b48e671a591836e9371..d5a91b1f94f90993fd1ef229e9f48e50c508c868 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 14;
+$page_security = 'SA_SHIPPING';
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 page(_("Shipping Company"));
 $path_to_root="..";
 include($path_to_root . "/includes/session.inc");
 page(_("Shipping Company"));
index afca5d6c0e9b25e005581db3d8d5affd4a13e8ec..3f2247042fdd4039c5a0c5b82043108666839dfd 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=15;
-$path_to_root="..";
+$page_security = 'SA_USERS';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Users"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Users"));
@@ -141,7 +141,7 @@ while ($myrow = db_fetch($result))
        label_cell($myrow["phone"]);
        email_cell($myrow["email"]);
        label_cell($last_visit_date, "nowrap");
        label_cell($myrow["phone"]);
        email_cell($myrow["email"]);
        label_cell($last_visit_date, "nowrap");
-       label_cell($security_headings[$myrow["full_access"]]);
+       label_cell($myrow["role"]);
        
     if ($not_me)
                inactive_control_cell($myrow["id"], $myrow["inactive"], 'users', 'id');
        
     if ($not_me)
                inactive_control_cell($myrow["id"], $myrow["inactive"], 'users', 'id');
@@ -174,7 +174,7 @@ if ($selected_id != -1)
                $_POST['real_name'] = $myrow["real_name"];
                $_POST['phone'] = $myrow["phone"];
                $_POST['email'] = $myrow["email"];
                $_POST['real_name'] = $myrow["real_name"];
                $_POST['phone'] = $myrow["phone"];
                $_POST['email'] = $myrow["email"];
-               $_POST['Access'] = $myrow["full_access"];
+               $_POST['Access'] = $myrow["role_id"];
                $_POST['language'] = $myrow["language"];
                $_POST['profile'] = $myrow["print_profile"];
                $_POST['rep_popup'] = $myrow["rep_popup"];
                $_POST['language'] = $myrow["language"];
                $_POST['profile'] = $myrow["print_profile"];
                $_POST['rep_popup'] = $myrow["rep_popup"];
@@ -211,7 +211,7 @@ text_row_ex(_("Telephone No.:"), 'phone', 30);
 
 email_row_ex(_("Email Address:"), 'email', 50);
 
 
 email_row_ex(_("Email Address:"), 'email', 50);
 
-security_headings_list_row(_("Access Level:"), 'Access', null); 
+security_roles_list_row(_("Access Level:"), 'Access', null); 
 
 languages_list_row(_("Language:"), 'language', null);
 
 
 languages_list_row(_("Language:"), 'language', null);
 
index 94c22416102df6f35e29af92c87de8d7991bce1c..f46f2053be199c81df6e8290f05eaabed76f208e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="..";
-$page_security = 5;
+$page_security = 'SA_VIEWPRINTTRANSACTION';
+$path_to_root = "..";
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
index 402a997e80820add356ef8a73fe7b87103eb22ac..e0d22ef71c7ed0fa8eb56e794e8efd3270853793 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="..";
-$page_security = 14;
+$page_security = 'SA_VOIDTRANSACTION';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 2b76e2ce9b95da9bd4e8be26b6901c9a0e8d9d6d..9220d14315eadd9ef10d53db4249e52e32a3790f 100644 (file)
@@ -47,7 +47,7 @@
                var $link;
                var $access;
                
                var $link;
                var $access;
                
-               function app_function($label,$link,$access=1
+               function app_function($label,$link,$access='SA_OPEN'
                {
                        $this->label = $label;
                        $this->link = $link;
                {
                        $this->label = $label;
                        $this->link = $link;
@@ -70,7 +70,7 @@
                        $this->rappfunctions = array();
                }
                
                        $this->rappfunctions = array();
                }
                
-               function add_lapp_function($label,$link="",$access=1
+               function add_lapp_function($label,$link="",$access='SA_OPEN'
                {
                        $appfunction = new app_function($label,$link,$access);
                        //array_push($this->lappfunctions,$appfunction);
                {
                        $appfunction = new app_function($label,$link,$access);
                        //array_push($this->lappfunctions,$appfunction);
@@ -78,7 +78,7 @@
                        return $appfunction;
                }
 
                        return $appfunction;
                }
 
-               function add_rapp_function($label,$link="",$access=1
+               function add_rapp_function($label,$link="",$access='SA_OPEN'
                {
                        $appfunction = new app_function($label,$link,$access);
                        //array_push($this->rappfunctions,$appfunction);
                {
                        $appfunction = new app_function($label,$link,$access);
                        //array_push($this->rappfunctions,$appfunction);
                        return $module;
                }
                
                        return $module;
                }
                
-               function add_lapp_function($level, $label,$link="",$access=1
+               function add_lapp_function($level, $label,$link="",$access='SA_OPEN'
                {
                        $this->modules[$level]->lappfunctions[] = new app_function($label, $link, $access);
                }       
                        
                {
                        $this->modules[$level]->lappfunctions[] = new app_function($label, $link, $access);
                }       
                        
-               function add_rapp_function($level, $label,$link="",$access=1
+               function add_rapp_function($level, $label,$link="",$access='SA_OPEN'
                {
                        $this->modules[$level]->rappfunctions[] = new app_function($label, $link, $access);
                }       
                {
                        $this->modules[$level]->rappfunctions[] = new app_function($label, $link, $access);
                }       
index 8d78e99f365a52ae9b551e365f51b077ef11ae19..771851a56c2e300d1350d22f614999c0565e2fa2 100644 (file)
@@ -18,8 +18,8 @@
 
                        $this->add_module(_("Company Setup"));
                        $this->add_lapp_function(0, _("&Company Setup"),"admin/company_preferences.php?");
 
                        $this->add_module(_("Company Setup"));
                        $this->add_lapp_function(0, _("&Company Setup"),"admin/company_preferences.php?");
-                       $this->add_lapp_function(0, _("&User Accounts Setup"),"admin/users.php?", 15);
-                       $this->add_lapp_function(0, _("&Access Setup"),"admin/security_roles.php?", 20);
+                       $this->add_lapp_function(0, _("&User Accounts Setup"),"admin/users.php?", 'SA_USERS');
+                       $this->add_lapp_function(0, _("&Access Setup"),"admin/security_roles.php?", 'SA_SECROLES');
                        $this->add_lapp_function(0, _("&Display Setup"),"admin/display_prefs.php?");
                        $this->add_lapp_function(0, _("&Forms Setup"),"admin/forms_setup.php?");
                        $this->add_rapp_function(0, _("&Taxes"),"taxes/tax_types.php?");
                        $this->add_lapp_function(0, _("&Display Setup"),"admin/display_prefs.php?");
                        $this->add_lapp_function(0, _("&Forms Setup"),"admin/forms_setup.php?");
                        $this->add_rapp_function(0, _("&Taxes"),"taxes/tax_types.php?");
                        $this->add_lapp_function(2, _("&Void a Transaction"),"admin/void_transaction.php?");
                        $this->add_lapp_function(2, _("View or &Print Transactions"),"admin/view_print_transaction.php?");
                        $this->add_lapp_function(2, _("&Attach Documents"),"admin/attachments.php?filterType=20");
                        $this->add_lapp_function(2, _("&Void a Transaction"),"admin/void_transaction.php?");
                        $this->add_lapp_function(2, _("View or &Print Transactions"),"admin/view_print_transaction.php?");
                        $this->add_lapp_function(2, _("&Attach Documents"),"admin/attachments.php?filterType=20");
-                       $this->add_rapp_function(2, _("&Backup and Restore"),"admin/backups.php?", 15);
-                       $this->add_rapp_function(2, _("Create/Update &Companies"),"admin/create_coy.php?", 14);
-                       $this->add_rapp_function(2, _("Install/Update &Languages"),"admin/inst_lang.php?", 14);
-                       $this->add_rapp_function(2, _("Install/Update &Modules"),"admin/inst_module.php?", 15);
-                       $this->add_rapp_function(2, _("Software &Upgrade"),"admin/inst_upgrade.php?", 15);
+                       $this->add_rapp_function(2, _("&Backup and Restore"),"admin/backups.php?", 'SA_BACKUP');
+                       $this->add_rapp_function(2, _("Create/Update &Companies"),"admin/create_coy.php?", 'SA_CREATECOMPANY');
+                       $this->add_rapp_function(2, _("Install/Update &Languages"),"admin/inst_lang.php?", 'SA_CREATELANGUAGE');
+                       $this->add_rapp_function(2, _("Install/Update &Modules"),"admin/inst_module.php?", 'SA_CREATEMODULES');
+                       $this->add_rapp_function(2, _("Software &Upgrade"),"admin/inst_upgrade.php?", 'SA_SOFTWAREUPGRADE');
                        if (count($installed_modules) > 0)
                        {
                                foreach ($installed_modules as $mod)
                        if (count($installed_modules) > 0)
                        {
                                foreach ($installed_modules as $mod)
index 61d2c0c0298c4c2c2635bd30be57bd47350450bd..c88489c41e971b280eccc4998ddac8286ee3696c 100644 (file)
@@ -140,25 +140,15 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_
        /* skin for Business Graphics, 1, 2 or 3 */
        $graph_skin     = 1;
 
        /* skin for Business Graphics, 1, 2 or 3 */
        $graph_skin     = 1;
 
-       /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
-       the areas of functionality accessible can be modified.
-       Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
-       Each script has a particular security category associated with it.
-       If the security setting of the page is contained in the security group as determined by the access level then the user will be allowed access.
-       Each page has a $page_security = x; variable
-       This value is compared to contents of the array applicable which is based on the access level of the user.
-       Access authorisation is checked in session.inc. If you wish to add more security groups
-       with then you must add a new SecurityHeading to the security_headings array
-       and a new array of Security categories to the Security Groups _at_the_end_ of the array
-       This mechanism allows more fine grained control of access
-       security_groups is an array of arrays
-       The index is the order in which the array of allowed pages is defined new ones can be defined at will
-       or by changing the numbers in each array the security access can be tailored. These numbers need to read
-       in conjunction with the Page Security index
-       Special case is security level 20 which is reserved for admins of first
-       registered company (site admins). All potentially dangerous for whole FA
-       site operations like installing addon modules require access level 20.
-       */
+/*     
+       Before upgrade from pre-2.2 FA you have to move here your customized
+       security roles definitions. If you have used standard roles, you
+       can simply uncomment following two arrays. After upgrade both arrays need 
+       to be deleted or commented out. You may wish to change user roles to
+       new better defined in Users Setup. Old not used roles can be set inactive 
+       or deleted.
+*/
+/* Standard FA2.1 Security Group definitions
 
        $security_headings = array(
                        _("Inquiries"),
 
        $security_headings = array(
                        _("Inquiries"),
@@ -171,6 +161,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_
                        array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
                        array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
        );
                        array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
                        array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
        );
+*/
 
        //MySQL Backup and Restore Settings
 
 
        //MySQL Backup and Restore Settings
 
index c0e99521f5860af7a965c8b52e7ec03adc9b8165..31f45748bbe19b646788906838f316ca2a8e636a 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="..";
+$page_security = 'SA_DIMENSION';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 29ee870927bcb2c9b944217f71f3d2b2d22098cd..9a5c16aebebca47e877610f041697b0c73992d80 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_DIMTRANSVIEW';
 $path_to_root="../..";
 
 include($path_to_root . "/includes/db_pager.inc");
 $path_to_root="../..";
 
 include($path_to_root . "/includes/db_pager.inc");
index 9d74b06b84f5ae82647a48b114b294f8505d4b42..9dfc01e867e184be993ad44104da45cc7185689f 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="../..";
+$page_security = 'SA_DIMTRANSVIEW';
+$path_to_root = "../..";
 
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
index f4cfeceb702d257c4d30e6b3f40fceda43f8ffba..1810b6417c9ddcaa92b94db153ceead6fd45d157 100644 (file)
@@ -10,8 +10,8 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 /* Author Rob Mallon */
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 /* Author Rob Mallon */
-$page_security = 8;
-$path_to_root="..";
+$page_security = 'SA_RECONCILE';
+$path_to_root = "..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index 94748d2f0631daf471765a1d3edd563aec46dfcc..b7c7fcc5ef56ded16bb071e9b575b58cf4de588c 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="..";
-$page_security = 5;
+$page_security = 'SA_BANKTRANSFER';
+$path_to_root = "..";
 
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
index 34218c6f275b6b59a0730e0395655fee1d16d758..aff95cb3c9e76c74d96f6fdd564eb81bfeabf9fa 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = isset($_GET['NewPayment']) ? 'SA_PAYMENT' : 'SA_DEPOSIT';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index 0afded12281894319f1162d402f3fee43e62c907..6357693b174eb9667e206a8053356a1be6e37975 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="..";
+$page_security = 'SA_BUDGETENTRY';
+$path_to_root = "..";
 include($path_to_root . "/includes/session.inc");
 
 add_js_file('budget.js');
 include($path_to_root . "/includes/session.inc");
 
 add_js_file('budget.js');
index 3ce28e3aa4c91c8512fe0567ac202a2b42a7a4a7..4e23d2f74179890e7fc46e1e72da487a0be1503b 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_JOURNALENTRY';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
index 9c627670b8e5a3681888936413fa3863a66d7cbc..e287d77bfcad714654a60b0ba8a64fae550c30cd 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 8;
+$page_security = 'SA_BANKTRANSVIEW';
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
index 132d23cce9cbecd8a5e63b45600a2a6ae31cfae6..17a889075211ed8a028c70609ac125b7edae04b8 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 8;
-$path_to_root="../..";
+$page_security = 'SA_GLTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
 
index deaa0b418b37e7d20df52747eaf11b7443391adc..895a2703497e2cfebd036008c50efc046d96a275 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 8;
+$page_security = 'SA_GLANALYTIC';
 $path_to_root="../..";
 
 include_once($path_to_root . "/includes/session.inc");
 $path_to_root="../..";
 
 include_once($path_to_root . "/includes/session.inc");
index 15361bd2be26b16cd528e14fbc8b1a6f6b86863a..6cfd3cccd20deb2fd484357651e895ca1c2b0340 100644 (file)
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 
-$page_security = 8;
+$page_security = 'SA_GLANALYTIC';
 $path_to_root="../..";
 
 include($path_to_root . "/includes/db_pager.inc");
 $path_to_root="../..";
 
 include($path_to_root . "/includes/db_pager.inc");
index 39d90bb13f79c36a89d7638db4eff998f7e20358..13f61d5ad3d9e425e4efd98c96eb8d5f5f532a5b 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 8;
+$page_security = 'SA_TAXREP';
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
index 20f492b73730aa18480eae05e789aca566004921..a04d3c1ed4c989f77fe02192e0a7ca370e78326f 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="../..";
+$page_security = 'SA_BANKACCOUNT';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Bank Accounts"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Bank Accounts"));
index 4d5bf91892f1dc1557fb2b05b0c1345991c03f6c..689389dedfb03f9b15cbf7b542de95ef8f7a6d38 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 9;
-$path_to_root="../..";
+$page_security = 'SA_CURRENCY';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Currencies"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Currencies"));
index 528b42030d6a74fde6a1c196f37c6e13a6cb22f9..dd2ee6e6dbe7295ee201118d6a6af24fd0acaea2 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 9;
-$path_to_root="../..";
+$page_security = 'SA_EXCHANGERATE';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index de419e72c6524492344f1b9df0f9babdc37a1742..bdc6b9790d54e3ed0c54cd0f951148180a9f533d 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_GLACCOUNTCLASS';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("GL Account Classes"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("GL Account Classes"));
index 080144c64bad047b8bdc7e7bb26ce22019ab53ca..fd7d92ab700386ca146d0a31954c8e5f11c3d6f4 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_GLACCOUNTGROUP';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("GL Account Groups"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("GL Account Groups"));
index f3e5bc95fb759afdf7270734c5ac95d0eb444b09..4699c5498a941be26d07a7a61e1f74565ae90b8d 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="../..";
+$page_security = 'SA_GLACCOUNT';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Chart of Accounts"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Chart of Accounts"));
index c35f03398cfd097db94ab13a8adb724ac3e4534e..5a8804cb12e0aacdc69f1fd617757aa95e82a343 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_QUICKENTRY';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Quick Entries"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Quick Entries"));
index 318c93d0b396289cb40713a15d620f78970eb195..36932c3ea69ac03cd66193fd32661906847fabaf 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
+$page_security = 'SA_BANKTRANSVIEW';
 $path_to_root="../..";
 
 include($path_to_root . "/includes/session.inc");
 $path_to_root="../..";
 
 include($path_to_root . "/includes/session.inc");
index 95449bd77885dce180184cfc4e65c801c7f48b49..52c01e019ae8106c7c8025ff609b20aa4a2d8bf1 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_BANKTRANSVIEW';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index 32f8933591f53d71f334d69ae2b07b66883a98af..b386c5c6afb4dfcab4e2d3f39e9e49b7c0b86861 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_BANKTRANSVIEW';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index e48b09bfa72d9325bc68c2ca884487babe3f14d3..3ebedfa6ce1338acbc7249aedb5f5a020e60adc4 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 8;
-$path_to_root="../..";
+$page_security = 'SA_GLTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("General Ledger Transaction Details"), true);
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("General Ledger Transaction Details"), true);
index c7442ab4dd51715987597a566bd43669c5ed91d3..f1ccc7f697b4b011ef149f867ae2f9ae3098c6f7 100644 (file)
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 /*
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 /*
-       Security sections groups various areas on both functionality and privilige levels.
-       Often analyti inquires are available only for management, and configuration
+       Security sections groups various areas on both functionality and privilege levels.
+       Often analytic inquires are available only for management, and configuration
        for administration or management staff. This is why we have those three
        for administration or management staff. This is why we have those three
-       sections related to near every FA module.
-       
-       Every security section can contain up to 256 different areas.
+       section type inside near every FA module.
+
        Section codes 0-99 are reserved for core FA functionalities.
        Section codes 0-99 are reserved for core FA functionalities.
-       External modules can extend security roles system by adding rows to security sections and
-       security areas using section code >=100.
+       Every security section can contain up to 256 different areas.
+       External modules can extend security roles system by adding rows to 
+       $security_sections and $security_areas using section codes >=100.
 */
 define('SS_SADMIN',    1<<8);  // site admin
 define('SS_SETUP',     2<<8);  // company level setup
 */
 define('SS_SADMIN',    1<<8);  // site admin
 define('SS_SETUP',     2<<8);  // company level setup
@@ -54,7 +54,7 @@ $security_sections = array(
  SS_SPEC => _("Special maintenance"),
  SS_SALES_C => _("Sales configuration"),
  SS_SALES => _("Sales transactions"),
  SS_SPEC => _("Special maintenance"),
  SS_SALES_C => _("Sales configuration"),
  SS_SALES => _("Sales transactions"),
- SS_SALES_A => _("Sales analytics"),
+ SS_SALES_A => _("Sales related reports"),
  SS_PURCH_C => _("Purchase configuration"),
  SS_PURCH => _("Purchase transactions"),
  SS_PURCH_A => _("Purchase analytics"),
  SS_PURCH_C => _("Purchase configuration"),
  SS_PURCH => _("Purchase transactions"),
  SS_PURCH_A => _("Purchase analytics"),
@@ -73,12 +73,13 @@ $security_sections = array(
 /*
        This table stores security areas available in FA. 
        Key is area identifier used to check user rights, values are
 /*
        This table stores security areas available in FA. 
        Key is area identifier used to check user rights, values are
-       code stored for each role in security_roles table and description used
+       codes stored for each role in security_roles table and description used
        in roles editor.
 
        Set of allowed access areas codes is retrieved during user login from
        in roles editor.
 
        Set of allowed access areas codes is retrieved during user login from
-       security_roles table, and stored in user profile for direct during the session.
+       security_roles table, and cached in user profile.
 
 
+       Special value 'SA_OPEN' is used for publicly available pages like login/logout.
 */
 $security_areas =array(
 //
 */
 $security_areas =array(
 //
@@ -91,63 +92,75 @@ $security_areas =array(
 //
 //     Company setup
 //
 //
 //     Company setup
 //
-       'SA_CRSTATUS' => array(SS_SETUP|1, _("Credit status definitions changes")),
-       'SA_INVENTORYLOCATION' => array(SS_SETUP|2, _("Inventory locations changes")),
-       'SA_INVENTORYMOVETYPE'  => array(SS_SETUP|3, _("Inventory movement types")),
-       'SA_WORKCENTRE' => array(SS_SETUP|4, _("Manufacture work centres ")),
-       'SA_SETUPCOMPANY' => array(SS_SETUP|5, _("Company parameters")),
-       'SA_SETUPUSER' => array(SS_SETUP|6, _("Users setup")),
-       'SA_SETUPFORM' => array(SS_SETUP|7, _("Forms setup")),
-       'SA_PRINTPROFILE' => array(SS_SETUP|8, _("Print profiles")),
-       'SA_PAYMENTTERM' => array(SS_SETUP|9, _("Payment terms")),
-       'SA_SHIPPING' => array(SS_SETUP|10, _("Shipping ways")),
-       'SA_SETUPPOS' => array(SS_SETUP|11, _("Point of sales definitions")),
-       'SA_SETUPPRINTER' => array(SS_SETUP|12, _("Printers configuration")),
-
-// special and common functions
-       'SA_VIEWPRINTTRANSACTION' => array(SS_SPEC|1, _("Common view/print transactions interface")),
-       'SA_ATTACHDOCUMENT' => array(SS_SPEC|2, _("Attaching documents")),
-       'SA_VOIDTRANSACTION' => array(SS_SPEC|3, _("Voiding transactions")),
-       'SA_BACKUP' => array(SS_SPEC|4, _("Database backup/restore")),
+       'SA_SETUPCOMPANY' => array(SS_SETUP|1, _("Company parameters")),
+       'SA_SECROLES' => array(SS_SETUP|2, _("Access levels edition")),
+       'SA_USERS' => array(SS_SETUP|3, _("Users setup")),
+       'SA_POSSETUP' => array(SS_SETUP|4, _("Point of sales definitions")),
+       'SA_PRINTERS' => array(SS_SETUP|5, _("Printers configuration")),
+       'SA_PRINTPROFILE' => array(SS_SETUP|6, _("Print profiles")),
+       'SA_PAYTERMS' => array(SS_SETUP|7, _("Payment terms")),
+       'SA_SHIPPING' => array(SS_SETUP|8, _("Shipping ways")),
+       'SA_CRSTATUS' => array(SS_SETUP|9, _("Credit status definitions changes")),
+       'SA_INVENTORYLOCATION' => array(SS_SETUP|10, _("Inventory locations changes")),
+       'SA_INVENTORYMOVETYPE'  => array(SS_SETUP|11, _("Inventory movement types")),
+       'SA_WORKCENTRES' => array(SS_SETUP|12, _("Manufacture work centres")),
+       'SA_FORMSETUP' => array(SS_SETUP|13, _("Forms setup")),
+//
+// Special and common functions
+//
+       'SA_VOIDTRANSACTION' => array(SS_SPEC|1, _("Voiding transactions")),
+       'SA_BACKUP' => array(SS_SPEC|2, _("Database backup/restore")),
+       'SA_VIEWPRINTTRANSACTION' => array(SS_SPEC|3, _("Common view/print transactions interface")),
+       'SA_ATTACHDOCUMENT' => array(SS_SPEC|4, _("Attaching documents")),
+       'SA_SETUPDISPLAY' => array(SS_SPEC|5, _("Display preferences")), //???
+       'SA_CHGPASSWD' => array(SS_SPEC|6, _("Password changes")), //???
 
 
+//
 // Sales related functionality
 //
 // Sales related functionality
 //
-       'SA_STEMPLATE' => array(SS_SALES_C|1, _("Sales templates")),
-       'SA_SRECURRENT' => array(SS_SALES_C|2, _("Recurrent invoices definitions")),
-       'SA_SALESPRICE' => array(SS_SALES_C|3, _("Sales prices edition")),
-       'SA_SALESGROUP' => array(SS_SALES_C|4, _("Sales groups changes")),
-       'SA_SALESMAN' => array(SS_SALES_C|5, _("Sales staff maintenance")),
-       'SA_SALESAREA' => array(SS_SALES_C|6, _("Sales areas maintenance")),
-
-       'SA_CUSTOMER' => array(SS_SALES|1,  _("Sales customer and branches changes")),
-       'SA_SALESORDER' => array(SS_SALES|2, _("Sales orders edition")),
-       'SA_SALESDELIVERY' => array(SS_SALES|3, _("Sales deliveries edition")),
-       'SA_SALESINVOICE' => array(SS_SALES|4, _("Sales invoices edition")),
-       'SA_SALESCREDITINV' => array(SS_SALES|5, _("Sales credit notes against invoice")),
-       'SA_SALESCREDIT' => array(SS_SALES|6, _("Sales freehand credit notes")),
-       'SA_SALESPAYMNT' => array(SS_SALES|7, _("Customer payments entry")),
-       'SA_SALESALLOC' => array(SS_SALES|1, _("Customer payments allocation")),
-
-       'SA_SALESANALYTIC' => array(SS_SALES_A|2, _("Customer analytical reports and inquiries")),
-       'SA_SALESMANREP' => array(SS_SALES_A|3, _("Sales reports")),
-       'SA_SALESVARREP' => array(SS_SALES_A|4, _("Sales other reports and inquires")),
+       'SA_SALESTYPES' => array(SS_SALES_C|1, _("Sales types")),
+       'SA_SALESPRICE' => array(SS_SALES_C|2, _("Sales prices edition")),
+       'SA_SALESMAN' => array(SS_SALES_C|3, _("Sales staff maintenance")),
+       'SA_SALESAREA' => array(SS_SALES_C|4, _("Sales areas maintenance")),
+       'SA_SALESGROUP' => array(SS_SALES_C|5, _("Sales groups changes")),
+       'SA_STEMPLATE' => array(SS_SALES_C|6, _("Sales templates")),
+       'SA_SRECURRENT' => array(SS_SALES_C|7, _("Recurrent invoices definitions")),
+
+       'SA_SALESTRANSVIEW' => array(SS_SALES|1,  _("Sales transactions view")),
+       'SA_CUSTOMER' => array(SS_SALES|2,  _("Sales customer and branches changes")),
+       'SA_SALESORDER' => array(SS_SALES|3, _("Sales orders edition")),
+       'SA_SALESDELIVERY' => array(SS_SALES|4, _("Sales deliveries edition")),
+       'SA_SALESINVOICE' => array(SS_SALES|5, _("Sales invoices edition")),
+       'SA_SALESCREDITINV' => array(SS_SALES|6, _("Sales credit notes against invoice")),
+       'SA_SALESCREDIT' => array(SS_SALES|7, _("Sales freehand credit notes")),
+       'SA_SALESPAYMNT' => array(SS_SALES|8, _("Customer payments entry")),
+       'SA_SALESALLOC' => array(SS_SALES|9, _("Customer payments allocation")),
+
+       'SA_SALESANALYTIC' => array(SS_SALES_A|1, _("Sales analytical reports")),
+       'SA_SALESBULKREP' => array(SS_SALES_A|2, _("Sales document bulk reports")),
+       'SA_PRICEREP' => array(SS_SALES_A|3, _("Sales prices listing")),
+       'SA_SALESMANREP' => array(SS_SALES_A|4, _("Sales staff listing")),
+       'SA_CUSTBULKREP' => array(SS_SALES_A|5, _("Customer bulk listing")),
+       'SA_CUSTSTATREP' => array(SS_SALES_A|6, _("Customer status report")),
+       'SA_CUSTPAYMREP' => array(SS_SALES_A|7, _("Customer payments report")),
 
 //
 // Purchase related functions
 //
        'SA_PURCHASEPRICING' => array(SS_PURCH_C|1, _("Purchase price changes")),
 
 
 //
 // Purchase related functions
 //
        'SA_PURCHASEPRICING' => array(SS_PURCH_C|1, _("Purchase price changes")),
 
-       'SA_SUPPLIER' => array(SS_PURCH|1, _("Suppliers data changes")),
-       'SA_PURCHASEORDER' => array(SS_PURCH|2, _("Purchase order entry")),
-       'SA_GRN' => array(SS_PURCH|3, _("Purchase receive")),
-       'SA_SUPPLIERINVOICE' => array(SS_PURCH|4, _("Supplier invoices")),
-       'SA_SUPPLIERCREDIT' => array(SS_PURCH|5, _("Supplier credit notes")),
-       'SA_SUPPLIERPAYMNT' => array(SS_PURCH|6, _("Supplier payments")),
-       'SA_SUPPLIERALLOC' => array(SS_PURCH|7, _("Supplier payments allocations")),
-
-       'SA_SUPPLIERANALYTIC' => array(SS_PURCH_A|1, _("Supplier analytical reports and inquiries")),
-       'SA_SUPPLIERMANREP' => array(SS_PURCH_A|2, _("Supplier reports")),
-       'SA_SUPPLIERVARREP' => array(SS_PURCH_A|3, _("Supplier other reports and inquiries")),
+       'SA_SUPPTRANSVIEW' => array(SS_PURCH|1, _("Supplier transactions view")),
+       'SA_SUPPLIER' => array(SS_PURCH|2, _("Suppliers changes")),
+       'SA_PURCHASEORDER' => array(SS_PURCH|3, _("Purchase order entry")),
+       'SA_GRN' => array(SS_PURCH|4, _("Purchase receive")),
+       'SA_SUPPLIERINVOICE' => array(SS_PURCH|5, _("Supplier invoices")),
+       'SA_SUPPLIERCREDIT' => array(SS_PURCH|6, _("Supplier credit notes")),
+       'SA_SUPPLIERPAYMNT' => array(SS_PURCH|7, _("Supplier payments")),
+       'SA_SUPPLIERALLOC' => array(SS_PURCH|8, _("Supplier payments allocations")),
+
+       'SA_SUPPLIERANALYTIC' => array(SS_PURCH_A|1, _("Supplier analytical reports")),
+       'SA_SUPPBULKREP' => array(SS_SALES_A|2, _("Supplier document bulk reports")),
+       'SA_SUPPPAYMREP' => array(SS_PURCH_A|3, _("Supplier payments report")),
 //
 // Inventory 
 //
 //
 // Inventory 
 //
@@ -156,37 +169,39 @@ $security_areas =array(
        'SA_ITEMCATEGORY' => array(SS_ITEMS_C|3, _("Item categories")),
        'SA_UOM' => array(SS_ITEMS_C|4, _("Units of measure")),
 
        'SA_ITEMCATEGORY' => array(SS_ITEMS_C|3, _("Item categories")),
        'SA_UOM' => array(SS_ITEMS_C|4, _("Units of measure")),
 
-       'SA_FORITEMCODE' => array(SS_ITEMS|1, _("Foreign item codes entry")),
-       'SA_LOCATIONTRANSFER' => array(SS_ITEMS|2, _("Inventory location transfers")),
-       'SA_INVENTORYADJUSTMENT' => array(SS_ITEMS|3, _("Inventory adjustments")),
+       'SA_ITEMSSTATVIEW' => array(SS_ITEMS|1, _("Stock status view")),
+       'SA_ITEMSTRANSVIEW' => array(SS_ITEMS|2, _("Stock transactions view")),
+       'SA_FORITEMCODE' => array(SS_ITEMS|3, _("Foreign item codes entry")),
+       'SA_LOCATIONTRANSFER' => array(SS_ITEMS|4, _("Inventory location transfers")),
+       'SA_INVENTORYADJUSTMENT' => array(SS_ITEMS|5, _("Inventory adjustments")),
 
        'SA_REORDER' => array(SS_ITEMS_A|1, _("Reorder levels")),
        'SA_ITEMSANALYTIC' => array(SS_ITEMS_A|2, _("Items analytical reports and inquiries")),
 
        'SA_REORDER' => array(SS_ITEMS_A|1, _("Reorder levels")),
        'SA_ITEMSANALYTIC' => array(SS_ITEMS_A|2, _("Items analytical reports and inquiries")),
-       'SA_ITEMSMANREP' => array(SS_ITEMS_A|3, _("Inventory reports")),
-       'SA_ITEMSVARREP' => array(SS_ITEMS_A|4, _("Inventory other reports and inquiries")),
+       'SA_ITEMSVALREP' => array(SS_ITEMS_A|3, _("Inventory valuation report")),
 
 //
 // Manufacturing module 
 //
        'SA_BOM' => array(SS_MANUF_C|1, _("Bill of Materials")),
 
 
 //
 // Manufacturing module 
 //
        'SA_BOM' => array(SS_MANUF_C|1, _("Bill of Materials")),
 
-       'SA_WORKORDERENTRY' => array(SS_MANUF|1, _("Work order entry")),
-       'SA_WORKORDEROPERATION' => array(SS_MANUF|2, _("Work order operations")),
+       'SA_MANUFTRANSVIEW' => array(SS_MANUF|1, _("Manufacturing operations view")),
+       'SA_WORKORDERENTRY' => array(SS_MANUF|2, _("Work order entry")),
+       'SA_MANUFISSUE' => array(SS_MANUF|3, _("Material issues entry")),
+       'SA_MANUFRECEIVE' => array(SS_MANUF|4, _("Final product receive")),
+       'SA_MANUFRELEASE' => array(SS_MANUF|5, _("Work order releases")),
 
        'SA_WORKORDERANALYTIC' => array(SS_MANUF_A|1, _("Work order analytical reports and inquiries")),
 
        'SA_WORKORDERANALYTIC' => array(SS_MANUF_A|1, _("Work order analytical reports and inquiries")),
-       'SA_WORKORDERMANREP' => array(SS_MANUF_A|2, _("Work order reports")),
-       'SA_WORKORDERVARREP' => array(SS_MANUF_A|3, _("Work order other reports and inquiries")),
-
+       'SA_WORKORDERCOST' => array(SS_MANUF_A|2, _("Manufacturing cost inquiry")),
+       'SA_MANUFBULKREP' => array(SS_SALES_A|3, _("Work order bulk reports")),
+       'SA_BOMREP' => array(SS_MANUF_A|4, _("Bill of materials reports")),
 //
 // Dimensions
 //
 //
 // Dimensions
 //
-       'SA_DIMENSION' => array(SS_DIM|1, _("Dimensions")),
+       'SA_DIMTRANSVIEW' => array(SS_DIM|1, _("Dimension view")),
 
 
-       'SA_DIMENSIONOPERATION' => array(SS_DIM|2, _("Dimension operations")),
+       'SA_DIMENSION' => array(SS_DIM|2, _("Dimension entry")),
 
 
-       'SA_DIMENSIONANALYTIC' => array(SS_DIM|3, _("Dimension analytical reports and inquiries")),
-       'SA_DIMENSIONMANREP' => array(SS_DIM|4, _("Dimension reports")),
-       'SA_DIMENSIONVARREP' => array(SS_DIM|5, _("Dimension other reports and inquiries")),
+       'SA_DIMENSIONREP' => array(SS_DIM|3, _("Dimension reports")),
 //
 // Banking and General Ledger
 //
 //
 // Banking and General Ledger
 //
@@ -197,20 +212,25 @@ $security_areas =array(
        'SA_QUICKENTRY' => array(SS_GL_C|5, _("Quick GL entry definitions")),
        'SA_CURRENCY' => array(SS_GL_C|6, _("Currencies")),
        'SA_BANKACCOUNT' => array(SS_GL_C|7, _("Bank accounts")),
        'SA_QUICKENTRY' => array(SS_GL_C|5, _("Quick GL entry definitions")),
        'SA_CURRENCY' => array(SS_GL_C|6, _("Currencies")),
        'SA_BANKACCOUNT' => array(SS_GL_C|7, _("Bank accounts")),
-       'SA_SETUPTAX' => array(SS_GL_C|8, _("Tax rates")),
-       'SA_SETUPFISCALYEAR' => array(SS_GL_C|9, _("Fiscal years maintenance")),
-
-       'SA_EXCHANGERATE' => array(SS_GL|1, _("Exchange rate table changes")),
-       'SA_PAYMENT' => array(SS_GL|2, _("Bank payments")),
-       'SA_DEPOSIT' => array(SS_GL|3, _("Bank deposits")),
-       'SA_BANKACCOUNTTRANSFER' => array(SS_GL|4, _("Bank account transfers")),
-       'SA_JOURNALENTRY' => array(SS_GL|5, _("Manual journal entries")),
-       'SA_BUDGETENTRY' => array(SS_GL|6, _("Budget edition")),
+       'SA_TAXRATES' => array(SS_GL_C|8, _("Tax rates")),
+       'SA_TAXGROUPS' => array(SS_GL_C|8, _("Tax groups")),
+       'SA_FISCALYEARS' => array(SS_GL_C|9, _("Fiscal years maintenance")),
+       'SA_GLSETUP' => array(SS_GL_C|10, _("Company GL setup")),
+
+       'SA_BANKTRANSVIEW' => array(SS_GL|1, _("Bank transactions view")),
+       'SA_GLTRANSVIEW' => array(SS_GL|2, _("GL postings view")),
+       'SA_EXCHANGERATE' => array(SS_GL|3, _("Exchange rate table changes")),
+       'SA_PAYMENT' => array(SS_GL|4, _("Bank payments")),
+       'SA_DEPOSIT' => array(SS_GL|5, _("Bank deposits")),
+       'SA_BANKTRANSFER' => array(SS_GL|6, _("Bank account transfers")),
        'SA_RECONCILE' => array(SS_GL|7, _("Bank reconciliation")),
        'SA_RECONCILE' => array(SS_GL|7, _("Bank reconciliation")),
-       'SA_STANDARDCOST' => array(SS_GL|8, _("Item standard costs")),
-
-       'SA_GLANALYTIC' => array(SS_GL_A|1, _("Bank and GL analytical reports and inquiries")),
-       'SA_GLMANREP' => array(SS_GL_A|2, _("Bank and GL reports")),
-       'SA_GLVARREP' => array(SS_GL_A|3, _("Bank and GL other reports and inquiries"))
+       'SA_JOURNALENTRY' => array(SS_GL|8, _("Manual journal entries")),
+       'SA_BUDGETENTRY' => array(SS_GL|9, _("Budget edition")),
+       'SA_STANDARDCOST' => array(SS_GL|10, _("Item standard costs")),
+
+       'SA_GLANALYTIC' => array(SS_GL_A|1, _("GL analytical reports and inquiries")),
+       'SA_TAXREP' => array(SS_GL_A|2, _("Tax reports and inquiries")),
+       'SA_BANKREP' => array(SS_GL_A|3, _("Bank reports and inquiries")),
+       'SA_GLREP' => array(SS_GL_A|4, _("GL reports and inquiries")),
 );
 ?>
\ No newline at end of file
 );
 ?>
\ No newline at end of file
index 4f216955b8726c0ed6c7ca8b44cf5857e9cc7195..77e8dc3e471707e139509000211a9548ccc27017 100644 (file)
@@ -24,7 +24,8 @@ class current_user
        var $access;
        var $timeout;
        var $last_act;
        var $access;
        var $timeout;
        var $last_act;
-
+       var $role_set = false;
+       
        var $logged;
        var $ui_mode = 0;
        
        var $logged;
        var $ui_mode = 0;
        
@@ -53,6 +54,8 @@ class current_user
 
        function login($company, $loginname, $password)
        {
 
        function login($company, $loginname, $password)
        {
+               global $security_areas, $security_groups, $security_headings;
+               
                $this->set_company($company);
            $this->logged = false;
 
                $this->set_company($company);
            $this->logged = false;
 
@@ -62,7 +65,38 @@ class current_user
                {
                        $myrow = db_fetch($Auth_Result);
                        if (! @$myrow["inactive"]) {
                {
                        $myrow = db_fetch($Auth_Result);
                        if (! @$myrow["inactive"]) {
-                   $this->access = $myrow["full_access"];
+                               if (isset($myrow["full_access"])) { 
+                                       // Transition code:
+                                       // db was not yet upgraded after source update to v.2.2
+                                       // give enough access for admin user to continue upgrade
+                                       if (!isset($security_groups) || !isset($security_headings)) {
+                                               echo "<center><br><br><font size='5' color='red'><b>";
+                                               echo _('Before software upgrade you have to include old $security_groups and $security_headings arrays from old config.php file to the new one.');
+                                               echo "</b></font><br><br></center>";
+                                               exit;
+                                       }
+                           $this->access = $myrow["full_access"];
+                           if (in_array(20, $security_groups[$this->access]))
+                                               // temporary access for admin users
+                                               $this->role_set[] = $security_areas['SA_SOFTWAREUPGRADE'][0];
+                                       else {
+                                               echo "<center><br><br><font size='5' color='red'><b>";
+                                               echo _('System is available for site admin only until full database upgrade');
+                                               echo "</b></font><br><br></center>";
+                                               exit;
+                                       }
+                       } else {
+                                       $this->role_set = array();
+                           $this->access = $myrow["role_id"];
+                                       // store area codes available for current user role
+                                       $role = get_security_role($this->access);
+                                       if (!$role) 
+                                               return false;
+                                       foreach( $role['areas'] as $code )
+                                               // filter only area codes for enabled security sections
+                                               if (in_array($code&~0xff, $role['sections'])) 
+                                                       $this->role_set[] = $code;
+                       }
                    $this->name = $myrow["real_name"];
                    $this->pos = $myrow["pos"];
                    $this->loginname = $loginname;
                    $this->name = $myrow["real_name"];
                    $this->pos = $myrow["pos"];
                    $this->loginname = $loginname;
@@ -75,22 +109,35 @@ class current_user
                                $this->timeout = session_timeout();
                        }
                }
                                $this->timeout = session_timeout();
                        }
                }
-
                return $this->logged;
        }
 
        function check_user_access()
        {
                global $security_groups;
                return $this->logged;
        }
 
        function check_user_access()
        {
                global $security_groups;
-               return is_array($security_groups[$this->access]);
+               if (isset($security_groups)) {
+                       // notification after upgrade from pre-2.2 version
+//                     display_notification(_("After database upgrade don't forget to remove \$security_groups and \$security_headings from config.php file!"));
+                       return is_array(@$security_groups[$this->access]);
+               } else
+                       return is_array($this->role_set);
        }
 
        function can_access_page($page_level)
        {
        }
 
        function can_access_page($page_level)
        {
-               global $security_groups;
-               // first registered company has site admin privileges
-               return isset($page_level) && in_array($page_level, $security_groups[$this->access])
-                       && ($this->company == 0 || $page_level != 20); 
+               global $security_groups, $security_areas;
+
+               if (isset($security_groups)) {
+                       return $this->company == 0 &&
+                               in_array(20, $security_groups[$this->access]);
+               }
+
+               if ($page_level === 'SA_OPEN') 
+                       return true;
+               $code = $security_areas[$page_level][0];
+               // only first registered company has site admin privileges
+               return $code && in_array($code, $this->role_set)
+                       && ($this->company == 0 || ($code&~0xff != SS_SADMIN));
        }
 
        function get_db_connection()
        }
 
        function get_db_connection()
index dad1c1c94f1cca20259e8f77ac2f937a8e7a18da..c37b7c15d6399d953e9bc0ebae7a8fef60a28c7c 100644 (file)
@@ -51,10 +51,15 @@ function check_page_security($page_security)
 {
        if (!$_SESSION["wa_current_user"]->check_user_access())
        {
 {
        if (!$_SESSION["wa_current_user"]->check_user_access())
        {
-               echo "<br><br><br><center>";
-               echo "<b>" . _("Security settings have not been defined for your user account.");
-               echo "<br>" . _("Please contact your system administrator.") . "</b>";
-
+               // notification after upgrade from pre-2.2 version
+               $msg = is_array($_SESSION["wa_current_user"]->role_set) ?
+                       _("Please remove \$security_groups and \$security_headings arrays from config.php file!")
+                       : _("Security settings have not been defined for your user account.")
+                       . "<br>" . _("Please contact your system administrator.");
+
+               page(_("Access denied"), false);
+                       display_error($msg);
+               end_page();
                kill_login();
                exit;
        }
                kill_login();
                exit;
        }
@@ -117,6 +122,7 @@ if (isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
        die("Restricted access");
 
 include_once($path_to_root . "/frontaccounting.php");
        die("Restricted access");
 
 include_once($path_to_root . "/frontaccounting.php");
+include_once($path_to_root . "/admin/db/security_db.inc");
 include_once($path_to_root . "/includes/current_user.inc");
 include_once($path_to_root . "/includes/lang/language.php");
 include_once($path_to_root . "/config_db.php");
 include_once($path_to_root . "/includes/current_user.inc");
 include_once($path_to_root . "/includes/lang/language.php");
 include_once($path_to_root . "/config_db.php");
@@ -153,6 +159,7 @@ if(@include_once($path_to_root . "/lang/".$_SESSION['language']->code."/locale.i
        $Hooks = new Hooks();
 }
 
        $Hooks = new Hooks();
 }
 
+include_once($path_to_root . "/includes/access_levels.inc");
 include_once($path_to_root . "/config.php");
 include_once($path_to_root . "/includes/main.inc");
 
 include_once($path_to_root . "/config.php");
 include_once($path_to_root . "/includes/main.inc");
 
@@ -218,13 +225,6 @@ if (!isset($_SESSION["App"])) {
        $_SESSION["App"]->init();
 }
 
        $_SESSION["App"]->init();
 }
 
-// Run with debugging messages for the system administrator(s) but not anyone else
-/*if (in_array(15, $security_groups[$_SESSION["AccessLevel"]])) {
-       $debug = 1;
-} else {
-       $debug = 0;
-}*/
-
 //----------------------------------------------------------------------------------------
 
 check_page_security($page_security);
 //----------------------------------------------------------------------------------------
 
 check_page_security($page_security);
index 85dce69fedfa0bf1dc15ca4b2797559edeb6a0d4..aa0e763e3eefa9bdd4ad24a758997c1e8a1715ca 100644 (file)
--- a/index.php
+++ b/index.php
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
        $path_to_root=".";
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
        $path_to_root=".";
-       $page_security = 1;
+       $page_security = 'SA_OPEN';
        ini_set('xdebug.auto_trace',1);
        include_once("includes/session.inc");
 
        ini_set('xdebug.auto_trace',1);
        include_once("includes/session.inc");
 
index 5a9f95d6c2dc54005b637a31f7095efaa66b9cd4..662b528bbb6c019a2b336e066fecc11831fb3f3e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_INVENTORYADJUSTMENT';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
index 0b22ac18b0f80d70727b2d0bec8f5d29016e71d8..ba8a39c79ac937cb05cc0786b75305b75f43058e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="..";
+$page_security = 'SA_STANDARDCOST';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 1192cd0685c29f602080f2a3124cd12b08f094d4..e3526e9bcd9a1a1cf23f4b5b214d59d0e626b54c 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_ITEMSTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 9703c6a4e47ee838bb0b4c7e55120a09617a2837..cd468744eb2e5ebc9bd305f5d4707756e166e06d 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_ITEMSSTATVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 if (isset($_GET['stock_id'])){
 include_once($path_to_root . "/includes/session.inc");
 
 if (isset($_GET['stock_id'])){
index 076de0c59cfef2c8f47a77ca4837cd3cce3001f0..26a2889fec39035ef5a247f7a5bb377614d3ee8a 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="../..";
+$page_security = 'SA_ITEMCATEGORY';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Item Categories"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Item Categories"));
index 3ac092bbf17fe99800bc9419da6c63f28a4a4a6e..cde34f0ffe495dfd4db818cf89b3d555c0a1d17a 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="../..";
+$page_security = 'SA_FORITEMCODE';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Foreign Item Codes"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Foreign Item Codes"));
index 64ad4deeaf2b978e451ee4e131a14c2604ab82dd..39be1be54d192d1c986488d67063d1aa50a68907 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="../..";
+$page_security = 'SA_UOM';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Units of Measure"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Units of Measure"));
index b5f6534bd5373e1bdaddf5f384ece812b1c8b3ee..9d30127725d6b60ffa49b70d2af4ceaa768aca28 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="../..";
+$page_security = 'SA_ITEM';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Items"), @$_REQUEST['popup']);
 include($path_to_root . "/includes/session.inc");
 
 page(_("Items"), @$_REQUEST['popup']);
index 3b05629dae7958d91835b1f5ac45917cf4d9cccf..b43c878195425dec7f6454648f6d6ffbc800f85a 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="../..";
+$page_security = 'SA_INVENTORYLOCATION';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Inventory Locations"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Inventory Locations"));
index aacdda94d01912b58172c9e4098ac47671ffd777..e54ff3cb4d1606a12f6b15aa85584109038be017 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_INVENTORYMOVETYPE';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Inventory Movement Types"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Inventory Movement Types"));
index 750d059e6c5fd4c7b6ba905e03633893c44e35ef..09cb731a5a7e0fd667c60f3f53ddba81112d8c02 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="../..";
+$page_security = 'SA_SALESKIT';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Sales Kits & Alias Codes"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Sales Kits & Alias Codes"));
index 29a6530dcfcc85177d3085386bc7bce843403ebb..d6e75adc93a419e31d4471a4a1c5065aaac7a7ef 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="..";
+$page_security = 'SA_SALESPRICE';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Inventory Item Sales prices"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Inventory Item Sales prices"));
index 3d64db513b7f32b31dc0de489400e11ea0ca48fd..51464e04969cb3eb31386e7ba6d563b452a5d31a 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 4;
-$path_to_root="..";
+$page_security = 'SA_PURCHASEPRICING';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Supplier Purchasing Data"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Supplier Purchasing Data"));
index 962dd268983a8cfba5b5fb6448f42f734c4551e2..7af7329e4b43bb65d44538f7dd4c42cfdcc1e0ed 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 4;
-$path_to_root="..";
+$page_security = 'SA_REORDER';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Reorder Levels"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Reorder Levels"));
index b311558928907704ad7dee50c156f11149b90b27..77fbc2f84b0d4530d5caf44623f3fb446e80955f 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_LOCATIONTRANSFER';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
index 4aad5a4825665fcda8def791567f050df3a43b95..cd6575b92229d144df3df08052951c1fe3b7f55e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_ITEMSTRANSVIEW';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index 4d6a44736dc1c3ce200f8d913a45cb119385beaf..0c448712919feff4400379e51affc2886e935523 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_ITEMSTRANSVIEW';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index 8faae1ccbf9728464abee9e081bd90cfe7be9bce..0552049d72ab1fcaaec68cd0d781dbc568c01b4f 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_WORKORDERCOST';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Costed Bill Of Material Inquiry"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Costed Bill Of Material Inquiry"));
index c792330bf314b21ed775a5f475ea20692506cd1b..aeea81cfff528df9cea28ecec19628bf45936522 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_WORKORDERANALYTIC';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
index cc3ee43bbaf306946c2bbd7f4cc6f1b43c563e5a..45aaab40b2eb9d3d24867820d30535dd20593491 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 9;
-$path_to_root="../..";
+$page_security = 'SA_BOM';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Bill Of Materials"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Bill Of Materials"));
index 769d1b4b04c40f91ac6c53563ea5bd3237f82687..4ae7e90f945fce6b7faa3c26207282f8862351f7 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_WORKCENTRES';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Work Centres"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Work Centres"));
index f4cf1624d38bb82c9b4053ca3b3eadd217a6a827..dfd74f8e17121b7da0122a2d224002faca4ab323 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="..";
+$page_security = 'SA_MANUFTRANSVIEW';
+$path_to_root = "..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index 80f624c4df5a6fc5726731e75d1242a80b16e63b..7b49484e1a4e7a006082cc9d2b864ab7b3343f3b 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="../..";
+$page_security = 'SA_MANUFTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 $js = "";
 include_once($path_to_root . "/includes/session.inc");
 
 $js = "";
index 1ab3e442425a39e4c66a0e6b180b4b008897d061..28a4c7aea425a1efc090b0a2973e6112ca0bc6d0 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="../..";
+$page_security = 'SA_MANUFTRANSVIEW';
+$path_to_root = "../..";
 
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
index 60daf0280f555559118d2ecb7df5c85e32cf3108..2c12edc88fa8a3a6d6a00ca9a42e3e939dddba36 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="../..";
+$page_security = 'SA_MANUFTRANSVIEW';
+$path_to_root = "../..";
 
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
index f94970ba4f24bc55e25211e8cdb06db9eb9d3e51..2804ea1e1fc04627a99bfe1ec75cedf903826bdd 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="..";
+$page_security = 'SA_MANUFRECEIVE';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 0d68a3f9db4e9413aac25c93f6a3b04bb999532b..107c073bb97c7d73a884b501b58568b5c1f1a111 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="..";
+$page_security = 'SA_WORKORDERCOST';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index c2560b47c2a86e8a95c3bfdcbb4a8d26df487bc7..a278e1e6a2e7a84555ed313435808e846ddc63d5 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="..";
+$page_security = 'SA_WORKORDERENTRY';
+$path_to_root = "..";
 
 include_once($path_to_root . "/includes/session.inc");
 
 
 include_once($path_to_root . "/includes/session.inc");
 
index 5c853841e8bcf54455e383204155b308220843cf..775527aabf9c1b942980d48028d970d7c17484ec 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_MANUFISSUE';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
index 55f2e1ff5d63593dc18d0d5ac0a12dda3e6d230d..ca72da7c980e73540e91d7dd0133827cbf6e106e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 10;
-$path_to_root="..";
+$page_security = 'SA_MANUFRELEASE';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 2a19c46403fca02014d10ceae8f99ef9a69b07b3..4a4b85a829058ba2b3e4957fe0141d8f5c436262 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="../..";
-$page_security = 3;
+$page_security = 'SA_SUPPLIERALLOC';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
index 2bef7bab9164ee09a0cdb9b518aad507c5786253..78b0b66059704369dddce0305e97b39abaad3162 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="../..";
-$page_security = 3;
+$page_security = 'SA_SUPPLIERALLOC';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index bd863ff2b27b409b6ae4ff930fef53c2c0979253..5638582be597b1ad1c1948e4696e6e8f8ddf83c2 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
index 1f9ff81007d6005061af0bf481920427c868ff9c..7f014d8c8a0a4366ec3e2d5c7bdf4c68eda36f6c 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SUPPTRANSVIEW';
 $path_to_root="../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 $path_to_root="../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
index 1b99f73537d36384df1cfd6e6b7518dd4d785a2f..30b11bfbc08c35a45a83aac5ce95c01a414bf38c 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=2;
-$path_to_root="../..";
+$page_security = 'SA_SUPPLIERALLOC';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
index 817fbfc5e063fb056734d420f8fd13ee16942f5e..7de2319c5402ec106ec5c2165f804458ab0980fd 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=2;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
index be2f1a7dc749f6e9ccfdf7908130e8429bbd22b8..82ee660af2e3e0e63a2bb2467f498e55b2639d2e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=5;
-$path_to_root="../..";
+$page_security = 'SA_SUPPLIER';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Suppliers"), @$_REQUEST['popup']);
 include($path_to_root . "/includes/session.inc");
 
 page(_("Suppliers"), @$_REQUEST['popup']);
index 1630da5ca6a6a933544356c8a81ce00d9941d8c4..09fc0663bb9c47ba6082d83e52c538ed2d268924 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 4;
-$path_to_root="..";
+$page_security = 'SA_PURCHASEORDER';
+$path_to_root = "..";
 include_once($path_to_root . "/purchasing/includes/po_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 include_once($path_to_root . "/purchasing/includes/po_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
index 2bcd6085343995db86bd367ea16ddc6b2116bda5..cec4715f05c66b0224c93e0486f47fdbd9469bac 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 11;
-$path_to_root="..";
+$page_security = 'SA_GRN';
+$path_to_root = "..";
 include_once($path_to_root . "/purchasing/includes/po_class.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/purchasing/includes/po_class.inc");
 
 include_once($path_to_root . "/includes/session.inc");
index bd2fb08ae0ae717a2640f051bfa20b8660a21f59..102184b03b48fd3364f2f9414dafd5a8ca374f6e 100644 (file)
@@ -9,12 +9,11 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="..";
+$page_security = 'SA_SUPPLIERCREDIT';
+$path_to_root = "..";
 
 include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc");
 
 
 include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc");
 
-$page_security=5;
-
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/data_checks.inc");
index 9e10d57b86eb7062814e0313bf613459cdd95d2e..11cd376a9af97ad124208afa5ccda84d65c5cbf9 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=5;
-$path_to_root="..";
+$page_security = 'SA_SUPPLIERINVOICE';
+$path_to_root = "..";
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 
index a2603dfb113c43b1710bec4e80384b66fe7b1bee..f4e4f776837b9fe9e08f0158e32e4d3bb2abede2 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="..";
-$page_security = 5;
+$page_security = 'SA_SUPPLIERPAYMNT';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/date_functions.inc");
index b0c37d7f7c85b29cc08595f9b9a3ac4017eb35bb..b47881996db4706b041ab4ea6e6afcd64e5f109c 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/purchasing/includes/po_class.inc");
 
 include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/purchasing/includes/po_class.inc");
 
 include($path_to_root . "/includes/session.inc");
index 81028338c80d2be97fa7444662e6c8a4a922fa4f..049c8c5ed575cc446164a0d6bffff4f0050ca098 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/purchasing/includes/po_class.inc");
 
 include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/purchasing/includes/po_class.inc");
 
 include($path_to_root . "/includes/session.inc");
index b83a24cc581089dc3a825fe9a5d61148ac772df3..9a81bec19ee5d8acfd913083524f9a471cf118f3 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 include_once($path_to_root . "/includes/session.inc");
index 0380ccd04fcc48953f7d3a7025be826fedfa71f9..bf77703aa9ca181c3375cfef5ac839bef1af4021 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 include_once($path_to_root . "/includes/session.inc");
index 793f6d417c4c83219a5135991115bd474bbd46ce..c7da2a5669f7c7fa7679e331d18711e9365b7156 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index 3d072e660a2dfd7c2cc53340913ca810d1a6e94f..af7ba6cc6f51dafae4c98be5d0a317e34a2a36e7 100644 (file)
@@ -9,7 +9,6 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 8;
 //include_once($path_to_root . "reporting/includes/class.pdf.inc");
 include_once(dirname(__FILE__)."/class.pdf.inc");
 include_once(dirname(__FILE__)."/printer_class.inc");
 //include_once($path_to_root . "reporting/includes/class.pdf.inc");
 include_once(dirname(__FILE__)."/class.pdf.inc");
 include_once(dirname(__FILE__)."/printer_class.inc");
index 347e9ed706c1f6a127483dbb05dc99e1e686489a..3d985ec87ec44a59d9db45587e56f440d386f788 100644 (file)
@@ -14,7 +14,7 @@
        print button in reporting module. 
 */
 $path_to_root = "..";
        print button in reporting module. 
 */
 $path_to_root = "..";
-$page_security = 2;    // this level is later overriden in rep file
+$page_security = 'SA_OPEN';    // this level is later overriden in rep file
 include_once($path_to_root . "/includes/session.inc");
 
 if (isset($_GET['xls']))
 include_once($path_to_root . "/includes/session.inc");
 
 if (isset($_GET['xls']))
index d8f37c77a74e3ad6bc5553625517bfe183461e2e..633ef3e9971b893ba5502f82621ecb80a34f165b 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_CUSTPAYMREP';
 
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
index d6cc82d825e15221b0c0abc54f3af39090a0e3fa..7ce89ad28937bd1f49bd2355d4041a371dd30da3 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_CUSTPAYMREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index f7ae195e8ab2fa9b164487647d511deb439e9013..ead177fdf37c9b54b037b1eb2a26131dc41d161d 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_CUSTBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 42eed72221a47de131e3e05ce6171b0fd705220d..e1cbdefc0ab145009abb72869b9be6e82aeff839 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_PRICEREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index bc367e6aaa08019ba5be4c27ee42cd9484dbeff5..63a804d685a6f0a0ceb7be7b9c85bae54c9dd4c8 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SALESBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index aa3a83f7c49f8b4d5c8d8b1bb8d7145c2be87ceb..09dd921cdb777aa18289a7a9ff020ef3e6b69d39 100644 (file)
@@ -9,12 +9,12 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SALESMANREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // date_:      2005-05-19
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // date_:      2005-05-19
-// Title:      Order Status List
+// Title:      Salesman Report
 // ----------------------------------------------------------------
 $path_to_root="..";
 
 // ----------------------------------------------------------------
 $path_to_root="..";
 
index d9f8aa22b5da82fc05eae1522b24960645008ac9..262d04dab3f0238114e980191e0d16a25a2fa4d0 100644 (file)
@@ -9,7 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
+       'SA_SALESTRANSVIEW' : 'SA_SALESBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
@@ -32,7 +33,7 @@ print_invoices();
 function print_invoices()
 {
        global $path_to_root;
 function print_invoices()
 {
        global $path_to_root;
-
+       
        include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
        $from = $_POST['PARAM_0'];
        include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
        $from = $_POST['PARAM_0'];
@@ -49,7 +50,7 @@ function print_invoices()
                $to = 0;
        $dec = user_price_dec();
 
                $to = 0;
        $dec = user_price_dec();
 
-       $fno = explode("-", $from);
+       $fno = explode("-", $from);
        $tno = explode("-", $to);
 
        $cols = array(4, 60, 225, 300, 325, 385, 450, 515);
        $tno = explode("-", $to);
 
        $cols = array(4, 60, 225, 300, 325, 385, 450, 515);
index 4d29faeaa005f428740441c2bcb609064025ac06..b5232a1286584e3435d072f050180722360d2bc0 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_CUSTSTATREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 31a769df1114bb1ff4dc68558119897c2bd8d621..66cdad59ef380e4ce45a149f45765616f1c9f77e 100644 (file)
@@ -9,7 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
+       'SA_SALESTRANSVIEW' : 'SA_SALESBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index b7aeb500c57a716cc60522683298b9505479c3d1..271b0fc079eea60859f415f95e6fd2f84af53b22 100644 (file)
@@ -9,7 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
+       'SA_SALESTRANSVIEW' : 'SA_SALESBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Janusz Dobrwolski
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Janusz Dobrwolski
index 756e83c64ab696fdd9d9bcc9c610c3bb75bc6313..fce973821f9303f2c82789854b31da7546f0feca 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SUPPLIERANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 3b543fcfbdc59db2b1fc88b2fd51e5c273cb4bb7..ba15545c846e4b3e6a63dff9e95afd627b630cd1 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SUPPLIERANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 122c6826ebec021f4652e4947a8534f2bdcbdbc6..3ad684adc96085c7afd7b27bdb3a8c530d900437 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SUPPPAYMREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index c0efd03486be42fd19ed6a4554ebd22b163e835d..5dd8d29f66d1b57a3f54fa154941335cd2546639 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SUPPLIERANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index b9a8a049509fd75b3252f9abc339b2bced951cd1..7bd5c4ae1cbe5635ca880bc5ba12e474529d15b1 100644 (file)
@@ -9,7 +9,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+
+$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
+       'SA_SUPPTRANSVIEW' : 'SA_SUPPBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 2b18d24b2cc477ee0d8068fe610cd932c28e5d88..dede52077f64ff7032ed17bf5299d0b8ca41919a 100644 (file)
@@ -9,12 +9,12 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_ITEMSVALREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // date_:      2005-05-19
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // date_:      2005-05-19
-// Title:      Supplier Balances
+// Title:      Inventory Valuation
 // ----------------------------------------------------------------
 $path_to_root="..";
 
 // ----------------------------------------------------------------
 $path_to_root="..";
 
index e92c27c5ff4a5fc4249f40c28861e55c86f828b8..1678b2ab5b4b94491269aebb61e57fde3183d506 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_ITEMSANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 19be2ee92030cfad74174ec82f216ba87c04c4f7..85bb02d8cec888c0d516017ad55ee994dc617701 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_ITEMSVALREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index bb4006f1a28e9da72842447c14e64020fbdecdb6..40b875844a912dfe883d8c92e640ce0d8b5655d2 100644 (file)
@@ -9,12 +9,12 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SALESANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // date_:      2005-05-19
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // date_:      2005-05-19
-// Title:      Inventory Planning
+// Title:      Inventory Sales Report
 // ----------------------------------------------------------------
 $path_to_root="..";
 
 // ----------------------------------------------------------------
 $path_to_root="..";
 
index 54a1be31a9c2d38f85dea4c04d6548347dc0838a..b752c6efba3d842690bfe7c6eb62148db57bfa49 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_SUPPLIERANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 8ae240e353ddcd682b970db7a3d7887b791281fb..0113375efa720e1ed108f953520437f417c218d8 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_BOMREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index f454c41f431f668f07aa3d5179e521ebea7f9aac..7140ee23d084ed436d44e54fa0d28066de44ac45 100644 (file)
@@ -9,10 +9,11 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
+       'SA_MANUFTRANSVIEW' : 'SA_MANUFBULKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
-// Creator:    Janusz Dobrwolski
+// Creator:    Janusz Dobrowolski
 // date_:      2008-01-14
 // Title:      Print Workorders
 // draft version!
 // date_:      2008-01-14
 // Title:      Print Workorders
 // draft version!
index b697925f1f87654b8c6d232db434d91a46085a97..8e9653b46485d2cfb810fa0b1d408c959f681487 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_DIMENSIONREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 66fbbf2abb8dffffd8e3eee0d3b5299c72e80947..b5ed420a32b14a524cb69e8b3c2bd6e8d4540aac 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_BANKREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 4f49b549fbf91c399fc69bc6ec93aff30487d2f9..847fb04e7371d6f1f4fe9fb35d3d263a296e3c85 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 26a09c2da78f9baec4f0077765c5837c74b01dec..478770f28a5f2ef259301136752fc0f5c545e7e2 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index b584c97c529e1056070defe62127f08143f85577..ffa888fdaad9b2e091f85635fcc0a1854402244b 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index a9ca35ea20d92f124668b15a7280ddb376ac8741..4361b6e7cea3ee10d63448dbe11a05e58e5aa958 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index a1dece20730fe782b6a9cb74f0bb4ef547d7e0aa..1ef4a9d72bc7877f3eb8783fd3baec3f1aa6abcc 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 1b93637b44eca60d46d61cfe5cf2fe6faa1dde4d..15690a09a23ac1e0e840d42b2e9a37f9a937d480 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index dd027188395336bf1ca0936948e6e5edffe40c10..9e95275a1373f8562d7bad0c1321e7053cf2064f 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 39b2e04a4e37973dd3d14d0dfc084eef0968f2d1..9b762ddc4a084e0ea992bb7f6819cf83362e2599 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_TAXREP';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index 761e3bc24fd777532eb3942f3ec0cd59de90ba83..1c2e86ecfd2e62d57f292a1668b6abd6eac4f0a3 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 15;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
index d02f01f737b42ec4e3d499edb5dad160ed504780..7536d2b2b88e7cbc0ae739c38e5e7281c48dcc8f 100644 (file)
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $path_to_root="..";
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $path_to_root="..";
-$page_security = 5;
+$page_security = 'SA_OPEN';
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 14f87fb8cf6811ec2bb60c3c635d85c294336aa2..411ee7bd7cffecad91b89eb5b0745e2fe8255d83 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="../..";
-$page_security = 3;
+$page_security = 'SA_SALESALLOC';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
index e874d53d3879c03ce968558f39e03f68b18e1e43..4bc5cef61f31d7e617292f5da95a0c51db8bb8f9 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="../..";
-$page_security = 3;
+$page_security = 'SA_SALESALLOC';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index 80b019a553c857f40890c2e5c9ddf433d7cf209a..8cdf543b606cc03033681997943b99a3dcfa7142 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_SALESINVOICE';
+$path_to_root = "..";
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/sales/includes/ui/sales_order_ui.inc");
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/sales/includes/ui/sales_order_ui.inc");
index 31f640f47ea2e143784ca20d0b30a64d612ca0a4..18e945c298f154f54641abe2ddae6fe5a2fd4d9c 100644 (file)
@@ -13,8 +13,8 @@
 //
 //     Entry/Modify free hand Credit Note
 //
 //
 //     Entry/Modify free hand Credit Note
 //
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_SALESCREDIT';
+$path_to_root = "..";
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
index b8aa6da84cce2cbde7e033a1c2eeccbcfdaec560..d6bb4057d9d04c93941735b99133e0d7548e1dc2 100644 (file)
@@ -14,7 +14,7 @@
 //     Entry/Modify Credit Note for selected Sales Invoice
 //
 
 //     Entry/Modify Credit Note for selected Sales Invoice
 //
 
-$page_security = 3;
+$page_security = 'SA_SALESCREDITINV';
 $path_to_root = "..";
 
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 $path_to_root = "..";
 
 include_once($path_to_root . "/sales/includes/cart_class.inc");
index 23cbd79a10a2ed31f3bf1478eb9ee29660932012..74a4c81d772f22e2f4aa3c91bae96e59d0537552 100644 (file)
@@ -13,8 +13,8 @@
 //
 //     Entry/Modify Delivery Note against Sales Order
 //
 //
 //     Entry/Modify Delivery Note against Sales Order
 //
-$page_security = 2;
-$path_to_root="..";
+$page_security = 'SA_SALESDELIVERY';
+$path_to_root = "..";
 
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
index 249a0aa91573678b522508b1ed10e8e411f79a4b..2e92bc1b929455bcf6df7d033cd051daf3979a91 100644 (file)
@@ -14,8 +14,8 @@
 //     Entry/Modify Sales Invoice against single delivery
 //     Entry/Modify Batch Sales Invoice against batch of deliveries
 //
 //     Entry/Modify Sales Invoice against single delivery
 //     Entry/Modify Batch Sales Invoice against batch of deliveries
 //
-$page_security = 2;
-$path_to_root="..";
+$page_security = 'SA_SALESINVOICE';
+$path_to_root = "..";
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
index b7b1e1da290eb17ae67ca9dce091d3b94bd807d4..ca2fcf6243ca7f244d7fc462024c0ada18962678 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$path_to_root="..";
-$page_security = 3;
+$page_security = 'SA_SALESPAYMNT';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui/allocation_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/date_functions.inc");
index 3313cebf652c56590f6ee403eb0d92a4c737fbf6..6d09615f50f850a07dcce5b608263cba999b9b5e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SALESALLOC';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index 160cb2509ba1937a094b0b5e75c68fe44351eb26..aba3613593850c49b649cd2bedaf33d94c68b9b3 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 
index 7995696d20ea86fece0aeb446d28b29022830315..1c5f342d4cd653287e5ab7d6690ba2a7e1fdbf28 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
index 6b1f3689801e33cf6316796b80313f313ade24d9..2269561f4e3cccc38dde98a27683253758a99d7b 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_STEMPLATE';
+$path_to_root = "../..";
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
index bab7f269e36552980c4b23dbeda0ced9f4513764..097956b7de2dce13fee9f0a75cce1676045e6533 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_CRSTATUS';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Credit Status")); 
 include($path_to_root . "/includes/session.inc");
 
 page(_("Credit Status")); 
index 1147dcf36fdcb40d14b9600ad30ed59557a7d932..117e2a0a08be7c0b32ec8f171c3c3a50646e17b3 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_CUSTOMER';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Customer Branches"), @$_REQUEST['popup']);
 include($path_to_root . "/includes/session.inc");
 
 page(_("Customer Branches"), @$_REQUEST['popup']);
index d98a21f0560c237174723910265ef442d2f3ae2f..a2b79cb9de92211f963c1c47315d3fd502515dfe 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_CUSTOMER';
+$path_to_root = "../..";
 
 include_once($path_to_root . "/includes/session.inc");
 page(_("Customers"), @$_REQUEST['popup']); 
 
 include_once($path_to_root . "/includes/session.inc");
 page(_("Customers"), @$_REQUEST['popup']); 
index 4e83cb02bac142bf37aa37b1d6465184f0646c06..ad2e4b4e675b328600c207298e4a0d816dce1e14 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_SRECURRENT';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/includes/ui.inc");
 
 include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/includes/ui.inc");
 
index ad9d87d8b6a8c2bb26bb782caff3793a05499dd0..3fd37dd23c1aed87d1965463e9faf8f18b16ddbf 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_SALESAREA';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Sales Areas"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Sales Areas"));
index 73b4467a3d5382c3efec42d88beafbf2a8b0ec77..4978299f6b7b2a0d278309d7c092406a67d1c9b7 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_SALESGROUP';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Sales Groups"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Sales Groups"));
index 333fe8968f9a2ea25c50019f2e1cef1b6ebf7515..8546ba7e38d1f7d3578a3e33e5b02b3ea0ffadd4 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_SALESMAN';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Sales Persons"));
 include($path_to_root . "/includes/session.inc");
 
 page(_("Sales Persons"));
index 09be7f193bc00575f2349e194355f37524051733..c76196e50d557926d8a0b0c1ebc034810a530474 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 15;
-$path_to_root="../..";
+$page_security = 'SA_POSSETUP';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("POS settings"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("POS settings"));
index 05a3166adb8b0618d06b0d80f3590c226c9d132f..75a504fa5c70a835abf91f2f30af8c7f5377818e 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 14;
-$path_to_root="../..";
+$page_security = 'SA_SALESTYPES';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Sales Types"));
 include_once($path_to_root . "/includes/session.inc");
 
 page(_("Sales Types"));
index e7cd0636d2e54c591e146e1d6a0754a47f48e37b..d429648b08fb376f6a636b6fe897bdbfd27b92c2 100644 (file)
@@ -16,8 +16,8 @@
 //     Entry Direct Invoice
 //
 
 //     Entry Direct Invoice
 //
 
-$page_security = 1;
-$path_to_root="..";
+$page_security = 'SA_SALESORDER';
+$path_to_root = "..";
 
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/session.inc");
index f800c3a730ecaad9475ba87cbf4cabf411c5faf1..d36df28296a499e8c0dc38610185f9211fd968ff 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index d2edafca6282988bb9d88bdb0ac930064854c215..45df15d5df0670bfd9002a1393fabfa763b30d3b 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/sales/includes/sales_ui.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/sales/includes/sales_ui.inc");
index 6669ca5ebf17bddbf80d406fe346fec52a3e91ec..b1aa50c5e3bb80b850b2410db2f5549e3d0d2449 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/sales/includes/sales_ui.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/sales/includes/sales_ui.inc");
index 458e9071d9f460d93653c944c888e4dadda73cfd..9127b112cd91307392547bf26f268c1a434dbce8 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 1;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
index 77d411751759567650bc5fa7142d7be51636746b..2426549546ccce2e1ad85d8f62f52c28c11d92eb 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
-$path_to_root="../..";
+$page_security = 'SA_SALESTRANSVIEW';
+$path_to_root = "../..";
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 
 include_once($path_to_root . "/includes/session.inc");
index 9e4eaacb6f412d1bd534f83db9b808f7dad8ce8d..1d6cb8fc307d4681f137980c7cb0cc9d8075eea6 100644 (file)
@@ -9,6 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
+
 class fa2_2 {
        var $version = '2.2';   // version installed
        var $description = 'Version 2.2';
 class fa2_2 {
        var $version = '2.2';   // version installed
        var $description = 'Version 2.2';
@@ -81,14 +82,15 @@ class fa2_2 {
                  }
                }
 */             
                  }
                }
 */             
-               return true;
+       return convert_roles($pref);
        }
        //
        //      Checking before install
        //
        function pre_check($pref)
        {
        }
        //
        //      Checking before install
        //
        function pre_check($pref)
        {
-               return true; // true when ok, fail otherwise
+               global $security_groups;
+               return isset($security_groups); // true when ok, fail otherwise
        }
        //
        //      Test if patch was applied before.
        }
        //
        //      Test if patch was applied before.
@@ -99,9 +101,93 @@ class fa2_2 {
                if (check_table($pref, 'users', 'sticky_doc_date')) return false;
                if (check_table($pref, 'audit_trail')) return false;
                if (check_table($pref, 'stock_master','no_sale')) return false;
                if (check_table($pref, 'users', 'sticky_doc_date')) return false;
                if (check_table($pref, 'audit_trail')) return false;
                if (check_table($pref, 'stock_master','no_sale')) return false;
+               if (check_table($pref, 'users', 'role_id')) return false;
                        return true;
        }
 };
 
                        return true;
        }
 };
 
+/*
+       Conversion of old security roles stored into $security_groups table
+*/
+function convert_roles($pref) 
+{
+               global $security_groups, $security_headings, $security_areas, $path_to_root;
+               include_once($path_to_root."/includes/access_levels.inc");
+
+       $trans_sec = array(
+               1 => array('SA_CHGPASSWD', 'SA_SETUPDISPLAY', 'SA_BANKTRANSVIEW',
+                       'SA_ITEMSTRANSVIEW','SA_SUPPTRANSVIEW', 'SA_SALESORDER',
+                       'SA_SALESALLOC', 'SA_SALESTRANSVIEW'),
+               2 => array('SA_DIMTRANSVIEW', 'SA_STANDARDCOST', 'SA_ITEMSTRANSVIEW',
+                       'SA_ITEMSSTATVIEW', 'SA_SALESPRICE', 'SA_MANUFTRANSVIEW',
+                       'SA_WORKORDERANALYTIC', 'SA_WORKORDERCOST', 'SA_SUPPTRANSVIEW',
+                       'SA_SUPPLIERALLOC', 'SA_STEMPLATE', 'SA_SALESTRANSVIEW',
+                       'SA_SALESINVOICE', 'SA_SALESDELIVERY', 'SA_CUSTPAYMREP',
+                       'SA_CUSTBULKREP', 'SA_PRICEREP', 'SA_SALESBULKREP', 'SA_SALESMANREP',
+                       'SA_SALESBULKREP', 'SA_CUSTSTATREP', 'SA_SUPPLIERANALYTIC',
+                       'SA_SUPPPAYMREP', 'SA_SUPPBULKREP', 'SA_ITEMSVALREP', 'SA_ITEMSANALYTIC',
+                       'SA_BOMREP', 'SA_MANUFBULKREP', 'SA_DIMENSIONREP', 'SA_BANKREP', 'SA_GLREP',
+                       'SA_GLANALYTIC', 'SA_TAXREP', 'SA_SALESANALYTIC'),
+               3 => array('SA_GLACCOUNTGROUP', 'SA_GLACCOUNTCLASS','SA_PAYMENT', 
+                       'SA_DEPOSIT', 'SA_JOURNALENTRY', 'SA_INVENTORYMOVETYPE',
+                       'SA_LOCATIONTRANSFER', 'SA_INVENTORYADJUSTMENT', 'SA_WORKCENTRES',
+                       'SA_MANUFISSUE', 'SA_SUPPLIERALLOC', 'SA_CUSTOMER', 'SA_CRSTATUS',
+                       'SA_SALESMAN', 'SA_SALESAREA', 'SA_SALESALLOC', 'SA_SALESCREDITINV',
+                       'SA_SALESPAYMNT', 'SA_SALESCREDIT', 'SA_SALESGROUP', 'SA_SRECURRENT',
+                       'SA_TAXRATES', 'SA_ITEMTAXTYPE', 'SA_TAXGROUPS', 'SA_QUICKENTRY'),
+               4 => array('SA_REORDER', 'SA_PURCHASEPRICING', 'SA_PURCHASEORDER'),
+               5 => array('SA_VIEWPRINTTRANSACTION', 'SA_BANKTRANSFER', 'SA_SUPPLIER',
+                       'SA_SUPPLIERINVOICE', 'SA_SUPPLIERPAYMNT', 'SA_SUPPLIERCREDIT'),
+               8 => array('SA_ATTACHDOCUMENT', 'SA_RECONCILE', 'SA_GLANALYTIC',
+                       'SA_TAXREP', 'SA_BANKTRANSVIEW', 'SA_GLTRANSVIEW'),
+               9 => array('SA_FISCALYEARS', 'SA_CURRENCY', 'SA_EXCHANGERATE', 
+                       'SA_BOM'),
+               10 => array('SA_PAYTERMS', 'SA_GLSETUP', 'SA_SETUPCOMPANY',
+                       'SA_FORMSETUP', 'SA_DIMTRANSVIEW', 'SA_DIMENSION', 'SA_BANKACCOUNT',
+                       'SA_GLACCOUNT', 'SA_BUDGETENTRY', 'SA_MANUFRECEIVE',
+                       'SA_MANUFRELEASE', 'SA_WORKORDERENTRY', 'SA_MANUFTRANSVIEW',
+                       'SA_WORKORDERCOST'),
+               11 => array('SA_ITEMCATEGORY', 'SA_ITEM', 'SA_UOM', 'SA_INVENTORYLOCATION',
+                        'SA_GRN', 'SA_FORITEMCODE', 'SA_SALESKIT'),
+               14 => array('SA_SHIPPING', 'SA_VOIDTRANSACTION', 'SA_SALESTYPES'),
+               15 => array('SA_PRINTERS', 'SA_PRINTPROFILE', 'SA_BACKUP', 'SA_USERS',
+                       'SA_POSSETUP'),
+               20 => array('SA_CREATECOMPANY', 'SA_CREATELANGUAGE', 'SA_CREATEMODULES',
+                       'SA_SOFTWAREUPGRADE', 'SA_SECROLES')
+               );
+               
+               foreach ($security_groups as $role_id => $areas) {
+                       $area_set = array();
+                       $sections = array();
+                       foreach ($areas as $a) {
+                        if (isset($trans_sec[$a]))
+                               foreach ($trans_sec[$a] as $id) {
+                                if ($security_areas[$id][0]==0)
+//                                     error_log('invalid area id: '.$a.':'.$id);
+                                       $area_set[] = $security_areas[$id][0];
+                                       $sections[$security_areas[$id][0]&~0xff] = 1;
+                               }
+                       }
+                       $sections  = array_keys($sections);
+                       sort($sections); sort($area_set);
+                       import_security_role($pref, $security_headings[$role_id], $sections, $area_set);
+                       $new = db_insert_id();
+                       $sql = "UPDATE {$pref}users set role_id=$new WHERE role_id=$role_id";
+                       $ret = db_query($sql, 'cannot update users roles');
+                       if(!$ret) return false;
+               }
+               return true;
+}
+
+function import_security_role($pref, $name, $sections, $areas)
+{
+       $sql = "INSERT INTO {$pref}security_roles (role, description, sections, areas)
+       VALUES (".db_escape('FA 2.1 '.$name).",".db_escape($name).","
+       .db_escape(implode(';',$sections)).",".db_escape(implode(';',$areas)).")";
+
+       db_query($sql, "could not add new security role");
+}
+
 $install = new fa2_2;
 $install = new fa2_2;
+
 ?>
\ No newline at end of file
 ?>
\ No newline at end of file
index b3662df5961cb4f1d79a3f6af7374e9bba346751..61edd4a84d5b99956e319929fcecb91aefae9904 100644 (file)
@@ -34,14 +34,14 @@ ALTER TABLE `0_stock_category` ADD COLUMN `dflt_dim2` int(11) default NULL;
 ALTER TABLE `0_stock_category` ADD COLUMN `dflt_no_sale` tinyint(1) NOT NULL default '0';
 
 ALTER TABLE `0_users` ADD COLUMN `sticky_doc_date` TINYINT(1) DEFAULT '0';
 ALTER TABLE `0_stock_category` ADD COLUMN `dflt_no_sale` tinyint(1) NOT NULL default '0';
 
 ALTER TABLE `0_users` ADD COLUMN `sticky_doc_date` TINYINT(1) DEFAULT '0';
-ALTER TABLE `0_users` ADD COLUMN `startup_tab` VARCHAR(20) NOT NULL default '' AFTER sticky_doc_date;
+ALTER TABLE `0_users` ADD COLUMN `startup_tab` VARCHAR(20) NOT NULL default 'orders' AFTER `sticky_doc_date`;
 
 ALTER TABLE `0_debtors_master` MODIFY COLUMN `name` varchar(100) NOT NULL default '';
 
 ALTER TABLE `0_cust_branch` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 
 ALTER TABLE `0_sys_types` DROP COLUMN `type_name`;
 
 ALTER TABLE `0_debtors_master` MODIFY COLUMN `name` varchar(100) NOT NULL default '';
 
 ALTER TABLE `0_cust_branch` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 
 ALTER TABLE `0_sys_types` DROP COLUMN `type_name`;
-ALTER TABLE `0_chart_class` DROP COLUMN `sign_convert`;
+
 ALTER TABLE `0_chart_class` CHANGE `balance_sheet` `ctype` TINYINT(1) NOT NULL DEFAULT '0';
 
 ALTER TABLE `0_chart_class` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 ALTER TABLE `0_chart_class` CHANGE `balance_sheet` `ctype` TINYINT(1) NOT NULL DEFAULT '0';
 
 ALTER TABLE `0_chart_class` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
@@ -50,7 +50,6 @@ ALTER TABLE `0_movement_types` ADD COLUMN `inactive` tinyint(1) NOT NULL default
 ALTER TABLE `0_item_tax_types` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 ALTER TABLE `0_tax_types` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 ALTER TABLE `0_tax_groups` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 ALTER TABLE `0_item_tax_types` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 ALTER TABLE `0_tax_types` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
 ALTER TABLE `0_tax_groups` ADD COLUMN `inactive` tinyint(1) NOT NULL default '0';
-ALTER TABLE `0_tax_group_items` DROP COLUMN `included_in_price`;
 
 ALTER TABLE `0_users` DROP PRIMARY KEY;
 ALTER TABLE `0_users` ADD `id` SMALLINT(6) AUTO_INCREMENT PRIMARY KEY FIRST;
 
 ALTER TABLE `0_users` DROP PRIMARY KEY;
 ALTER TABLE `0_users` ADD `id` SMALLINT(6) AUTO_INCREMENT PRIMARY KEY FIRST;
@@ -83,11 +82,13 @@ UPDATE `0_suppliers` SET `supp_ref`=`supp_name` WHERE 1;
 ALTER TABLE `0_cust_branch` ADD COLUMN `branch_ref`    varchar(30) NOT NULL;
 UPDATE `0_cust_branch` SET `branch_ref`=`br_name` WHERE 1; 
 
 ALTER TABLE `0_cust_branch` ADD COLUMN `branch_ref`    varchar(30) NOT NULL;
 UPDATE `0_cust_branch` SET `branch_ref`=`br_name` WHERE 1; 
 
+DROP TABLE IF EXISTS `0_security_roles`;
+
 CREATE TABLE `0_security_roles` (
   `id` int(11) NOT NULL auto_increment,
 CREATE TABLE `0_security_roles` (
   `id` int(11) NOT NULL auto_increment,
-  `role` varchar(20) NOT NULL,
+  `role` varchar(30) NOT NULL,
   `description` varchar(50) default NULL,
   `description` varchar(50) default NULL,
-  `modules` text,
+  `sections` text,
   `areas` text,
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   `areas` text,
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
@@ -95,3 +96,5 @@ CREATE TABLE `0_security_roles` (
 ) TYPE=MyISAM AUTO_INCREMENT=8 AUTO_INCREMENT=8 ;
 
 ALTER TABLE `0_company` ADD COLUMN `login_tout` SMALLINT(6) NOT NULL DEFAULT '600';
 ) TYPE=MyISAM AUTO_INCREMENT=8 AUTO_INCREMENT=8 ;
 
 ALTER TABLE `0_company` ADD COLUMN `login_tout` SMALLINT(6) NOT NULL DEFAULT '600';
+ALTER TABLE `0_users` CHANGE COLUMN `full_access` `role_id` int(11) NOT NULL default '1';
+
index 3a008e4cd07363d968b2304425d72dcdd90ea75f..0e10cc2ac5c1219709fc364d9cd00639ae99b460 100644 (file)
@@ -1826,7 +1826,7 @@ CREATE TABLE `0_users` (
   `user_id` varchar(60) NOT NULL default '',
   `password` varchar(100) NOT NULL default '',
   `real_name` varchar(100) NOT NULL default '',
   `user_id` varchar(60) NOT NULL default '',
   `password` varchar(100) NOT NULL default '',
   `real_name` varchar(100) NOT NULL default '',
-  `full_access` int(11) NOT NULL default '1',
+  `role_id` int(11) NOT NULL default '1',
   `phone` varchar(30) NOT NULL default '',
   `email` varchar(100) default NULL,
   `language` varchar(20) default NULL,
   `phone` varchar(30) NOT NULL default '',
   `email` varchar(100) default NULL,
   `language` varchar(20) default NULL,
index 793fc514e4951e428bb214846b3c76e6d9862725..27593590e54b7de38f2107f4b2c25a1fb98398f7 100644 (file)
@@ -1598,7 +1598,7 @@ CREATE TABLE `0_users` (
   `user_id` varchar(60) NOT NULL default '',
   `password` varchar(100) NOT NULL default '',
   `real_name` varchar(100) NOT NULL default '',
   `user_id` varchar(60) NOT NULL default '',
   `password` varchar(100) NOT NULL default '',
   `real_name` varchar(100) NOT NULL default '',
-  `full_access` int(11) NOT NULL default '1',
+  `role_id` int(11) NOT NULL default '1',
   `phone` varchar(30) NOT NULL default '',
   `email` varchar(100) default NULL,
   `language` varchar(20) default NULL,
   `phone` varchar(30) NOT NULL default '',
   `email` varchar(100) default NULL,
   `language` varchar(20) default NULL,
index 295d359519f9e93d1f7d560162b1221ea6ec4fcb..817ce4ecd48d30b0e01cb982dca5d718ea316ccb 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
+$page_security = 'SA_ITEMTAXTYPE';
 $path_to_root = "..";
 $path_to_root = "..";
-$page_security = 3;
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index b28f4fa998d80aca526c70e0098ce43eaf7efd4d..c633c556de77bd6be2b1bc9ae666803bce03fb39 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_TAXGROUPS';
+$path_to_root = "..";
 
 include($path_to_root . "/includes/session.inc");
 
 
 include($path_to_root . "/includes/session.inc");
 
index af2a2e09f91dd85f097707cdec034aadba6385e2..5976f1a9eda6b005c9fd1860153047181cf3a157 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_TAXRATES';
+$path_to_root = "..";
 
 include($path_to_root . "/includes/session.inc");
 page(_("Tax Types"));
 
 include($path_to_root . "/includes/session.inc");
 page(_("Tax Types"));