Commit f6812227 authored by tbrehm's avatar tbrehm
Browse files

Changed default encryption method for ispconfig controlpanel users from md5 to crypt-md5.

parent 7b56208b
...@@ -158,6 +158,7 @@ $form['tabs']['users'] = array ( ...@@ -158,6 +158,7 @@ $form['tabs']['users'] = array (
'passwort' => array ( 'passwort' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD', 'formtype' => 'PASSWORD',
'encryption'=> 'CRYPT',
'regex' => '', 'regex' => '',
'errmsg' => '', 'errmsg' => '',
'default' => '', 'default' => '',
......
...@@ -119,7 +119,7 @@ $form["tabs"]['address'] = array ( ...@@ -119,7 +119,7 @@ $form["tabs"]['address'] = array (
'password' => array ( 'password' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD', 'formtype' => 'PASSWORD',
'encryption'=> 'MD5', 'encryption'=> 'CRYPT',
'default' => '', 'default' => '',
'value' => '', 'value' => '',
'separator' => '', 'separator' => '',
......
...@@ -58,8 +58,8 @@ class login_index { ...@@ -58,8 +58,8 @@ class login_index {
if(count($_POST) > 0) { if(count($_POST) > 0) {
//** Check variables //** Check variables
if(!preg_match("/^[\w\.\-\_]{1,64}$/", $_POST['username'])) $error = 'Username contains unallowed characters or is longer then 64 characters.'; if(!preg_match("/^[\w\.\-\_]{1,64}$/", $_POST['username'])) $error = $app->lng('user_regex_error');
if(!preg_match("/^.{1,64}$/i", $_POST['passwort'])) $error = 'The password length is > 64 characters.'; if(!preg_match("/^.{1,64}$/i", $_POST['passwort'])) $error = $app->lng('pw_error_length');
//** iporting variables //** iporting variables
$ip = $app->db->quote(ip2long($_SERVER['REMOTE_ADDR'])); $ip = $app->db->quote(ip2long($_SERVER['REMOTE_ADDR']));
...@@ -105,10 +105,29 @@ class login_index { ...@@ -105,10 +105,29 @@ class login_index {
} else { } else {
if ($loginAs){ if ($loginAs){
$sql = "SELECT * FROM sys_user WHERE USERNAME = '$username' and PASSWORT = '". $passwort. "'"; $sql = "SELECT * FROM sys_user WHERE USERNAME = '$username' and PASSWORT = '". $passwort. "'";
$user = $app->db->queryOneRecord($sql);
} else { } else {
$sql = "SELECT * FROM sys_user WHERE USERNAME = '$username' and ( PASSWORT = '".md5($passwort)."' or PASSWORT = password('$passwort') )"; $sql = "SELECT * FROM sys_user WHERE USERNAME = '$username'";
$user = $app->db->queryOneRecord($sql);
if($user && $user['active'] == 1) {
$saved_password = stripslashes($user['passwort']);
if(substr($saved_password,0,3) == '$1$') {
//* The password is crypt-md5 encrypted
$salt = '$1$'.substr($saved_password,3,8).'$';
if(crypt($passwort,$salt) != $saved_password) {
$user = false;
}
} else {
//* The password is md5 encrypted
if(md5($passwort) != $saved_password) {
$user = false;
}
}
} else {
$user = false;
}
} }
$user = $app->db->queryOneRecord($sql);
if($user) { if($user) {
if($user['active'] == 1) { if($user['active'] == 1) {
// User login right, so attempts can be deleted // User login right, so attempts can be deleted
......
<?php <?php
$wb[1001] = "Username or Password empty."; $wb[1001] = "Username or Password empty.";
$wb[1002] = "Username or Password wrong."; $wb[1002] = "Username or Password wrong.";
$wb[1003] = "User is blocked."; $wb[1003] = "User is blocked.";
$wb[1004] = "To many wrong login's, Please retry it after 15 minutes"; $wb[1004] = "To many wrong login's, Please retry it after 15 minutes";
$wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.'; $wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.';
$wb['pw_reset'] = 'The password has been reset and send to your email address.'; $wb['pw_reset'] = 'The password has been reset and send to your email address.';
$wb['pw_error'] = 'Username or email address does not match.'; $wb['pw_error'] = 'Username or email address does not match.';
$wb['pw_error_noinput'] = 'Please enter email address and username.'; $wb['pw_error_noinput'] = 'Please enter email address and username.';
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: '; $wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.'; $wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.';
$wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
$wb['pw_error_length'] = 'The password length is > 64 characters.';
?> ?>
\ No newline at end of file
<?php <?php
$wb['1001'] = 'Usuario o contraseña vacíos.'; $wb['1001'] = 'Usuario o contraseña vacíos.';
$wb['1002'] = 'Usuario o contraseña incorrectos.'; $wb['1002'] = 'Usuario o contraseña incorrectos.';
$wb['1003'] = 'El usuario está bloqueado'; $wb['1003'] = 'El usuario está bloqueado';
$wb['1004'] = 'Demasiados intentos erroneos, por favor, inténtelo dentro de 15 minutos.'; $wb['1004'] = 'Demasiados intentos erroneos, por favor, inténtelo dentro de 15 minutos.';
$wb['pass_reset_txt'] = 'Se generará una nueva contraseña que se le enviará a la cuenta de correo que tiene configurada.'; $wb['pass_reset_txt'] = 'Se generará una nueva contraseña que se le enviará a la cuenta de correo que tiene configurada.';
$wb['pw_reset'] = 'La contraseña ha sido reseteada y enviada a su cuenta de correo.'; $wb['pw_reset'] = 'La contraseña ha sido reseteada y enviada a su cuenta de correo.';
$wb['pw_error'] = 'El usuario o la cuenta de correo no coinciden.'; $wb['pw_error'] = 'El usuario o la cuenta de correo no coinciden.';
$wb['pw_error_noinput'] = 'Por favor, introduzca la dirección de correo y el nombre de usuario.'; $wb['pw_error_noinput'] = 'Por favor, introduzca la dirección de correo y el nombre de usuario.';
$wb['pw_reset_mail_msg'] = 'La contraseña de su cuenta de panel de control ISPConfig 3 ha sido reseteada. La nueva contraseña es: '; $wb['pw_reset_mail_msg'] = 'La contraseña de su cuenta de panel de control ISPConfig 3 ha sido reseteada. La nueva contraseña es: ';
$wb['pw_reset_mail_title'] = 'La contraseña del panel de control ISPConfig 3 ha sido reseteada.'; $wb['pw_reset_mail_title'] = 'La contraseña del panel de control ISPConfig 3 ha sido reseteada.';
?> $wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
$wb['pw_error_length'] = 'The password length is > 64 characters.';
?>
<?php <?php
$wb['1001'] = 'Nom dutilisateur ou mot de passe vide.'; $wb['1001'] = 'Nom dutilisateur ou mot de passe vide.';
$wb['1002'] = 'Nom dutilisateur ou mot de passe faux.'; $wb['1002'] = 'Nom dutilisateur ou mot de passe faux.';
$wb['1003'] = 'Utilisateur bloqu.'; $wb['1003'] = 'Utilisateur bloqu.';
$wb['1004'] = 'To many wrong logins, Please retry it after 15 minutes'; $wb['1004'] = 'To many wrong logins, Please retry it after 15 minutes';
$wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.'; $wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.';
$wb['pw_reset'] = 'The password has been reset and send to your email address.'; $wb['pw_reset'] = 'The password has been reset and send to your email address.';
$wb['pw_error'] = 'Username or email address does not match.'; $wb['pw_error'] = 'Username or email address does not match.';
$wb['pw_error_noinput'] = 'Please enter email address and username.'; $wb['pw_error_noinput'] = 'Please enter email address and username.';
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: '; $wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.'; $wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.';
?> $wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
$wb['pw_error_length'] = 'The password length is > 64 characters.';
?>
<?php <?php
$wb['1001'] = 'Nome utente o Password vuoti.'; $wb['1001'] = 'Nome utente o Password vuoti.';
$wb['1002'] = 'Nome utente o Password errati.'; $wb['1002'] = 'Nome utente o Password errati.';
$wb['1003'] = 'Utente bloccato.'; $wb['1003'] = 'Utente bloccato.';
$wb['1004'] = 'Troppi tentativi di login errati, Riprova tra 15 minuti'; $wb['1004'] = 'Troppi tentativi di login errati, Riprova tra 15 minuti';
$wb['pass_reset_txt'] = 'Una nuova password sarà generata e spedita alla tua email se l`email inserita corrisponde a quella delle impostazioni dell`utente.'; $wb['pass_reset_txt'] = 'Una nuova password sarà generata e spedita alla tua email se l`email inserita corrisponde a quella delle impostazioni dell`utente.';
$wb['pw_reset'] = 'La password è stata reimpostata e spedita al tuo indirizzo mail.'; $wb['pw_reset'] = 'La password è stata reimpostata e spedita al tuo indirizzo mail.';
$wb['pw_error'] = 'Nome utente o email non corrispondenti.'; $wb['pw_error'] = 'Nome utente o email non corrispondenti.';
$wb['pw_error_noinput'] = 'Inserisci nome utente e indirizzo email.'; $wb['pw_error_noinput'] = 'Inserisci nome utente e indirizzo email.';
$wb['pw_reset_mail_msg'] = 'La password nel tuo pannello di controllo ISPConfig 3 è stata reimpostata. La nuova password è: '; $wb['pw_reset_mail_msg'] = 'La password nel tuo pannello di controllo ISPConfig 3 è stata reimpostata. La nuova password è: ';
$wb['pw_reset_mail_title'] = 'Password del pannello di controllo ISPConfig 3 reimpostata.'; $wb['pw_reset_mail_title'] = 'Password del pannello di controllo ISPConfig 3 reimpostata.';
?> $wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
$wb['pw_error_length'] = 'The password length is > 64 characters.';
?>
<?php <?php
$wb['1001'] = 'Gebruikersnaam of wachtwoord is leeg.'; $wb['1001'] = 'Gebruikersnaam of wachtwoord is leeg.';
$wb['1002'] = 'Gebruikersnaam of wachtwoord ongeldig.'; $wb['1002'] = 'Gebruikersnaam of wachtwoord ongeldig.';
$wb['1003'] = 'Gebruiker is geblokkeerd.'; $wb['1003'] = 'Gebruiker is geblokkeerd.';
$wb['1004'] = 'Teveel ongeldige login pogingen, Probeer het na 15 minuten opnieuw.'; $wb['1004'] = 'Teveel ongeldige login pogingen, Probeer het na 15 minuten opnieuw.';
$wb['pass_reset_txt'] = 'Een nieuw wachtwoord zal worden gegenereerd en na het hierboven ingevulde Emailadres worden gestuurd, op voorwaarde dat het Emailadres overeenkomt met het Emailadres in uw klanten-settings'; $wb['pass_reset_txt'] = 'Een nieuw wachtwoord zal worden gegenereerd en na het hierboven ingevulde Emailadres worden gestuurd, op voorwaarde dat het Emailadres overeenkomt met het Emailadres in uw klanten-settings';
$wb['pw_reset'] = 'Het wachtwoord is gereset en is verzonden aan uw Emailadres.'; $wb['pw_reset'] = 'Het wachtwoord is gereset en is verzonden aan uw Emailadres.';
$wb['pw_error'] = 'Gebruikersnaam of Emailadres komen niet overeen.'; $wb['pw_error'] = 'Gebruikersnaam of Emailadres komen niet overeen.';
$wb['pw_error_noinput'] = 'Voer a.u.b. uw Emailadres en gebruikersnaam in.'; $wb['pw_error_noinput'] = 'Voer a.u.b. uw Emailadres en gebruikersnaam in.';
$wb['pw_reset_mail_msg'] = 'Het wachtwoord dat toegang biedt tot ISPConfig 3 is gereset. Het nieuwe wachtwoord is: '; $wb['pw_reset_mail_msg'] = 'Het wachtwoord dat toegang biedt tot ISPConfig 3 is gereset. Het nieuwe wachtwoord is: ';
$wb['pw_reset_mail_title'] = 'Het wachtwoord dat toegang biedt tot ISPConfig 3 is gereset.'; $wb['pw_reset_mail_title'] = 'Het wachtwoord dat toegang biedt tot ISPConfig 3 is gereset.';
?> $wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
$wb['pw_error_length'] = 'The password length is > 64 characters.';
?>
<?php <?php
$wb['1001'] = 'Anvndarnamn eller Lsenord r tomt.'; $wb['1001'] = 'Anvndarnamn eller Lsenord r tomt.';
$wb['1002'] = 'Felaktigt Anvndarnamn eller Lsenord.'; $wb['1002'] = 'Felaktigt Anvndarnamn eller Lsenord.';
$wb['1003'] = 'Anvndaren r sprrad.'; $wb['1003'] = 'Anvndaren r sprrad.';
$wb['1004'] = 'To many wrong logins, Please retry it after 15 minutes'; $wb['1004'] = 'To many wrong logins, Please retry it after 15 minutes';
$wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.'; $wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.';
$wb['pw_reset'] = 'The password has been reset and send to your email address.'; $wb['pw_reset'] = 'The password has been reset and send to your email address.';
$wb['pw_error'] = 'Username or email address does not match.'; $wb['pw_error'] = 'Username or email address does not match.';
$wb['pw_error_noinput'] = 'Please enter email address and username.'; $wb['pw_error_noinput'] = 'Please enter email address and username.';
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: '; $wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.'; $wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.';
?> $wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';
$wb['pw_error_length'] = 'The password length is > 64 characters.';
?>
<?php <?php
/* /*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors * Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without may be used to endorse or promote products derived from this software without
specific prior written permission. specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once('../../lib/config.inc.php'); require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php'); require_once('../../lib/app.inc.php');
// Loading the template // Loading the template
$app->uses('tpl'); $app->uses('tpl');
$app->tpl->newTemplate("form.tpl.htm"); $app->tpl->newTemplate("form.tpl.htm");
$app->tpl->setInclude('content_tpl','templates/password_reset.htm'); $app->tpl->setInclude('content_tpl','templates/password_reset.htm');
$app->tpl_defaults(); $app->tpl_defaults();
include(ISPC_ROOT_PATH.'/web/login/lib/lang/'.$_SESSION['s']['language'].'.lng'); include(ISPC_ROOT_PATH.'/web/login/lib/lang/'.$_SESSION['s']['language'].'.lng');
$app->tpl->setVar($wb); $app->tpl->setVar($wb);
if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != '' && $_POST['username'] != 'admin') { if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != '' && $_POST['username'] != 'admin') {
$username = $app->db->quote($_POST['username']); if(!preg_match("/^[\w\.\-\_]{1,64}$/", $_POST['username'])) die($app->lng('user_regex_error'));
$email = $app->db->quote($_POST['email']); if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $_POST['email'])) die($app->lng('email_error'));
$client = $app->db->queryOneRecord("SELECT * FROM client WHERE username = '$username' && email = '$email'"); $username = $app->db->quote($_POST['username']);
$email = $app->db->quote($_POST['email']);
if($client['client_id'] > 0) {
$new_password = md5 (uniqid (rand())); $client = $app->db->queryOneRecord("SELECT * FROM client WHERE username = '$username' AND email = '$email'");
$new_password = $app->db->quote($new_password);
$username = $app->db->quote($client['username']); if($client['client_id'] > 0) {
$app->db->query("UPDATE sys_user SET passwort = md5('$new_password') WHERE username = '$username'"); $new_password = md5 (uniqid (rand()));
$app->db->query("UPDATE client SET ´password´ = md5('$new_password') WHERE username = '$username'"); $salt="$1$";
$app->tpl->setVar("message",$wb['pw_reset']); for ($n=0;$n<11;$n++) {
$salt.=chr(mt_rand(64,126));
mail($client['email'],$wb['pw_reset_mail_title'],$wb['pw_reset_mail_msg'].$new_password); }
$salt.="$";
} else { $new_password_encrypted = crypt($new_password,$salt);
$app->tpl->setVar("message",$wb['pw_error']); $new_password_encrypted = $app->db->quote($new_password_encrypted);
}
$username = $app->db->quote($client['username']);
} else { $app->db->query("UPDATE sys_user SET passwort = '$new_password_encrypted' WHERE username = '$username'");
$app->tpl->setVar("message",$wb['pw_error_noinput']); $app->db->query("UPDATE client SET ´password´ = '$new_password_encrypted' WHERE username = '$username'");
} $app->tpl->setVar("message",$wb['pw_reset']);
mail($client['email'],$wb['pw_reset_mail_title'],$wb['pw_reset_mail_msg'].$new_password);
$app->tpl_defaults(); } else {
$app->tpl->pparse(); $app->tpl->setVar("message",$wb['pw_error']);
}
} else {
$app->tpl->setVar("message",$wb['pw_error_noinput']);
}
$app->tpl_defaults();
$app->tpl->pparse();
?> ?>
\ No newline at end of file
<?php <?php
/* /*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors * Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without may be used to endorse or promote products derived from this software without
specific prior written permission. specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/* /*
Form Definition Form Definition
Tabellendefinition Tabellendefinition
Datentypen: Datentypen:
- INTEGER (Wandelt Ausdr�cke in Int um) - INTEGER (Wandelt Ausdr�cke in Int um)
- DOUBLE - DOUBLE
- CURRENCY (Formatiert Zahlen nach W�hrungsnotation) - CURRENCY (Formatiert Zahlen nach W�hrungsnotation)
- VARCHAR (kein weiterer Format Check) - VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check) - TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung) - DATE (Datumsformat, Timestamp Umwandlung)
Formtype: Formtype:
- TEXT (normales Textfeld) - TEXT (normales Textfeld)
- TEXTAREA (normales Textfeld) - TEXTAREA (normales Textfeld)
- PASSWORD (Feldinhalt wird nicht angezeigt) - PASSWORD (Feldinhalt wird nicht angezeigt)
- SELECT (Gibt Werte als option Feld aus) - SELECT (Gibt Werte als option Feld aus)
- RADIO - RADIO
- CHECKBOX - CHECKBOX
- CHECKBOXARRAY - CHECKBOXARRAY
- FILE - FILE
VALUE: VALUE:
- Wert oder Array - Wert oder Array
Hinweis: Hinweis:
Das ID-Feld ist nicht bei den Table Values einzuf�gen. Das ID-Feld ist nicht bei den Table Values einzuf�gen.
*/ */
$form['title'] = 'User Settings'; $form['title'] = 'User Settings';
$form['description'] = 'Form to edit the user password and language.'; $form['description'] = 'Form to edit the user password and language.';
$form['name'] = 'usersettings'; $form['name'] = 'usersettings';
$form['action'] = 'user_settings.php'; $form['action'] = 'user_settings.php';
$form['db_table'] = 'sys_user'; $form['db_table'] = 'sys_user';
$form['db_table_idx'] = 'userid'; $form['db_table_idx'] = 'userid';
$form["db_history"] = "no"; $form["db_history"] = "no";
$form['tab_default'] = 'users'; $form['tab_default'] = 'users';
$form['list_default'] = 'index.php'; $form['list_default'] = 'index.php';
$form['auth'] = 'no'; $form['auth'] = 'no';
//* 0 = id of the user, > 0 id must match with id of current user //* 0 = id of the user, > 0 id must match with id of current user
$form['auth_preset']['userid'] = 0; $form['auth_preset']['userid'] = 0;
//* 0 = default groupid of the user, > 0 id must match with groupid of current user //* 0 = default groupid of the user, > 0 id must match with groupid of current user
$form['auth_preset']['groupid'] = 0; $form['auth_preset']['groupid'] = 0;
//** Permissions are: r = read, i = insert, u = update, d = delete //** Permissions are: r = read, i = insert, u = update, d = delete
$form['auth_preset']['perm_user'] = 'riud'; $form['auth_preset']['perm_user'] = 'riud';
$form['auth_preset']['perm_group'] = 'riud'; $form['auth_preset']['perm_group'] = 'riud';
$form['auth_preset']['perm_other'] = ''; $form['auth_preset']['perm_other'] = '';
//* Languages //* Languages
$language_list = array(); $language_list = array();
$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang'); $handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
while ($file = @readdir ($handle)) { while ($file = @readdir ($handle)) {
if ($file != '.' && $file != '..') { if ($file != '.' && $file != '..') {
if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') { if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') {
$tmp = substr($file, 0, 2); $tmp = substr($file, 0, 2);
$language_list[$tmp] = $tmp; $language_list[$tmp] = $tmp;
} }
} }
} }
$form['tabs']['users'] = array ( $form['tabs']['users'] = array (
'title' => 'Settings', 'title' => 'Settings',
'width' => 80, 'width' => 80,
'template' => 'templates/user_settings.htm', 'template' => 'templates/user_settings.htm',
'fields' => array ( 'fields' => array (
################################## ##################################
# Beginn Datenbankfelder # Beginn Datenbankfelder
################################## ##################################
'passwort' => array ( 'passwort' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD', 'formtype' => 'PASSWORD',
'regex' => '', 'encryption'=> 'CRYPT',
'errmsg' => '', 'regex' => '',
'default' => '', 'errmsg' => '',
'value' => '', 'default' => '',
'separator' => '',