-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
64 lines (53 loc) · 2.53 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
<?php
require_once './php/DBConnect.php';
$db->authRedirectLogin();
$title="Profile";
include './layout/_header.php';
include './layout/navSec.php';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'){
$url = "https";
}else{
$url = "http";
}
$url .= "://";
$url .= $_SERVER['HTTP_HOST'];
$url .= $_SERVER['REQUEST_URI'];
$url_components = parse_url($url);
parse_str($url_components['query'], $params);
$resultRetSearch = $db->searchPofileSingle($params['id']);
if(!$resultRetSearch){
echo '
<div class="alert alert-warning" style="margin-top: 5rem;">
<h1>No Result Found!</h1>
</div>
';
}else{
echo '
<div class="container" style="margin-top: 5rem;">
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh;width: 100%;">
<div>
<div class="card mb-3 shadow-lg" style="max-width: 540px;">
<div class="row g-0">
<div class="col-md-4">
<img style="height: 100%;width: 100%;" src="./assets/img/profiles/'.$resultRetSearch[0]['profile_img'].'" class="img-fluid rounded-start shadow-lg" alt="cuteCoupleImg">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title text-capitalize">'.$resultRetSearch[0]['name'].'</h5>
<p class="card-text">Gender: '.$resultRetSearch[0]['gender'].'</br>Age: '.$resultRetSearch[0]['age'].'</br>Religion: '.$resultRetSearch[0]['religion'].'</br>MotherTongue: '.$resultRetSearch[0]['mother_tongue'].'</br>Education: '.$resultRetSearch[0]['education'].'</p>
<span class="d-flex justify-content-between">
<p class="card-text"><small class="text-muted">Last updated '.$resultRetSearch[0]['last_update_profile'].'</small></p>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
';
}
?>
<?php
include './layout/_footer.php';
?>