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");
29 error_reporting(E_ALL);
30 ini_set("display_errors", "On");
34 error_reporting(E_USER_WARNING|E_USER_ERROR|E_USER_NOTICE);
35 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
36 ini_set("display_errors", "On");
39 $app_title = "FrontAccounting";
40 // application version
43 // Build for development purposes
44 $build_version = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));
47 $power_by = "FrontAccounting";
48 $power_url = "http://frontaccounting.net";
50 /* use popup windows for views */
51 $use_popup_windows = 1;
53 /* use date picker for all date fields */
56 /* use Audit Trails in GL */
59 /* Integrated base Wiki Help URL or null if not used */
60 //$help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
61 $help_base_url = null;
63 /* per user data/cache directory */
64 $comp_path = $path_to_root.'/company';
66 /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
69 /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
70 2 = Islamic used by other arabic nations */
73 /* email stock location if order below reorder-level */
74 $loc_notification = 0;
76 /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
77 $print_invoice_no = 0;
79 $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
80 $dateseps = array("/", ".", "-", " ");
81 $thoseps = array(",", ".", " ");
82 $decseps = array(".", ",");
84 $pagesizes = array("Letter", "A4"); // default PDF pagesize
86 /* Default border and spacing for tables */
87 /* Should be moved to CSS */
89 $table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
90 $table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
92 /* Accounts Payable */
93 /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
94 If this parameter is checked the proportion by which the purchase invoice is an overcharge
95 referred to before reporting an error */
97 $check_qty_charged_vs_del_qty = true;
99 /* System check to see if price charged on purchase invoices exceeds the purchase order price.
100 If this parameter is checked the proportion by which the purchase invoice is an overcharge
101 referred to before reporting an error */
103 $check_price_charged_vs_order_price = True;
105 $config_allocation_settled_allowance = 0.005;
107 // Internal configurable variables
108 //-----------------------------------------------------------------------------------
110 /* Whether to display the demo login and password or not */
112 $allow_demo_mode = false;
114 /* for uploaded item pictures */
117 $max_image_size = 500;
119 /* skin for Business Graphics, 1, 2 or 3 */
122 /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
123 the areas of functionality accessible can be modified.
124 Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
125 Each script has a particular security category associated with it.
126 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.
127 Each page has a $page_security = x; variable
128 This value is compared to contents of the array applicable which is based on the access level of the user.
129 Access authorisation is checked in session.inc. If you wish to add more security groups
130 with then you must add a new SecurityHeading to the security_headings array
131 and a new array of Security categories to the Security Groups _at_the_end_ of the array
132 This mechanism allows more fine grained control of access
133 security_groups is an array of arrays
134 The index is the order in which the array of allowed pages is defined new ones can be defined at will
135 or by changing the numbers in each array the security access can be tailored. These numbers need to read
136 in conjunction with the Page Security index
137 Special case is security level 20 which is reserved for admins of first
138 registered company (site admins). All potentially dangerous for whole FA
139 site operations like installing addon modules require access level 20.
142 $security_headings = array(
145 _("System Administrator"),
148 $security_groups = array(
150 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
151 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
155 System tabs. This variable should be in future included from separate file for extended module manager
157 $applications = array (
158 'orders' => _("Sales"),
159 'AP'=>_("Purchases"),
160 'stock'=> _("Items and Inventory"),
161 'manuf'=> _("Manufacturing"),
162 'proj'=>_("Dimensions"),
163 'GL'=>_("Banking and General Ledger"),
166 /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
170 //MySQL Backup and Restore Settings
172 if(isset($_SESSION["wa_current_user"])) {
173 define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
175 // static js files path
176 $js_path = $path_to_root.'/js/';
177 // standard external js scripts included in all files
178 $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
179 // additional js source included in header
180 $js_lib = $js_userlib = array();