Skip to content
Snippets Groups Projects
Commit f47c427d authored by Jared Hancock's avatar Jared Hancock
Browse files

Add concept of system information page

Add information about current software versions, server software, php
extensions loaded, and database space usage.

In the future, this will offer a nice place to add an import/export button
for data backup and restore, announcements, and more
parent 293fa740
No related branches found
No related tags found
No related merge requests found
......@@ -191,6 +191,7 @@ class AdminNav extends StaffNav{
switch(strtolower($k)){
case 'dashboard':
$subnav[]=array('desc'=>'System Logs','href'=>'logs.php','iconclass'=>'logs');
$subnav[]=array('desc'=>'Information','href'=>'system.php','iconclass'=>'preferences');
break;
case 'settings':
$subnav[]=array('desc'=>'System Preferences','href'=>'settings.php?t=system','iconclass'=>'preferences');
......
<?php
if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied');
?>
<h2>About this osTicket Installation</h2>
<br/>
<table class="list" width="100%";>
<thead>
<tr><th colspan="2">Server Information</th></tr>
</thead>
<tbody>
<tr><td>osTicket Version</td>
<td><?php echo THIS_VERSION; ?></td></tr>
<tr><td>Server Software</td>
<td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td></tr>
<tr><td>PHP Version</td>
<td><?php echo phpversion(); ?></td></tr>
<tr><td>MySQL Version</td>
<td><?php echo db_version(); ?></td></tr>
<tr><td>PHP Extensions</td>
<td><table><tbody>
<tr><td><i class="icon icon-<?php
echo extension_loaded('gd')?'check':'warning-sign'; ?>"></i></td>
<td>gdlib</td>
<td>Used for image manipulation and PDF printing</td></tr>
<tr><td><i class="icon icon-<?php
echo extension_loaded('imap')?'check':'warning-sign'; ?>"></i></td>
<td>imap</td>
<td>Used for email fetching</td></tr>
<tr><td><i class="icon icon-<?php
echo extension_loaded('xml')?'check':'warning-sign'; ?>"></i></td>
<td>xml</td>
<td>Used for HTML email processing and XML API</td></tr>
<tr><td><i class="icon icon-<?php
echo extension_loaded('json')?'check':'warning-sign'; ?>"></i></td>
<td>json</td>
<td>Improves performance creating and processing JSON</td></tr>
<tr><td><i class="icon icon-<?php
echo extension_loaded('gettext')?'check':'warning-sign'; ?>"></i></td>
<td>gettext</td>
<td>Improves performance for non US-English configurations</td></tr>
<tr><td><i class="icon icon-<?php
echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i></td>
<td>mbstring</td>
<td>Highly recommended for non western european language content</td></tr>
</tbody></table></td></tr>
</tbody>
<thead>
<tr><th colspan="2">Database Usage</th></tr>
</thead>
<tbody>
<tr><td>Database Space Used</td>
<td><?php
$sql = 'SELECT sum( data_length + index_length ) / 1048576 total_size
FROM information_schema.TABLES WHERE table_schema = '
.db_input(DBNAME);
$space = db_result(db_query($sql));
echo sprintf('%.2f MiB', $space); ?></td>
<tr><td>Database Space for Attachments</td>
<td><?php
$sql = 'SELECT SUM(LENGTH(filedata)) / 1048576 FROM '.FILE_CHUNK_TABLE;
$space = db_result(db_query($sql));
echo sprintf('%.2f MiB', $space); ?></td>
</tbody>
</table>
......@@ -1485,6 +1485,11 @@ input[type=text]:disabled, input[type=checkbox]:disabled {
background-color: #eee;
}
input.dp {
width: 10em;
}
.icon-warning-sign {
color: #d33;
}
<?php
/*********************************************************************
system.php
System information about this http server, database, php, and osticket.
Includes useful configuration informations.
Peter Rotich <peter@osticket.com>
Jared Hancock <jared@osticket.com>
Copyright (c) 2006-2013 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
require('admin.inc.php');
$page='system.inc.php';
$nav->setTabActive('dashboard');
require(STAFFINC_DIR.'header.inc.php');
require(STAFFINC_DIR.$page);
include(STAFFINC_DIR.'footer.inc.php');
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment