set release number to 2.8.2
[openemr.git] / interface / globals.php
blob5ca2d4f273e1e0a53cce3a8a653ac2cf60054069
1 <?
2 require_once(dirname(__FILE__) . "/../includes/config.php");
3 // Global variable file in which colors and paths are set for the interface.
4 ///////////////////////////////////////////////////////////////////
5 // THESE VALUES MUST BE SET BEFORE OPENEMR WILL FUNCTION:
6 ///////////////////////////////////////////////////////////////////
7 // Set this to the full absolute directory path for openemr:
8 $webserver_root = "/var/www/html/openemr";
10 // Set this to the relative html path, ie. what you would type into the web
11 // browser after the server address to get to OpenEMR. For example, if you
12 // type "http://127.0.0.1/clinic/openemr/" to load OpenEMR, set $web_root
13 // to "/clinic/openemr" without the trailing slash.
14 $web_root = "/openemr";
16 ///////////////////////////////////////////////////////////////////
18 // This is the return mail address used when sending prescriptions by email:
19 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
21 // Root directory, relative to the webserver root:
22 $GLOBALS['rootdir'] = "$web_root/interface";
23 // Absolute path to the source code include and headers file directory (Full path):
24 $GLOBALS['srcdir'] = "$webserver_root/library";
25 // Absolute path to the location of documentroot directory for use with include statements:
26 $GLOBALS['fileroot'] = "$webserver_root";
27 // Absolute path to the location of interface directory for use with include statements:
28 $include_root = "$webserver_root/interface";
29 // Absolute path to the location of documentroot directory for use with include statements:
30 $GLOBALS['webroot'] = $web_root;
32 $GLOBALS['template_dir'] = $GLOBALS['fileroot'] . "/templates/";
33 $GLOBALS['incdir'] = $include_root;
34 // Location of the login screen file
35 $GLOBALS['login_screen'] = "$rootdir/login_screen.php";
37 // Language Control Section (will add toggling)
38 // English:1, Swedish:2, Spanish:3, German:4, Dutch:5, Hebrew:6
39 define (LANGUAGE,1);
40 include_once (dirname(__FILE__) . "/../library/translation.inc.php");
42 // Default category for find_patient screen
43 $GLOBALS['default_category'] = 5;
44 $GLOBALS['default_event_title'] = 'Office Visit';
46 // The session name appears in cookies stored in the browser. If you have
47 // multiple OpenEMR installations running on the same server, you should
48 // customize this name so they cannot interfere with each other.
49 session_name("OpenEMR");
51 session_start();
53 // Set this to true to activate support for the new frame layout.
55 $GLOBALS['concurrent_layout'] = false;
57 // Theme definition:
58 if ($GLOBALS['concurrent_layout']) {
59 $top_bg_line = ' bgcolor="#dddddd" ';
60 $GLOBALS['style']['BGCOLOR2'] = "#dddddd";
61 $bottom_bg_line = $top_bg_line;
62 $title_bg_line = ' bgcolor="#bbbbbb" ';
63 $nav_bg_line = ' bgcolor="#94d6e7" ';
64 } else {
65 $top_bg_line = ' bgcolor="#94d6e7" ';
66 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
67 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
68 $title_bg_line = ' bgcolor="#aaffff" ';
69 $nav_bg_line = ' bgcolor="#94d6e7" ';
71 $login_filler_line = ' bgcolor="#f7f0d5" ';
72 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
73 $css_header = "$rootdir/themes/style_sky_blue.css";
74 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
75 $linepic = "$rootdir/pic/repeat_vline9.gif";
76 $table_bg = ' bgcolor="#cccccc" ';
77 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
78 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
79 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
80 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
82 // The height in pixels of the Logo bar at the top of the login page:
83 $GLOBALS['logoBarHeight'] = 110;
84 // The height in pixels of the Navigation bar:
85 $GLOBALS['navBarHeight'] = 22;
86 // The height in pixels of the Title bar:
87 $GLOBALS['titleBarHeight'] = 20;
89 // The assistant word, MORE printed next to titles that can be clicked:
90 $tmore = "(More)";
91 // The assistant word, BACK printed next to titles that return to previous screens:
92 $tback = "(Back)";
94 // This is the idle logout function:
95 // if a page has not been refreshed within this many seconds, the interface
96 // will return to the login page
97 if ($special_timeout > 0) {
98 $timeout = intval($special_timeout);
100 else {
101 // Max Idle Time in seconds before logout. Default 7200 (2 hours):
102 $timeout = 7200;
105 //Version tags
107 $v_major = '2';
108 $v_minor = '8';
109 $v_patch = '2';
110 $tag = ''; // release candidate, e.g. '-rc1'
112 // This name appears on the login page and in the title bar of most windows.
113 // It's nice to customize this to be the name of your clinic.
114 $openemr_name = 'OpenEMR';
116 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
118 $rootdir = $GLOBALS['rootdir'];
119 $srcdir = $GLOBALS['srcdir'];
120 $login_screen = $GLOBALS['login_screen'];
121 $GLOBALS['css_header'] = $css_header;
122 $GLOBALS['backpic'] = $backpic;
123 $GLOBALS['rootdir'] = $rootdir;
125 // change these to reflect when the daily view should start to display times
126 // as well as it should end. ex schedule_start = 9 schedule_end = 17
127 // start end times in hours
128 $GLOBALS['schedule_start'] = 8;
129 $GLOBALS['schedule_end'] = 17;
131 // This is the time granularity of the calendar and the smallest interval
132 // in minutes for an appointment slot:
133 $GLOBALS['calendar_interval'] = 15;
135 // Include the authentication module code here, but the rule is
136 // if the file has the word "login" in the source code file name,
137 // don't include the authentication module - we do this to avoid
138 // include loops.
139 if (!$ignoreAuth) {
140 include_once("$srcdir/auth.inc");
143 // If you do not want your accounting system to have a customer added to it
144 // for each insurance company, then set this to true. SQL-Ledger currently
145 // (2005-03-21) does nothing useful with insurance companies as customers.
146 $GLOBALS['insurance_companies_are_not_customers'] = true;
148 // If OpenEMR is being used by an athletic team rather than in a traditional
149 // clinical setting, set this to true.
150 $GLOBALS['athletic_team'] = false;
152 // True if this is a weight loss clinic:
153 $GLOBALS['weight_loss_clinic'] = false;
155 // The telephone country code of this installation. 1 = USA.
156 // See http://www.wtng.info/ for a list.
157 $GLOBALS['phone_country_code'] = '1';
159 // This determines how appointments display on the calendar:
160 // 1 = lastname; 2 = last,first; 3 = last,first(title);
161 // 4 = last,first(title: description)
162 $GLOBALS['calendar_appt_style'] = 2;
164 // Make this true if you want providers to see all appointments by default
165 // and not just their own.
166 $GLOBALS['docs_see_entire_calendar'] = false;
168 // Set this to true if you want the drug database and support for in-house
169 // prescription dispensing.
170 $GLOBALS['inhouse_pharmacy'] = false;
172 // True to omit insurance and some other things from the demographics form:
173 $GLOBALS['simplified_demographics'] = false;
175 // True to omit form, route and interval which then become part of dosage:
176 $GLOBALS['simplified_prescriptions'] = false;
178 // True to omit method of payment from the copay panel:
179 $GLOBALS['simplified_copay'] = false;
181 // You may put text here as the default complaint in the New Patient form:
182 $GLOBALS['default_chief_complaint'] = '';
184 // This was added for sports teams needing to fill out injury forms, but might
185 // have other applications.
186 $GLOBALS['default_new_encounter_form'] = '';
188 // If you want a new encounter to be automatically created when appointment
189 // status is set to "@" (arrived), then make this true.
190 $GLOBALS['auto_create_new_encounters'] = true;
192 // If you don't want employer information, country, title in patient demographics.
193 $GLOBALS['omit_employers'] = false;
195 // If you want Hylafax support then uncomment and customize the following
196 // statements, and also customize custom/faxcover.txt:
198 // $GLOBALS['hylafax_server'] = 'localhost';
199 // $GLOBALS['hylafax_basedir'] = '/var/spool/fax';
200 // $GLOBALS['hylafax_enscript'] = 'enscript -M Letter -B -e^ --margins=36:36:36:36';
202 // For scanner support, uncomment and customize the following. This is
203 // the directory in which scanned-in documents may be found, and may for
204 // example be a smbfs-mounted share from the PC supporting the scanner:
206 // $GLOBALS['scanner_output_directory'] = '/mnt/scan_docs';
208 // Customize these if you are using SQL-Ledger with OpenEMR.
209 $sl_cash_acc = '1060'; // sql-ledger account number for checking account
210 $sl_ar_acc = '1200'; // sql-ledger account number for accounts receivable
211 $sl_income_acc = '4320'; // sql-ledger account number for medical services income
212 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
213 $sl_dbname = 'sql-ledger'; // sql-ledger database name
214 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
215 $sl_dbpass = 'secret'; // sql-ledger database login password
217 // Don't change anything below this line. ////////////////////////////
219 $encounter = $_SESSION['encounter'];
221 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
222 $_SESSION['pid'] = $_GET['pid'];
224 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
225 $_SESSION['pid'] = $_POST['pid'];
227 $pid = $_SESSION['pid'];
228 $userauthorized = $_SESSION['userauthorized'];
229 $groupname = $_SESSION['authProvider'];
231 // global interface function to format text length using ellipses
232 function strterm($string,$length) {
233 if (strlen($string) >= ($length-3)) {
234 return substr($string,0,$length-3) . "...";
235 } else {
236 return $string;
240 // required for normal operation because of recent changes in PHP:
241 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
242 if ($ps === false) {
243 extract($_GET);
244 extract($_POST);
247 // turn off PHP compatibility warnings
248 ini_set("session.bug_compat_warn","off");