2 /*--------------------------------------------------\
4 |---------------------------------------------------|
6 | http://frontaccounting.com/ |
8 |---------------------------------------------------|
10 \--------------------------------------------------*/
13 // Make sure this directory exists and is writable!
14 $session_save_path = dirname(__FILE__).'/tmp/';
17 $session_save_path = session_save_path();
18 if (strpos($session_save_path, ";") !== false)
19 $session_save_path = substr($session_save_path, strpos($session_save_path, ";") + 1);
21 if (isset($session_save_path))
23 session_save_path($session_save_path);
24 unset($session_save_path);
26 if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
27 die("Restricted access");
28 include_once($path_to_root . "/config_db.php");
29 include_once($path_to_root . "/includes/lang/language.php");
31 //--------------------------------------------------
33 // User configurable variables
34 //---------------------------------------------------
36 /*Show debug messages returned from an error on the page.
37 Debugging info level also determined by settings in PHP.ini
38 if $debug=1 show debugging info, dont show if $debug=0 */
45 error_reporting(E_ALL);
46 ini_set("display_errors", "On");
50 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
51 ini_set("display_errors", "Off");
54 $app_title = "FrontAccounting";
55 // application version
58 // Build for development purposes
59 $build_version = "15";
62 $power_by = "FrontAccounting";
63 $power_url = "http://frontaccounting.net";
66 $stock_units = array(_("ea."), _("m"), _("kgg"), _("tons"), _("l"), _("lbs"), _("dozen"), _("pack"), _("hrs"));
68 /* use popup windows for views */
69 $use_popup_windows = 1;
71 /* use date picker for all date fields */
74 /* use Audit Trails in GL */
77 /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
80 /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
83 /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
84 2 = Islamic used by other arabic nations */
87 /* email stock location if order below reorder-level */
88 $loc_notification = 0;
90 /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
91 $print_invoice_no = 0;
93 /* Flags for no item, customer and supplier lists. The list can only hold about 1000 items in the lists */
94 $no_item_list = 0; // change value to 1 if you do not want all items in list
95 $no_customer_list = 0; // change value to 1 if you do not want all customers in list
96 $no_supplier_list = 0; // change value to 1 if you do not want all suppliers in list
98 $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
99 $dateseps = array("/", ".", "-", " ");
100 $thoseps = array(",", ".", " ");
101 $decseps = array(".", ",");
103 $themes = array("default","aqua","cool");
104 $pagesizes = array("Letter", "A4"); // default PDF pagesize
106 /* Default border and spacing for tables */
107 /* Should be moved to CSS */
109 $table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
110 $table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
112 /* Accounts Payable */
113 /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
114 If this parameter is checked the proportion by which the purchase invoice is an overcharge
115 referred to before reporting an error */
117 $check_qty_charged_vs_del_qty = true;
119 /* System check to see if price charged on purchase invoices exceeds the purchase order price.
120 If this parameter is checked the proportion by which the purchase invoice is an overcharge
121 referred to before reporting an error */
123 $check_price_charged_vs_order_price = True;
125 $config_allocation_settled_allowance = 0.005;
127 // Internal configurable variables
128 //-----------------------------------------------------------------------------------
130 /* Whether to display the demo login and password or not */
132 $allow_demo_mode = false;
134 /* for uploaded item pictures */
137 $max_image_size = 500;
139 /* skin for Business Graphics, 1, 2 or 3 */
142 /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
143 the areas of functionality accessible can be modified.
144 Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
145 Each script has a particular security category associated with it.
146 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.
147 Each page has a $page_security = x; variable
148 This value is compared to contents of the array applicable which is based on the access level of the user.
149 Access authorisation is checked in header.inc this is where _SESSION["AccessLevel"] is the index of the security_groups array. If you wish to add more security groups with then you must add a new SecurityHeading to the security_headings array
150 and a new array of Security categories to the Security Groups array
151 This mechanism allows more fine grained control of access
152 security_groups is an array of arrays
153 The index is the order in which the array of allowed pages is defined new ones can be defined at will
154 or by changing the numbers in each array the security access can be tailored. These numbers need to read
155 in conjunction with the Page Security index
158 $security_headings = array(
161 _("System Administrator")
164 $security_groups = array(
166 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14),
167 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
170 //MySQL Backup and Restore Settings
172 define("BACKUP_PATH", "/admin/backup/");