template.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. require_once('localization.php');
  3. require_once('var.php');
  4. //inclUde('lang/'.$lang.'/change_pw.php');
  5. /* inizio comune della pagina */
  6. function printHead($title_page) {
  7. ?>
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv='content-type' content='text/html;charset=utf-8'>
  12. <title><?php echo sprintf(_("Tool to change %s password"), $title_page); ?></title>
  13. <link rel='stylesheet' type='text/css' href='https://www.indivia.net/res/css/global.css'>
  14. <link rel='stylesheet' type='text/css' href='res/css/strenght_box.css'>
  15. <link rel='stylesheet' type='text/css' href='res/css/default.css'>
  16. <link rel="stylesheet" type="text/css" href="res/css/keyboard.css">
  17. <script type="text/javascript" src="res/js/keyboard.js"></script>
  18. <script type='text/javascript' src='res/js/pwdStrength.js'></script>
  19. <script type='text/javascript' src='res/js/visibility.js'></script>
  20. </head>
  21. <body>
  22. <?php
  23. }
  24. function printTitle($title) { ?>
  25. <div id="chpw-hb" class='homebox'>
  26. <h1>
  27. <?php echo sprintf(_("Change your %s account password"),$title); ?>
  28. </h1>
  29. <br>
  30. <?php
  31. }
  32. /* crea il form */
  33. function printForm($user, $cosa, $lang) {?>
  34. <form name='chpw' method='post' autocomplete='off' action='<?php echo $cosa; ?>.php'>
  35. <table class='formtable'>
  36. <tr>
  37. <td><?php echo sprintf(_("%s:"), $user); ?></td>
  38. <td>
  39. <input type='text' name='user' class='keyboardInput'>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td><?php echo _("Old password:") ?></td>
  44. <td><input type='password' name='opwd' class="keyboardInput"></td>
  45. </tr>
  46. <tr>
  47. <td><?php echo _("New password:") ?></td>
  48. <td>
  49. <input id='nuovapassword' type='password' name='npwd' class='keyboardInput' onkeyup="testPassword(document.forms.chpw.nuovapassword.value)">
  50. </td>
  51. </tr>
  52. <tr>
  53. <td><?php echo _("Retype:") ?></td>
  54. <td>
  55. <input type='password' name='npwd2'class='keyboardInput'>
  56. </td>
  57. </tr>
  58. </table>
  59. <div style='text-align: center'>
  60. <input type='hidden' name='vsSpammer' value=''>
  61. <input type='hidden' name='ph' value='1'>
  62. <input type='hidden' name='lang' value='<?php echo $lang ?>'>
  63. <input type='submit' id='formSubmit' value='Vai' class='gobutton' disabled='disabled'>
  64. </div>
  65. </form>
  66. <br>
  67. <div id='Words-box'>
  68. <div id='help-box'>
  69. <a href='#' title='<? echo _("How to chose a password"); ?>' onclick="changeDisplay('helper');return false;">
  70. <img src="res/images/pi-3d.png" alt="Help">
  71. </a>
  72. </div>
  73. </div>
  74. <?php
  75. }
  76. function printMessage($msg) { ?>
  77. <p class="msg">
  78. <?php echo sprintf(_("%s"),$msg); ?>
  79. </p>
  80. <?php
  81. }
  82. function printFooter(){ ?>
  83. </div>
  84. <?php printPasswordHelper(); ?>
  85. </body></html>
  86. <?php
  87. }
  88. function printPasswordHelper(){
  89. ?>
  90. <div id='helper' style='display:none'>
  91. <div>
  92. <ul>
  93. <li>Lunghezza (x):
  94. <ul>
  95. <li><?php echo '1 < x < 6 = 4 punti'?></li>
  96. <li><?php echo '7 < x < 11 = 10 punti' ?></li>
  97. <li><?php echo 'x > 12 = 18 punti' ?></li>
  98. </ul></li>
  99. <li>minuscole/MAIUSCOLE:
  100. <ul>
  101. <li>Lettere tutte minuscole = 1 punto</li>
  102. <li>Lettere mixate = 3 punti</li>
  103. </ul></li>
  104. <li>Numeri:
  105. <ul>
  106. <li>Un numero = 3 punti</li>
  107. <li>3 o piu' numeri = 5 punti</li>
  108. </ul></li>
  109. <li>Caratteri speciali:
  110. <ul>
  111. <li>Un carattere speciale =5 punti </li>
  112. <li>Piu' caratteri speciali = 7 punti</li>
  113. </ul></li>
  114. <li>Combinazioni:
  115. <ul>
  116. <li>Lettere mixate = 2 punti</li>
  117. <li>Lettere mixate e numeri = 2 punti</li>
  118. <li>Lettere mixate, numeri e caratteri speciali = 2 punti</li>
  119. </ul></li>
  120. </ul>
  121. </div>
  122. </div>
  123. <?php
  124. }
  125. ?>