-
Notifications
You must be signed in to change notification settings - Fork 1
/
dream.jsp
172 lines (135 loc) · 3.26 KB
/
dream.jsp
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<%@ 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 name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Regjsp</title>
<style>
body, html {
background-image: url("IMG/back.jpg");
height: 100%;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
background-size:auto;
}
* {
box-sizing: border-box;
}
.bg-img {
/* The image used */
background-image: url("IMG/89631.jpg");
min-height:700px;
min-width:750px;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
/* Needed to position the navbar */
position: relative;
}
/* Position the navbar container inside the image */
.container {
margin: 20px;
width: 1300px;
}
.topnav {
overflow: hidden;
background-color: #333;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #4CAF50;
color: white;
}
.topnav-right {
float: right;
}
/* Position text in the middle of the page/image */
.bg-text {
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0, 0.4); /* Black w/opacity/see-through */
color: white;
font-weight: bold;
border: 3px solid #f1f1f1;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
width: 80%;
padding: 20px;
text-align: center;
}
</style>
</head>
<body >
<%
if(session.getAttribute("userStatus")!=null){
if(session.getAttribute("userStatus").equals("1")){
%>
<%@ page import ="java.sql.*" %>
<%@ page import ="javax.sql.*" %>
<div class="bg-img">
<div class="container">
<div class="topnav">
<a class="active" href="loginy.jsp">Home</a>
<div class="topnav-right">
<a href="controller.jsp?page=logout">Logout</a>
</div>
</div>
</div>
</br>
<form action="calculate.jsp">
<center>
<table style="color:white">
<tr>
<td>
</p align="center">Select the Players from the given list of players........</p>
</td>
</tr>
<%
Class.forName("com.mysql.jdbc.Driver");
java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ipl_project",
"root","ayushi2005");
Statement st= con.createStatement();
ResultSet rs;
String sql="select * from players";
rs=st.executeQuery(sql);
while(rs.next())
{
%><tr>
<td><%=rs.getString("name")%></td>
<td><input type="checkbox" name="checks" value="<%=rs.getString("name")%>">
</br>
</tr>
<%}
%>
</br>
</br>
<tr>
<td>
<input type="submit" value="Make Team" align="middle">
</td>
</tr>
</table>
</form>
</div>
<%
}else response.sendRedirect("testindex.html");
}else response.sendRedirect("testindex.html");
%>
</body>
</html>