-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofileS.php
119 lines (99 loc) · 3.58 KB
/
profileS.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
<?php
require 'config.php';
session_start();
if(!empty($_SESSION["ID"])){
$check=true;
$ID=$_SESSION["ID"];
$sql="SELECT * From cr WHERE ID='$ID'";
$result=mysqli_query($conn, $sql);
$rows=mysqli_fetch_array($result);
$name=$rows['Name'];
}
else{
$check=false;
echo
"<script> alert('Login First'); window.location.href='loginS.php'; </script> ";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile</title>
<link href="https://fonts.googleapis.com/css2?family=Acme&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./assets/css/profile.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="hero">
<nav>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<img src="./assets/images/user.png" class="user-pic" onclick="toggleMenu()">
<div class="sub-menu-wrap" id="subMenu">
<div class="sub-menu">
<div class="user-info">
<img src="./assets/images/user.png">
<h2><?php echo $name ?></h2>
</div>
<hr>
<a href="S_DashBoard.php" class="sub-menu-link">
<img src="./assets/images/profile.png">
<p>Show Dashboard</p>
<span></span>
</a>
<a href="#" class="sub-menu-link">
<img src="./assets/images/setting.png">
<p>Settings and Privacy</p>
<span></span>
</a>
<a href="#" class="sub-menu-link">
<img src="./assets/images/help.png">
<p>Help and Support</p>
<span></span>
</a>
<a href="LogOUT.php" class="sub-menu-link">
<img src="./assets/images/logout.png">
<p>Log Out</p>
<span></span>
</a>
</div>
</div>
</nav>
<div class="container">
<div class="box">
<?php if($check){ ?>
<img src="./assets/images/user.png" alt="">
<div class="details">
<p>Name: <span><?php echo $name ?></span></p>
<p>CR <span></span></p>
<hr>
<p>Student ID: <span><?php echo $ID ?></span></p>
<hr>
<p>Department: <span><?php echo $rows['department'] ?></span></p>
<hr>
<p>Program: <span><?php echo $rows['programe'] ?></span></p>
<hr>
<p>Batch: <span>20</span></p>
<hr>
</div>
<?php }else{
echo
"<script> alert('Login First'); window.location.href='loginS.php'; </script> ";
} ?>
</div>
</div>
</div>
<script>
let subMenu = document.getElementById("subMenu");
function toggleMenu()
{
subMenu.classList.toggle("open-menu");
}
</script>
</body>
</html>