diff --git a/include/class.nav.php b/include/class.nav.php index 89f47ed75e1cd46ef75a95016e5ab019cea024a5..9dc4a79f25a31ff1d9f7aea5954d6f0abd22847c 100644 --- a/include/class.nav.php +++ b/include/class.nav.php @@ -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'); diff --git a/include/staff/system.inc.php b/include/staff/system.inc.php new file mode 100644 index 0000000000000000000000000000000000000000..9c45c3dabd873d6e5be5ec8ceb9a61d2dee71c90 --- /dev/null +++ b/include/staff/system.inc.php @@ -0,0 +1,66 @@ +<?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> diff --git a/scp/css/scp.css b/scp/css/scp.css index 5ace679406f08b4db7a8c890ee484455a0d32bdd..62ecb27503434b518fa61d2352d6c411c0648e59 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -1485,6 +1485,11 @@ input[type=text]:disabled, input[type=checkbox]:disabled { background-color: #eee; } + input.dp { width: 10em; } + +.icon-warning-sign { + color: #d33; +} diff --git a/scp/system.php b/scp/system.php new file mode 100644 index 0000000000000000000000000000000000000000..5106fda52003e26e3f5cb260cf0bec97630173e9 --- /dev/null +++ b/scp/system.php @@ -0,0 +1,25 @@ +<?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'); +?>