Skip to content

Commit b79c5ba

Browse files
author
Till Brehm
committed
New ISPConfig login.
1 parent 831dd0a commit b79c5ba

File tree

17 files changed

+491
-396
lines changed

17 files changed

+491
-396
lines changed

interface/web/content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
$page = $_REQUEST["s_pg"];
3737
*/
3838

39-
$module = 'login';
40-
$page = 'index';
39+
$module = 'dashboard';
40+
$page = 'dashboard';
4141

4242
if(!preg_match("/^[a-z]{2,20}$/i", $module)) die('module name contains unallowed chars.');
4343
if(!preg_match("/^[a-z]{2,20}$/i", $page)) die('page name contains unallowed chars.');

interface/web/index.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@
3131
require_once '../lib/config.inc.php';
3232
require_once '../lib/app.inc.php';
3333

34-
if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = 'login';
34+
// Check if we have an active users ession and redirect to login if thats not the case.
35+
if($_SESSION['s']['user']['active'] != 1) {
36+
header('Location: /login/');
37+
die();
38+
}
39+
40+
if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = 'dashboard';
3541

3642
$app->uses('tpl');
3743
$app->tpl->newTemplate('main.tpl.htm');

interface/web/login/index.php

Lines changed: 290 additions & 291 deletions
Large diffs are not rendered by default.

interface/web/login/lib/lang/ar.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $wb['pw_error_noinput'] = 'Please enter email address and username.';
1010
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
1111
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.';
1212
$wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
13-
$wb['pw_error_length'] = 'The password length is > 64 characters.';
13+
$wb['pw_error_length'] = 'The password length is < 1 or > 64 characters.';
1414
$wb['username_txt'] = 'Username';
1515
$wb['password_txt'] = 'Password';
1616
$wb['login_button_txt'] = 'Login';

interface/web/login/lib/lang/bg.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $wb['pw_error_noinput'] = 'Моля въведете потребителско
66
$wb['pw_reset_mail_msg'] = 'Новата парола за вашия ISPConfig 3 контролен панел е:';
77
$wb['pw_reset_mail_title'] = 'Нова парола за вашия ISPConfig 3 контролен панел';
88
$wb['user_regex_error'] = 'Потребителско име contains unallowed characters or is longer then 64 characters.';
9-
$wb['pw_error_length'] = 'The password length is > 64 characters.';
9+
$wb['pw_error_length'] = 'The password length is < 1 or > 64 characters.';
1010
$wb['error_user_password_empty'] = 'Потребителско име or Password empty.';
1111
$wb['error_user_password_incorrect'] = 'Потребителско име or Password wrong.';
1212
$wb['error_user_blocked'] = 'User is blocked.';

interface/web/login/lib/lang/br.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $wb['pw_error'] = 'Nome de usuário ou correio eletrônico não coincidem.';
99
$wb['pw_error_noinput'] = 'Favor informar nome de usuário e endereço de correio válidos.';
1010
$wb['pw_reset_mail_msg'] = 'Sua senha do painel de controle foi restabelecida. A sua nova senha é: ';
1111
$wb['pw_reset_mail_title'] = 'Sua senha do painel de controle foi restabelecida.';
12-
$wb['user_regex_error'] = 'O nome de usuário contém mais de 64 caracteres ou contém caracteres inválidos.';
12+
$wb['user_regex_error'] = 'O nome de usuário contém < 1 or mais de 64 caracteres ou contém caracteres inválidos.';
1313
$wb['pw_error_length'] = 'Tamanho da senha não pode ser maior do que 64 caracteres.';
1414
$wb['username_txt'] = 'Usuário';
1515
$wb['password_txt'] = 'Senha';

interface/web/login/lib/lang/de.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $wb['pw_error_noinput'] = 'Bitte geben Sie Ihre E-Mail Adresse und Ihren Benutze
1010
$wb['pw_reset_mail_msg'] = 'Das Passwort wurde zurückgesetzt. Das neue Passwort lautet: ';
1111
$wb['pw_reset_mail_title'] = 'Ihr Passwort wurde zurückgesetzt.';
1212
$wb['user_regex_error'] = 'Benutzername beinhaltet nicht erlaubte Zeichen oder ist länger als 64 Zeichen.';
13-
$wb['pw_error_length'] = 'Die Passwortlänge ist > 64 Zeichen.';
13+
$wb['pw_error_length'] = 'Die Passwortlänge ist < 1 oder > 64 Zeichen.';
1414
$wb['login_txt'] = 'Anmelden';
1515
$wb['username_txt'] = 'Benutzername';
1616
$wb['password_txt'] = 'Passwort';

interface/web/login/lib/lang/en.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $wb['pw_error_noinput'] = 'Please enter email address and username.';
1010
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
1111
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.';
1212
$wb['user_regex_error'] = 'Username contains unallowed characters or is longer than 64 characters.';
13-
$wb['pw_error_length'] = 'The password length is > 64 characters.';
13+
$wb['pw_error_length'] = 'The password length is < 1 or > 64 characters.';
1414
$wb['email_error'] = 'Email contains unallowed characters or has a invalid format.';
1515
$wb['login_txt'] = "Login";
1616
$wb['username_txt'] = "Username";

interface/web/login/login_as.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@
9292
'.$wb['login_2_txt'].'<br />
9393
<div style="visibility:hidden">
9494
<input type="text" name="username" value="' . $dbData['username'] . '" />
95-
<input type="password" name="passwort" value="' . $dbData['passwort'] .'" />
95+
<input type="password" name="password" value="' . $dbData['passwort'] .'" />
9696
</div>
97-
<input type="hidden" name="s_mod" value="login" />
98-
<input type="hidden" name="s_pg" value="index" />
97+
<input type="hidden" name="s_mod" value="dashboard" />
98+
<input type="hidden" name="s_pg" value="dashboard" />
99+
<input type="hidden" name="login_as" value="1" />
99100
<div class="wf_actions buttons">
100-
<button class="positive iconstxt icoPositive" type="button" value="'.$wb['btn_yes_txt'].'" onclick="submitLoginForm(' . "'pageForm'" . ');"><span>'.$wb['btn_yes_txt'].'</span></button>
101+
<button class="positive iconstxt icoPositive" type="button" value="'.$wb['btn_yes_txt'].'" data-submit-form="pageForm" data-form-action="/login/index.php"><span>'.$wb['btn_yes_txt'].'</span></button>
101102
<button class="negative iconstxt icoNegative" type="button" value="'.$wb['btn_back_txt'].'" data-load-content="'.$backlink.'"><span>'.$wb['btn_back_txt'].'</span></button>
102103
</div>
103104
';

interface/web/login/logout.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@
5050
'.str_replace('{UTYPE}', $utype, $wb['login_as_or_logout_txt']).'<br />
5151
<div style="visibility:hidden">
5252
<input type="text" name="username" value="' . $_SESSION['s_old']['user']['username'] . '" />
53-
<input type="password" name="passwort" value="' . $_SESSION['s_old']['user']['passwort'] .'" />
53+
<input type="password" name="password" value="' . $_SESSION['s_old']['user']['passwort'] .'" />
5454
</div>
5555
<input type="hidden" name="s_mod" value="login" />
5656
<input type="hidden" name="s_pg" value="index" />
57+
<input type="hidden" name="login_as" value="1" />
5758
<div class="wf_actions buttons">
58-
<button class="positive iconstxt icoPositive" type="button" value="Yes, re-login as ' . $utype . '" onclick="submitLoginForm(' . "'pageForm'" . ');"><span>Yes, re-login as ' . $utype . '</span></button>
59+
<button class="positive iconstxt icoPositive" type="button" value="Yes, re-login as ' . $utype . '" data-submit-form="pageForm" data-form-action="/login/index.php"><span>Yes, re-login as ' . $utype . '</span></button>
5960
<button class="negative iconstxt icoNegative" type="button" value="No, logout" data-load-content="login/logout.php?l=1"><span>No, logout</span></button>
6061
</div>
6162
';

0 commit comments

Comments
 (0)