Fix javascript require problem
This commit is contained in:
		@@ -32,8 +32,10 @@ $user = (isset($_POST['user'])) ? $_POST['user'] : "";
 | 
			
		||||
<head>
 | 
			
		||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="ressources/gpass.css" />
 | 
			
		||||
<script src="ressources/gpass.js"></script>
 | 
			
		||||
<script src="ressources/jssha256.js"></script>
 | 
			
		||||
<script src="ressources/hmac.js"></script>
 | 
			
		||||
<script src="ressources/pkdbf2.js"></script>
 | 
			
		||||
<script src="ressources/gpass.js"></script>
 | 
			
		||||
<?php
 | 
			
		||||
    global $user;
 | 
			
		||||
if ($user == "")
 | 
			
		||||
@@ -103,7 +105,8 @@ else
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
        echo "</select>\n";
 | 
			
		||||
    echo '  <b>Master key </b> <input id="see_password" type="password" name="mkey"/> <input name="see" type="submit" value="See" onclick="a=document.getElementById("selected_user") ; return derive_mkey(a.options[a.selectedIndex].value, "see_password") ;"/>' . "\n";
 | 
			
		||||
        echo '  <b>Master key </b> <input id="see_password" type="password" name="mkey"/>';
 | 
			
		||||
        echo "<input name=\"see\" type=\"submit\" value=\"See\" onclick=\"a=document.getElementById('selected_user') ; return derive_mkey(a.options[a.selectedIndex].value, 'see_password') ;\"/>" . "\n";
 | 
			
		||||
}
 | 
			
		||||
?>
 | 
			
		||||
</form>
 | 
			
		||||
@@ -168,7 +171,7 @@ if ($user != "")
 | 
			
		||||
    echo 'password <input id="new_password" type="text" name="pwd"/>';
 | 
			
		||||
    echo 'master key <input id="new_mkey" 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); return derive_mkey($user, 'new_mkey') ;\"/>";
 | 
			
		||||
    echo "<input type=\"submit\" name=\"add\" value=\"Add\" onclick=\"a = document.getElementById('new_url') ; a.value = url_domain(a.value); return derive_mkey('$user', 'new_mkey') ;\"/>";
 | 
			
		||||
    echo '</form>' . "\n";
 | 
			
		||||
}
 | 
			
		||||
?>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user