a new and improved date widget
[openemr.git] / interface / globals.php
blob89820816d14d316547915d44366ed761f7e1de36
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
12 //For example, if you type "http://127.0.0.1/pennfirm/openemr/"
13 //to load OpenEMR, set $web_root to "/pennfirm/openemr" without the
14 //trailing slash.
15 $web_root = "/openemr";
17 ///////////////////////////////////////////////////////////////////
19 //This is the return mail address used when sending prescriptions by email
20 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
22 //root directory, relative to the webserver root:
23 $GLOBALS['rootdir'] = "$web_root/interface";
24 //absolute path to the source code include and headers file directory (Full path):
25 $GLOBALS['srcdir'] = "$webserver_root/library";
26 //absolute path to the location of interface root directory for use with include statements:
27 $GLOBALS['fileroot'] = "$webserver_root";
28 //absolute path to the location of interface root directory for use with include statements:
29 $include_root = "$webserver_root/interface";
30 //absolute path to the location of interface root directory for use with include statements:
31 $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");
43 //default category for find_patient screen
44 $GLOBALS['default_category'] = 5;
45 $GLOBALS['default_event_title'] = 'Office Visit';
47 //SESSION SETTINGS
48 session_name("OpenEMR");
49 session_start();
50 #print(session_id());
52 //this is the theme definition for a beige theme:
53 $top_bg_line = ' bgcolor="#94d6e7" ';
54 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
55 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
56 $login_filler_line = ' bgcolor="#f7f0d5" ';
57 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
58 $title_bg_line = ' bgcolor="#aaffff" ';
59 $nav_bg_line = ' bgcolor="#94d6e7" ';
60 $css_header = "$rootdir/themes/style_sky_blue.css";
61 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
62 $linepic = "$rootdir/pic/repeat_vline9.gif";
63 $table_bg = ' bgcolor="#cccccc" ';
64 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
65 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
66 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
67 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
69 // the height in pixels of the Logo bar at the top of the login page.
70 $GLOBALS['logoBarHeight'] = 110;
71 // the height in pixels of the Navigation bar
72 $GLOBALS['navBarHeight'] = 22;
73 // the height in pixels of the Title bar
74 $GLOBALS['titleBarHeight'] = 20;
76 //the assistant word, MORE printed next to titles that can be clicked
77 $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);
87 //echo "Setting special timeout as $special_timeout";
89 else {
90 //echo "setting regular timeout";
91 // Max Idle Time before logout. Default 3600 (60 minutes)
92 $timeout = 3600;
95 //Version tags
97 $v_major = '2';
98 $v_minor = '8';
99 $v_patch = '2';
101 $tag = '-dev'; // release candidate, e.g. '-rc1'
103 $openemr_name = 'OpenEMR'; // appears on the login page
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;
112 //change these to reflect when the daily view should start to display times
113 //as well as it should end. ex schedule_start = 9 schedule_end = 17
114 // start end times in hours
115 $GLOBALS['schedule_start'] = 8;
116 $GLOBALS['schedule_end'] = 17;
117 // the interval in minutes that the day calendar will display
118 $GLOBALS['calendar_interval'] =15;
119 // the width in charactors that the day view calendar will display the title and patient name
120 $GLOBALS['day_view_td_width'] =30;
121 //include the authentication module code here, but the rule is
122 //if the file has the word "login" in the source code file name,
123 //don't include the authenticatio module - we do this to avoid
124 //include loops
125 if (!$ignoreAuth) {
126 include_once("$srcdir/auth.inc");
129 // If you do not want your accounting system to have a customer added to it
130 // for each insurance company, then set this to true. SQL-Ledger currently
131 // (2005-03-21) does nothing useful with insurance companies as customers.
132 $GLOBALS['insurance_companies_are_not_customers'] = true;
134 // If OpenEMR is being used by an athletic team rather than in a traditional
135 // clinical setting, set this to true.
136 $GLOBALS['athletic_team'] = false;
138 // The telephone country code of this installation.
139 // See http://www.wtng.info/ for a list.
140 $GLOBALS['phone_country_code'] = '1'; // 1 = USA
142 // This determines how appointments display on the calendar:
143 // 1 = lastname; 2 = last,first; 3 = last,first(title);
144 // 4 = last,first(title: description)
145 $GLOBALS['calendar_appt_style'] = 2;
147 // These are needed only if you are using SQL-Ledger and you want to see
148 // the cash receipts report by practitioner (sl_receipts_report.php),
149 // which is invoked from the billing page. We will probably have more
150 // uses for these later.
151 $sl_cash_acc = '1060'; // sql-ledger account number for checking
152 $sl_ar_acc = '1200'; // sql-ledger account number for a/r
153 $sl_income_acc = '4320'; // sql-ledger account number for medical services income
154 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
155 $sl_dbname = 'sql-ledger'; // sql-ledger database name
156 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
157 $sl_dbpass = 'secret'; // sql-ledger database login password
159 // Set this to true if you want the drug database and support for
160 // prescription dispensing, otherwise 0.
161 $GLOBALS['inhouse_pharmacy'] = false;
163 // True to omit insurance and some other things from the demographics form:
164 $GLOBALS['simplified_demographics'] = false;
166 // True if this is a weight loss clinic:
167 $GLOBALS['weight_loss_clinic'] = false;
169 // Assign a value here as the default complaint in the New Patient form:
170 $GLOBALS['default_chief_complaint'] = '';
172 $encounter = $_SESSION['encounter'];
174 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
175 $_SESSION['pid'] = $_GET['pid'];
177 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
178 $_SESSION['pid'] = $_POST['pid'];
180 $pid = $_SESSION['pid'];
181 $userauthorized = $_SESSION['userauthorized'];
182 $groupname = $_SESSION['authProvider'];
184 //global interface function to format text length using ellipses
185 function strterm($string,$length) {
186 if (strlen($string) >= ($length-3)) {
187 return substr($string,0,$length-3) . "...";
188 } else {
189 return $string;
193 //required for normal operation because of recent changes in PHP:
194 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
195 if ($ps === false) {
196 extract($_GET);
197 extract($_POST);
200 //turn off PHP compatibility warnings
201 ini_set("session.bug_compat_warn","off");