Changed Console view to display disk space.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@977 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2004-03-17 22:54:29 +00:00
parent 5abc3a4af8
commit 1b87c9e119
9 changed files with 35 additions and 14 deletions

View File

@ -20,7 +20,7 @@
function userLogin( $username, $password ) function userLogin( $username, $password )
{ {
global $user, $HTTP_SESSION_VARS; global $user, $HTTP_SESSION_VARS, $HTTP_SERVER_VARS;
$sql = "select * from Users where Username = '$username' and Password = password('$password') and Enabled = 1"; $sql = "select * from Users where Username = '$username' and Password = password('$password') and Enabled = 1";
$result = mysql_query( $sql ); $result = mysql_query( $sql );
@ -28,6 +28,7 @@ function userLogin( $username, $password )
echo mysql_error(); echo mysql_error();
$HTTP_SESSION_VARS['username'] = $username; $HTTP_SESSION_VARS['username'] = $username;
$HTTP_SESSION_VARS['password'] = $password; $HTTP_SESSION_VARS['password'] = $password;
$HTTP_SESSION_VARS['remote_addr'] = $HTTP_SERVER_VARS['REMOTE_ADDR']; // To help prevent session hijacking
if ( $db_user = mysql_fetch_assoc( $result ) ) if ( $db_user = mysql_fetch_assoc( $result ) )
{ {
$HTTP_SESSION_VARS['user'] = $user = $db_user; $HTTP_SESSION_VARS['user'] = $user = $db_user;
@ -587,4 +588,22 @@ function parseFilter()
} }
$filter_sql = " and ( $filter_sql )"; $filter_sql = " and ( $filter_sql )";
} }
function getLoad()
{
$uptime = shell_exec( 'uptime' );
$load = '';
if ( preg_match( '/load average: ([\d.]+)/', $uptime, $matches ) )
$load = $matches[1];
return( $load );
}
function getSpace()
{
$df = shell_exec( 'df '.ZM_DIR_EVENTS );
$load = '';
if ( preg_match( '/\s(\d+%)/ms', $df, $matches ) )
$space = $matches[1];
return( $space );
}
?> ?>

View File

@ -124,12 +124,7 @@ newWindow( '<?= $PHP_SELF ?>?view=version', 'zmVersion', <?= $jws['version']['w'
<tr> <tr>
<td class="smallhead" align="left"><?= date( "D jS M, g:ia" ) ?></td> <td class="smallhead" align="left"><?= date( "D jS M, g:ia" ) ?></td>
<td class="bighead" align="center"><strong><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?= $zmSlangConsole ?> - <?php if ( canEdit( 'System' ) ) { ?><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=state', 'zmState', <?= $jws['state']['w'] ?>, <?= $jws['state']['h'] ?> );"><?= $status ?></a> - <?php } ?><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=version', 'zmVersion', ".$jws['version']['w'].", ".$jws['version']['h']." );", "v".ZM_VERSION, canEdit( 'System' ) ) ?></strong></td> <td class="bighead" align="center"><strong><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?= $zmSlangConsole ?> - <?php if ( canEdit( 'System' ) ) { ?><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=state', 'zmState', <?= $jws['state']['w'] ?>, <?= $jws['state']['h'] ?> );"><?= $status ?></a> - <?php } ?><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=version', 'zmVersion', ".$jws['version']['w'].", ".$jws['version']['h']." );", "v".ZM_VERSION, canEdit( 'System' ) ) ?></strong></td>
<?php <td class="smallhead" align="right"><?= $zmSlangLoad ?>: <?= getLoad() ?> / <?= $zmSlangDisk ?>: <?= getSpace() ?></td>
$uptime = shell_exec( 'uptime' );
$load = '';
preg_match( '/load average: ([\d.]+)/', $uptime, $matches );
?>
<td class="smallhead" align="right"><?= $zmSlangServerLoad ?>: <?= $matches[1] ?></td>
</tr> </tr>
<tr> <tr>
<td class="smallhead" align="left"> <td class="smallhead" align="left">

View File

@ -143,6 +143,7 @@ $zmSlangDeviceChannel = 'Ger
$zmSlangDeviceFormat = 'Geräte Format (0=PAL,1=NTSC etc)'; $zmSlangDeviceFormat = 'Geräte Format (0=PAL,1=NTSC etc)';
$zmSlangDeviceNumber = 'Geräte Nummer (/dev/video?)'; $zmSlangDeviceNumber = 'Geräte Nummer (/dev/video?)';
$zmSlangDimensions = 'Abmaße'; $zmSlangDimensions = 'Abmaße';
$zmSlangDisk = 'Disk';
$zmSlangDuration = 'Dauer'; $zmSlangDuration = 'Dauer';
$zmSlangEdit = 'Bearbeiten'; $zmSlangEdit = 'Bearbeiten';
$zmSlangEmail = 'Email'; $zmSlangEmail = 'Email';
@ -187,6 +188,7 @@ $zmSlangInclude = 'Einschlu
$zmSlangInverted = 'Invertiert'; $zmSlangInverted = 'Invertiert';
$zmSlangLanguage = 'Sprache'; $zmSlangLanguage = 'Sprache';
$zmSlangLast = 'Letztes'; $zmSlangLast = 'Letztes';
$zmSlangLoad = 'Last';
$zmSlangLocal = 'Lokal'; $zmSlangLocal = 'Lokal';
$zmSlangLoggedInAs = 'Angemeldet als'; $zmSlangLoggedInAs = 'Angemeldet als';
$zmSlangLoggingIn = 'Amnelden '; $zmSlangLoggingIn = 'Amnelden ';
@ -287,7 +289,6 @@ $zmSlangScale = 'Skaliere';
$zmSlangScore = 'Zähler'; $zmSlangScore = 'Zähler';
$zmSlangSecs = 'Sekunden'; $zmSlangSecs = 'Sekunden';
$zmSlangSectionlength = 'Sektions Länge'; $zmSlangSectionlength = 'Sektions Länge';
$zmSlangServerLoad = 'Server Last';
$zmSlangSetLearnPrefs = 'Setze Lernmerkmale'; // This can be ignored for now $zmSlangSetLearnPrefs = 'Setze Lernmerkmale'; // This can be ignored for now
$zmSlangSetNewBandwidth = 'Setze Neue Bandbreite'; $zmSlangSetNewBandwidth = 'Setze Neue Bandbreite';
$zmSlangSettings = 'Einstellungen'; $zmSlangSettings = 'Einstellungen';

View File

@ -143,6 +143,7 @@ $zmSlangDeviceChannel = 'Device Channel';
$zmSlangDeviceFormat = 'Device Format (0=PAL,1=NTSC etc)'; $zmSlangDeviceFormat = 'Device Format (0=PAL,1=NTSC etc)';
$zmSlangDeviceNumber = 'Device Number (/dev/video?)'; $zmSlangDeviceNumber = 'Device Number (/dev/video?)';
$zmSlangDimensions = 'Dimensions'; $zmSlangDimensions = 'Dimensions';
$zmSlangDisk = 'Disk';
$zmSlangDuration = 'Duration'; $zmSlangDuration = 'Duration';
$zmSlangEdit = 'Edit'; $zmSlangEdit = 'Edit';
$zmSlangEmail = 'Email'; $zmSlangEmail = 'Email';
@ -187,6 +188,7 @@ $zmSlangInclude = 'Include';
$zmSlangInverted = 'Inverted'; $zmSlangInverted = 'Inverted';
$zmSlangLanguage = 'Language'; $zmSlangLanguage = 'Language';
$zmSlangLast = 'Last'; $zmSlangLast = 'Last';
$zmSlangLoad = 'Load';
$zmSlangLocal = 'Local'; $zmSlangLocal = 'Local';
$zmSlangLoggedInAs = 'Logged In As'; $zmSlangLoggedInAs = 'Logged In As';
$zmSlangLoggingIn = 'Logging In'; $zmSlangLoggingIn = 'Logging In';
@ -287,7 +289,6 @@ $zmSlangScale = 'Scale';
$zmSlangScore = 'Score'; $zmSlangScore = 'Score';
$zmSlangSecs = 'Secs'; $zmSlangSecs = 'Secs';
$zmSlangSectionlength = 'Section length'; $zmSlangSectionlength = 'Section length';
$zmSlangServerLoad = 'Server Load';
$zmSlangSetLearnPrefs = 'Set Learn Prefs'; // This can be ignored for now $zmSlangSetLearnPrefs = 'Set Learn Prefs'; // This can be ignored for now
$zmSlangSetNewBandwidth = 'Set New Bandwidth'; $zmSlangSetNewBandwidth = 'Set New Bandwidth';
$zmSlangSettings = 'Settings'; $zmSlangSettings = 'Settings';

View File

@ -143,6 +143,7 @@ $zmSlangDeviceChannel = 'Canal cam
$zmSlangDeviceFormat = 'Format caméra (0=PAL,1=NTSC etc)'; $zmSlangDeviceFormat = 'Format caméra (0=PAL,1=NTSC etc)';
$zmSlangDeviceNumber = 'Numéro caméra (/dev/video?)'; $zmSlangDeviceNumber = 'Numéro caméra (/dev/video?)';
$zmSlangDimensions = 'Dimensions'; $zmSlangDimensions = 'Dimensions';
$zmSlangDisk = 'Disk';
$zmSlangDuration = 'Durée'; $zmSlangDuration = 'Durée';
$zmSlangEdit = 'Editer'; $zmSlangEdit = 'Editer';
$zmSlangEmail = 'Courriel'; $zmSlangEmail = 'Courriel';
@ -187,6 +188,7 @@ $zmSlangInclude = 'Inclure';
$zmSlangInverted = 'Inversé'; $zmSlangInverted = 'Inversé';
$zmSlangLanguage = 'Langue'; $zmSlangLanguage = 'Langue';
$zmSlangLast = 'Dernier'; $zmSlangLast = 'Dernier';
$zmSlangLoad = 'Load';
$zmSlangLocal = 'Local'; $zmSlangLocal = 'Local';
$zmSlangLoggedInAs = 'Connecté cô'; $zmSlangLoggedInAs = 'Connecté cô';
$zmSlangLoggingIn = 'Connexion'; $zmSlangLoggingIn = 'Connexion';
@ -287,7 +289,6 @@ $zmSlangScale = 'Echelle';
$zmSlangScore = 'Score'; $zmSlangScore = 'Score';
$zmSlangSecs = 'Secs'; $zmSlangSecs = 'Secs';
$zmSlangSectionlength = 'Longueur section'; $zmSlangSectionlength = 'Longueur section';
$zmSlangServerLoad = 'Charge Serveur';
$zmSlangSetLearnPrefs = 'Régler préf. apprises'; // This can be ignored for now $zmSlangSetLearnPrefs = 'Régler préf. apprises'; // This can be ignored for now
$zmSlangSetNewBandwidth = 'Régler la bande passante'; $zmSlangSetNewBandwidth = 'Régler la bande passante';
$zmSlangSettings = 'Réglages'; $zmSlangSettings = 'Réglages';

View File

@ -143,6 +143,7 @@ $zmSlangDeviceChannel = '
$zmSlangDeviceFormat = 'デバイス フォーマット (0=PAL,1=NTSC 等 )'; $zmSlangDeviceFormat = 'デバイス フォーマット (0=PAL,1=NTSC 等 )';
$zmSlangDeviceNumber = 'デバイス番号 (/dev/video?)'; $zmSlangDeviceNumber = 'デバイス番号 (/dev/video?)';
$zmSlangDimensions = '寸法'; $zmSlangDimensions = '寸法';
$zmSlangDisk = 'Disk';
$zmSlangDuration = '継続時間'; $zmSlangDuration = '継続時間';
$zmSlangEdit = '編集'; $zmSlangEdit = '編集';
$zmSlangEmail = 'メール'; $zmSlangEmail = 'メール';
@ -187,6 +188,7 @@ $zmSlangInclude = '
$zmSlangInverted = '反転'; $zmSlangInverted = '反転';
$zmSlangLanguage = '言語'; $zmSlangLanguage = '言語';
$zmSlangLast = '最終'; $zmSlangLast = '最終';
$zmSlangLoad = 'Load';
$zmSlangLocal = 'ローカル'; $zmSlangLocal = 'ローカル';
$zmSlangLoggedInAs = 'ログイン済み:'; $zmSlangLoggedInAs = 'ログイン済み:';
$zmSlangLoggingIn = 'ログイン中'; $zmSlangLoggingIn = 'ログイン中';
@ -287,7 +289,6 @@ $zmSlangScale = '
$zmSlangScore = 'スコアー'; $zmSlangScore = 'スコアー';
$zmSlangSecs = '秒'; $zmSlangSecs = '秒';
$zmSlangSectionlength = '長さ'; $zmSlangSectionlength = '長さ';
$zmSlangServerLoad = '»°ÊÞ° •‰S—¦';
$zmSlangSetLearnPrefs = 'Set Learn Prefs'; // 新しい設定の自動保存 This can be ignored for now $zmSlangSetLearnPrefs = 'Set Learn Prefs'; // 新しい設定の自動保存 This can be ignored for now
$zmSlangSetNewBandwidth = '新しい帯域幅の設定'; $zmSlangSetNewBandwidth = '新しい帯域幅の設定';
$zmSlangSettings = '設定'; $zmSlangSettings = '設定';

View File

@ -144,6 +144,7 @@ $zmSlangDeviceChannel = 'Apparaat kanaal';
$zmSlangDeviceFormat = 'Apparaat formaat (0=PAL,1=NTSC etc)'; $zmSlangDeviceFormat = 'Apparaat formaat (0=PAL,1=NTSC etc)';
$zmSlangDeviceNumber = 'apparaat nummer (/dev/video?)'; $zmSlangDeviceNumber = 'apparaat nummer (/dev/video?)';
$zmSlangDimensions = 'Afmetingen'; $zmSlangDimensions = 'Afmetingen';
$zmSlangDisk = 'Disk';
$zmSlangDuration = 'Duur'; $zmSlangDuration = 'Duur';
$zmSlangEdit = 'Bewerk'; $zmSlangEdit = 'Bewerk';
$zmSlangEmail = 'Email'; $zmSlangEmail = 'Email';
@ -188,6 +189,7 @@ $zmSlangInclude = 'voeg in';
$zmSlangInverted = 'omgedraaid'; $zmSlangInverted = 'omgedraaid';
$zmSlangLanguage = 'Taal'; $zmSlangLanguage = 'Taal';
$zmSlangLast = 'Laatste'; $zmSlangLast = 'Laatste';
$zmSlangLoad = 'Load';
$zmSlangLocal = 'Lokaal'; $zmSlangLocal = 'Lokaal';
$zmSlangLoggedInAs = 'Ingelogd als'; $zmSlangLoggedInAs = 'Ingelogd als';
$zmSlangLoggingIn = 'In loggen'; $zmSlangLoggingIn = 'In loggen';
@ -288,7 +290,6 @@ $zmSlangScale = 'Schaal';
$zmSlangScore = 'Score'; $zmSlangScore = 'Score';
$zmSlangSecs = 'Secs'; $zmSlangSecs = 'Secs';
$zmSlangSectionlength = 'Sectie lengte'; $zmSlangSectionlength = 'Sectie lengte';
$zmSlangServerLoad = 'Server belasting';
$zmSlangSetLearnPrefs = 'Set Learn Prefs'; // This can be ignored for now $zmSlangSetLearnPrefs = 'Set Learn Prefs'; // This can be ignored for now
$zmSlangSetNewBandwidth = 'Set Nieuwe Bandbreedte'; $zmSlangSetNewBandwidth = 'Set Nieuwe Bandbreedte';
$zmSlangSettings = 'Instellingen'; $zmSlangSettings = 'Instellingen';

View File

@ -144,6 +144,7 @@ $zmSlangDeviceChannel = 'Numer wej
$zmSlangDeviceFormat = 'System TV (0=PAL,1=NTSC itd)'; $zmSlangDeviceFormat = 'System TV (0=PAL,1=NTSC itd)';
$zmSlangDeviceNumber = 'Numer urz±dzenia (/dev/video?)'; $zmSlangDeviceNumber = 'Numer urz±dzenia (/dev/video?)';
$zmSlangDimensions = 'Rozmiary'; $zmSlangDimensions = 'Rozmiary';
$zmSlangDisk = 'Disk';
$zmSlangDuration = 'Czas trwania'; $zmSlangDuration = 'Czas trwania';
$zmSlangEdit = 'Edycja'; $zmSlangEdit = 'Edycja';
$zmSlangEmail = 'Email'; $zmSlangEmail = 'Email';
@ -188,6 +189,7 @@ $zmSlangInclude = 'Do
$zmSlangInverted = 'Odwrócony'; $zmSlangInverted = 'Odwrócony';
$zmSlangLanguage = 'Jêzyk'; $zmSlangLanguage = 'Jêzyk';
$zmSlangLast = 'Ostatni'; $zmSlangLast = 'Ostatni';
$zmSlangLoad = 'Load';
$zmSlangLocal = 'Lokalny'; $zmSlangLocal = 'Lokalny';
$zmSlangLoggedInAs = 'Zalogowany jako'; $zmSlangLoggedInAs = 'Zalogowany jako';
$zmSlangLoggingIn = 'Logowanie'; $zmSlangLoggingIn = 'Logowanie';
@ -288,7 +290,6 @@ $zmSlangScale = 'Skala';
$zmSlangScore = 'Wynik'; $zmSlangScore = 'Wynik';
$zmSlangSecs = 'Sekund'; $zmSlangSecs = 'Sekund';
$zmSlangSectionlength = 'D³ugo¶æ sekcji'; $zmSlangSectionlength = 'D³ugo¶æ sekcji';
$zmSlangServerLoad = 'Obci±¿enie serwera';
$zmSlangSetLearnPrefs = 'Ustaw preferencje nauki'; // This can be ignored for now $zmSlangSetLearnPrefs = 'Ustaw preferencje nauki'; // This can be ignored for now
$zmSlangSetNewBandwidth = 'Ustaw now± przepustowo¶æ'; $zmSlangSetNewBandwidth = 'Ustaw now± przepustowo¶æ';
$zmSlangSettings = 'Ustawienia'; $zmSlangSettings = 'Ustawienia';

View File

@ -144,6 +144,7 @@ $zmSlangDeviceChannel = '
$zmSlangDeviceFormat = 'Формат (0=PAL,1=NTSC и т.д.)'; $zmSlangDeviceFormat = 'Формат (0=PAL,1=NTSC и т.д.)';
$zmSlangDeviceNumber = 'Номер устройства (/dev/video?)'; $zmSlangDeviceNumber = 'Номер устройства (/dev/video?)';
$zmSlangDimensions = 'Размеры'; $zmSlangDimensions = 'Размеры';
$zmSlangDisk = 'Disk';
$zmSlangDuration = 'Длительность'; $zmSlangDuration = 'Длительность';
$zmSlangEdit = 'Редактирование'; $zmSlangEdit = 'Редактирование';
$zmSlangEmail = 'Email'; $zmSlangEmail = 'Email';
@ -188,6 +189,7 @@ $zmSlangInclude = '
$zmSlangInverted = 'Инвертировать'; $zmSlangInverted = 'Инвертировать';
$zmSlangLanguage = 'Язык'; $zmSlangLanguage = 'Язык';
$zmSlangLast = 'Последний'; $zmSlangLast = 'Последний';
$zmSlangLoad = 'Load';
$zmSlangLocal = 'Локальный'; $zmSlangLocal = 'Локальный';
$zmSlangLoggedInAs = 'Пользователь'; $zmSlangLoggedInAs = 'Пользователь';
$zmSlangLoggingIn = 'Вход в систему'; $zmSlangLoggingIn = 'Вход в систему';
@ -288,7 +290,6 @@ $zmSlangScale = '
$zmSlangScore = 'Оценка'; $zmSlangScore = 'Оценка';
$zmSlangSecs = 'Сек.'; $zmSlangSecs = 'Сек.';
$zmSlangSectionlength = 'Длина секции (в кадрах)'; $zmSlangSectionlength = 'Длина секции (в кадрах)';
$zmSlangServerLoad = '愠ヌメユレヒチ モナメラナメチ';
$zmSlangSetLearnPrefs = 'Set Learn Prefs'; // This can be ignored for now $zmSlangSetLearnPrefs = 'Set Learn Prefs'; // This can be ignored for now
$zmSlangSetNewBandwidth = 'Установка новой ширина канала'; $zmSlangSetNewBandwidth = 'Установка новой ширина канала';
$zmSlangSettings = 'Настройки'; $zmSlangSettings = 'Настройки';