-
Notifications
You must be signed in to change notification settings - Fork 0
/
profileadmin.php
170 lines (157 loc) · 6.1 KB
/
profileadmin.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
<?php
include_once 'check.php';
include_once 'conf.php';
$berr=false;
if(isset($elog)) {
echo "Nothing!!!";
} else {
if($_SESSION['level']==0){
$db=mysqli_connect(DB_HOST,DB_USER,DB_PASS,DB);
if($db) {
$sql="SELECT * FROM `userinfo` WHERE id='{$_SESSION['id']}';";
$result=mysqli_query($db,$sql);
$row=mysqli_fetch_assoc($result);
$name= $row['name'];
$surname= $row['surname'];
$username= $row['username'];
$email= $row['email'];
$phone= $row['phonenumber'];
} else { $err['db']="No DB connection"; die();}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel='stylesheet' href='https://cdn.rawgit.com/creativetimofficial/material-dashboard/31144b3f/assets/css/material-dashboard.css'>
<link rel='stylesheet' 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'>
<link rel="stylesheet" type="text/css" href="css/adminstyle.css"/>
<link href='https://fonts.googleapis.com/css?family=Damion' rel='stylesheet'>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<title>Public Transportatio Admin-Profile</title>
</head>
<body>
<div class="wrapper ">
<div class="sidebar" data-color="green" data-background-color="white">
<!--
Tip 1: You can change the color of the sidebar using: data-color="purple | azure | green | orange | danger"
-->
<div class="logo">
<h3 class="simple-text logo-normal">
Admin's Name
</h3>
</div>
<div class="sidebar-wrapper">
<ul class="nav">
<li class="nav-item active">
<a class="nav-link" href="admin.php">
<i class="material-icons">dashboard</i>
<p>Admin's Dashboard</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="vehicle.php">
<i class="material-icons">badge</i>
<p>Vehicles</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="client.php">
<i class="material-icons">supervisor_account</i>
<p>Comuters</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="routes.php">
<i class="material-icons">supervisor_account</i>
<p>Routes</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="material-icons">book_online</i>
<p>Bookings</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="tracking.php">
<i class="material-icons">supervisor_account</i>
<p>Tracking</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="mailer.php">
<i class="material-icons">mail_outline</i>
<p>Mailer</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">
<i class="material-icons">logout</i>
<p>Logout</p>
</a>
</li>
</ul>
</div>
</div>
<div class="main-panel">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-transparent navbar-absolute fixed-top ">
<div class="container-fluid">
<div class="navbar-wrapper">
<a class="navbar-brand" href="admin.php">Dashboard</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
<span class="sr-only">Toggle navigation</span>
<span class="navbar-toggler-icon icon-bar"></span>
<span class="navbar-toggler-icon icon-bar"></span>
<span class="navbar-toggler-icon icon-bar"></span>
</button>
<div class="collapse navbar-collapse justify-content-end">
<form class="navbar-form">
<div class="input-group no-border">
<input type="text" value="" class="form-control" placeholder="Search...">
<button type="submit" class="btn btn-white btn-round btn-just-icon">
<i class="material-icons">search</i>
<div class="ripple-container"></div>
</button>
</div>
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="admin.php">
<i class="material-icons">person</i>
<p class="d-lg-none d-md-block">
Account Name
</p>
</a>
</li>
</ul>
</div>
</div>
</nav>
<!--End of nav bar -->
<div id="wrap">
<div class="content-area" >
<div id="profile">
<div id="header">
<h2> Welcome, <?php echo htmlentities($name) ?> </h2>
<img src="img/user.png" alt="user" />
</div>
<p>Name: <?php echo htmlentities($name); ?></p>
<p>Surname: <?php echo htmlentities($surname); ?></p>
<p>Username: <?php echo htmlentities($username); ?></p>
<p>Email: <?php echo htmlentities($email); ?></p>
<p>Phone: <?php echo "0".htmlentities($phone); ?></p>
</div>
</div>
</div>
<?php }
else header("Location: index.php");
}?>
</body>
</html>