option for using DOS as billing date added
[openemr.git] / interface / globals.php
blobabf7a7fddcb99146e2e86b0b0f00c5f65ab8ede7
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";
19 ///////////////////////////////////////////////////////////////////
21 //This is the return mail address used when sending prescriptions by email
22 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
24 //root directory, relative to the webserver root:
25 $GLOBALS['rootdir'] = "$web_root/interface";
26 //absolute path to the source code include and headers file directory (Full path):
27 $GLOBALS['srcdir'] = "$webserver_root/library";
28 //absolute path to the location of interface root directory for use with include statements:
29 $GLOBALS['fileroot'] = "$webserver_root";
30 //absolute path to the location of interface root directory for use with include statements:
31 $include_root = "$webserver_root/interface";
32 //absolute path to the location of interface root directory for use with include statements:
33 $GLOBALS['webroot'] = $web_root;
34 $GLOBALS['template_dir'] = $GLOBALS['fileroot'] . "/templates/";
35 $GLOBALS['incdir'] = $include_root;
36 //location of the login screen file
37 $GLOBALS['login_screen'] = "$rootdir/login_screen.php";
38 //default category for find_patient screen
39 $GLOBALS['default_category'] = 5;
40 $GLOBALS['default_event_title'] = 'Office Visit';
42 //SESSION SETTINGS
43 session_name("OpenEMR");
44 session_start();
45 #print(session_id());
47 //this is the theme definition for a beige theme:
48 $top_bg_line = ' bgcolor="#94d6e7" ';
49 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
50 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
51 $login_filler_line = ' bgcolor="#f7f0d5" ';
52 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
53 $title_bg_line = ' bgcolor="#aaffff" ';
54 $nav_bg_line = ' bgcolor="#94d6e7" ';
55 $css_header = "$rootdir/themes/style_sky_blue.css";
56 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
57 $linepic = "$rootdir/pic/repeat_vline9.gif";
58 $table_bg = ' bgcolor="#cccccc" ';
59 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
60 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
61 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
62 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
64 // the height in pixels of the Logo bar at the top of the login page.
65 $GLOBALS['logoBarHeight'] = 110;
66 // the height in pixels of the Navigation bar
67 $GLOBALS['navBarHeight'] = 22;
68 // the height in pixels of the Title bar
69 $GLOBALS['titleBarHeight'] = 20;
71 //the assistant word, MORE printed next to titles that can be clicked
72 $tmore = "(More)";
74 //the assistant word, BACK printed next to titles that return to previous screens
75 $tback = "(Back)";
77 //This is the idle logout function:
78 //if a page has not been refreshed within this many seconds, the interface
79 //will return to the login page
80 if ($special_timeout > 0) {
81 $timeout = intval($special_timeout);
82 //echo "Setting special timeout as $special_timeout";
84 else {
85 //echo "setting regular timeout";
86 // Max Idle Time before logout. Default 3600 (60 minutes)
87 $timeout = 3600;
90 //Version tags
92 $v_major = '2';
93 $v_minor = '8';
94 $v_patch = '0';
96 $tag = ''; // release candidate, e.g. '-rc1'
98 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
100 $rootdir = $GLOBALS['rootdir'];
101 $srcdir = $GLOBALS['srcdir'];
102 $login_screen = $GLOBALS['login_screen'];
103 $GLOBALS['css_header'] = $css_header;
104 $GLOBALS['backpic'] = $backpic;
105 $GLOBALS['rootdir'] = $rootdir;
106 //change these to reflect when the daily view should start to display times
107 //as well as it should end. ex schedule_start = 9 schedule_end = 17
108 // start end times in hours
109 $GLOBALS['schedule_start'] = 8;
110 $GLOBALS['schedule_end'] = 17;
111 // the interval in minutes that the day calendar will display
112 $GLOBALS['calendar_interval'] =15;
113 // the width in charactors that the day view calendar will display the title and patient name
114 $GLOBALS['day_view_td_width'] =30;
115 //include the authentication module code here, but the rule is
116 //if the file has the word "login" in the source code file name,
117 //don't include the authenticatio module - we do this to avoid
118 //include loops
119 if (!$ignoreAuth) {
120 include_once("$srcdir/auth.inc");
123 // If you do not want your accounting system to have a customer added to it
124 // for each insurance company, then set this to true. SQL-Ledger currently
125 // (2005-03-21) does nothing useful with insurance companies as customers.
126 $GLOBALS['insurance_companies_are_not_customers'] = false;
128 // If OpenEMR is being used by an athletic team rather than in a traditional
129 // clinical setting, set this to true.
130 $GLOBALS['athletic_team'] = false;
132 // The telephone country code of this installation.
133 // See http://www.wtng.info/ for a list.
134 $GLOBALS['phone_country_code'] = '1'; // 1 = USA
136 // This determines how appointments display on the calendar:
137 // 1 = lastname 2 = last,first 3 = last,first(title)
138 $GLOBALS['calendar_appt_style'] = 2;
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.
144 $sl_cash_acc = '1060'; // sql-ledger account number for checking
145 $sl_ar_acc = '1200'; // sql-ledger account number for a/r
146 $sl_income_acc = '4020'; // sql-ledger account number for medical services income
147 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
148 $sl_dbname = 'sql-ledger'; // sql-ledger database name
149 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
150 $sl_dbpass = 'secret'; // sql-ledger database login password
152 $encounter = $_SESSION['encounter'];
154 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
155 $_SESSION['pid'] = $_GET['pid'];
157 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
158 $_SESSION['pid'] = $_POST['pid'];
160 $pid = $_SESSION['pid'];
161 $userauthorized = $_SESSION['userauthorized'];
162 $groupname = $_SESSION['authProvider'];
164 //global interface function to format text length using ellipses
165 function strterm($string,$length) {
166 if (strlen($string) >= ($length-3)) {
167 return substr($string,0,$length-3) . "...";
168 } else {
169 return $string;
173 //Language Control Section (will add toggling)
174 //English:1, Swedish:2, Spanish:3, German:4,
175 define (LANGUAGE,1);
176 include_once (dirname(__FILE__) . "/../library/translation.inc.php");
178 //required for normal operation because of recent changes in PHP:
179 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
180 if ($ps === false) {
181 extract($_GET);
182 extract($_POST);
185 //turn off PHP compatibility warnings
186 ini_set("session.bug_compat_warn","off");