2 /*--------------------------------------------------\
4 |---------------------------------------------------|
6 | http://frontaccounting.com/ |
8 |---------------------------------------------------|
10 \--------------------------------------------------*/
12 //--------------------------------------------------
14 // User configurable variables
15 //---------------------------------------------------
17 /*Show debug messages returned from an error on the page.
18 Debugging info level also determined by settings in PHP.ini
19 if $debug=1 show debugging info, dont show if $debug=0 */
21 if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
22 die("Restricted access");
30 error_reporting(E_ALL);
31 ini_set("display_errors", "On");
35 error_reporting(E_USER_WARNING|E_USER_ERROR|E_USER_NOTICE);
36 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
37 ini_set("display_errors", "On");
40 $app_title = "FrontAccounting";
41 // application version
42 $version = "2.1.0 CVS";
44 // Build for development purposes
45 $build_version = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));
48 $power_by = "FrontAccounting";
49 $power_url = "http://frontaccounting.net";
51 /* use popup windows for views */
52 $use_popup_windows = 1;
54 /* use date picker for all date fields */
57 /* use Audit Trails in GL */
60 /* Integrated base Wiki Help URL or null if not used */
61 //$help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
62 $help_base_url = null;
64 /* per user data/cache directory */
65 $comp_path = $path_to_root.'/company';
67 /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
70 /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
71 2 = Islamic used by other arabic nations */
74 /* email stock location if order below reorder-level */
75 $loc_notification = 0;
77 /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
78 $print_invoice_no = 0;
80 $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
81 $dateseps = array("/", ".", "-", " ");
82 $thoseps = array(",", ".", " ");
83 $decseps = array(".", ",");
85 $pagesizes = array("Letter", "A4"); // default PDF pagesize
87 /* Default border and spacing for tables */
88 /* Should be moved to CSS */
90 $table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
91 $table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
93 /* Accounts Payable */
94 /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
95 If this parameter is checked the proportion by which the purchase invoice is an overcharge
96 referred to before reporting an error */
98 $check_qty_charged_vs_del_qty = true;
100 /* System check to see if price charged on purchase invoices exceeds the purchase order price.
101 If this parameter is checked the proportion by which the purchase invoice is an overcharge
102 referred to before reporting an error */
104 $check_price_charged_vs_order_price = True;
106 $config_allocation_settled_allowance = 0.005;
108 // Internal configurable variables
109 //-----------------------------------------------------------------------------------
111 /* Whether to display the demo login and password or not */
113 $allow_demo_mode = false;
115 /* for uploaded item pictures */
118 $max_image_size = 500;
120 /* skin for Business Graphics, 1, 2 or 3 */
123 /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
124 the areas of functionality accessible can be modified.
125 Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
126 Each script has a particular security category associated with it.
127 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.
128 Each page has a $page_security = x; variable
129 This value is compared to contents of the array applicable which is based on the access level of the user.
130 Access authorisation is checked in session.inc. If you wish to add more security groups
131 with then you must add a new SecurityHeading to the security_headings array
132 and a new array of Security categories to the Security Groups _at_the_end_ of the array
133 This mechanism allows more fine grained control of access
134 security_groups is an array of arrays
135 The index is the order in which the array of allowed pages is defined new ones can be defined at will
136 or by changing the numbers in each array the security access can be tailored. These numbers need to read
137 in conjunction with the Page Security index
138 Special case is security level 20 which is reserved for admins of first
139 registered company (site admins). All potentially dangerous for whole FA
140 site operations like installing addon modules require access level 20.
143 $security_headings = array(
146 _("System Administrator"),
149 $security_groups = array(
151 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
152 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
156 System tabs. This variable should be in future included from separate file for extended module manager
158 $applications = array (
159 'orders' => _("&Sales"),
160 'AP'=>_("&Purchases"),
161 'stock'=> _("&Items and Inventory"),
162 'manuf'=> _("&Manufacturing"),
163 'proj'=>_("&Dimensions"),
164 'GL'=>_("&Banking and General Ledger"),
165 'system'=>_("S&etup")
167 /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
171 //MySQL Backup and Restore Settings
173 if(isset($_SESSION["wa_current_user"])) {
174 define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
176 // static js files path
177 $js_path = $path_to_root.'/js/';
178 // standard external js scripts included in all files
179 $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
180 // additional js source included in header
181 $js_lib = $js_userlib = array();