-
Notifications
You must be signed in to change notification settings - Fork 1
/
profile.php
executable file
·127 lines (87 loc) · 3.87 KB
/
profile.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
<?php
session_start();
$con = mysqli_connect("localhost","root","","student")or die(mysqli_error($con));
?>
<html>
<head>
<title>Profile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel= "stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="index.css" type="text/css">
<link href="assets/css/style.css" rel="stylesheet">
<script src="assets/js/main.js"></script>
</head>
<body>
<header id="header" class="fixed-top d-flex align-items-center">
<div style= "background-color: #5366f4">
<div class="container" >
<div style ="margin-top : 10px;">
<nav class="nav-menu d-none d-lg-block" style = "float: left;">
<a href = "index.html"> <h2 style ="color : white;">Student grevience Portal</h2> </a>
</nav>
<nav class="nav-menu d-none d-lg-block" style = "float: right;">
<ul>
<li class="active"><a href="#header">Home</a></li>
<li><a href="logout.php">logout</a></li>
</ul>
</nav><!-- .nav-menu -->
</div>
</div>
</div>
</header>
<center>
<h1>Your profile</h1>
<div class="card">
<img src ="img/account.svg" height = "200px" width = "200px">
<h1><?php echo $_SESSION['name']; ?></h1>
<br>
<b>Name</b> : <?php echo $_SESSION['name']; ?> <br>
<b>College </b>: <?php echo $_SESSION['clg']; ?> <br>
<b>Dept </b> : <?php echo $_SESSION['dept']; ?> Engineering<br>
<b>Email </b> : <?php echo $_SESSION['email']; ?>
<br>
<br>
<p><button>Contact</button></p>
</div>
</center>
<?php
if($_SESSION['design'] == 'student')
{ $uid = $_SESSION['id'];
$con = mysqli_connect("localhost","root","","student")or die(mysqli_error($con));
$query = "SELECT * FROM issues,users where users.id = issues.userid and userid = '$uid' order by datei desc ";
$res = mysqli_query($con,$query) or die("failed ".mysqli_error($con));
?>
<div style = "margin-left : 300px; margin-top: 50px">
<h1 style="margin-left : 250px;"> YOUR GREVIENCES </h1>
<?php
while($array = mysqli_fetch_array($res)) { ?>
<div class="card mb-3" style="max-width: 1020px; background-color: #f5f5f5; margin-top:20px; padding: 2%; border: black 0.5px; border-radius: 15px">
<div class="row no-gutters">
<div class="col-md-2" style="padding-top: 40px; padding-left: 50px">
<img src="img/complaint.svg" class="card-img" alt="..." height="70px" width="70px">
</div>
<div class="col-md-10">
<div class="card-body">
<h5 class="card-title" style="font-size: 25px; color: blue"><?php echo $array['title'] ?></h5>
<p class="card-text"><small class="text-muted">Posted by: <?php echo $array['name']; ?><br> Date : <?php echo $array['datei']; ?></small></p>
<p class="card-text" style="font-size: 20px"><?php echo $array['details'] ?></p>
<div class="row">
<div class="col-lg-2">
<button type="button" class="btn ">
<img src="img/up-arrow.svg" class="card-img" alt="..." height="20px" width="20px"> Upvote
</button>
</div>
<div class="col-lg-2">
<button type="button" class="btn">
<img src="img/down-arrow.svg" class="card-img" alt="..." height="20px" width="20px"> Downvote
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?php }} ?>
</div>