-
Notifications
You must be signed in to change notification settings - Fork 0
/
profileuser.php
152 lines (134 loc) · 4.8 KB
/
profileuser.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
<?php
header("X-XSS-Protection: 1; mode=block");
include_once 'check.php';
include_once 'conf.php';
$berr=false;
if(isset($elog)) {
echo "Nothing!!!";
} else {
if($_SESSION['level']==1){
$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= mysqli_real_escape_string($db,$row['name']);
$surname=mysqli_real_escape_string($db,$row['surname']);
$username=mysqli_real_escape_string($db,$row['username']);
$email=mysqli_real_escape_string($db,$row['email']);
$phone=mysqli_real_escape_string($db,$row['phonenumber']);
/* echo "<p>Profile Info \n:</p>";
echo "<p>Name:{$row['name']}\n</p>";
echo "<p>Surname :{$row['surname']}\n</p>";
echo "<p>Username:{$row['username']}\n</p>";
echo "<p>Password:{$row['password']}\n</p>";
echo "<p>Email:{$row['email']}\n</p>";
echo "<p>Phone Number:{$row['phonenumber']}\n</p>"; */
} else { $err['db']="No DB connection"; die();}
?>
<!DOCTYPE html>
<html>
<head>
<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>
<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'>
<style>
body {
background-color: lightblue;
}
</style>
<title>Public Transport Commuter Profile</title>
</head>
<body>
<div class="wrapper ">
<div class="sidebar" data-color="azure" data-background-color="yellow">
<!--
Tip 1: You can change the color of the sidebar using: data-color="purple | azure | green | orange | danger"
-->
<div class="logo">
<li class="nav-item active">
<a class="nav-link" href="profileuser.php">
<h3 class="simple-text logo-normal">
<a > Commuter Profile</a>
</h3>
</li>
</div>
<div class="sidebar-wrapper">
<ul class="nav">
<li class="nav-item active">
<a class="nav-link" href="Commuter.php">
<i class="material-icons">dashboard</i>
<p>Commuter </p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">
<i class="material-icons">badge</i>
<p>Urban Lines</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="services.php">
<i class="material-icons">supervisor_account</i>
<p>Inter Urban Lines</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="showadminapp.php">
<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">book_online</i>
<p>Track journey</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>
<style>
#profile{
position: absolute;
top: 20%;
left: 60%;
transform: translate(-50%, -50%) ;
padding: 30px;
display: block;
text-align: center;
}
</style>
<div class="content-area" >
<div id="profile">
<div id="header">
<h1> Welcome, <?php echo htmlentities($name) ?> </h1>
<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>
<a href="showappointments.php"> See Your Journeys</br>
<a href="edituser.php"> Edit Your Profile
</div>
</div>
<?php }
else header("Location: index.php");
}?>
</body>
</html>