Add line returns to generated HTML code
This commit is contained in:
		| @@ -36,9 +36,9 @@ $user = (isset($_POST['user'])) ? $_POST['user'] : ""; | ||||
| <?php | ||||
|     global $user; | ||||
| if ($user == "") | ||||
|     echo "<title>gPass : global Password</title>"; | ||||
|     echo "<title>gPass : global Password</title>\n"; | ||||
| else | ||||
|     echo "<title>gPass : global Password - $user</title>"; | ||||
|     echo "<title>gPass : global Password - $user</title>\n"; | ||||
| ?> | ||||
| </head> | ||||
| <body> | ||||
| @@ -85,10 +85,10 @@ $count = 0; | ||||
|     } | ||||
|  | ||||
| if ($count == 0) | ||||
|     echo "<b>No user found</b><br/>"; | ||||
|     echo "<b>No user found</b><br/>\n"; | ||||
| else | ||||
| { | ||||
|     echo '<b>User</b> <select name="user">'; | ||||
|     echo '<b>User</b> <select name="user">' . "\n"; | ||||
|     foreach($users as $u) | ||||
|     { | ||||
|         if (is_dir("./users/" . $u) && $u[0] != '_' && $u[0] != '.') | ||||
| @@ -100,8 +100,8 @@ else | ||||
|                 echo "<option value=\"$u\"/>$u</option>"; | ||||
|         } | ||||
|     } | ||||
|         echo "</select>"; | ||||
|     echo '  <b>Master key </b> <input type="password" name="mkey"/> <input name="list" type="submit" value="See"/>'; | ||||
|         echo "</select>\n"; | ||||
|     echo '  <b>Master key </b> <input type="password" name="mkey"/> <input name="list" type="submit" value="See"/>' . "\n"; | ||||
| } | ||||
| ?> | ||||
| </form> | ||||
| @@ -116,11 +116,11 @@ if ($user != "") | ||||
|     $nb_unciphered = 0; | ||||
|     list($nb_ciphered, $entries) = list_entries($user, $mkey); | ||||
|  | ||||
|     echo "<b>" . (count($entries) - $nb_ciphered) . " unciphered password(s)</b><br/>"; | ||||
|     echo "<b>" . (count($entries) - $nb_ciphered) . " unciphered password(s)</b><br/>\n"; | ||||
|     foreach($entries as $entry) | ||||
|     { | ||||
|         if ($entry['ciphered'] == 1) continue; | ||||
|         echo '<form method="post">'; | ||||
|         echo '<form method="post">' . "\n"; | ||||
|         echo '<input type="hidden" name="user" value="' . $user . '"/>'; | ||||
|         echo '<input type="hidden" name="mkey" value="' . $mkey . '"/>'; | ||||
|         echo '<input type="hidden" name="login_ciph" value="' . $entry['login_ciph'] . '"/>'; | ||||
| @@ -129,23 +129,23 @@ if ($user != "") | ||||
|         echo 'password <input type="text" name="pwd" value="' . $entry['password'] . '"/>'; | ||||
|         echo '<input type="submit" name="delete" value="Delete" onclick="return confirm(\'Are you sure want to delete this password ?\');"/>'; | ||||
|         echo '<input type="submit" name="update" value="Update" onclick="return confirm(\'Are you sure want to update this password ?\');"/>'; | ||||
|         echo '</form>'; | ||||
|         echo '</form>' . "\n"; | ||||
|     } | ||||
|  | ||||
|     echo "<br/><br/>"; | ||||
|     echo "<b>$nb_ciphered ciphered password(s)</b><br/>"; | ||||
|     echo "<br/><br/>\n"; | ||||
|     echo "<b>$nb_ciphered ciphered password(s)</b><br/>\n"; | ||||
|     if ($VIEW_CIPHERED_PASSWORDS) | ||||
|     { | ||||
|         foreach($entries as $entry) | ||||
|         { | ||||
|             if ($entry['ciphered'] == 0) continue; | ||||
|             echo '<form method="post">'; | ||||
|             echo '<form method="post">' . "\n"; | ||||
|             echo '<input type="hidden" name="user" value="' . $user . '"/>'; | ||||
|             echo '<input type="hidden" name="mkey" value="' . $mkey . '"/>'; | ||||
|             echo '<input class="hash" type="text" name="login_ciph" value="' . $entry['login_ciph'] . '"/>'; | ||||
|             echo '<input class="hash" type="text" name="pwd" value="' . $entry['password'] . '"/>'; | ||||
|             echo '<input type="submit" name="delete" value="Delete" onclick="return confirm(\'Are you sure want to delete this password ?\');"/>'; | ||||
|             echo '</form>'; | ||||
|             echo '</form>' . "\n"; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -157,8 +157,8 @@ if ($user != "") | ||||
|  | ||||
| if ($user != "") | ||||
| { | ||||
|     echo "<b>Add a new password</b><br/>"; | ||||
|     echo '<form method="post">'; | ||||
|     echo "<b>Add a new password</b><br/>\n"; | ||||
|     echo '<form method="post">' . "\n"; | ||||
|     echo '<input type="hidden" name="user" value="' . $user . '"/>'; | ||||
|  | ||||
|     echo 'URL <input id="new_url" type="text" name="url"/>'; | ||||
| @@ -167,7 +167,7 @@ if ($user != "") | ||||
|     echo 'master key <input type="password" name="mkey"/>'; | ||||
|     echo '<input type="button" value="Generate password" onClick="generate_password();"/>'; | ||||
|     echo "<input type=\"submit\" name=\"add\" value=\"Add\" onclick='a = document.getElementById(\"new_url\") ; a.value = url_domain(a.value);'/>"; | ||||
|     echo '</form>'; | ||||
|     echo '</form>' . "\n"; | ||||
| } | ||||
| ?> | ||||
| </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user