Commented out duplicate declaration of the variable $parent around line 370 which...
[openemr.git] / interface / globals.php
blobdf873b1f81bb72a0a4ab357c44e1e5101c48a43f
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 // Theme definition for a beige theme:
54 $top_bg_line = ' bgcolor="#94d6e7" ';
55 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
56 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
57 $login_filler_line = ' bgcolor="#f7f0d5" ';
58 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
59 $title_bg_line = ' bgcolor="#aaffff" ';
60 $nav_bg_line = ' bgcolor="#94d6e7" ';
61 $css_header = "$rootdir/themes/style_sky_blue.css";
62 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
63 $linepic = "$rootdir/pic/repeat_vline9.gif";
64 $table_bg = ' bgcolor="#cccccc" ';
65 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
66 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
67 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
68 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
70 // The height in pixels of the Logo bar at the top of the login page:
71 $GLOBALS['logoBarHeight'] = 110;
72 // The height in pixels of the Navigation bar:
73 $GLOBALS['navBarHeight'] = 22;
74 // The height in pixels of the Title bar:
75 $GLOBALS['titleBarHeight'] = 20;
77 // The assistant word, MORE printed next to titles that can be clicked:
78 $tmore = "(More)";
79 // The assistant word, BACK printed next to titles that return to previous screens:
80 $tback = "(Back)";
82 // This is the idle logout function:
83 // if a page has not been refreshed within this many seconds, the interface
84 // will return to the login page
85 if ($special_timeout > 0) {
86 $timeout = intval($special_timeout);
88 else {
89 // Max Idle Time in seconds before logout. Default 7200 (2 hours):
90 $timeout = 7200;
93 //Version tags
95 $v_major = '2';
96 $v_minor = '8';
97 $v_patch = '2';
98 $tag = '-dev'; // release candidate, e.g. '-rc1'
100 // This name appears on the login page and in the title bar of most windows.
101 // It's nice to customize this to be the name of your clinic.
102 $openemr_name = 'OpenEMR';
104 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
106 $rootdir = $GLOBALS['rootdir'];
107 $srcdir = $GLOBALS['srcdir'];
108 $login_screen = $GLOBALS['login_screen'];
109 $GLOBALS['css_header'] = $css_header;
110 $GLOBALS['backpic'] = $backpic;
111 $GLOBALS['rootdir'] = $rootdir;
113 // change these to reflect when the daily view should start to display times
114 // as well as it should end. ex schedule_start = 9 schedule_end = 17
115 // start end times in hours
116 $GLOBALS['schedule_start'] = 8;
117 $GLOBALS['schedule_end'] = 17;
119 // This is the time granularity of the calendar and the smallest interval
120 // in minutes for an appointment slot:
121 $GLOBALS['calendar_interval'] = 15;
123 // Include the authentication module code here, but the rule is
124 // if the file has the word "login" in the source code file name,
125 // don't include the authentication module - we do this to avoid
126 // include loops.
127 if (!$ignoreAuth) {
128 include_once("$srcdir/auth.inc");
131 // If you do not want your accounting system to have a customer added to it
132 // for each insurance company, then set this to true. SQL-Ledger currently
133 // (2005-03-21) does nothing useful with insurance companies as customers.
134 $GLOBALS['insurance_companies_are_not_customers'] = true;
136 // If OpenEMR is being used by an athletic team rather than in a traditional
137 // clinical setting, set this to true.
138 $GLOBALS['athletic_team'] = false;
140 // True if this is a weight loss clinic:
141 $GLOBALS['weight_loss_clinic'] = false;
143 // The telephone country code of this installation. 1 = USA.
144 // See http://www.wtng.info/ for a list.
145 $GLOBALS['phone_country_code'] = '1';
147 // This determines how appointments display on the calendar:
148 // 1 = lastname; 2 = last,first; 3 = last,first(title);
149 // 4 = last,first(title: description)
150 $GLOBALS['calendar_appt_style'] = 2;
152 // Make this true if you want providers to see all appointments by default
153 // and not just their own.
154 $GLOBALS['docs_see_entire_calendar'] = false;
156 // Set this to true if you want the drug database and support for in-house
157 // prescription dispensing.
158 $GLOBALS['inhouse_pharmacy'] = false;
160 // True to omit insurance and some other things from the demographics form:
161 $GLOBALS['simplified_demographics'] = false;
163 // You may put text here as the default complaint in the New Patient form:
164 $GLOBALS['default_chief_complaint'] = '';
166 // If you want Hylafax support then uncomment and customize the following
167 // statements, and also customize custom/faxcover.txt:
168 // $GLOBALS['hylafax_server'] = 'localhost';
169 // $GLOBALS['hylafax_basedir'] = '/var/spool/fax';
170 // $GLOBALS['hylafax_enscript'] = 'enscript -M Letter -B -e^ --margins=36:36:36:36';
172 // Customize these if you are using SQL-Ledger with OpenEMR.
173 $sl_cash_acc = '1060'; // sql-ledger account number for checking account
174 $sl_ar_acc = '1200'; // sql-ledger account number for accounts receivable
175 $sl_income_acc = '4320'; // sql-ledger account number for medical services income
176 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
177 $sl_dbname = 'sql-ledger'; // sql-ledger database name
178 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
179 $sl_dbpass = 'secret'; // sql-ledger database login password
181 // Don't change anything below this line. ////////////////////////////
183 $encounter = $_SESSION['encounter'];
185 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
186 $_SESSION['pid'] = $_GET['pid'];
188 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
189 $_SESSION['pid'] = $_POST['pid'];
191 $pid = $_SESSION['pid'];
192 $userauthorized = $_SESSION['userauthorized'];
193 $groupname = $_SESSION['authProvider'];
195 // global interface function to format text length using ellipses
196 function strterm($string,$length) {
197 if (strlen($string) >= ($length-3)) {
198 return substr($string,0,$length-3) . "...";
199 } else {
200 return $string;
204 // required for normal operation because of recent changes in PHP:
205 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
206 if ($ps === false) {
207 extract($_GET);
208 extract($_POST);
211 // turn off PHP compatibility warnings
212 ini_set("session.bug_compat_warn","off");