-
Notifications
You must be signed in to change notification settings - Fork 1
/
profile.php
executable file
·150 lines (142 loc) · 10 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
session_start();
include('config/config.php');
include('config/checklogin.php');
check_login();
require_once('partials/_head.php');
?>
<body>
<!-- BEGIN NAVBAR -->
<?php
require_once('partials/_navbar.php');
//Get Logged In User Session
$login_user_name = $_SESSION['login_user_name'];
$ret = "SELECT * FROM administrator WHERE admin_email = '$login_user_name' || admin_username = '$login_user_name' ";
$stmt = $mysqli->prepare($ret) ;
$stmt->execute() ;
$res = $stmt->get_result();
while($admin = $res->fetch_object())
{
//if admin has a profile pic
if($admin->admin_profile_pic != '')
{
$profilePic = "<img class='img-thumbnail img-fluid' src='assets/img/$admin->admin_profile_pic' alt='avatar'>";
}
else
{
$profilePic = "<img class='img-thumbnail img-fluid' src='assets/img/boy.png' alt='avatar'>";
}
?>
<div class="sub-header-container">
<header class="header navbar navbar-expand-sm">
<a href="javascript:void(0);" class="sidebarCollapse" data-placement="bottom"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></a>
<ul class="navbar-nav flex-row">
<li>
<div class="page-header">
<nav class="breadcrumb-one" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">Home</a></li>
<li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li>
<li class="breadcrumb-item"><a href="profile.php">Profile</a></li>
<li class="breadcrumb-item active" aria-current="page"><span><?php echo $admin->admin_username;?></span></li>
</ol>
</nav>
</div>
</li>
</ul>
</header>
</div>
<!-- END NAVBAR -->
<!-- BEGIN MAIN CONTAINER -->
<div class="main-container" id="container">
<div class="overlay"></div>
<div class="search-overlay"></div>
<!-- BEGIN SIDEBAR -->
<?php
require_once('partials/_sidebar.php');
?>
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT AREA -->
<div id="content" class="main-content">
<div class="layout-px-spacing">
<div class="row layout-spacing">
<!-- Content -->
<div class="col-xl-4 col-lg-6 col-md-5 col-sm-12 layout-top-spacing">
<div class="user-profile layout-spacing">
<div class="widget-content widget-content-area">
<div class="d-flex justify-content-between">
<h3 class="">My Profile</h3>
<a href="profile_settings.php" class="mt-2 edit-profile"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-3"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg></a>
</div>
<div class="text-center user-info">
<?php echo $profilePic;?>
<p class=""><?php echo $admin->admin_username;?></p>
</div>
<div class="user-info-list">
<div class="">
<ul class="contacts-block list-unstyled">
<li class="contacts-block__item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-coffee"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>
<?php echo $admin->admin_number;?>
</li>
<li class="contacts-block__item">
<a href="mailto:<?php echo $admin->admin_email;?>"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mail"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
<?php echo $admin->admin_email;?>
</a>
</li>
<li class="contacts-block__item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-phone"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>
<?php echo $admin->admin_phone_number;?>
</li>
<!--
<li class="contacts-block__item">
<ul class="list-inline">
<li class="list-inline-item">
<div class="social-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-facebook"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
</div>
</li>
<li class="list-inline-item">
<div class="social-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-twitter"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
</div>
</li>
<li class="list-inline-item">
<div class="social-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-linkedin"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
</div>
</li>
</ul>
</li>
-->
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-lg-6 col-md-7 col-sm-12 layout-top-spacing">
<div class="bio layout-spacing ">
<div class="widget-content widget-content-area">
<h3 class="">Bio</h3>
<p>
<?php echo $admin->admin_bio;?>
</p>
</div>
</div>
</div>
</div>
</div>
<?php
require_once('partials/_footer.php');
?>
</div>
<!-- END CONTENT AREA -->
</div>
<!-- END MAIN CONTAINER -->
<?php
require_once('partials/_scripts.php');
}
?>
</body>
</html>