Add database information (#6551)

* Add database information

Show the database version.

* Add title-database

* Update app_config.php
This commit is contained in:
FusionPBX
2023-02-14 10:30:38 -07:00
committed by GitHub
parent f8f906a29c
commit 7afcad0743
3 changed files with 54 additions and 5 deletions

View File

@@ -312,7 +312,7 @@
echo "<br /><br />";
}
}
//Windows
if (stristr(PHP_OS, 'WIN')) {
echo "<!--\n";
@@ -475,6 +475,33 @@
echo "<br /><br />";
}
//database information
if (permission_exists('system_view_database')) {
if ($db_type == 'pgsql') {
$sql = "select version(); ";
$database = new database;
$database_version = $database->select($sql, null, 'column');
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left'>".$text['title-database']."</th>\n";
echo "</tr>\n";
echo "<tr>\n";
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
echo " ".$text['label-version']." \n";
echo " </td>\n";
echo " <td class=\"row_style1\">\n";
echo "<pre>\n";
echo "$database_version<br>";
echo "</pre>\n";
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
}
echo "<br /><br />";
}
//memcache information
if (permission_exists("system_view_memcache") && file_exists($_SERVER["PROJECT_ROOT"]."/app/sip_status/app_config.php")){
echo "<table width='100%' border='0' cellpadding='7' cellspacing='0'>\n";