-
Notifications
You must be signed in to change notification settings - Fork 0
/
form1.html
196 lines (158 loc) · 5.88 KB
/
form1.html
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<html>
<head>
<title>form1</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<style>
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.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 b {
float: right;
display: block;
color: white;
text-align: right;
padding: 14px 16px;
text-decoration: none;
font-size: 34px;
}
.topnav b:hover {
background-color: #ddd;
color: black;
}
body{
background-image: url("img1.jpeg");
color: white;
}
input.transparent-input{
background-color:rgba(0,0,0,0) ;
color: white;
}
th, td {
padding: 15px;
}
@media (max-width: 600px) {
.col1, .col2 {width:100%;
font-size:1.8rem;}
}
@media screen and (min-width:900px){
body{
font-size:1.6rem;
center:50%
}
}
.col1{
float:left;
width:25%;
margin-top:8px;
}
.col2{
float:left;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color:black;
color: white;
text-align: center;
height: 25px;
font-size: 18px;
}
</style>
<script type='text/javascript'>
function validation()
{
if (document.login.email.value == "")
{
alert("Email should not be empty")
return false;
}
if (!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(document.login.email.value))
{
alert("Enter valid email address")
return false;
}
if (document.login.pwd.value == "")
{
alert("Password should not be empty")
return false;
}
return true;
}
</script>
</head>
<body style="background-image:url('img1.jpeg')">
<center>
<h1 style="font-size:5vw; font-family:courier; text-align:center; font-color:#000000;">SOLIDUOUS SYSTEMWARE</h1>
<div class="topnav">
<a class="active" href="homepage.php">Home</a>
<a href="http://localhost/miniproject/ajax.php">Service Centres</a>
<a href="http://localhost/miniproject/form2.html">Feedback</a>
<a href="http://localhost/miniproject/aboutus.php">About Us</a>
<?php
session_start();
if (!isset($_SESSION['email'])) {
?>
<a href="form1.html">Login</a>
<a href="customer.html">Registration</a>
<?php } else {
?>
<a href="cdetails.php" style='color:red'><?php echo $_SESSION['email'] ?></a>
<?php } ?>
</div>
<h1 style="font-size:10vw">Login</h1>
<form name='login' class="form-horizontal" method="POST" >
<table >
<tr >
<th class="col1" >Email </th> <th class="col2" > <input type="text"
placeholder="Enter Email" class="form-control transparent-input" name="email" id="email"> </th>
</tr>
<tr >
<th class="col1" >Password </th> <th class="col2" ><input type="password"
placeholder="Enter password" class="form-control transparent-input" name="pwd" id="pwd"> </th>
</tr>
<tr >
<th class="col2"><button type="submit" class="btn btn-success" name="submit"
onclick="return validation()" formaction="login.php" >Submit</button> </th>
<th class="col2"><button class="btn btn-danger" formaction="alogin.php">Login as Admin</button> </th>
</tr>
<tr >
<th class="col2"><button class="btn btn-success" formaction="customer.html">Register</button> </th>
<th class="col2"><button class="btn btn-success" formaction="forgotpwd.html">Forgot Password?</button> </th>
</tr>
</table>
<footer style="text-align: center; padding: 5px">
<p>
© 2018 Soliduous Systemware. All rights reserved.
</p>
</footer>
</form>
</center>
</body>
</html>