Added option to handle Jalali and Islamic Calendars
[fa-stable.git] / config.php
1 <?php
2         /*--------------------------------------------------\
3         |               |               | config.php                    |
4         |---------------------------------------------------|
5     | FrontAccounting                                                                   |
6     | http://frontaccounting.com/                                               |
7     | by FrontAccounting                                        |
8         |---------------------------------------------------|
9         |                                                   |
10         \--------------------------------------------------*/
11
12 /*
13         // Make sure this directory exists and is writable!
14     $session_save_path = dirname(__FILE__).'/tmp/';
15
16 */
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);
20
21         if (isset($session_save_path))
22         {
23                 session_save_path($session_save_path);
24                 unset($session_save_path);
25     }
26
27     include_once($path_to_root . "/config_db.php");
28     include_once($path_to_root . "/includes/lang/language.php");
29
30         //--------------------------------------------------
31
32         // User configurable variables
33     //---------------------------------------------------
34
35     /*Show debug messages returned from an error on the page.
36     Debugging info level also determined by settings in PHP.ini
37     if $debug=1 show debugging info, dont show if $debug=0 */
38     
39     $debug                      = 1;
40         $show_sql               = 0;
41         $go_debug               = 0;
42         if ($go_debug == 1)
43         {
44                 error_reporting(E_ALL);
45                 ini_set("display_errors", "On");
46         }       
47         else
48         {
49                 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");                 
50                 ini_set("display_errors", "Off");
51         }       
52         // Main Title
53         $app_title = "FrontAccounting";
54     // application version
55     $version            = "1.12";
56
57     // Build for development purposes
58     $build_version      = "31";
59
60         // Powered by
61         $power_by               = "FrontAccounting";
62         $power_url              = "http://frontaccounting.net/ftac";
63
64     /*Stock units array*/
65         $stock_units    = array(_("ea."), _("m"), _("kgg"), _("tons"), _("l"), _("lbs"), _("dozen"), _("pack"), _("hrs"));
66
67         /* use popup windows for views */
68         $use_popup_windows = 1;
69
70         /* use date picker for all date fields */
71         $use_date_picker = 1;
72
73         /* use Audit Trails in GL */
74         $use_audit_trail = 0;
75         
76         /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
77         $accounts_alpha = 0;
78
79         /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
80         $def_app = "orders";
81         
82         /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations, 
83            2 = Islamic used by other arabic nations */
84         $date_system = 0;
85
86         $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
87         $dateseps               = array("/", ".", "-", " ");
88         $thoseps                = array(",", ".", " ");
89         $decseps                = array(".", ",");
90     // CSS theme
91     $themes             = array("default","aqua","cool");
92     $pagesizes          = array("Letter", "A4"); // default PDF pagesize
93
94         /* Default border and spacing for tables */
95     /* Should be moved to CSS */
96     
97     $table_style        = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
98     $table_style2       = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
99
100     /* Accounts Payable */
101     /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
102         If this parameter is checked the proportion by which the purchase invoice is an overcharge
103         referred to before reporting an error */
104
105         $check_qty_charged_vs_del_qty = true;
106
107     /* System check to see if price charged on purchase invoices exceeds the purchase order price.
108     If this parameter is checked the proportion by which the purchase invoice is an overcharge
109     referred to before reporting an error */
110     
111     $check_price_charged_vs_order_price = True;
112
113         $config_allocation_settled_allowance = 0.005;
114
115     // Internal configurable variables
116     //-----------------------------------------------------------------------------------
117
118     /* Whether to display the demo login and password or not */
119     
120     $allow_demo_mode = false;
121     
122     /* for uploaded item pictures */
123     $pic_width          = 80;
124     $pic_height         = 50;
125         $max_image_size = 500;
126
127     /* skin for Business Graphics, 1, 2 or 3 */
128         $graph_skin     = 1;
129         
130     /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
131     the areas of functionality accessible can be modified.
132     Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
133     Each script has a particular security category associated with it.
134     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.
135     Each page has a $page_security = x; variable
136     This value is compared to contents of the array applicable which is based on the access level of the user.
137     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
138     and a new array of Security categories to the Security Groups array
139     This mechanism allows more fine grained control of access
140     security_groups is an array of arrays
141     The index is the order in which the array of allowed pages is defined new ones can be defined at will
142     or by changing the numbers in each array the security access can be tailored. These numbers need to read
143     in conjunction with the Page Security index
144     */
145
146     $security_headings = array(
147                 _("Inquiries"),
148                 _("Accountant"),
149                 _("System Administrator")
150     );
151
152     $security_groups = array(
153                 array(1,2),
154                 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14),
155                 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
156     );
157         
158         //MySQL Backup and Restore Settings
159     
160     define("BACKUP_PATH", "/admin/backup/");
161
162 ?>