in some php versions touch will give an error, error output supressed by @
[openemr.git] / interface / globals.php
blob775f6a6dd970c4705e8420989e5b1767f2a0b1b2
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:
51 $top_bg_line = ' bgcolor="#94d6e7" ';
52 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
53 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
54 $login_filler_line = ' bgcolor="#f7f0d5" ';
55 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
56 $title_bg_line = ' bgcolor="#aaffff" ';
57 $nav_bg_line = ' bgcolor="#94d6e7" ';
58 $css_header = "$rootdir/themes/style_sky_blue.css";
59 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
60 $linepic = "$rootdir/pic/repeat_vline9.gif";
61 $table_bg = ' bgcolor="#cccccc" ';
62 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
63 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
64 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
65 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
67 // the height in pixels of the Logo bar at the top of the login page.
68 $GLOBALS['logoBarHeight'] = 110;
69 // the height in pixels of the Navigation bar
70 $GLOBALS['navBarHeight'] = 20;
71 // the height in pixels of the Title bar
72 $GLOBALS['titleBarHeight'] = 20;
75 //the assistant word, MORE printed next to titles that can be clicked
76 $tmore = "(More)";
78 //the assistant word, BACK printed next to titles that return to previous screens
79 $tback = "(Back)";
81 //This is the idle logout function:
82 //if a page has not been refreshed within this many seconds, the interface
83 //will return to the login page
84 if ($special_timeout > 0) {
85 $timeout = intval($special_timeout);
86 //echo "Setting special timeout as $special_timeout";
88 else {
89 //echo "setting regular timeout";
90 // Max Idle Time before logout. Default 3600 (60 minutes)
91 $timeout = 3600;
94 //Version tags
96 $v_major = '2';
97 $v_minor = '7';
98 $v_patch = '0';
101 $tag = ''; //early access
103 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
105 $rootdir = $GLOBALS['rootdir'];
106 $srcdir = $GLOBALS['srcdir'];
107 $login_screen = $GLOBALS['login_screen'];
108 $GLOBALS['css_header'] = $css_header;
109 $GLOBALS['backpic'] = $backpic;
110 $GLOBALS['rootdir'] = $rootdir;
111 //change these to reflect when the daily view should start to display times
112 //as well as it should end. ex schedule_start = 9 schedule_end = 17
113 // start end times in hours
114 $GLOBALS['schedule_start'] = 9;
115 $GLOBALS['schedule_end'] = 17;
116 // the interval in minutes that the day calendar will display
117 $GLOBALS['calendar_interval'] =15;
118 // the width in charactors that the day view calendar will display the title and patient name
119 $GLOBALS['day_view_td_width'] =30;
120 //include the authentication module code here, but the rule is
121 //if the file has the word "login" in the source code file name,
122 //don't include the authenticatio module - we do this to avoid
123 //include loops
124 if (!$ignoreAuth) {
125 include_once("$srcdir/auth.inc");
128 // If you do not want your accounting system to have a customer added to it
129 // for each insurance company, then set this to true. SQL-Ledger currently
130 // (2005-03-21) does nothing useful with insurance companies as customers.
132 $GLOBALS['insurance_companies_are_not_customers'] = false;
134 $encounter = $_SESSION['encounter'];
136 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
137 $_SESSION['pid'] = $pid;
139 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
140 $_SESSION['pid'] = $pid;
142 $pid = $_SESSION['pid'];
143 $userauthorized = $_SESSION['userauthorized'];
144 $groupname = $_SESSION['authProvider'];
146 //global interface function to format text length using ellipses
147 function strterm($string,$length) {
148 if (strlen($string) >= ($length-3)) {
149 return substr($string,0,$length-3) . "...";
150 } else {
151 return $string;
155 //required for normal operation because of recent changes in PHP:
156 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
157 if ($ps === false) {
158 extract($_GET);
159 extract($_POST);
162 //turn off PHP compatibility warnings
163 ini_set("session.bug_compat_warn","off");