Skip to content

Commit 4dad01e

Browse files
authored
Add files via upload
1 parent 2cbe498 commit 4dad01e

File tree

3 files changed

+81
-3
lines changed

3 files changed

+81
-3
lines changed

finpulse.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ <h4> Last Seen </h4>
952952
<span>${delt}</span>
953953
</div><br>
954954
955-
<button onclick="nknfetEx(this)">View BackUP File Uploaded Time</button>
955+
<button onclick="location.href='userupd.html'"> Account Update </button>
956956
<hr>
957957
<div style="display:flex;justify-content:space-evenly;color:red;">
958958
<h5 onclick="location.href='logout.html'" style="color:red;margin:0;"> Logout Acount</h5>

login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
<form id="f">
8181
<fieldset>
8282
<legend> &nbsp; Backup Login &nbsp; </legend>
83-
<input style="display:none" type="text" id="u" value="vignesh" placeholder="Username" required><br>
84-
<input type="text" id="urlinp" placeholder="Paste BackUp URL(No CORS)" required><br>
83+
<input style="display:none" type="text" id="u" value="vignesh" placeholder="Username"><br>
84+
<input type="text" id="urlinp" placeholder="Paste BackUp URL(No CORS)"><br>
8585
<input type="file" id="fileInput"><br>
8686
<input type="password" id="p" placeholder="Password" required><br>
8787
<input type="number" value="1234" style="display:none;" id="logpin" min="0" max="9999" placeholder="Create 4 digit pin">

userupd.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<html>
2+
<head>
3+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4+
<title>Register</title>
5+
</head>
6+
<body>
7+
<center>
8+
<br><br><br>
9+
<h2> BlackRoad </h2>
10+
<h3> Account Update</h3>
11+
<br><br>
12+
<label> User Name</label><br><br>
13+
<input type="text" id="ux" placeholder="Username"><br><br>
14+
<label>password</label><br><br>
15+
<input type="text" id="px" placeholder="Password"><br><br>
16+
<button onclick="r()"> Update </button>
17+
</center>
18+
<script>
19+
20+
21+
22+
function getVal1() {
23+
const r = indexedDB.open('black');
24+
r.onerror = () => console.error('oeror');
25+
r.onsuccess = () => {
26+
const d = r.result;
27+
const t = d.transaction('sst', 'readwrite');
28+
const s = t.objectStore('sst');
29+
const g = s.get('user');
30+
g.onerror = () => console.error('geerror');
31+
g.onsuccess = () => {
32+
let mh=JSON.parse(JSON.stringify(g.result));
33+
document.getElementById("ux").value=mh["u"];
34+
document.getElementById("px").value=mh["p"];
35+
36+
};
37+
};
38+
}
39+
40+
getVal1();
41+
42+
43+
44+
function c(u, p, r) {
45+
const d = indexedDB.open("black", 2);
46+
d.onupgradeneeded = e => {
47+
const db = e.target.result;
48+
if (!db.objectStoreNames.contains("sst")) {
49+
db.createObjectStore("sst");
50+
}
51+
};
52+
d.onsuccess = e => {
53+
const db = e.target.result;
54+
const t = db.transaction("sst", "readwrite");
55+
const s = t.objectStore("sst");
56+
const o = { u, p };
57+
const a = s.put(o,"user");
58+
a.onsuccess = function(){
59+
alert("Black Road Account Updated Sucessfulll");
60+
window.location.href = r;
61+
};
62+
a.onerror = () => console.error("Error:", a.error);
63+
};
64+
d.onerror = e => console.error("DB Error:", e.target.error);
65+
}
66+
67+
function r() {
68+
const u = document.getElementById("ux").value;
69+
const p = document.getElementById("px").value;
70+
if(u=="" | p==""){
71+
alert("Enter Valuese");
72+
}else{
73+
c(u, p, "finpulse.html");
74+
}
75+
}
76+
</script>
77+
</body>
78+
</html>

0 commit comments

Comments
 (0)