Initial import.
[openemr.git] / interface / globals.php
blob1f200e97f07c57a557a45e7eaf78023c3bf25204
1 <?
2 require_once(dirname(__FILE__) . "/../includes/config.php");
3 //Global variable file in which colors and paths are set for the interface.
4 //Pennington Firm (PennFirm.com), San Diego, California
5 //888-480-5050
6 ///////////////////////////////////////////////////////////////////
7 //THESE VALUES MUST BE SET BEFORE OPENEMR WILL FUNCTION:
8 ///////////////////////////////////////////////////////////////////
9 //Set this to the full absolute directory path for openemr:
10 $webserver_root = "/var/www/html/openemr";
12 //Set this to the relative html path, ie. what you would type into the web
13 //browser after the server address to get to OpenEMR
14 //For example, if you type "http://127.0.0.1/pennfirm/openemr/"
15 //to load OpenEMR, set $web_root to "/pennfirm/openemr" without the
16 //trailing slash.
17 $web_root = "/openemr";
20 ///////////////////////////////////////////////////////////////////
22 //This is the return mail address used when sending prescriptions by email
23 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
25 //root directory, relative to the webserver root:
26 $GLOBALS['rootdir'] = "$web_root/interface";
27 //absolute path to the source code include and headers file directory (Full path):
28 $GLOBALS['srcdir'] = "$webserver_root/library";
29 //absolute path to the location of interface root directory for use with include statements:
30 $GLOBALS['fileroot'] = "$webserver_root";
31 //absolute path to the location of interface root directory for use with include statements:
32 $include_root = "$webserver_root/interface";
33 //absolute path to the location of interface root directory for use with include statements:
34 $GLOBALS['webroot'] = $web_root;
35 $GLOBALS['template_dir'] = $GLOBALS['fileroot'] . "/templates/";
36 $GLOBALS['incdir'] = $include_root;
37 //location of the login screen file
38 $GLOBALS['login_screen'] = "$rootdir/login_screen.php";
39 //default category for find_patient screen
40 $GLOBALS['default_category'] = 5;
41 $GLOBALS['default_event_title'] = 'Office Visit';
43 //SESSION SETTINGS
44 session_name("OpenEMR");
45 session_start();
46 #print(session_id());
48 //this is the theme definition for a beige theme:
49 $top_bg_line = ' bgcolor="#94d6e7" ';
50 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
51 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
52 $login_filler_line = ' bgcolor="#f7f0d5" ';
53 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
54 $title_bg_line = ' bgcolor="#aaffff" ';
55 $nav_bg_line = ' bgcolor="#94d6e7" ';
56 $css_header = "$rootdir/themes/style_sky_blue.css";
57 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
58 $linepic = "$rootdir/pic/repeat_vline9.gif";
59 $table_bg = ' bgcolor="#cccccc" ';
60 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
61 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
62 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
63 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
65 // the height in pixels of the Logo bar at the top of the login page.
66 $GLOBALS['logoBarHeight'] = 110;
67 // the height in pixels of the Navigation bar
68 $GLOBALS['navBarHeight'] = 22;
69 // the height in pixels of the Title bar
70 $GLOBALS['titleBarHeight'] = 20;
72 //the assistant word, MORE printed next to titles that can be clicked
73 $tmore = "(More)";
75 //the assistant word, BACK printed next to titles that return to previous screens
76 $tback = "(Back)";
78 //This is the idle logout function:
79 //if a page has not been refreshed within this many seconds, the interface
80 //will return to the login page
81 if ($special_timeout > 0) {
82 $timeout = intval($special_timeout);
83 //echo "Setting special timeout as $special_timeout";
85 else {
86 //echo "setting regular timeout";
87 // Max Idle Time before logout. Default 3600 (60 minutes)
88 $timeout = 3600;
91 //Version tags
93 $v_major = '2';
94 $v_minor = '7';
95 $v_patch = '2';
97 $tag = ''; // release candidate
99 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
101 $rootdir = $GLOBALS['rootdir'];
102 $srcdir = $GLOBALS['srcdir'];
103 $login_screen = $GLOBALS['login_screen'];
104 $GLOBALS['css_header'] = $css_header;
105 $GLOBALS['backpic'] = $backpic;
106 $GLOBALS['rootdir'] = $rootdir;
107 //change these to reflect when the daily view should start to display times
108 //as well as it should end. ex schedule_start = 9 schedule_end = 17
109 // start end times in hours
110 $GLOBALS['schedule_start'] = 9;
111 $GLOBALS['schedule_end'] = 17;
112 // the interval in minutes that the day calendar will display
113 $GLOBALS['calendar_interval'] =15;
114 // the width in charactors that the day view calendar will display the title and patient name
115 $GLOBALS['day_view_td_width'] =30;
116 //include the authentication module code here, but the rule is
117 //if the file has the word "login" in the source code file name,
118 //don't include the authenticatio module - we do this to avoid
119 //include loops
120 if (!$ignoreAuth) {
121 include_once("$srcdir/auth.inc");
124 // If you do not want your accounting system to have a customer added to it
125 // for each insurance company, then set this to true. SQL-Ledger currently
126 // (2005-03-21) does nothing useful with insurance companies as customers.
128 $GLOBALS['insurance_companies_are_not_customers'] = false;
130 // If OpenEMR is being used by an athletic team rather than in a traditional
131 // clinical setting, set this to true.
133 $GLOBALS['athletic_team'] = false;
135 // The telephone country code of this installation.
136 // See http://www.wtng.info/ for a list.
138 $GLOBALS['phone_country_code'] = '1'; // 1 = USA
140 // These are needed only if you are using SQL-Ledger and you want to see
141 // the cash receipts report by practitioner (sl_receipts_report.php),
142 // which is invoked from the billing page. We will probably have more
143 // uses for these later.
145 $sl_cash_acc = '1060'; // sql-ledger account number for checking
146 $sl_ar_acc = '1200'; // sql-ledger account number for a/r
147 $sl_income_acc = '4020'; // sql-ledger account number for medical services income
148 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
149 $sl_dbname = 'sql-ledger'; // sql-ledger database name
150 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
151 $sl_dbpass = 'secret'; // sql-ledger database login password
153 $encounter = $_SESSION['encounter'];
155 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
156 $_SESSION['pid'] = $_GET['pid'];
158 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
159 $_SESSION['pid'] = $_POST['pid'];
161 $pid = $_SESSION['pid'];
162 $userauthorized = $_SESSION['userauthorized'];
163 $groupname = $_SESSION['authProvider'];
165 //global interface function to format text length using ellipses
166 function strterm($string,$length) {
167 if (strlen($string) >= ($length-3)) {
168 return substr($string,0,$length-3) . "...";
169 } else {
170 return $string;
174 //required for normal operation because of recent changes in PHP:
175 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
176 if ($ps === false) {
177 extract($_GET);
178 extract($_POST);
181 //turn off PHP compatibility warnings
182 ini_set("session.bug_compat_warn","off");