-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
274 lines (227 loc) · 9.56 KB
/
index.php
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<?php
include("config/config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
<link rel="icon" type="image/png" href="assets/img/favicon.png">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!--Change api key here-->
<meta name="google-signin-client_id" content="1085777605069-2qss1bn1n04qpq0t8ip51o8ulkh1gdte.apps.googleusercontent.com">
<title> Home | Complain Box </title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
<!-- Fonts and icons -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
<!-- CSS Files -->
<link href="assets/css/material-kit.css" rel="stylesheet" />
</head>
<body class="landing-page sidebar-collapse">
<div class="page-header header-filter" data-parallax="true" style="background-image: url('assets/img/slider1.jpg')">
<div class="container">
<div class="row">
<div class="col-md-6">
<h1 class="title">One Step Solution</h1>
<h4>A portal for all your complaints, Focus on complaining about the problem you have, rather than staying with the issue.</h4>
<br>
<a href = "#login" class="btn btn-danger btn-raised btn-lg">
Click Here to Login
</a>
</div>
</div>
</div>
</div>
<div class="main main-raised">
<div class="container">
<div class="section text-center">
<div class="row">
<div class="col-md-8 ml-auto mr-auto">
<h2 class="title">Untold Suffering is not wise.</h2>
<h5 class="description">
Tell us about the complaints you have and we will look after it. Be it any department , Be it any smallest to biggest complaint you have just tell us and sit back relaxed , we will resolve it as soon as possible.
</h5>
</div>
</div>
<div class="features">
<div class="row">
<div class="col-md-4">
<div class="info">
<div class="icon icon-danger">
<i class="material-icons">domain</i>
</div>
<h4 class="info-title">Anyone can complaint</h4>
<p>
If you are in somaiya vidyavihar then just login into complain box using somaiya mail and register your complain online.
</p>
</div>
</div>
<div class="col-md-4">
<div class="info">
<div class="icon icon-success">
<i class="material-icons">supervisor_account</i>
</div>
<h4 class="info-title">Connect to Supervisor </h4>
<p>
Submit your complain direct to supervisor, Just select Department we will submit your complain to respective supervisor
.</p>
</div>
</div>
<div class="col-md-4">
<div class="info">
<div class="icon icon-info">
<i class="material-icons">schedule</i>
</div>
<h4 class="info-title">Use at Any time</h4>
<p>
If you have any complain register your complain at any time any day no mater if it is holiday or evening we will forward your complain.
</p>
</div>
</div>
</div>
</div>
<div class="page-header header-filter" style="background-image: url('assets/img/cam.jpg'); background-size: cover; background-position: top center;">
<div class="container" >
<div class="row" id="login">
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
<div class="card card-login">
<form class="form" method="post" action="logindb.php">
<div class="card-header card-header-primary text-center" style="margin:0;">
<h4 class="card-title" style="font-size:">Login </h4>
<div class="social-line">
</div>
</div>
<div class="card-body">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="material-icons">perm_identity</i>
</span>
</div>
<input type="text" class="form-control" name="username" placeholder="Username..." required="true">
</div>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="material-icons">lock_outline</i>
</span>
</div>
<input type="password" class="form-control" name="password" placeholder="Password..." required="true">
</div>
</div>
<div class="footer text-center">
<button type="submit" class="btn btn-primary btn-link btn-wd btn-lg">Login</button>
<!--
<a href="./forgotpassword.php" class="btn btn-primary btn-link btn-wd btn-lg">Forgot Password?</a>
-->
<p><b>Login Using Somaiya Mail</b></p>
<div class="row">
<div class="col-md-12">
<center><div id="my-signin1" data-onsuccess="onSignIn"></div></center>
</div>
</div>
<!--<a href="./help.php" class="btn btn-primary btn-link btn-wd btn-lg">Can't Sign In?</a>-->
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php
include("footer.php");
?>
<!-- Core JS Files -->
<script src="assets/js/core/jquery.min.js" type="text/javascript"></script>
<script src="assets/js/core/popper.min.js" type="text/javascript"></script>
<script src="assets/js/core/bootstrap-material-design.min.js" type="text/javascript"></script>
<script src="assets/js/plugins/moment.min.js"></script>
<!-- Plugin for the Sliders, full documentation here: http://refreshless.com/nouislider/ -->
<script src="assets/js/plugins/nouislider.min.js" type="text/javascript"></script>
<!-- Control Center for Material Kit: parallax effects, scripts for the example pages etc -->
<script src="assets/js/material-kit.js" type="text/javascript"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script>
<script>
function onSuccess(googleUser) {
var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
if(profile){
$.ajax({
type: 'POST',
url: 'verifyuser.php',
data: {id:profile.getId(), name:profile.getName(), email:profile.getEmail(),imgurl:profile.getImageUrl()}
}).done(function(usertype){
console.log(usertype);
if(usertype=="Department"){
console.log("In dept");
window.location.href = 'depthome.php';
}
else if(usertype=="admin"){
console.log("Admin");
window.location.href = 'admindashboard.php';
}
else if(usertype=="Manager"){
console.log("In Manager");
window.location.href = 'managerdashboard.php';
}
else if(usertype=="User"){
console.log("In user");
window.location.href = 'dashboard.php';
}
else if(usertype=="Firstuser"){
console.log("In first user");
window.location.href = 'userprofile.php';
}
//window.location.href = 'dashboard.php';
}).fail(function() {
alert( "Error occur. Try again later" );
});
}
}
function onFailure(error) {
console.log(error);
}
function renderButton() {
gapi.signin2.render('my-signin1', {
'scope': 'profile email',
'width': 240,
'height': 50,
'longtitle': false,
'theme': 'dark',
'prompt': 'select_account',
'onsuccess': onSuccess,
'onfailure': onFailure
});
}
</script>
<script>
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top-100
}, 1000, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
</script>
</body>
</html>