-
Notifications
You must be signed in to change notification settings - Fork 2
/
personal.php
142 lines (110 loc) · 4.04 KB
/
personal.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
<!DOCTYPE html>
<head>
<title>Donors Details</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<style>
body {
font-family: Arial, sans-serif;
padding-top: 20px;
}
.nav-container{
background-color: #333;
color: #fff;
}
/* profile container */
.profile-container {
margin-top: 20px;
line-height: 2.5;
max-width: 600px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
background-color: #f5f5f5;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.profile-heading {
text-align: center;
margin-bottom: 20px;
color: #333;
}
.profile-details {
margin-bottom: 40px;
}
.profile-details h2 {
color: #333;
font-size: 20px;
margin-bottom: 10px;
}
.profile-details p {
margin: 5px 0;
color: #666;
}
.profile-buttons {
text-align: right;
}
.profile-buttons button {
margin: 5px;
padding: 10px 20px;
border: none;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.profile-buttons button:hover {
background-color: #333;
color: #fff;
}
</style>
</head>
<body>
<?php
include 'database/Db_Connection.php';
if (isset($_GET['title'])) {
$title = urldecode($_GET['title']);
} else {
$title = '';
}
$sql = "SELECT uid FROM donors WHERE Uid='$title'";
$result = mysqli_query($conn, $sql);
if ($result) {
if (mysqli_num_rows($result) > 0) {
$row = mysqli_fetch_assoc($result);
$user_id = $row['uid'];
$sql2 = "SELECT * FROM user WHERE id='$title'";
$result2 = mysqli_query($conn, $sql2);
if ($result2) {
if (mysqli_num_rows($result2) > 0) {
$row2 = mysqli_fetch_assoc($result2);
$address = $row2['address'];
$contact = $row2['Contact'];
$email = $row2['email'];
$name = $row2['name'];
$donation_total = 0;
$donation_sql = "SELECT SUM(amount) AS total FROM donors WHERE uid='$user_id'";
$donation_result = mysqli_query($conn, $donation_sql);
if ($donation_result) {
$donation_row = mysqli_fetch_assoc($donation_result);
$donation_total = $donation_row['total'];
}
}
}
}
}
?>
<div class="profile-container" style="margin-top: 50px;">
<h1 class="profile-heading" style="text-align: center; margin-top:20px;"></h1>
<div class="profile-details">
<h2 style="text-align:center"><B><?php echo $name ?></B></h2>
<p><i class="fas fa-id-card"></i> <strong>ID: <?php echo $user_id ?></strong></p>
<p><i class="fas fa-envelope"></i> <strong>Email:<?php echo $email ?></strong> </p>
<p><i class="fas fa-phone"></i> <strong>Phone Number:+977 <?php echo $contact ?></strong> </p>
<p><i class="fas fa-map-marker-alt"></i> <strong>Address:<?php echo $address ?></strong></p>
<p><i class="fas fa-dollar-sign"></i><strong> Total Donations :<?php echo $donation_total ?> </strong> <P>
<!-- <p><i class="fas fa-dollar-sign"></i><strong>Total Donations : </strong> <P> -->
</div>
</div>
</body>
</html>