view.php 2.49 KB
Newer Older
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
1
2
3
4
5
6
7
8
9
10
<?php

require ('../autoload.php');

function viewProfile (array $params) {
    echo Header::generateHead('Profile', 'profile');
    $userData = '
        <div class="flex-profile-header">
            <div class="flex-1"></div>
            <div class="flex-2">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
11
                <img class="profile-photo margin-20" src="/uploads/'.$params['profile_picture'].'">
12
                <div id="username" class="text-size-50">'.$params['name'].'</div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
13
            </div>
14
15
16
            <a class="flex-container add-flex-end-justify flex-1 " href="edit_profile">
                <img src="../svgIcon/pencil-alt.svg" id="edit-profile-button" >
            </a>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
17
18
19
20
21
22
23
        </div>

        <div id="my-profile-label-div" class="orange-text text-size-80">
            <label id="label-text-my-profile" >My Profile</label>
        </div>

        <div class="text-size-40" id="profile-data-table">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
24
            <div class="flex-container align-items-flex-center">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
25
                <object class="icon-profile" type="image/svg+xml" data="../svgIcon/user.svg">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
26
27
28
29
30
                    Your browser does not support SVG
                </object>
                <div class="flex-1">Username</div>
                <div class="flex-2">@'.$params['username'].'</div>
            </div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
31
            <div class="flex-container align-items-flex-center">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
32
                <object class="icon-profile" type="image/svg+xml" data="../svgIcon/mail.svg">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
33
34
35
                    Your browser does not support SVG
                </object>
                <div class="flex-1">Email</div>
36
                <div class="flex-2">'.$params['email'].'</div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
37
            </div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
38
            <div class="flex-container align-items-flex-center">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
39
                <object class="icon-profile" type="image/svg+xml" data="../svgIcon/home.svg">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
40
41
42
                    Your browser does not support SVG
                </object>            
                <div class="flex-1">Address</div>
43
                <div class="flex-2">'.$params['address'].'</div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
44
            </div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
45
            <div class="flex-container align-items-flex-center">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
46
                <object class="icon-profile" type="image/svg+xml" data="../svgIcon/phone.svg">
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
47
48
49
                    Your browser does not support SVG
                </object>
                <div class="flex-1">Phone Number</div>
50
                <div class="flex-2">'.$params['phone'].'</div>
Wildan Dicky Alnatara's avatar
Wildan Dicky Alnatara committed
51
52
53
54
55
56
57
58
59
60
            </div>
        </div>
    ';
    Body::outputInBody(
        Header::headerLogin($params['username']).
        Header::headerMenu(Header::PROFILE).
        $userData
    );

}