status page added

This commit is contained in:
lars 2005-09-26 18:52:18 +00:00
parent 27ed317dad
commit c1b5e829a0
9 changed files with 74 additions and 26 deletions

View File

@ -11,6 +11,7 @@ Lang {
Config = Konfiguration der CryptoBox
Log = Protokoll der CryptoBox
ShutDown = System
Status = Status der CryptoBox
}
@ -35,6 +36,8 @@ Lang {
DoUmount = Deaktivierung des verschlüsselten Dateisystems
DoMount = Aktivierung des verschlüsselten Dateisystems
Configuration = Einstellungen
CryptoIsActive = Die Crypto-Daten sind verfügbar.
CryptoIsDown = Die Crypto-Daten sind vor jedem Zugriff geschützt.
}
@ -49,6 +52,7 @@ Lang {
ReBoot = neu starten
Protocol = Protokoll
Documentation = Handbuch
Status = Status
}

View File

@ -11,6 +11,7 @@ Lang {
Config = CryptoBox configuration
Log = CryptoBox logfiles
ShutDown = System
Status = Status
}
@ -35,6 +36,8 @@ Lang {
DoUmount = Deactivation of the encrypted filesystem
DoMount = Activation of the encrypted filesystem
Configuration = Configuration
CryptoIsActive = The encrypted data is accessible.
CryptoIsDown = The encrypted data is protected from any access.
}
@ -49,6 +52,7 @@ Lang {
ReBoot = Reboot
Protocol = Logfiles
Documentation = Manual
Status = Status
}

View File

@ -11,6 +11,7 @@ Lang {
Config = CryptoBox konfiguracija
Log = CryptoBox dnevnik
ShutDown = Ugasni
Status = Stanje
}
@ -35,6 +36,8 @@ Lang {
DoUmount = Deaktivacija kriptiranega datotečnega sistema
DoMount = Aktivacija kriptiranega datotečnega sistema
Configuration = Konfiguracija
CryptoIsActive = The encrypted data is accessible.
CryptoIsDown = The encrypted data is protected from any access.
}
@ -49,6 +52,7 @@ Lang {
ReBoot = Ponovni zagon
Protocol = Dnevnik
Documentation = Priročnik
Status = Stanje
}

View File

@ -0,0 +1 @@
<!-- what else would you expect here? -->

View File

@ -1,5 +1,5 @@
<?cs if:Data.Redirect.URL ?>
<p class="warning"><a href="<?cs var:Data.Redirect.URL ?>"><?cs var:Lang.Text.RedirectNote ?></a></p>
<?cs if:Data.Redirect ?>
<p class="warning"><a href="<?cs if:Data.Redirect.URL ?><?cs var:Data.Redirect.URL ?><?cs else ?><?cs call:getSelfURL('action=' + Data.Redirect.Action, '') ?><?cs /if ?>"><?cs var:Lang.Text.RedirectNote ?></a></p>
<?cs /if ?>
</div><!-- end of 'words' -->

View File

@ -8,7 +8,8 @@
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<link rel="stylesheet" media="screen" href="/cryptobox.css" type="text/css" />
<?cs if:Data.Redirect.URL ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs var:Data.Redirect.URL ?>"><?cs /if ?>
<?cs if:Data.Redirect.URL ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs var:Data.Redirect.URL ?>" /><?cs
elif:Data.Redirect.Action ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs call:getSelfURL('action=' + Data.Redirect.Action, '') ?>" /><?cs /if ?>
</head>
<body>

View File

@ -4,6 +4,7 @@
<a href="<?cs call:getSelfURL('action=umount_do','action') ?>" title="<?cs var:Lang.Text.DoUmount ?>"><?cs var:Lang.Button.Umount ?></a>
<?cs else ?>
<a href="<?cs call:getSelfURL('action=mount_ask','action') ?>" title="<?cs var:Lang.Text.DoMount ?>"><?cs var:Lang.Button.Mount ?></a>
<a href="<?cs call:getSelfURL('action=status','action') ?>" title="<?cs var:Lang.Button.Status ?>"><?cs var:Lang.Button.Status ?></a>
<?cs /if ?>
<?cs /if ?>

View File

@ -0,0 +1,3 @@
<h1><?cs var:Lang.Title.Status ?></h1>
<p><?cs if:(Data.Status.Mounted == 1) ?><?cs var:Lang.Text.CryptoIsActive ?>
<?cs else ?><?cs var:Lang.Text.CryptoIsDown ?><?cs /if ?></p>

View File

@ -311,10 +311,12 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'init_form');
} elsif (&check_init_running()) {
$pagedata->setValue('Data.Warning', 'InitNotFinished');
$pagedata->setValue('Data.Action', 'mount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'config_form');
$pagedata->setValue('Data.Redirect.Delay', "30");
} elsif ( ! &check_mounted()) {
$pagedata->setValue('Data.Warning', 'NotMounted');
$pagedata->setValue('Data.Action', 'mount_form');
$pagedata->setValue('Data.Action', 'empty');
} else {
# unmounten
&umount_vol();
@ -323,7 +325,9 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'umount_form');
} else {
$pagedata->setValue('Data.Success', 'UmountDone');
$pagedata->setValue('Data.Action', 'mount_form');
$pagedata->setValue('Data.Action', 'status');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "60");
}
}
################ mount_do ########################
@ -334,10 +338,14 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'init_form');
} elsif (&check_init_running()) {
$pagedata->setValue('Data.Warning', 'InitNotFinished');
$pagedata->setValue('Data.Action', 'mount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'config_form');
$pagedata->setValue('Data.Redirect.Delay', "30");
} elsif (&check_mounted()) {
$pagedata->setValue('Data.Warning', 'IsMounted');
$pagedata->setValue('Data.Action', 'umount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "30");
} elsif ($query->param('crypto_password') eq '') {
# leeres Passwort
$pagedata->setValue('Data.Warning', 'EmptyCryptoPassword');
@ -350,7 +358,9 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'mount_form');
} else {
$pagedata->setValue('Data.Success', 'MountDone');
$pagedata->setValue('Data.Action', 'umount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "30");
}
}
################## mount_ask #######################
@ -360,10 +370,14 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'init_form');
} elsif (&check_init_running()) {
$pagedata->setValue('Data.Warning', 'InitNotFinished');
$pagedata->setValue('Data.Action', 'mount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'config_form');
$pagedata->setValue('Data.Redirect.Delay', "30");
} elsif (&check_mounted()) {
$pagedata->setValue('Data.Warning', 'IsMounted');
$pagedata->setValue('Data.Action', 'umount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "30");
} else {
$pagedata->setValue('Data.Action', 'mount_form');
}
@ -374,7 +388,9 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'init_form');
} elsif ( ! &check_mounted()) {
$pagedata->setValue('Data.Warning', 'NotMounted');
$pagedata->setValue('Data.Action', 'mount_form');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "30");
} else {
$pagedata->setValue('Data.Action', 'umount_form');
}
@ -475,11 +491,9 @@ if ( ! &check_ssl()) {
} else {
$pagedata->setValue('Data.Success', 'ConfigSaved');
}
if (&check_mounted()) {
$pagedata->setValue('Data.Action', 'umount_form');
} else {
$pagedata->setValue('Data.Action', 'mount_form');
}
$pagedata->setValue('Data.Action', 'status');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "30");
}
}
#################### show_log #######################
@ -502,12 +516,28 @@ if ( ! &check_ssl()) {
if ($query->param('type') eq 'reboot') {
&system_reboot();
$pagedata->setValue('Data.Success', 'ReBoot');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "180");
} else {
&system_poweroff();
$pagedata->setValue('Data.Success', 'PowerOff');
}
$pagedata->setValue('Data.Doc.Page', 'CryptoBoxIntro');
$pagedata->setValue('Data.Action', 'doc');
$pagedata->setValue('Data.Action', 'empty');
#################### status #########################
} elsif ($action eq 'status') {
if ( ! &check_config()) {
$pagedata->setValue('Data.Warning', 'NotInitialized');
$pagedata->setValue('Data.Action', 'init_form');
} elsif (&check_init_running()) {
$pagedata->setValue('Data.Warning', 'InitNotFinished');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'config_form');
$pagedata->setValue('Data.Redirect.Delay', "30");
} else {
$pagedata->setValue('Data.Action', 'status');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "60");
}
################### unknown #########################
} else {
$pagedata->setValue('Data.Error', 'UnknownAction');
@ -515,14 +545,14 @@ if ( ! &check_ssl()) {
###################### default ##########################
} else {
if (&check_init_running()) {
$pagedata->setValue('Data.Doc.Page', 'CryptoBoxIntro');
$pagedata->setValue('Data.Action', 'doc');
$pagedata->setValue('Data.Warning', 'InitNotFinished');
$pagedata->setValue('Data.Action', 'empty');
$pagedata->setValue('Data.Redirect.Action', 'config_form');
$pagedata->setValue('Data.Redirect.Delay', "60");
} elsif (&check_config()) {
if (&check_mounted()) {
$pagedata->setValue('Data.Action', 'umount_form');
} else {
$pagedata->setValue('Data.Action', 'mount_form');
}
$pagedata->setValue('Data.Action', 'status');
$pagedata->setValue('Data.Redirect.Action', 'status');
$pagedata->setValue('Data.Redirect.Delay', "60");
} else {
$pagedata->setValue('Data.Action', 'init_form');
}