forked from samyuh/feup-ltw-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
27 lines (23 loc) · 808 Bytes
/
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
<?php
/* Initialize Session and Database */
include_once('./includes/session.php');
include_once('./includes/database.php');
/* Database Managers Files */
include_once('database/users.php');
include_once('database/pets.php');
include_once('database/pets_adoption.php');
include_once('database/pets_profile.php');
/* Verifications and set variables */
$user = getUser($_GET['user']);
if(empty($user)) {
header('Location: ./error404.php');
}
$userPets = getFavoritePets($user);
$adoptPets = getAdoptPets($user);
$toAdoptPets = getAllOwner($user);
/* HTML Code */
include_once('templates/common/header.php');
include_once('templates/common/notifications.php');
include_once('templates/user/profile.php');
include_once('templates/common/footer.php');
?>