Browse code

Yes, simplevault is still active. Thanks to Fabio for his improvements to usability and stability.

Rolf Brugger authored on 21.08.2015 12:26:37
Showing 17 changed files

... ...
@@ -9,7 +9,7 @@
9 9
 #    Email:  mail at rolfb dot ch
10 10
 #
11 11
 # Versions - History:
12
-#           1.8          - Mobile Template: framework iui replaced by jQuery Mobile
12
+#           1.8  Jan 12  - Mobile Template: framework iui replaced by jQuery Mobile
13 13
 #                        - Mobile Template: can now also create, edit and delete entries.
14 14
 #
15 15
 #           1.7  Dec 11  - settings are now in a separate file.
... ...
@@ -62,6 +62,9 @@
62 62
 
63 63
 session_start();
64 64
 
65
+// Files should be readable and writable only by the owner.
66
+umask (0177);
67
+
65 68
 // ----------------------------------------------------------------------------------------
66 69
 // *** Settings
67 70
 // ----------------------------------------------------------------------------------------
... ...
@@ -212,7 +215,12 @@ if(isset($_POST['entrysave'])){
212 215
       // we were editing an existing entry. Delete original entry before saving the modified entry.
213 216
       $i = entry_index($vlt, $_POST['defcat'], $_POST['deft1'], $_POST['deft2']);
214 217
       if ($i >= 0){
215
-        delete_entry($vlt, $i, $cats);
218
+        $res = delete_entry($vlt, $i, $cats);
219
+
220
+        if ($res == false) {
221
+          $errormsg[] = "could not delete entry: error writing db file.";
222
+          return;
223
+        }
216 224
       }
217 225
     }
218 226
 
... ...
@@ -230,7 +238,12 @@ if(isset($_POST['entrysave'])){
230 238
       sort($vlt);
231 239
       while($vlt[0]==""){array_shift($vlt);};
232 240
     
233
-      file_put_contents("$vaultfname", implode("\n", $vlt));
241
+      $res = update_db_file (implode("\n", $vlt));
242
+      if ($res === false) {
243
+        $errormsg[] = "could not save entry: error writing db file.";
244
+        return;
245
+      }
246
+
234 247
       $cats = categories($vlt);
235 248
       $infomsg[] = "Entry ".$_POST['t1']."/".$_POST['t2']." saved.";
236 249
 
... ...
@@ -268,7 +281,12 @@ if(isset($_POST['bulkchangepf'])){
268 281
     }
269 282
     $i++;
270 283
   }
271
-  file_put_contents("$vaultfname", implode("\n", $vlt));  
284
+  $res = update_db_file (implode("\n", $vlt));
285
+  if ($res === FALSE) {
286
+    $errormsg[] = "Could not save entry: error writing db file.";
287
+    return;
288
+  }
289
+
272 290
   $infomsg[] = $logmsg;
273 291
   $infomsg[] = "$count of ".count($vlt)." entries were re-encrypted with the new passphrase.";
274 292
 }
... ...
@@ -333,7 +351,12 @@ if(isset($_POST['bulkimportentries'])){
333 351
   
334 352
   // save vaultfile
335 353
   while($vlt[0]==""){array_shift($vlt);};
336
-  file_put_contents("$vaultfname", implode("\n", $vlt));
354
+  $res = update_db_file (implode("\n", $vlt));
355
+  if ($res === false) {
356
+    $errormsg[] = "could not save entry: error writing db file.";
357
+    return;
358
+  }
359
+
337 360
   $cats = categories($vlt);
338 361
   $infomsg[] = $logmsg;
339 362
   $infomsg[] = "$count entries have been imported.";
... ...
@@ -388,7 +411,12 @@ if(isset($decrmode)) {
388 411
         }
389 412
         elseif ($decrmode == "delete"){
390 413
           // passphrase is ok, delete entry with index $i
391
-          delete_entry($vlt, $i, $cats);
414
+          $res = delete_entry($vlt, $i, $cats);
415
+          if ($res == false) {
416
+            $errormsg[] = "could not delete entry: error writing db file.";
417
+            return;
418
+          }
419
+
392 420
           $entrydeleted = 1;
393 421
           include "$template/decryptform.php";
394 422
         }
... ...
@@ -618,8 +646,14 @@ function delete_entry(&$vlt, $i, &$cats)
618 646
   global $vaultfname;
619 647
   
620 648
   array_splice ($vlt, $i, 1);
621
-  file_put_contents("$vaultfname", implode("\n", $vlt));
649
+  $res = update_db_file (implode("\n", $vlt));
650
+  if ($res === false) {
651
+    return false;
652
+  }
653
+
622 654
   $cats = categories($vlt);
655
+
656
+  return true;
623 657
 }
624 658
 
625 659
 /* -------------------------------------------------------------------------- */
... ...
@@ -642,39 +676,6 @@ function entry_index($vlt, $cat, $tit1, $tit2)
642 676
   }
643 677
 }
644 678
 
645
-
646
-
647
-// ----------------------------------------------------------------------------------------
648
-// *** Forms
649
-// ----------------------------------------------------------------------------------------
650
-
651
-
652
-function show_entry_title($cat, $t1, $t2)
653
-{
654
-  print "<table class='entry'>";
655
-  print "<tr><td>Category:</td><td>$cat</td></tr>";
656
-  print "<tr><td>Title:</td><td>$t1</td></tr>";
657
-  print "<tr><td>Subtitle:</td><td>$t2</td></tr>";
658
-  print "</table>";
659
-}
660
-
661
-/* -------------------------------------------------------------------------- */
662
-
663
-function show_entry_body($decfields)
664
-{
665
-  global $nbencfields;
666
-  print "<table class='encrbox'>";
667
-  print "<tr><td>URL:</td><td>"      .print_url($decfields[2])."</td></tr>";
668
-  print "<tr><td>Login:</td><td>"    .$decfields[1]."</td></tr>";
669
-  print "<tr><td>Password:</td><td>" .$decfields[3]."</td></tr>";
670
-  if(strlen($decfields[8]) > 0){
671
-    print "<tr><td>".$decfields[8].":</td><td>" .$decfields[9]."</td></tr>";
672
-  }
673
-  print "<tr><td>Note:</td><td><pre>".$decfields[$nbencfields]."</pre></td></tr>";
674
-  print "</table>";
675
-  print "</p>";
676
-}
677
-
678 679
 /* -------------------------------------------------------------------------- */
679 680
 /* -------------------------------------------------------------------------- */
680 681
 
... ...
@@ -737,6 +738,27 @@ function reportVisitor($reason)
737 738
   error_log($body);
738 739
 }
739 740
 
741
+// Safely updates the password database with the contents of $data.
742
+//
743
+// Returns TRUE if the update was successful, FALSE otherwise
744
+function update_db_file ($data)
745
+{
746
+  global $vaultfname;
747
+
748
+  $tmp = tempnam (sys_get_temp_dir (), "simplevault");
749
+  if ($tmp === FALSE) {
750
+    return FALSE;
751
+  }
752
+
753
+  $res = file_put_contents ($tmp, $data);
754
+	if ($res === FALSE) {
755
+    return FALSE;
756
+	}
757
+  rename ($tmp, $vaultfname);
758
+
759
+  return TRUE;
760
+}
761
+
740 762
 function selfURL(){
741 763
     if(!isset($_SERVER['REQUEST_URI'])){
742 764
         $serverrequri = $_SERVER['PHP_SELF'];
743 765
deleted file mode 100755
... ...
@@ -1,22 +0,0 @@
1
-#!/bin/sh
2
-
3
-if [ "$#" = "1" ]
4
-then
5
-    echo "making package for simplevault version $1"
6
-    mkdir simplevault-$1
7
-    mkdir simplevault-$1/img
8
-    mkdir simplevault-$1/vault
9
-    mkdir simplevault-$1/doc
10
-    cp README index.php sv.js svconfig.php-dist simplevault-$1
11
-    cp img/*.png simplevault-$1/img
12
-    cp img/*.ico simplevault-$1/img
13
-    cp doc/*.png doc/*.html doc/*.css simplevault-$1/doc
14
-    cp vault/simplevault.txt-demo simplevault-$1/vault/simplevault.txt
15
-    cp -r tpl-* simplevault-$1
16
-    find simplevault-$1 -name ".*" -exec rm -rfv {} \;
17
-    cp vault/.htaccess simplevault-$1/vault/
18
-    tar -cvzf simplevault-$1.tgz simplevault-$1
19
-    #rm -rf simplevault-$1
20
-else
21
-    echo "you have to pass one parameter: the version number like 1.0"
22
-fi
23 0
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+<?php include "header.php"; ?>
2
+
3
+	<div class="content">	
4
+		<div class="page-header">
5
+			<h1><?php echo ucfirst($decrmode) ?> Entry</h1>
6
+		</div>
7
+	<div class="row">
8
+		<div class="span-14">
9
+			<?php include "incl-entry-title.php"; ?>
10
+			<?php if($pwdmsg){ ?>
11
+				<p><span class="warning"><?php echo $pwdmsg ?></span></p>
12
+			<?php } ?>
13
+			<?php if($entrydeleted){ ?>
14
+				<p><span class="info">Entry <?php echo escape_for_html($t1)."/".escape_for_html($t2) ?> deleted!</span> &nbsp; <a href="index.php">Ok</a></p>
15
+			<?php }else{ ?>
16
+				<form name="enterpf" action="index.php" method="post"  autocomplete="off">
17
+				<input name="cat" type="hidden" value="<?php echo escape_for_html($cat) ?>"/>
18
+				<input name="t1"  type="hidden" value="<?php echo escape_for_html($t1) ?>"/>
19
+				<input name="t2"  type="hidden" value="<?php echo escape_for_html($t2) ?>"/>
20
+				<p>
21
+				Passphrase: <input id="pf" name="pf" type="password" value="" size="20" maxlength="200"/> 
22
+				<input type="submit" name="entry<?php echo escape_for_html($decrmode) ?>" value="<?php echo escape_for_html($decrmode) ?>" />
23
+				<input type="checkbox" id="display_pf" onchange="toggle_pf('pf')" />
24
+				</p>
25
+				</form>
26
+			<?php } ?>
27
+		</div>
28
+	</div>
29
+<?php include "footer.php"; ?>
0 30
new file mode 100644
... ...
@@ -0,0 +1,44 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
2
+	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+<html xmlns="http://www.w3.org/1999/xhtml">
4
+<head>
5
+<?php include "$template/incl-head.php"; ?>
6
+</head>
7
+
8
+<body  onload="document.forms.enterpf.pf.focus()">
9
+
10
+<?php include "$template/incl-titlebar.php"; ?>
11
+
12
+<h1>Decrypted Entries</h1>
13
+<table class='entrylist'>
14
+<?php foreach($entries as $entry){ 
15
+        $cat = $entry['recfields'][0];
16
+        $t1  = $entry['recfields'][1];
17
+        $t2  = $entry['recfields'][2];
18
+        $decfields = $entry['decfields'];
19
+?>
20
+  <tr><td class='tl'>
21
+  <?php include "$template/incl-entry-title.php"; ?>
22
+  </td><td class='tl'>
23
+  <?php include "$template/incl-entry-body.php"; ?>
24
+  </td></tr>
25
+  <tr><td colspan='2'><hr /></td></tr>
26
+<?php } ?>
27
+</table>
28
+
29
+<h1>Not Decrypted Entries</h1>
30
+<table class='entrylist'>
31
+<?php foreach($notdecrypted as $entry){ 
32
+        $cat = $entry['recfields'][0];
33
+        $t1  = $entry['recfields'][1];
34
+        $t2  = $entry['recfields'][2];
35
+?>
36
+  <tr><td class='tl'>
37
+  <?php include "$template/incl-entry-title.php"; ?>
38
+  </td></tr>
39
+  <tr><td><hr /></td></tr>
40
+<?php } ?>
41
+</table>
42
+
43
+</body>
44
+</html>
0 45
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+<?php include "header.php"; ?>
2
+
3
+	<div class="content">	
4
+		<div class="page-header">
5
+			<h1><?php echo ucfirst($decrmode) ?> Entry</h1>
6
+		</div>
7
+	<div class="row">
8
+		<div class="span-14">
9
+
10
+			<?php include "incl-entry-title.php"; ?>
11
+			<br/>
12
+			<?php include "incl-entry-body.php"; ?>
13
+		</div>
14
+	</div>
15
+
16
+<?php include "footer.php"; ?>
0 17
new file mode 100644
... ...
@@ -0,0 +1,67 @@
1
+<?php include "header.php"; ?>
2
+	<div class="content">	
3
+		<div class="page-header">
4
+			<h1><?php if ( $pgtitle ) { echo $pgtitle; } else { echo 'Create a New Entry'; } ?></h1>
5
+		</div>
6
+	<div class="row">
7
+		<div class="span-14">		
8
+			<form action="<?php echo $myfname ?>" method="post" onsubmit="return check_pf()" autocomplete="off">
9
+			<div>
10
+			<input name="defcat" type="hidden" value="<?php echo escape_for_html($cat) ?>"/>
11
+			<input name="deft1"  type="hidden" value="<?php echo escape_for_html($t1) ?>"/>
12
+			<input name="deft2"  type="hidden" value="<?php echo escape_for_html($t2) ?>"/>
13
+			<input name="mode"   type="hidden" value="<?php echo escape_for_html($mode) ?>"/>
14
+			<table class="entry">
15
+			  <tr><td>Category: *</td><td>
16
+			    <table class="raw"><tr><td>existing:</td><td><select name="catdl" size="1"><option></option>
17
+			    <?php
18
+			      foreach ($cats as $currcat){
19
+			      print "<option".($cat==$currcat ? " selected":"").">" . escape_for_html($currcat) . "</option>";
20
+			      }
21
+			    ?>
22
+			    </select></td></tr>
23
+			    <tr><td>or new:</td><td><input name="cat" type="text" value="<?php echo escape_for_html($newcat) ?>" size="20" maxlength="200"/></td></tr>
24
+			    </table>
25
+			  </td></tr>
26
+			  <tr><td>Title:   *</td><td><input id="t1" name="t1" type="text" value="<?php echo escape_for_html($t1) ?>" size="20" maxlength="200"/></td></tr>
27
+			  <tr><td>Subtitle:</td><td><input name="t2" type="text" value="<?php echo escape_for_html($t2) ?>" size="20" maxlength="200"/></td></tr>
28
+			</table>
29
+			
30
+			<p>encrypted:</p>
31
+			<table class="encrbox">
32
+			  <tr><td>URL:</td><td>
33
+			  <input name="newp2"    type="text" value="<?php echo escape_for_html($encfields[2]) ?>" size="20" maxlength="200"/>
34
+			  </td></tr>
35
+			  <tr><td>Login:</td><td>
36
+			  <input name="newp1"    type="text" value="<?php echo escape_for_html($encfields[1]) ?>" size="20" maxlength="200"/>
37
+			  </td></tr>
38
+			  <tr><td>Password: *</td><td>
39
+			  <input id="newp3" name="newp3"    type="text" value="<?php echo escape_for_html($encfields[3]) ?>" size="20" maxlength="200"/>
40
+			  Generate: 
41
+			  <input type="button" value="cQ3" onclick="generate_password ('newp3', 'c')"/>
42
+			  <input type="button" value="cQ3_!" onclick="generate_password ('newp3', 's')"/>
43
+			  <input type="button" value="cQ3_!<£" onclick="generate_password ('newp3', 'a')"/>
44
+			  </td></tr>
45
+			  <tr><td> 
46
+			  <input name="newp8" type="text" value="<?php echo escape_for_html($encfields[8]) ?>" size="6" maxlength="30"/>
47
+			  :</td><td>
48
+			  <input name="newp9" type="text" value="<?php echo escape_for_html($encfields[9]) ?>" size="20" maxlength="200"/>
49
+			  </td></tr>
50
+			  <tr><td>Note:</td><td>
51
+			  <textarea name="newnote" cols="40" rows="6"><?php echo escape_for_html($encfields[$nbencfields]) ?></textarea>
52
+			  </td></tr>
53
+			</table>
54
+			
55
+			
56
+			<p>
57
+			Passphrase: <input id="pf" name="pf" type="password" value="" size="20" maxlength="200"/>
58
+			<input type="checkbox" id="display_pf" onchange="toggle_pf('pf')" />
59
+			</p>
60
+			<p>
61
+			<input type="submit" name="entrysave" value="save entry" />
62
+			</p>
63
+			</div>
64
+			</form>
65
+		</div>
66
+	</div>
67
+<?php include "footer.php"; ?>
0 68
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+	<?php if(count($records)==0){ ?>
2
+	  <div class="footer"><span>Password manager powered by <a href="http://simplevault.sourceforge.net">SimpleVault</a></span></div>
3
+	<?php } ?>
4
+
5
+</div>
6
+
7
+</body>
8
+</html>
0 9
\ No newline at end of file
1 10
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
2
+	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+<html xmlns="http://www.w3.org/1999/xhtml">
4
+<head>
5
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+	<meta name="robots" content="noarchive,nofollow" />
7
+	<meta http-equiv="cache-control" content="no-cache" />
8
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
9
+	<title><?= $pgtitle ?> - Simple Vault</title>
10
+	<link href="<?php echo $template; ?>/tpl.css" rel="stylesheet" type="text/css" media="screen" />
11
+	<link rel="shortcut icon" href="img/favicon.ico" />
12
+	<script type="text/javascript" src="/sv.js"></script>  
13
+</head>
14
+
15
+<body>
16
+
17
+    <div class="topbar">
18
+      <div class="fill">
19
+        <div class="container">
20
+          <a class="brand" href="/">Simple Vault</a>
21
+  		  <form action="index.php" method="get" style="width: 688px;">
22
+		  <div id="nav-main">
23
+		  	<ul>
24
+		  		<li><a href="index.php">Home</a></li>
25
+		  		<li><a href="?tools">Tools</a></li>
26
+		  		<li>
27
+		  			<a href="#">Categories</a>
28
+		  			<ul>
29
+					    <?php foreach ($cats as $currcat){ ?>
30
+					      <li><a href="?cat=<?php echo urlencode($currcat); ?>"><?php echo escape_for_html($currcat); ?> <?php echo " (".svcountcatentries($currcat).")"; ?></a></li>
31
+					    <?php } ?>		  				
32
+		  			</ul>
33
+		  		</li>
34
+		  		<li><a href="?new=1&amp;cat=<?php echo urlencode($defcat) ?>">Add New Entry</a></li>
35
+		  	</ul>
36
+			  <div class="pull-right">
37
+				<input type="text" name="s" value="<?= htmlspecialchars ($filter) ?>" size ="7" id="inpfield" />
38
+				<input type="submit" class="button" name="image" value="Filter" title="run filter" />
39
+			  </div>		  	
40
+		  </div>
41
+		  </form>
42
+        </div>
43
+      </div>
44
+    </div>
45
+    <div class="container" id="messages">
46
+    	<div class="row">
47
+    		<div class="span-14">
48
+				<?php foreach($errormsg as $msg){ ?>
49
+				<div class="alert-message error"><?php echo escape_for_html($msg) ?></div>
50
+				<?php } ?>
51
+				
52
+				<?php foreach($infomsg as $msg){ ?>
53
+				<div class="alert-message info"><?php echo escape_for_html($msg) ?></div>
54
+				<?php } ?>    
55
+			</div>
56
+		</div>
57
+    </div>
58
+    
59
+    <div class="container">
60
+
0 61
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+<table class="encrbox">
2
+<tr><td>URL:</td><td>       <?php echo print_url(escape_for_html($decfields[2])) ?></td></tr>
3
+<tr><td>Login:</td><td>     <?php echo escape_for_html($decfields[1])  ?></td></tr>
4
+<tr><td>Password:</td><td>  <?php echo escape_for_html($decfields[3])  ?></td></tr>
5
+<?php  if(strlen($decfields[8]) > 0){ ?>
6
+    <tr><td><?php echo escape_for_html($decfields[8]) ?>:</td><td><?php echo escape_for_html($decfields[9]) ?></td></tr>
7
+<?php  } ?>
8
+<tr><td>Note:</td><td><pre><?php echo escape_for_html($decfields[$nbencfields]) ?></pre></td></tr>
9
+</table>
10
+ 
0 11
\ No newline at end of file
1 12
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+<table class="entry">
2
+<tr><td>Category:</td><td><?php echo escape_for_html($cat) ?></td></tr>
3
+<tr><td>Title:</td><td><?php echo escape_for_html($t1) ?></td></tr>
4
+<tr><td>Subtitle:</td><td><?php echo escape_for_html($t2) ?></td></tr>
5
+</table>
0 6
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+    <div class="topbar">
2
+      <div class="fill">
3
+        <div class="container">
4
+          <a class="brand" href="/">Site Vault</a>
5
+  		  <form action="index.php" method="get">
6
+		  <div id="nav-main">
7
+		  	<ul class="menu">
8
+		  		<li><a href="index.php">Home</a></li>
9
+		  		<li><a href="?tools">Tools</a></li>
10
+		  		<li>
11
+		  			<a href="#">Categories</a>
12
+		  			<ul>
13
+					    <?php foreach ($cats as $currcat){ ?>
14
+					      <li><a href="?cat=<?php echo urlencode($currcat); ?>"><?php echo escape_for_html($currcat); ?> <?php echo " (".svcountcatentries($currcat).")"; ?></a></li>
15
+					    <?php } ?>		  				
16
+		  			</ul>
17
+		  		</li>
18
+		  		<li><a href="?new=1&amp;cat=<?php echo urlencode($defcat) ?>">Add New Entry</a></li>
19
+		  	</ul>
20
+		  </div>
21
+<!--
22
+		  <div id="searchbox" class="pull-right">
23
+			<input type="text" name="s" value="<?= htmlspecialchars ($filter) ?>" size ="7" id="inpfield" />
24
+			<input type="submit" class="button" name="image" value="Filter" title="run filter" />
25
+		  </div>
26
+-->
27
+		  </form>
28
+        </div>
29
+      </div>
30
+    </div>
31
+    <div class="container">
32
+    	<div class="row">
33
+    		<div class="span-14">
34
+				<?php foreach($errormsg as $msg){ ?>
35
+				<div class="alert-message error"><?php echo escape_for_html($msg) ?></div>
36
+				<?php } ?>
37
+				
38
+				<?php foreach($infomsg as $msg){ ?>
39
+				<div class="alert-message info"><?php echo escape_for_html($msg) ?></div>
40
+				<?php } ?>    
41
+			</div>
42
+		</div>
43
+    </div>
44
+    
45
+    <div class="container">
46
+
0 47
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+<?php include "header.php"; ?>
2
+
3
+	<div class="content">	
4
+		<div class="page-header">
5
+			<h1><?php echo $pgtitle ?></h1>
6
+		</div>
7
+	<div class="row">
8
+		<div class="span-14">
9
+			<table class="entry zebra-striped">
10
+				<thead>
11
+					<th>Category</th>
12
+					<th>Title</th>					
13
+					<th>Sub-title</th>		
14
+					<th class="text-center">Unlock</th>								
15
+					<th class="text-center">Edit</th>													
16
+					<th class="text-center">Delete</th>							
17
+				</thead>
18
+				<tbody>
19
+					<?php foreach ($records as $record){?>
20
+					  <tr>
21
+						<td><?php echo escape_for_html($record["cat"])?></td>
22
+						<td><?php echo escape_for_html($record["t1"])?></td>
23
+						<td><?php echo escape_for_html($record["t2"]) ?></td>
24
+						<td class="text-center"><a href="?dec=1&amp;cat=<?php echo urlencode($record["cat"]); ?>&amp;t1=<?php echo urlencode($record["t1"]); ?>&amp;t2=<?php echo urlencode($record["t2"]); ?>"><img src="<?php echo $template; ?>/images/decrypt.png"  title="decrypt" alt="decrypt"/></a></td>
25
+						<td class="text-center"><a href="?edt=1&amp;cat=<?php echo urlencode($record["cat"]); ?>&amp;t1=<?php echo urlencode($record["t1"]); ?>&amp;t2=<?php echo urlencode($record["t2"]); ?>"><img src="<?php echo $template; ?>/images/edit.png"  title="edit" alt="edit"/></a></td>
26
+						<td class="text-center"><a href="?del=1&amp;cat=<?php echo urlencode($record["cat"]); ?>&amp;t1=<?php echo urlencode($record["t1"]); ?>&amp;t2=<?php echo urlencode($record["t2"]); ?>"><img src="<?php echo $template; ?>/images/delete.png"  title="delete" alt="delete"/></a></td>
27
+					  </tr>
28
+					<?php }?>
29
+				</tbody>
30
+			</table>
31
+		</div>
32
+	</div>
33
+	
34
+<?php include "footer.php"; ?>
0 35
new file mode 100644
... ...
@@ -0,0 +1,61 @@
1
+<?php include "header.php"; ?>
2
+	<div class="content">	
3
+		<div class="page-header">
4
+			<h1>Tools</h1>
5
+		</div>
6
+	<div class="row">
7
+		<div class="span-14">
8
+			<h2>Bulk Decrypt Entries</h2>
9
+			<form action="index.php" method="post"  autocomplete="off">
10
+			  <p>Passphrase: <input name="pf" value="" size="20" maxlength="200" type="password"/> &nbsp; <input name="bulkdecrypt" value="Decrypt all" type="submit"/></p>
11
+			</form>
12
+			<div class="helptext"><span>This function at once decrypts and displays all entries that can be decrypted with the <i>passphrase</i>.</span></div>
13
+			
14
+			<hr/>
15
+			
16
+			<h2>Bulk Change Passphrase</h2>
17
+			<form action="index.php" method="post"  autocomplete="off">
18
+			  <p>Old Passphrase: <input name="oldpf" value="" size="20" maxlength="200" type="password"/> &nbsp; New Passphrase: <input name="newpf" value="" size="20" maxlength="200" type="password"/> 
19
+			  <input name="bulkchangepf" value="Change all" type="submit"/></p>
20
+			</form>
21
+			<div class="helptext"><span>This function scans all entries and sets the <i>new passphrase</i> for those entries that can be decrypted with the <i>old passphrase</i>. Those entries that cannot be decrypted with the <i>old passphrase</i> are not modified.</span></div>
22
+			
23
+			<hr/>
24
+			
25
+			<h2>Import Entries</h2>
26
+			<form action="index.php" method="post" enctype="multipart/form-data"  autocomplete="off">
27
+			<table><tbody>
28
+			<tr><td>Import File: </td><td><input name="MAX_FILE_SIZE" value="30000000" type="hidden"/><input name="importfile" size="50" type="file"/> </td></tr>
29
+			<tr><td>Category: </td><td><select name="importcat" size="1">
30
+			<?php  foreach ($cats as $cat){
31
+			    print "<option>" . escape_for_html($cat) . "</option>";    
32
+			  } ?>
33
+			</select></td></tr>
34
+			<tr><td>Passphrase: </td><td><input name="pf" value="" size="20" maxlength="200" type="password"/> &nbsp; <input name="bulkimportentries" value="Import" type="submit"/></td></tr>
35
+			</tbody></table>
36
+			</form>
37
+			<div class="helptext">This function imports entries from an uploaded file into a category. All imported entries are encrypted with the same <i>passphrase</i>. <br/>
38
+			
39
+			Format of the uploaded file: Whenever a text line starts with the string <tt>Title:</tt> a new entry is created. The respective fields of an entry are set to the values of lines starting with <tt>Subtitle, URL:, Login:, Password: </tt>or<tt> Note: </tt> Note is the only multi-line field. <br/>
40
+			<br/>
41
+			Example (with two entries):<br/>
42
+			<pre>Title: Host Pluto
43
+			Login: johndoe
44
+			Password: mypasswd
45
+			URL: http://my.site.org
46
+			Note:
47
+			Here follows some
48
+			multi-line text
49
+			
50
+			Title: Host Janus
51
+			Subtitle: db account
52
+			Login: janedoe
53
+			Password: janespwd
54
+			URL: 
55
+			Note:
56
+			</pre>
57
+			</div>
58
+		</div>
59
+	</div>
60
+
61
+<?php include "footer.php"; ?>
0 62
\ No newline at end of file
1 63
new file mode 100644
... ...
@@ -0,0 +1,2611 @@
1
+/*
2
+Theme Name: Password Keeps.in 
3
+Theme URI: http://matthewaprice.com/
4
+Description: Keeps.in theme.  based on twitter boostrap
5
+Author: matthewaprice
6
+Author URI: http://matthewaprice.com/
7
+Version: 0.0.1
8
+
9
+!
10
+ * Bootstrap v1.3.0
11
+ *
12
+ * Copyright 2011 Twitter, Inc
13
+ * Licensed under the Apache License v2.0
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
17
+ * Date: Mon Oct 10 14:31:07 CDT 2011
18
+ */
19
+/* Reset.less
20
+ * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here	that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
21
+ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
22
+html, body {
23
+  margin: 0;
24
+  padding: 0;
25
+}
26
+h1,
27
+h2,
28
+h3,
29
+h4,
30
+h5,
31
+h6,
32
+p,
33
+blockquote,
34
+pre,
35
+a,
36
+abbr,
37
+acronym,
38
+address,
39
+cite,
40
+code,
41
+del,
42
+dfn,
43
+em,
44
+img,
45
+q,
46
+s,
47
+samp,
48
+small,
49
+strike,
50
+strong,
51
+sub,
52
+sup,
53
+tt,
54
+var,
55
+dd,
56
+dl,
57
+dt,
58
+li,
59
+ol,
60
+ul,
61
+fieldset,
62
+form,
63
+label,
64
+legend,
65
+button,
66
+table,
67
+caption,
68
+tbody,
69
+tfoot,
70
+thead,
71
+tr,
72
+th,
73
+td {
74
+  margin: 0;
75
+  padding: 0;
76
+  border: 0;
77
+  font-weight: normal;
78
+  font-style: normal;
79
+  font-size: 100%;
80
+  line-height: 1;
81
+  font-family: inherit;
82
+}
83
+table {
84
+  border-collapse: collapse;
85
+  border-spacing: 0;
86
+}
87
+ol, ul {
88
+  list-style: none;
89
+}
90
+q:before,
91
+q:after,
92
+blockquote:before,
93
+blockquote:after {
94
+  content: "";
95
+}
96
+html {
97
+  overflow-y: scroll;
98
+  font-size: 100%;
99
+  -webkit-text-size-adjust: 100%;
100
+  -ms-text-size-adjust: 100%;
101
+}
102
+a:focus {
103
+  outline: thin dotted;
104
+}
105
+a:hover, a:active {
106
+  outline: 0;
107
+}
108
+article,
109
+aside,
110
+details,
111
+figcaption,
112
+figure,
113
+footer,
114
+header,
115
+hgroup,
116
+nav,
117
+section {
118
+  display: block;
119
+}
120
+audio, canvas, video {
121
+  display: inline-block;
122
+  *display: inline;
123
+  *zoom: 1;
124
+}
125
+audio:not([controls]) {
126
+  display: none;
127
+}
128
+sub, sup {
129
+  font-size: 75%;
130
+  line-height: 0;
131
+  position: relative;
132
+  vertical-align: baseline;
133
+}
134
+sup {
135
+  top: -0.5em;
136
+}
137
+sub {
138
+  bottom: -0.25em;
139
+}
140
+img {
141
+  border: 0;
142
+  -ms-interpolation-mode: bicubic;
143
+}
144
+button,
145
+input,
146
+select,
147
+textarea {
148
+  font-size: 100%;
149
+  margin: 0;
150
+  vertical-align: baseline;
151
+  *vertical-align: middle;
152
+}
153
+button, input {
154
+  line-height: normal;
155
+  *overflow: visible;
156
+}
157
+button::-moz-focus-inner, input::-moz-focus-inner {
158
+  border: 0;
159
+  padding: 0;
160
+}
161
+button,
162
+input[type="button"],
163
+input[type="reset"],
164
+input[type="submit"] {
165
+  cursor: pointer;
166
+  -webkit-appearance: button;
167
+}
168
+input[type="search"] {
169
+  -webkit-appearance: textfield;
170
+  -webkit-box-sizing: content-box;
171
+  -moz-box-sizing: content-box;
172
+  box-sizing: content-box;
173
+}
174
+input[type="search"]::-webkit-search-decoration {
175
+  -webkit-appearance: none;
176
+}
177
+textarea {
178
+  overflow: auto;
179
+  vertical-align: top;
180
+}
181
+/* Variables.less
182
+ * Variables to customize the look and feel of Bootstrap
183
+ * ----------------------------------------------------- */
184
+/* Mixins.less
185
+ * Snippets of reusable CSS to develop faster and keep code readable
186
+ * ----------------------------------------------------------------- */
187
+/*
188
+ * Scaffolding
189
+ * Basic and global styles for generating a grid system, structural layout, and page templates
190
+ * ------------------------------------------------------------------------------------------- */
191
+html, body {
192
+  background-color: #ffffff;
193
+}
194
+body {
195
+  margin: 0;
196
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
197
+  font-size: 13px;
198
+  font-weight: normal;
199
+  line-height: 18px;
200
+  color: #404040;
201
+}
202
+.container {
203
+  width: 940px;
204
+  margin-left: auto;
205
+  margin-right: auto;
206
+  zoom: 1;
207
+}
208
+.container:before, .container:after {
209
+  display: table;
210
+  content: "";
211
+  zoom: 1;
212
+  *display: inline;
213
+}
214
+.container:after {
215
+  clear: both;
216
+}
217
+.container-fluid {
218
+  position: relative;
219
+  min-width: 940px;
220
+  padding-left: 20px;
221
+  padding-right: 20px;
222
+  zoom: 1;
223
+}
224
+.container-fluid:before, .container-fluid:after {
225
+  display: table;
226
+  content: "";
227
+  zoom: 1;
228
+  *display: inline;
229
+}
230
+.container-fluid:after {
231
+  clear: both;
232
+}
233
+.container-fluid > .sidebar {
234
+  float: left;
235
+  width: 220px;
236
+}
237
+.container-fluid > .content {
238
+  margin-left: 240px;
239
+}
240
+a {
241
+  color: #0069d6;
242
+  text-decoration: none;
243
+  line-height: inherit;
244
+  font-weight: inherit;
245
+}
246
+a:hover {
247
+  color: #00438a;
248
+  text-decoration: underline;
249
+}
250
+.pull-right {
251
+  float: right;
252
+}
253
+.pull-left {
254
+  float: left;
255
+}
256
+.hide {
257
+  display: none;
258
+}
259
+.show {
260
+  display: block;
261
+}
262
+.row {
263
+  zoom: 1;
264
+  margin-left: -20px;
265
+}
266
+.row:before, .row:after {
267
+  display: table;
268
+  content: "";
269
+  zoom: 1;
270
+  *display: inline;
271
+}
272
+.row:after {
273
+  clear: both;
274
+}
275
+[class*="span"] {
276
+  display: inline;
277
+  float: left;
278
+  margin-left: 20px;
279
+}
280
+.span1 {
281
+  width: 40px;
282
+}
283
+.span2 {
284
+  width: 100px;
285
+}
286
+.span3 {
287
+  width: 160px;
288
+}
289
+.span4 {
290
+  width: 220px;
291
+}
292
+.span5 {
293
+  width: 280px;
294
+}
295
+.span6 {
296
+  width: 340px;
297
+}
298
+.span7 {
299
+  width: 400px;
300
+}
301
+.span8 {
302
+  width: 460px;
303
+}
304
+.span9 {
305
+  width: 520px;
306
+}
307
+.span10 {
308
+  width: 580px;
309
+}
310
+.span11 {
311
+  width: 640px;
312
+}
313
+.span12 {
314
+  width: 700px;
315
+}
316
+.span13 {
317
+  width: 760px;
318
+}
319
+.span14 {
320
+  width: 820px;
321
+}
322
+.span15 {
323
+  width: 880px;
324
+}
325
+.span16 {
326
+  width: 940px;
327
+}
328
+.span17 {
329
+  width: 1000px;
330
+}
331
+.span18 {
332
+  width: 1060px;
333
+}
334
+.span19 {
335
+  width: 1120px;
336
+}
337
+.span20 {
338
+  width: 1180px;
339
+}
340
+.span21 {
341
+  width: 1240px;
342
+}
343
+.span22 {
344
+  width: 1300px;
345
+}
346
+.span23 {
347
+  width: 1360px;
348
+}
349
+.span24 {
350
+  width: 1420px;
351
+}
352
+.offset1 {
353
+  margin-left: 80px;
354
+}
355
+.offset2 {
356
+  margin-left: 140px;
357
+}
358
+.offset3 {
359
+  margin-left: 200px;
360
+}
361
+.offset4 {
362
+  margin-left: 260px;
363
+}
364
+.offset5 {
365
+  margin-left: 320px;
366
+}
367
+.offset6 {
368
+  margin-left: 380px;
369
+}
370
+.offset7 {
371
+  margin-left: 440px;
372
+}
373
+.offset8 {
374
+  margin-left: 500px;
375
+}
376
+.offset9 {
377
+  margin-left: 560px;
378
+}
379
+.offset10 {
380
+  margin-left: 620px;
381
+}
382
+.offset11 {
383
+  margin-left: 680px;
384
+}
385
+.offset12 {
386
+  margin-left: 740px;
387
+}
388
+.span-one-third {
389
+  width: 300px;
390
+}
391
+.span-two-thirds {
392
+  width: 620px;
393
+}
394
+.offset-one-third {
395
+  margin-left: 340px;
396
+}
397
+.offset-two-thirds {
398
+  margin-left: 660px;
399
+}
400
+/* Typography.less
401
+ * Headings, body text, lists, code, and more for a versatile and durable typography system
402
+ * ---------------------------------------------------------------------------------------- */
403
+p {
404
+  font-size: 13px;
405
+  font-weight: normal;
406
+  line-height: 18px;
407
+  margin-bottom: 9px;
408
+}
409
+p small {
410
+  font-size: 11px;
411
+  color: #bfbfbf;
412
+}
413
+h1,
414
+h2,
415
+h3,
416
+h4,
417
+h5,
418
+h6 {
419
+  font-weight: bold;
420
+  color: #404040;
421
+}
422
+h1 small,
423
+h2 small,
424
+h3 small,
425
+h4 small,
426
+h5 small,
427
+h6 small {
428
+  color: #bfbfbf;
429
+}
430
+h1 {
431
+  margin-bottom: 18px;
432
+  font-size: 30px;
433
+  line-height: 36px;
434
+}
435
+h1 small {
436
+  font-size: 18px;
437
+}
438
+h2 {
439
+  font-size: 24px;
440
+  line-height: 36px;
441
+  margin-bottom: 15px;  
442
+}
443
+h2 small {
444
+  font-size: 14px;
445
+}
446
+h3,
447
+h4,
448
+h5,
449
+h6 {
450
+  line-height: 36px;
451
+}
452
+h3 {
453
+  font-size: 18px;
454
+}
455
+h3 small {
456
+  font-size: 14px;
457
+}
458
+h4 {
459
+  font-size: 16px;
460
+}
461
+h4 small {
462
+  font-size: 12px;
463
+}
464
+h5 {
465
+  font-size: 14px;
466
+}
467
+h6 {
468
+  font-size: 13px;
469
+  color: #bfbfbf;
470
+  text-transform: uppercase;
471
+}
472
+ul, ol {
473
+  margin: 0 0 18px 25px;
474
+}
475
+ul ul,
476
+ul ol,
477
+ol ol,
478
+ol ul {
479
+  margin-bottom: 0;
480
+}
481
+ul {
482
+  list-style: disc;
483
+}
484
+ol {
485
+  list-style: decimal;
486
+}
487
+li {
488
+  line-height: 18px;
489
+  color: #808080;
490
+}
491
+ul.unstyled {
492
+  list-style: none;
493
+  margin-left: 0;
494
+}
495
+dl {
496
+  margin-bottom: 18px;
497
+}
498
+dl dt, dl dd {
499
+  line-height: 18px;
500
+}
501
+dl dt {
502
+  font-weight: bold;
503
+}
504
+dl dd {
505
+  margin-left: 9px;
506
+}
507
+hr {
508
+  margin: 20px 0 19px;
509
+  border: 0;
510
+  border-bottom: 1px solid #eee;
511
+}
512
+strong {
513
+  font-style: inherit;
514
+  font-weight: bold;
515
+}
516
+em {
517
+  font-style: italic;
518
+  font-weight: inherit;
519
+  line-height: inherit;
520
+}
521
+.muted {
522
+  color: #bfbfbf;
523
+}
524
+blockquote {
525
+  margin-bottom: 18px;
526
+  border-left: 5px solid #eee;
527
+  padding-left: 15px;
528
+}
529
+blockquote p {
530
+  font-size: 14px;
531
+  font-weight: 300;
532
+  line-height: 18px;
533
+  margin-bottom: 0;
534
+}
535
+blockquote small {
536
+  display: block;
537
+  font-size: 12px;
538
+  font-weight: 300;
539
+  line-height: 18px;
540
+  color: #bfbfbf;
541
+}
542
+blockquote small:before {
543
+  content: '\2014 \00A0';
544
+}
545
+address {
546
+  display: block;
547
+  line-height: 18px;
548
+  margin-bottom: 18px;
549
+}
550
+code, pre {
551
+  padding: 0 3px 2px;
552
+  font-family: Monaco, Andale Mono, Courier New, monospace;
553
+  font-size: 12px;
554
+  -webkit-border-radius: 3px;
555
+  -moz-border-radius: 3px;
556
+  border-radius: 3px;
557
+}
558
+code {
559
+  background-color: #fee9cc;
560
+  color: rgba(0, 0, 0, 0.75);
561
+  padding: 1px 3px;
562
+}
563
+pre {
564
+  background-color: #f5f5f5;
565
+  display: block;
566
+  padding: 8.5px;
567
+  margin: 0 0 18px;
568
+  line-height: 18px;
569
+  font-size: 12px;
570
+  border: 1px solid #ccc;
571
+  border: 1px solid rgba(0, 0, 0, 0.15);
572
+  -webkit-border-radius: 3px;
573
+  -moz-border-radius: 3px;
574
+  border-radius: 3px;
575
+  white-space: pre;
576
+  white-space: pre-wrap;
577
+  word-wrap: break-word;
578
+}
579
+/* Forms.less
580
+ * Base styles for various input types, form layouts, and states
581
+ * ------------------------------------------------------------- */
582
+form {
583
+  margin-bottom: 18px;
584
+}
585
+fieldset {
586
+  margin-bottom: 18px;
587
+  padding-top: 18px;
588
+}
589
+fieldset legend {
590
+  display: block;
591
+  padding-left: 150px;
592
+  font-size: 19.5px;
593
+  line-height: 1;
594
+  color: #404040;
595
+  *padding: 0 0 5px 145px;
596
+  /* IE6-7 */
597
+
598
+  *line-height: 1.5;
599
+  /* IE6-7 */
600
+
601
+}
602
+form .clearfix {
603
+  margin-bottom: 18px;
604
+  zoom: 1;
605
+}
606
+form .clearfix:before, form .clearfix:after {
607
+  display: table;
608
+  content: "";
609
+  zoom: 1;
610
+  *display: inline;
611
+}
612
+form .clearfix:after {
613
+  clear: both;
614
+}
615
+label,
616
+input,
617
+select,
618
+textarea {
619
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
620
+  font-size: 13px;
621
+  font-weight: normal;
622
+  line-height: normal;
623
+}
624
+label {
625
+  padding-top: 6px;
626
+  font-size: 13px;
627
+  line-height: 18px;
628
+  float: left;
629
+  width: 130px;
630
+  text-align: right;
631
+  color: #404040;
632
+}
633
+form .input {
634
+  margin-left: 150px;
635
+}
636
+input[type=checkbox], input[type=radio] {
637
+  cursor: pointer;
638
+}
639
+input,
640
+textarea,
641
+select,
642
+.uneditable-input {
643
+  display: inline-block;
644
+  width: 210px;
645
+  height: 18px;
646
+  padding: 4px;
647
+  font-size: 13px;
648
+  line-height: 18px;
649
+  color: #808080;
650
+  border: 1px solid #ccc;
651
+  -webkit-border-radius: 3px;
652
+  -moz-border-radius: 3px;
653
+  border-radius: 3px;
654
+}
655
+/* mini reset for non-html5 file types */
656
+input[type=checkbox], input[type=radio] {
657
+  width: auto;
658
+  height: auto;
659
+  padding: 0;
660
+  margin: 3px 0;
661
+  *margin-top: 0;
662
+  /* IE6-7 */
663
+
664
+  line-height: normal;
665
+  border: none;
666
+}
667
+input[type=file] {
668
+  background-color: #ffffff;
669
+  padding: initial;
670
+  border: initial;
671
+  line-height: initial;
672
+  -webkit-box-shadow: none;
673
+  -moz-box-shadow: none;
674
+  box-shadow: none;
675
+}
676
+input[type=button], input[type=reset], input[type=submit] {
677
+  width: auto;
678
+  height: auto;
679
+}
680
+select, input[type=file] {
681
+  height: 27px;
682
+  line-height: 27px;
683
+  *margin-top: 4px;
684
+  /* For IE7, add top margin to align select with labels */
685
+
686
+}
687
+select[multiple] {
688
+  height: inherit;
689
+}
690
+textarea {
691
+  height: auto;
692
+}
693
+.uneditable-input {
694
+  background-color: #ffffff;
695
+  display: block;
696
+  border-color: #eee;
697
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
698
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
699
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
700
+  cursor: not-allowed;
701
+}
702
+:-moz-placeholder {
703
+  color: #bfbfbf;
704
+}
705
+::-webkit-input-placeholder {
706
+  color: #bfbfbf;
707
+}
708
+input, textarea {
709
+  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
710
+  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
711
+  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
712
+  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
713
+  transition: border linear 0.2s, box-shadow linear 0.2s;
714
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
715
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
716
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
717
+}
718
+input:focus, textarea:focus {
719
+  outline: 0;
720
+  border-color: rgba(82, 168, 236, 0.8);
721
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
722
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
723
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
724
+}
725
+input[type=file]:focus, input[type=checkbox]:focus, select:focus {
726
+  -webkit-box-shadow: none;
727
+  -moz-box-shadow: none;
728
+  box-shadow: none;
729
+  outline: 1px dotted #666;
730
+}
731
+form div.clearfix.error {
732
+  background: #fae5e3;
733
+  padding: 10px 0;
734
+  margin: -10px 0 10px;
735
+  -webkit-border-radius: 4px;
736
+  -moz-border-radius: 4px;
737
+  border-radius: 4px;
738
+}
739
+form div.clearfix.error > label, form div.clearfix.error span.help-inline, form div.clearfix.error span.help-block {
740
+  color: #9d261d;
741
+}
742
+form div.clearfix.error input, form div.clearfix.error textarea {
743
+  border-color: #c87872;
744
+  -webkit-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25);
745
+  -moz-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25);
746
+  box-shadow: 0 0 3px rgba(171, 41, 32, 0.25);
747
+}
748
+form div.clearfix.error input:focus, form div.clearfix.error textarea:focus {
749
+  border-color: #b9554d;
750
+  -webkit-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5);
751
+  -moz-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5);
752
+  box-shadow: 0 0 6px rgba(171, 41, 32, 0.5);
753
+}
754
+form div.clearfix.error .input-prepend span.add-on, form div.clearfix.error .input-append span.add-on {
755
+  background: #f4c8c5;
756
+  border-color: #c87872;
757
+  color: #b9554d;
758
+}
759
+.input-mini,
760
+input.mini,
761
+textarea.mini,
762
+select.mini {
763
+  width: 60px;
764
+}
765
+.input-small,
766
+input.small,
767
+textarea.small,
768
+select.small {
769
+  width: 90px;
770
+}
771
+.input-medium,
772
+input.medium,
773
+textarea.medium,
774
+select.medium {
775
+  width: 150px;
776
+}
777
+.input-large,
778
+input.large,
779
+textarea.large,
780
+select.large {
781
+  width: 210px;
782
+}
783
+.input-xlarge,
784
+input.xlarge,
785
+textarea.xlarge,
786
+select.xlarge {
787
+  width: 270px;
788
+}
789
+.input-xxlarge,
790
+input.xxlarge,
791
+textarea.xxlarge,
792
+select.xxlarge {
793
+  width: 530px;
794
+}
795
+textarea.xxlarge {
796
+  overflow-y: auto;
797
+}
798
+input.span1, textarea.span1, select.span1 {
799
+  display: inline-block;
800
+  float: none;
801
+  width: 30px;
802
+  margin-left: 0;
803
+}
804
+input.span2, textarea.span2, select.span2 {
805
+  display: inline-block;
806
+  float: none;