-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
79 lines (73 loc) · 2.91 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
<?php include "includes/header.php"; ?>
<link rel="stylesheet" href="assets/css/profile.css">
<style>
.full-size{
height: fit-content;
}
</style>
</head>
<body>
<div id="plans"></div>
<div class="full-size">
<?php include "includes/nav.php";
include_once "Classes/Payment.php";
$Payment = new Payment($connection);
?>
<?php
if($USER_LOGIN_ID == ''){
header("Location: index.php");
}
?>
<div class="profile-wrapper">
<div class="left-profile col-3 p-0">
<ul class='list-group'>
<a href='profile.php'><li class='list-group-item active'><i class='fa fa-user px-2'></i>Dashboard</li></a>
</ul>
</div>
<div class="right-profile col-9 p-0">
<div id='profile-img-big' class='d-flex justify-content-center align-items-center' style="background-color:<?php echo $User->get_user_detail_by_id('color',$USER_LOGIN_ID); ?>;">
<i class='fa fa-user fa-2x'></i>
</div>
<div class="deatils-row">
<span>Name:</span>
<input type="text" readonly value='<?php echo $User->get_user_detail_by_id('username',$USER_LOGIN_ID); ?>'>
</div>
<div class="deatils-row">
<span>Email:</span>
<input type="text" readonly value='<?php echo $User->get_user_detail_by_id('email',$USER_LOGIN_ID); ?>'>
</div>
<div class="deatils-row">
<span>Phone number:</span>
<input type="text" readonly value='<?php echo $User->get_user_detail_by_id('mobile_number',$USER_LOGIN_ID); ?>'>
</div>
<div class="deatils-row">
<span>Current pack:</span>
<input type="text" readonly value='<?php
$payment_id = $User->get_user_detail_by_id('payment_id',$USER_LOGIN_ID);
if($payment_id == 0){
echo "Free Tier";
}else{
$pack_deatil = $Payment->getAllPaymentById($payment_id);
$pack_deatil = mysqli_fetch_assoc($pack_deatil);
if($pack_deatil['pack'] == 1){
echo "Starter Pack";
}else if($pack_deatil['pack'] == 2){
echo "Basic Pack";
}else if($pack_deatil['pack'] == 3){
echo "Proffesional Pack";
}else if($pack_deatil['pack'] == 4){
echo "Ultra Pack";
}
}
?>'>
</div>
<?php if($payment_id != 0){ ?>
<div class="deatils-row">
<span>Pack Ends On:</span>
<input type="text" readonly value='<?php echo date("d-m-Y", strtotime($pack_deatil['expiry_date'])); ?>'>
</div>
<?php } ?>
</div>
</div>
</div>
<?php include "includes/footer.php"; ?>