-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
133 lines (122 loc) · 4.56 KB
/
Copy pathheader.php
File metadata and controls
133 lines (122 loc) · 4.56 KB
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
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel='stylesheet' type='text/css' href="css/bootstrap.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/header.css"/>
</head>
<header>
<div class="header">
<img id="logo" src="img/RFID SMART-TRACE.png" alt="RFID Sticker Logo">
<style>
#logo {
position: relative;
width: 400px; /* You can adjust the percentage as needed */
}
</style>
<div>
<div class="a" href="index.php">UM Smart-Trace</div>
<div class="b" href="index.php"> College of Engineering Education</div>
<div class="c" href="index.php"> Electronics Engineering</div>
</div>
</div>
<?php
if (isset($_GET['error'])) {
if ($_GET['error'] == "wrongpasswordup") {
echo ' <script type="text/javascript">
setTimeout(function () {
$(".up_info1").fadeIn(200);
$(".up_info1").text("The password is wrong!!");
$("#admin-account").modal("show");
}, 500);
setTimeout(function () {
$(".up_info1").fadeOut(1000);
}, 3000);
</script>';
}
}
if (isset($_GET['success'])) {
if ($_GET['success'] == "updated") {
echo ' <script type="text/javascript">
setTimeout(function () {
$(".up_info2").fadeIn(200);
$(".up_info2").text("Your Account has been updated");
}, 500);
setTimeout(function () {
$(".up_info2").fadeOut(1000);
}, 3000);
</script>';
}
}
if (isset($_GET['login'])) {
if ($_GET['login'] == "success") {
echo '<script type="text/javascript">
setTimeout(function () {
$(".up_info2").fadeIn(200);
$(".up_info2").text("You successfully logged in");
}, 500);
setTimeout(function () {
$(".up_info2").fadeOut(1000);
}, 4000);
</script> ';
}
}
?>
<div class="topnav" id="myTopnav">
<a href="index.php">Users</a>
<a href="ManageUsers.php">Register Users</a>
<a href="UsersLog.php">Users Log</a>
<a href="devices.php">Devices</a>
<a href="map.php">Map</a>
<?php
if (isset($_SESSION['Admin-name'])) {
echo '<a href="#" data-toggle="modal" data-target="#admin-account">'.$_SESSION['Admin-name'].'</a>';
echo '<a href="logout.php">Log Out</a>';
}
else{
echo '<a href="login.php">Log In</a>';
}
?>
<a href="javascript:void(0);" class="icon" onclick="navFunction()">
<i class="fa fa-bars"></i></a>
</div>
<div class="up_info1 alert-danger"></div>
<div class="up_info2 alert-success"></div>
</header>
<script>
function navFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
<!-- Account Update -->
<div class="modal fade" id="admin-account" tabindex="-1" role="dialog" aria-labelledby="Admin Update" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalLongTitle">Update Your Account Info:</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form action="ac_update.php" method="POST" enctype="multipart/form-data">
<div class="modal-body">
<label for="User-mail"><b>Admin Name:</b></label>
<input type="text" name="up_name" placeholder="Enter your Name..." value="<?php echo $_SESSION['Admin-name']; ?>" required/><br>
<label for="User-mail"><b>Admin E-mail:</b></label>
<input type="email" name="up_email" placeholder="Enter your E-mail..." value="<?php echo $_SESSION['Admin-email']; ?>" required/><br>
<label for="User-psw"><b>Password</b></label>
<input type="password" name="up_pwd" placeholder="Enter your Password..." required/><br>
</div>
<div class="modal-footer">
<button type="submit" name="update" class="btn btn-success">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<!-- //Account Update -->