Browse Source

version 1.6 with various litte enhancements

master
Rolf Brugger 10 years ago
parent
commit
afd86250c1
  1. 10
      doc/index.html
  2. BIN
      img/logo-icon.png
  3. 151
      index.php
  4. 2
      makerelease.sh
  5. 28
      sv.js
  6. 1
      tpl-iphone/entry.php
  7. 38
      tpl-iphone/entryform.php
  8. 17
      tpl-iphone/main.php
  9. 3
      tpl-iphone/tpl.css
  10. 7
      tpl-std/decryptform.php
  11. 14
      tpl-std/entries.php
  12. 16
      tpl-std/entryform.php
  13. 2
      tpl-std/incl-head.php
  14. 7
      tpl-std/incl-titlebar.php
  15. 2
      tpl-std/main.php
  16. 2
      tpl-std/tools.php
  17. 10
      tpl-std/tpl.css
  18. 60
      vault/simplevault.txt

10
doc/index.html

@ -54,13 +54,19 @@
<a name="install" ></a>
<h2>Installation and Configuration</h2>
<p>Prerequisites are: PHP4 or PHP5 with the mcrypt library.</p>
<p><a href='http://sourceforge.net/project/showfiles.php?group_id=205981'>Download</a> and unpack the SimpleVault package to the directory <tt>&lt;install-dir&gt;</tt>. By default, <tt>&lt;install-dir&gt;/vault/simplevault.txt</tt> is used as the vault file where all encrypted and unencrypted data is stored. This file should be readable and writeable by the web server. A different vault file can be configured in <tt>index.php</tt> in the variables <tt>$vaultdir</tt> and <tt>$vaultfile</tt>.</p>
<p><a href='http://sourceforge.net/project/showfiles.php?group_id=205981'>Download</a> and unpack the SimpleVault package to the directory <tt>&lt;install-dir&gt;</tt>. By default, <tt>&lt;install-dir&gt;/vault/simplevault.txt</tt> is used as the vault file where all encrypted and unencrypted data is stored. This file should be readable and writeable by the web server. A different vault file can be configured in <tt>index.php</tt> in the variables <tt>$vaultfname</tt>.</p>
<p>That's it. Go to <tt>&lt;your-host&gt;/&lt;install-dir&gt;/index.php</tt> and start creating entries.</p>
<p>In the default installation, the vault file contains 2 categories and 4 entries for demonstration purposes. All entries are encrypted with the passphrase <i>toto</i>. You can delete the entries interactively, or by emptying the vault file.</p>
<p>If you have problems please ask your questions in the <a href='http://sourceforge.net/forum/?group_id=205981'>support forum</a>.</p>
<h3>Configuration</h3>
<p>In the main file <tt>index.php</tt> there is a configuration section below the lines <tt> *** Settings</tt>. The setting for <tt>$dateformat</tt> specifies the date format and <tt>$forcesamepf</tt> defines if a global pass phrase is to be used. </p>
<p>In the main file <tt>index.php</tt> there is a configuration section below the lines <tt> *** Settings</tt>.
<ul>
<li>The setting for <tt>$dateformat</tt> specifies the date format.</li>
<li><tt>$forcesamepf</tt> defines if a global pass phrase is to be used, if each category has its own pass phrase or if each entry can have it's own pass phrase. </li>
<li><tt>$vaultfname</tt> specifies the location where the vault file is stored. This may be a location that is not web readable. However, if good pass phrases were chosen, it is no particular risk to put this file at a web readable location. All precious data is encrypted. </li>
</ul>
</p>
<h3>Updating an Existing Installation</h3>
<p>Simply replace the files <tt>index.php</tt>, <tt>sv.js</tt>, <tt>img/*</tt> and <tt>tpl-*</tt> with the new files from the distribution. </p>

BIN
img/logo-icon.png

After

Width: 29  |  Height: 33  |  Size: 1.0 KiB

151
index.php

@ -9,20 +9,37 @@
# Email: mail at rolfb dot ch
#
# Versions - History:
# 1.5 Jan 10: Ignore empty lines in bulk decrypt tool.
# Font and screen size adaped to iPhone.
# Import from text file.
# Internally restructured according to MVC model, and support for templates added.
# iPhone template added.
# Option added that the same pass phrase must be used in the entire vault ($forcesamepf='a') or in a category ($forcesamepf='c')
# 1.4 Feb 08: Prevent forms form autocompleting fields.
# When an entry is saved, it is checked if the passphrase was used for other entries too.
# New tools area.
# New functions: bulk decrypt, bulk change passphrase.
# 1.3 Jan 08: More secure handling of special characters in title tags
# 1.2 Nov 07: Editing entires improved
# 1.1 Oct 07: Edit entires
# 1.0 Sep 07: Initial release
# 1.6 Jun 11: - Bulk decrypt entries shows a list of not decrypted entries too.
# - Set cursor to password form field.
# Many thanks to Fabio B. who contributed the following features:
# - Use the mobile template for Android as well
# - Don't lose the inputted data when an entry is not saved
# - mark mandatory fields with an asterisk.
# - Added a title to the pages.
# - Autofocus on the passphrase field
# - Checkbox for showing the passphrase when no one is around.
# - Button to generate a random password.
# - Home page shows all your entries
#
# 1.5 Jan 10: - Ignore empty lines in bulk decrypt tool.
# - Font and screen size adaped to iPhone.
# - Import from text file.
# - Internally restructured according to MVC model, and support for templates added.
# - iPhone template added.
# - Option added that the same pass phrase must be used in the entire vault ($forcesamepf='a') or in a category ($forcesamepf='c')
#
# 1.4 Feb 08: - Prevent forms form autocompleting fields.
# - When an entry is saved, it is checked if the passphrase was used for other entries too.
# - New tools area.
# - New functions: bulk decrypt, bulk change passphrase.
#
# 1.3 Jan 08: - More secure handling of special characters in title tags
#
# 1.2 Nov 07: - Editing entires improved
#
# 1.1 Oct 07: - Edit entires
#
# 1.0 Sep 07: - Initial release
#
################################################################
@ -36,6 +53,8 @@
//$dateformat = 'M jS Y g:ia'; // "Sep 19th 2007 3:44pm"
//$dateformat = 'd-M-Y G:i'; // "09-Sep-2007 15:44"
$dateformat = 'd-M-Y'; // "09-Sep-2007"
date_default_timezone_set('Europe/Zurich');
// Checks if the pass phrase that was entered to encode an entry has already
// been used to encode other entries. Depending on the usage scenario a re-used
@ -50,13 +69,20 @@ $checkexistingpf = 1;
// c: An entry can only be saved with a pass phrase that has been used to encode
// all other entries of the same category. All entries in a category will have the same
// pass phrase.
$forcesamepf = '0';
$forcesamepf = 'c';
// Place where the vault file is stored. This may be a location that is not web readable.
// However, if good passphrases were chosen, it is no particular risk to put this file at a
// web readable location. All precious data is encrypted.
$vaultfname = "vault/simplevault.txt";
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// ----------------------------------------------------------------------------------------
// *** Look and Feel / Templates
// ----------------------------------------------------------------------------------------
if (strpos( $_SERVER["HTTP_USER_AGENT"], 'iPhone' )){
if (preg_match("/android|iphone/i", $_SERVER["HTTP_USER_AGENT"])) {
//
$defaulttemplate = 'tpl-iphone';
}
@ -68,8 +94,6 @@ else{
// *** Constants
// ----------------------------------------------------------------------------------------
$vaultdir = "vault";
$vaultfile = "simplevault.txt";
$cipher = 'rijndael-256';
@ -88,7 +112,7 @@ $nbencfields = 10;
$template = $defaulttemplate;
$vlt = explode("\n", file_get_contents("$vaultdir/$vaultfile"));
$vlt = explode("\n", file_get_contents("$vaultfname"));
if(count($vlt)==1 and strlen($vlt[0])==0){$vlt=array();} // fix php-explode bug of an empty file
$cats = categories($vlt);
@ -102,23 +126,54 @@ $errormsg= array();
// *** save an entry
if(isset($_POST['entrysave'])){
/* Populate variables for entryform template used in case of error */
if (isset($_POST['catdl']) and strlen($_POST['catdl']) > 0) {
$cat = $_POST['catdl'];
}
if (isset($_POST['cat']) and strlen($_POST['cat']) > 0) {
$cat = $newcat = $_POST['cat'];
}
$t1 = $_POST['t1'];
$t2 = $_POST['t2'];
$mode = $_POST['mode'];
$encfields = array ();
$encfields[1] = $_POST['newp1'];
$encfields[2] = $_POST['newp2'];
$encfields[3] = $_POST['newp3'];
$encfields[8] = $_POST['newp8'];
$encfields[9] = $_POST['newp9'];
$encfields[$nbencfields] = $_POST['newnote'];
if (!isset($_POST['cat']) or strlen($_POST['cat'])<1){ $_POST['cat']=$_POST['catdl']; $_REQUEST['cat']=$_POST['catdl']; } // take category from dropdown list? category in text field has precedence.
// *** make checks
if(!isset($_POST['cat']) or strlen($_POST['cat'])==0){
$errormsg[] = "Could not save entry: no category set.</span></p>";
include "$template/entryform.php";
return;
}
else if(!isset($_POST['t1']) or strlen($_POST['t1'])==0){
$errormsg[] = "Could not save entry: no title set.</span></p>";
include "$template/entryform.php";
return;
}
else if(!isset($_POST['newp3']) or strlen($_POST['newp3'])==0){
$errormsg[] = "Could not save entry: no password set.</span></p>";
include "$template/entryform.php";
return;
}
else if ($forcesamepf == 'a' and count($vlt)>=1 and svcountdecodeableentries($_POST['pf'], "")==0){
$errormsg[] = "Could not save entry!";
$errormsg[] = "You have entered an invalid pass phrase. All entries have to be encoded with the same pass phrase. Go back an use the same pass phrase that was used to encode the other entries.";
include "$template/entryform.php";
return;
}
else if ($forcesamepf == 'c' and svcountcatentries($_POST['cat'])>=1 and svcountdecodeableentries($_POST['pf'], $_POST['cat'] )==0){
$errormsg[] = "Could not save entry!";
$errormsg[] = "You have entered an invalid pass phrase. All entries in a category have to be encoded with the same pass phrase. Go back an use the same pass phrase that was used to encode the other entries in the category {$_POST['cat']}.";
include "$template/entryform.php";
return;
}
// *** everything checked - save the entry now
@ -145,13 +200,13 @@ if(isset($_POST['entrysave'])){
sort($vlt);
while($vlt[0]==""){array_shift($vlt);};
file_put_contents("$vaultdir/$vaultfile", implode("\n", $vlt));
file_put_contents("$vaultfname", implode("\n", $vlt));
$cats = categories($vlt);
$infomsg[] = "Entry ".$_POST['t1']."/".$_POST['t2']." saved.";
if ($checkexistingpf){
if (svcountdecodeableentries($_POST['pf'], "") > 1){ // has the passphrase already been used to encode other entries?
$infomsg[] = "This passphrase has already been used to encode other entries.";
$infomsg[] = "This passphrase has also been used to encode other entries.";
}
else{
$infomsg[] = "This is a new passphrase.";
@ -160,6 +215,8 @@ if(isset($_POST['entrysave'])){
}
else{
$errormsg[] = "Could not save entry: an entry with this category and title already exists.";
include "$template/entryform.php";
return;
}
}
}
@ -181,7 +238,7 @@ if(isset($_POST['bulkchangepf'])){
}
$i++;
}
file_put_contents("$vaultdir/$vaultfile", implode("\n", $vlt));
file_put_contents("$vaultfname", implode("\n", $vlt));
$infomsg[] = $logmsg;
$infomsg[] = "$count of ".count($vlt)." entries were re-encrypted with the new passphrase.";
}
@ -246,7 +303,7 @@ if(isset($_POST['bulkimportentries'])){
// save vaultfile
while($vlt[0]==""){array_shift($vlt);};
file_put_contents("$vaultdir/$vaultfile", implode("\n", $vlt));
file_put_contents("$vaultfname", implode("\n", $vlt));
$cats = categories($vlt);
$infomsg[] = $logmsg;
$infomsg[] = "$count entries have been imported.";
@ -260,10 +317,10 @@ if(isset($_POST['bulkimportentries'])){
// ----------------------------------------------------------------------------------------
// *** Show one entry
if ( isset($_POST['entrysave']) ){ $decrmode = "decrypt"; }
if ($_GET['dec'] or isset($_POST['entrydecrypt']) ){ $decrmode = "decrypt"; }
if ($_GET['del'] or isset($_POST['entrydelete'] ) ){ $decrmode = "delete"; }
if ($_GET['edt'] or isset($_POST['entryedit'] ) ){ $decrmode = "edit"; }
if ( isset($_POST['entrysave']) ){ $decrmode = "decrypt"; }
if (isset($_GET['dec']) or isset($_POST['entrydecrypt']) ){ $decrmode = "decrypt"; }
if (isset($_GET['del']) or isset($_POST['entrydelete'] ) ){ $decrmode = "delete"; }
if (isset($_GET['edt']) or isset($_POST['entryedit'] ) ){ $decrmode = "edit"; }
if(isset($decrmode)) {
// decrypt the specified entry
@ -274,6 +331,7 @@ if(isset($decrmode)) {
$t1 = strip_titletags($_REQUEST['t1']);
$t2 = strip_titletags($_REQUEST['t2']);
$pgtitle = "Decrypt Entry";
if (isset($_POST['entrydecrypt']) or isset($_POST['entrydelete']) or isset($_POST['entryedit'])){
// find and decrypt it
$i = entry_index($vlt, $cat, $t1, $t2);
@ -286,7 +344,6 @@ if(isset($decrmode)) {
$encfields = $decfields;
if ($decrmode == "decrypt"){
// passphrase is ok, show decrypted entry
$pgtitle = "Decrypt Entry";
$mode = "modify";
include "$template/entry.php";
}
@ -298,7 +355,6 @@ if(isset($decrmode)) {
}
elseif ($decrmode == "edit"){
// passphrase is ok, fill in form default values
$pgtitle = "Decrypt Entry";
$mode = "modify";
include "$template/entryform.php";
}
@ -328,6 +384,7 @@ elseif(isset($_POST['bulkdecrypt'])){
$i=0;
$count = 0;
$entries = array();
$notdecrypted = array();
while ($i < count($vlt)){
if (strlen($vlt[$i])>10){ # ignore empty lines
$recfields = explode ("\t", $vlt[$i], $nbfields);
@ -336,6 +393,9 @@ elseif(isset($_POST['bulkdecrypt'])){
$entries[] = array('recfields' => $recfields, 'decfields' => $decfields);
$count++;
}
else{
$notdecrypted[] = array('recfields' => $recfields);
}
}
$i++;
}
@ -355,30 +415,27 @@ elseif(isset($_GET['new'])){
include "$template/entryform.php";
}
// *** Show admin screen
elseif(isset($_GET['tools'])){
$pgtitle = "Tools";
include "$template/tools.php";
}
// *** Browse for existing entries
elseif(isset($_GET['cat']) or isset($_GET['all']) or isset($_POST['filter'])){
else{
$filter = $_POST['filter'];
$records = array();
foreach ($vlt as $record){
$recfields = explode ("\t", $record, $nbfields);
if ( (isset($_GET['all']))
if ( (count ($_GET) === 0 and count ($_POST) === 0)
or (isset($_GET['cat']) and $_GET['cat'] == $recfields[0])
or (isset($_POST['filter']) and strlen($_POST['filter'])>1 and stripos($record, $_POST['filter']) !== false )
or (isset($filter) and strlen($filter)>1 and stripos($record, $filter) !== false )
){
array_push($records, array('cat'=>$recfields[0],'t1'=>$recfields[1],'t2'=>$recfields[2],'mdate'=>$recfields[3]));
}
}
$defcat = $_GET['cat'];
include "$template/main.php";
}
// *** Show admin screen
elseif(isset($_GET['tools'])){
include "$template/tools.php";
}
else{
$records = array();
$defcat = $_GET['cat'];
$defcat = isset($_GET['cat'])?$_GET['cat']:'';
$pgtitle = isset($_GET['cat']) ? htmlspecialchars ($_GET['cat']) : "Browse";
include "$template/main.php";
}
@ -442,7 +499,7 @@ function svdecrypt($pf, $data)
/* -------------------------------------------------------------------------- */
function svdecodeableentry($pf, $data)
// returns ture if the entry can be sucessfully decoded with the passphrase
// returns true if the entry can be sucessfully decoded with the passphrase
{
global $preamble;
$decfields = svdecrypt($pf, $data);
@ -485,10 +542,10 @@ function svcountcatentries($category)
function delete_entry(&$vlt, $i, &$cats)
// Delete entry with index $i. The vault ($vlt) and category ($cats) arrays are updated. The vault array is saved to the file.
{
global $vaultdir, $vaultfile;
global $vaultfname;
array_splice ($vlt, $i, 1);
file_put_contents("$vaultdir/$vaultfile", implode("\n", $vlt));
file_put_contents("$vaultfname", implode("\n", $vlt));
$cats = categories($vlt);
}

2
makerelease.sh

@ -9,9 +9,11 @@ then
mkdir simplevault-$1/doc
cp README index.php sv.js simplevault-$1
cp img/*.png simplevault-$1/img
cp img/*.ico simplevault-$1/img
cp doc/*.png doc/*.html doc/*.css simplevault-$1/doc
cp -r tpl-* simplevault-$1
cp vault/simplevault.txt-demo simplevault-$1/vault/simplevault.txt
find simplevault-$1 -name ".*" -exec rm -rfv {} \;
tar -cvzf simplevault-$1.tgz simplevault-$1
rm -rf simplevault-$1
else

28
sv.js

@ -0,0 +1,28 @@
function check_pf()
{
if (document.editentry.pf.value == ""){
return confirm("You have set an empty passphrase. Do you want to continue?");
}
else{
return true;
}
}
function toggle_pf(id)
{
var element = document.getElementById (id);
element.type = element.type === "password" ? "text" : "password";
}
function generate_password(id)
{
var chars = "\\|!\"£$%&/()(=?^[];,:.<>+*/@abcdefghijmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ";
var len = 16;
var element = document.getElementById (id);
element.value = '';
for (var i = 0; i < len; i++) {
element.value += chars.charAt(Math.floor(Math.random() * chars.length));
}
}

1
tpl-iphone/entry.php

@ -2,6 +2,7 @@
<div class="panel" title="Item decrypted">
<h2><?php echo $_POST['cat']; ?></h2>
<fieldset>
<p class="ptext"><?php print_r($_POST); ?></p>
<div class="row"><label>Title</label><p class="prow"><?php echo $_POST['t1']; ?></p></div>
<div class="row"><label>Subtitle</label><p class="prow"><?php echo $_POST['t2']; ?></p></div>
</fieldset>

38
tpl-iphone/entryform.php

@ -0,0 +1,38 @@
<form title="Edit Item" class="panel" method="post" action="index.php">
<!-- h2><?php echo $_POST['cat']; ?></h2 -->
<input name='defcat' type='hidden' value='<?php echo $cat ?>'/>
<input name='deft1' type='hidden' value='<?php echo $t1 ?>'/>
<input name='deft2' type='hidden' value='<?php echo $t2 ?>'/>
<input name='mode' type='hidden' value='<?php echo $mode ?>'/>
<fieldset>
<div class="row"><label>Category</label></div>
<div class="row"><label>exising</label>
<select name='catdl' size='1' class='category'><option></option>
<?php
foreach ($cats as $currcat){
print "<option".($cat==$currcat ? " selected":"").">$currcat</option>";
}
?>
</select>
</div>
<div class="row"><label>new</label><input type="text" name="cat" value="" /></div>
</fieldset>
<fieldset>
<div class="row"><label>Title </label><input type="text" name="t1" value="<?php echo $t1 ?>" /></div>
<div class="row"><label>Subtitle</label><input type="text" name="t2" value="<?php echo $t2 ?>" /></div>
</fieldset>
<h2>encrypted:</h2>
<fieldset>
<div class="row"><label>URL </label><input type="text" name="newp2" value="<?php echo $encfields[2] ?>" /></div>
<div class="row"><label>Login </label><input type="text" name="newp1" value="<?php echo $encfields[1] ?>" /></div>
<div class="row"><label>Password</label><input type="text" name="newp3" value="<?php echo $encfields[3] ?>" /></div>
<div class="row"><label><input type="text" name="newp8" value="<?php echo $encfields[8] ?>" /></label>
<input type="text" name="newp9" value="<?php echo $encfields[9] ?>" /></div>
<p class="ptext"><label>Note</label><br/><textarea name='newnote' cols='40' rows='6'><?php echo $encfields[$nbencfields] ?></textarea></p>
</fieldset>
<fieldset>
<div class="row"><label>Password</label><input type="password" name="pf" value="" /></div>
</fieldset>
<input type='submit' name='entrysave' value='save entry' />
</form>

17
tpl-iphone/main.php

@ -9,6 +9,7 @@
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style type="text/css" media="screen">@import "tpl-iphone/tpl.css";</style>
<style type="text/css" media="screen">@import "tpl-iphone/iui/iui.css";</style>
<style type="text/css" media="screen">@import "tpl-iphone/iui/t/default/default-theme.css";</style>
<script type="application/x-javascript" src="tpl-iphone/iui/iui.js"></script>
<meta name="robots" content="noarchive,nofollow" />
<!-- script type="text/javascript" src="sv.js"></script -->
@ -51,7 +52,8 @@
$recfields = explode ("\t", $record, $nbfields);
?>
<form id="<?php echo strtr($recfields[0].$recfields[1].$recfields[2]," ","_"); ?>" title="Decrypt" class="panel" method="post" action="index.php">
<form id="<?php echo strtr($recfields[0].$recfields[1].$recfields[2]," ","_"); ?>" title="Item" class="panel" method="post" action="index.php" name="decrform">
<h2>Category: <?php echo $recfields[0]; ?></h2>
<fieldset>
<div class="row"><label>Title</label><p class="prow"><?php echo $recfields[1]; ?></p></div>
@ -64,15 +66,24 @@
<input name='cat' type='hidden' value='<?php echo $recfields[0]; ?>'/>
<input name='t1' type='hidden' value='<?php echo $recfields[1]; ?>'/>
<input name='t2' type='hidden' value='<?php echo $recfields[2]; ?>'/>
<input type='hidden' name='entrydecrypt' value='decrypt' />
<input type='submit' name='s1' value='s1' />
<input type='submit' name='s2' value='s2' />
<a class="whiteButton" type="submit" name='a1' onclick="decrform.submit()">a1</a>
<!--
<input type='submit' name='entrydecrypt' value='decrypt' />
<!-- a class="whiteButton" type="submit" name='entrydecrypt'>Decrypt</a -->
<input type='submit' name='entryedit' value='edit' />
<a class="whiteButton" type="submit" name='entrydecrypt2'>Decrypt</a>
-->
</form>
<?php } ?>
<form id="searchForm" class="dialog" method="post" action="index.php">
<fieldset>
<h1>Music Search</h1>
<h1>Search</h1>
<a class="button leftButton" type="cancel">Cancel</a>
<a class="button blueButton" type="submit">Search</a>

3
tpl-iphone/tpl.css

@ -31,3 +31,6 @@ select {
font-size: 16px;
font-weight: normal;
}
select.category {
width: 70%;
}

7
tpl-std/decryptform.php

@ -5,7 +5,7 @@
<?php include "$template/incl-head.php"; ?>
</head>
<body>
<body onload="document.enterpf.pf.focus()">
<?php include "$template/incl-titlebar.php"; ?>
@ -25,11 +25,12 @@
<input name='t1' type='hidden' value='<?php echo $t1 ?>'/>
<input name='t2' type='hidden' value='<?php echo $t2 ?>'/>
<p>
Passphrase: <input name='pf' type='password' value='' size='20' maxlength='200'/>
Passphrase: <input id="pf" name='pf' type='password' value='' size='20' maxlength='200'/>
<input type='submit' name='entry<?php echo $decrmode ?>' value='<?php echo $decrmode ?>' />
<input type='checkbox' id='display_pf' onchange='toggle_pf("pf")' />
<label for='display_pf'>Display Passphrase</label>
</p>
</form>
<?php } ?>
</body>
</html>

14
tpl-std/entries.php

@ -26,5 +26,19 @@
<?php } ?>
</table>
<h1>Not Decrypted Entries</h1>
<table class='entrylist'>
<?php foreach($notdecrypted as $entry){
$cat = $entry['recfields'][0];
$t1 = $entry['recfields'][1];
$t2 = $entry['recfields'][2];
?>
<tr><td class='tl'>
<?php include "$template/incl-entry-title.php"; ?>
</td></tr>
<tr><td><hr /></td></tr>
<?php } ?>
</table>
</body>
</html>

16
tpl-std/entryform.php

@ -17,9 +17,8 @@
<input name='deft1' type='hidden' value='<?php echo $t1 ?>'/>
<input name='deft2' type='hidden' value='<?php echo $t2 ?>'/>
<input name='mode' type='hidden' value='<?php echo $mode ?>'/>
<table class='entry'>
<tr><td>Category:</td><td>
<tr><td>Category: *</td><td>
<table class='raw'><tr><td>existing:</td><td><select name='catdl' size='1'><option></option>
<?php
foreach ($cats as $currcat){
@ -27,10 +26,10 @@
}
?>
</select></td></tr>
<tr><td>or new:</td><td><input name='cat' type='text' value='' size='20' maxlength='200'/></td></tr>
<tr><td>or new:</td><td><input name='cat' type='text' value='<?php echo $newcat ?>' size='20' maxlength='200'/></td></tr>
</table>
</td></tr>
<tr><td>Title: </td><td><input name='t1' type='text' value='<?php echo $t1 ?>' size='20' maxlength='200'/></td></tr>
<tr><td>Title: *</td><td><input name='t1' type='text' value='<?php echo $t1 ?>' size='20' maxlength='200'/></td></tr>
<tr><td>Subtitle:</td><td><input name='t2' type='text' value='<?php echo $t2 ?>' size='20' maxlength='200'/></td></tr>
</table>
@ -42,8 +41,9 @@
<tr><td>Login:</td><td>
<input name='newp1' type='text' value='<?php echo $encfields[1] ?>' size='20' maxlength='200'/>
</td></tr>
<tr><td>Password:</td><td>
<input name='newp3' type='text' value='<?php echo $encfields[3] ?>' size='20' maxlength='200'/>
<tr><td>Password: *</td><td>
<input id="newp3" name='newp3' type='text' value='<?php echo $encfields[3] ?>' size='20' maxlength='200'/>
<input type="button" value="Generate" onclick="generate_password ('newp3')"/>
</td></tr>
<tr><td>
<input name='newp8' type='text' value='<?php echo $encfields[8] ?>' size='6' maxlength='30'/>
@ -57,7 +57,9 @@
<p>
Passphrase: <input name='pf' type='password' value='' size='20' maxlength='200'/>
Passphrase: <input id='pf' name='pf' type='password' value='' size='20' maxlength='200'/>
<input type='checkbox' id='display_pf' onchange='toggle_pf("pf")' />
<label for='display_pf'>Display Passphrase</label>
</p>
<p>
<input type='submit' name='entrysave' value='save entry' />

2
tpl-std/incl-head.php

@ -2,7 +2,7 @@
<meta name="robots" content="noarchive,nofollow" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<title></title>
<title><?= $pgtitle ?> - Simple Vault</title>
<link href='tpl-std/tpl.css' rel='stylesheet' type='text/css' media='screen' />
<link rel="shortcut icon" href="img/favicon.ico" />

7
tpl-std/incl-titlebar.php

@ -5,8 +5,7 @@
<div class='leftblock'>
<span>
<a href='index.php'><b>Home</b></a> &nbsp; &nbsp;
<a href='index.php?all'>all</a> &nbsp; &nbsp;
<input type='text' name='filter' value='' size ='7' id='inpfield' />
<input type='text' name='filter' value='<?= htmlspecialchars ($filter) ?>' size ='7' id='inpfield' />
<input type='image' src='img/go-arr.png' name='image' title='run filter' />
</span>
</div>
@ -21,6 +20,10 @@
</div>
</form>
<div class='addentry'>
<a href='?new=1&amp;cat=<?php echo $defcat ?>'><img class='button' src='img/add.png' title='add new entry' alt='add new entry' /> add new entry</a>
</div>
<?php foreach($errormsg as $msg){ ?>
<p><span class='warning'><?php echo $msg ?></span></p>
<?php } ?>

2
tpl-std/main.php

@ -15,8 +15,6 @@
<tr><td><?php echo $record['cat']?></td><td><?php echo $record['t1']?></td><td><?php echo $record['t2']?></td><td><?php echo date($dateformat,$record['mdate']) ?></td><td><a href='?dec=1&amp;cat=<?php echo $record['cat']; ?>&amp;t1=<?php echo $record['t1']; ?>&amp;t2=<?php echo $record['t2']; ?>'><img src='img/decrypt.png' title='decrypt' alt='decrypt'/></a></td><td><a href='?edt=1&amp;cat=<?php echo $record['cat']; ?>&amp;t1=<?php echo $record['t1']; ?>&amp;t2=<?php echo $record['t2']; ?>'><img src='img/edit.png' title='edit' alt='edit'/></a></td><td><a href='?del=1&amp;cat=<?php echo $record['cat']; ?>&amp;t1=<?php echo $record['t1']; ?>&amp;t2=<?php echo $record['t2']; ?>'><img src='img/del.png' title='delete' alt='delete'/></a></td></tr>
<?php }?>
</table>
<p><a href='?new=1&amp;cat=<?php echo $defcat ?>'><img class='button' src='img/add.png' title='add new entry' alt='add new entry' /> add new entry</a>
</p>
<?php if(count($records)==0){ ?>
<div class='footer'><span>Password manager powered by <a href='http://simplevault.sourceforge.net'>SimpleVault</a></span></div>

2
tpl-std/tools.php

@ -62,5 +62,7 @@ Note:
</pre>
</div>
<div class='footer'><span>Password manager powered by <a href='http://simplevault.sourceforge.net'>SimpleVault</a></span></div>
</body>
</html>

10
tpl-std/tpl.css

@ -80,6 +80,16 @@ div.leftblock{
div.rightblock{
text-align : right;
}
div.addentry{
padding-top: 4px;
float : right;
text-align : right;
}
div.addentry a{
text-decoration: none;
}
div.helptext{

60
vault/simplevault.txt
File diff suppressed because it is too large
View File

Loading…
Cancel
Save