-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.jsp
More file actions
136 lines (86 loc) · 3.65 KB
/
update.jsp
File metadata and controls
136 lines (86 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
<%
String email=(String)session.getAttribute("userid");
Class.forName("com.mysql.jdbc.Driver");
java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test1","root","MYSQL");
Statement st= con.createStatement();
String msg,msg2,msg3;
ResultSet rs=st.executeQuery("select * from login where email='"+email+"'");
rs.next();
String pwd=rs.getString(1);
String fname=rs.getString(2);
String lname=rs.getString(3);
String em=rs.getString(4);
%>
<canvas id="c"></canvas>
<script>
var c = document.getElementById("c");
var ctx = c.getContext("2d");
c.height = window.innerHeight;
c.width = window.innerWidth;
var matrix = "QWERTYUIOPLKJHGFDSAZXCVBNM123456789@#$%^&*()*&^";
matrix = matrix.split("");
var font_size = 10;
var columns = c.width/font_size;
var drops = [];
for(var x = 0; x < columns; x++)
drops[x] = 1;
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
function draw()
{
ctx.fillStyle = "rgba(0, 0, 0, 0.04)";
ctx.fillRect(0, 0, c.width, c.height);
ctx.fillStyle = "green";
ctx.font = font_size + "px arial";
for(var i = 0; i < drops.length; i++)
{
var text = matrix[Math.floor(Math.random()*matrix.length)];
ctx.fillText(text, i*font_size, drops[i]*font_size);
if(drops[i]*font_size > c.height && Math.random() > 0.975)
drops[i] = 0;
drops[i]++;
}
}
var za=1;
setInterval(draw, 40);
</script>
<div class="form" style="transform: translateY(-135%);">
<div id="signup">
<h1>Update Now</h1>
<form action="modify.jsp" method="post">
<div class="top-row">
<div class="field-wrap">
<input type="text" name="fname" value="<%=fname%>" required autocomplete="off" placeholder="First Name*">
</div>
<div class="field-wrap">
<input type="text" name="lname" value="<%=lname%>" required autocomplete="off" placeholder="Last Name*">
</div>
</div>
<div class="field-wrap">
<input type="email"required value="<%=em%>" autocomplete="off" name="email" placeholder="Email Address*">
</div>
<div class="field-wrap">
<input type="password"required value="<%=pwd%>" autocomplete="off" name="pass" placeholder="Set Password*">
</div>
<button type="submit" class="button"/>Update Details</button>
</form>
</div>
</body>
</html>