Added tables/sql mods to upgrade script that were not included in 2.8.3_2.9.0 upgrade...
[openemr.git] / index.php
blob1b5c95426b5dcc4d2282093f999251d73cc9c37b
1 <?php
2 // This program is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU General Public License
4 // as published by the Free Software Foundation; either version 2
5 // of the License, or (at your option) any later version.
7 // Set the site ID if required. This must be done before any database
8 // access is attempted.
10 if (!empty($_GET['site']))
11 $site_id = $_GET['site'];
12 else if (is_dir("sites/" . $_SERVER['HTTP_HOST']))
13 $site_id = $_SERVER['HTTP_HOST'];
14 else
15 $site_id = 'default';
17 if (empty($site_id) || preg_match('/[^A-Za-z0-9\\-.]/', $site_id))
18 die("Site ID '$site_id' contains invalid characters.");
20 require_once("sites/$site_id/sqlconf.php");
22 <html>
23 <?php if ($config == 1) { ?>
24 <body ONLOAD="javascript:top.location.href='<?php echo "interface/login/login_frame.php?site=$site_id" ?>';">
25 <?php } else { ?>
26 <body ONLOAD="javascript:top.location.href='<?php echo "setup.php?site=$site_id" ?>';">
27 <?php } ?>
28 Redirecting...
29 </body>
30 </html>