* @author Ranganath Pathak * @copyright Copyright (C) 2010 Rod Roark * @copyright Copyright (c) 2019 Ranganath Pathak * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ // Checks if the server's PHP version is compatible with OpenEMR: require_once(dirname(__FILE__) . "/src/Common/Compatibility/Checker.php"); $response = OpenEMR\Common\Compatibility\Checker::checkPhpVersion(); if ($response !== true) { die(htmlspecialchars($response)); } require_once "version.php"; $webserver_root = dirname(__FILE__); if (stripos(PHP_OS, 'WIN') === 0) { $webserver_root = str_replace("\\", "/", $webserver_root); } $OE_SITES_BASE = "$webserver_root/sites"; function sqlQuery($statement, $link) { $row = mysqli_fetch_array(mysqli_query($link, $statement), MYSQLI_ASSOC); return $row; } ?> OpenEMR Site Administration

OpenEMR Multi Site Administration

\n"; // Access the site's database. include "$sitedir/sqlconf.php"; if ($config) { $dbh = mysqli_connect("$host", "$login", "$pass", $dbase, $port); if (!$dbh) { $errmsg = "MySQL connect failed"; } } echo " \n"; echo " \n"; if (!$config) { echo " \n"; } elseif ($errmsg) { echo " \n"; } else { // Get site name for display. $row = sqlQuery("SELECT gl_value FROM globals WHERE gl_name = 'openemr_name' LIMIT 1", $dbh); $openemr_name = $row ? $row['gl_value'] : ''; // Get version indicators from the database. $row = sqlQuery("SHOW TABLES LIKE 'version'", $dbh); if (empty($row)) { $openemr_version = 'Unknown'; $database_version = 0; } else { $row = sqlQuery("SELECT * FROM version LIMIT 1", $dbh); $database_patch_txt = ""; if (!(empty($row['v_realpatch'])) && $row['v_realpatch'] != 0) { $database_patch_txt = " (" . $row['v_realpatch'] . ")"; } $openemr_version = $row['v_major'] . "." . $row['v_minor'] . "." . $row['v_patch'] . $row['v_tag'] . $database_patch_txt; $database_version = 0 + $row['v_database']; $database_acl = 0 + $row['v_acl']; $database_patch = 0 + $row['v_realpatch']; } // Display relevant columns. echo " \n"; echo " \n"; if ($v_database != $database_version) { echo " \n"; } elseif (($v_acl > $database_acl)) { echo " \n"; } elseif (($v_realpatch != $database_patch)) { echo " \n"; } else { echo " \n"; } if (($v_database == $database_version) && ($v_acl <= $database_acl) && ($v_realpatch == $database_patch)) { echo " \n"; } else { echo " \n"; } } echo " \n"; if ($config && $dbh !== false) { mysqli_close($dbh); } } ?>
Site ID DB Name Site Name Version Is Current Log In
$sfname$dbaseNeeds setup, click here to run it$errmsg$openemr_name$openemr_versionUpgrade DatabaseUpgrade Access ControlsPatch Database