132 lines
3.5 KiB
PHP
132 lines
3.5 KiB
PHP
<?php
|
|
require_once('localization.php');
|
|
require_once('var.php');
|
|
//inclUde('lang/'.$lang.'/change_pw.php');
|
|
|
|
/* inizio comune della pagina */
|
|
function printHead($title_page) {
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv='content-type' content='text/html;charset=utf-8'>
|
|
<title><?php echo sprintf(_("Tool to change %s password"), $title_page); ?></title>
|
|
<link rel='stylesheet' type='text/css' href='https://www.indivia.net/res/css/global.css'>
|
|
<link rel='stylesheet' type='text/css' href='res/css/strenght_box.css'>
|
|
<link rel='stylesheet' type='text/css' href='res/css/default.css'>
|
|
<link rel="stylesheet" type="text/css" href="res/css/keyboard.css">
|
|
<script type="text/javascript" src="res/js/keyboard.js"></script>
|
|
<script type='text/javascript' src='res/js/pwdStrength.js'></script>
|
|
<script type='text/javascript' src='res/js/visibility.js'></script>
|
|
</head>
|
|
<body>
|
|
<?php
|
|
}
|
|
|
|
function printTitle($title) { ?>
|
|
|
|
<div id="chpw-hb" class='homebox'>
|
|
<h1>
|
|
<?php echo sprintf(_("Change your %s account password"),$title); ?>
|
|
</h1>
|
|
<br>
|
|
<?php
|
|
}
|
|
|
|
/* crea il form */
|
|
function printForm($user, $cosa, $lang) {?>
|
|
<form name='chpw' method='post' autocomplete='off' action='<?php echo $cosa; ?>.php'>
|
|
<table class='formtable'>
|
|
<tr>
|
|
<td><?php echo sprintf(_("%s:"), $user); ?></td>
|
|
<td>
|
|
<input type='text' name='user' class='keyboardInput'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php echo _("Old password:") ?></td>
|
|
<td><input type='password' name='opwd' class="keyboardInput"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php echo _("New password:") ?></td>
|
|
<td>
|
|
<input id='nuovapassword' type='password' name='npwd' class='keyboardInput' onkeyup="testPassword(document.forms.chpw.nuovapassword.value)">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php echo _("Retype:") ?></td>
|
|
<td>
|
|
<input type='password' name='npwd2'class='keyboardInput'>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div style='text-align: center'>
|
|
<input type='hidden' name='vsSpammer' value=''>
|
|
<input type='hidden' name='ph' value='1'>
|
|
<input type='hidden' name='lang' value='<?php echo $lang ?>'>
|
|
<input type='submit' id='formSubmit' value='Vai' class='gobutton' disabled='disabled'>
|
|
</div>
|
|
</form>
|
|
<br>
|
|
<div id='Words-box'>
|
|
<div id='help-box'>
|
|
<a href='#' title='<? echo _("How to chose a password"); ?>' onclick="changeDisplay('helper');return false;">
|
|
<img src="res/images/pi-3d.png" alt="Help">
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
|
|
function printMessage($msg) { ?>
|
|
<p class="msg">
|
|
<?php echo sprintf(_("%s"),$msg); ?>
|
|
</p>
|
|
<?php
|
|
}
|
|
|
|
function printFooter(){ ?>
|
|
</div>
|
|
<?php printPasswordHelper(); ?>
|
|
</body></html>
|
|
<?php
|
|
}
|
|
|
|
function printPasswordHelper(){
|
|
?>
|
|
<div id='helper' style='display:none'>
|
|
<div>
|
|
<ul>
|
|
<li>Lunghezza (x):
|
|
<ul>
|
|
<li><?php echo '1 < x < 6 = 4 punti'?></li>
|
|
<li><?php echo '7 < x < 11 = 10 punti' ?></li>
|
|
<li><?php echo 'x > 12 = 18 punti' ?></li>
|
|
</ul></li>
|
|
<li>minuscole/MAIUSCOLE:
|
|
<ul>
|
|
<li>Lettere tutte minuscole = 1 punto</li>
|
|
<li>Lettere mixate = 3 punti</li>
|
|
</ul></li>
|
|
<li>Numeri:
|
|
<ul>
|
|
<li>Un numero = 3 punti</li>
|
|
<li>3 o piu' numeri = 5 punti</li>
|
|
</ul></li>
|
|
<li>Caratteri speciali:
|
|
<ul>
|
|
<li>Un carattere speciale =5 punti </li>
|
|
<li>Piu' caratteri speciali = 7 punti</li>
|
|
</ul></li>
|
|
<li>Combinazioni:
|
|
<ul>
|
|
<li>Lettere mixate = 2 punti</li>
|
|
<li>Lettere mixate e numeri = 2 punti</li>
|
|
<li>Lettere mixate, numeri e caratteri speciali = 2 punti</li>
|
|
</ul></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|