forked from igoryen/Tarboz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
65 lines (55 loc) · 2.61 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
<?php
// include "../../config.php";
require_once "header.php";
require_once BUSINESS_DIR_USER . 'UserManager.php';
require_once BUSINESS_DIR_LOCATION . 'LocationManager.php';
require_once BUSINESS_DIR_ENTRY . "EntryManager.php";
require_once BUSINESS_DIR_ENTRY . "Entry.php";
require_once BUSINESS_DIR_TRANSLREQ . "TranslationRequestManager.php";
require_once BUSINESS_DIR_RATING . 'RatingManager.php';
require_once BUSINESS_DIR_RATING . 'Rating.php';
$userManager = new UserManager();
$locationManager = new LocationManager();
$EntryManager = new EntryManager();
$Rating = new RatingManager();
if (isset($_SESSION['user'])) {
$user = $_SESSION['user'];
$user_id = $user->getUserId();
$User_Login = $userManager->getUserByUserId($user_id);
$id =$User_Login->getUserId();
$fname = $User_Login->getFirstName();
$lname = $User_Login->getLastName();
$email = $User_Login->getEmail();
$language = $User_Login->getUserLanguage();
$regdate = $User_Login->getRegistrationDate();
$locationId = $User_Login->getLocation();
$birth= $User_Login->getDOB();
$mediaId = $User_Login->getMediaId();
// // get location
// $location = $locationManager->getLocationBylocationId($locationId);
// foreach ( $location as $loc) {
// $Address = $loc->getAddress();
// $PostalCode = $loc->getPostalCode();
// $cityid = $loc->getCityId();
// }
// get city name
$city = $locationManager->getCityById($locationId);
$CityName = $city->getCityName();
$provId = $city->getProvinceId();
//get province name
$province = $locationManager->getProvinceById($provId);
$ProvinceName = $province->getProvinceName();
$countryId = $province->getCountryId();
//get Country Name
$country = $locationManager->getCountriesNameById($countryId);
foreach ( $country as $cou) {
$CountryName = $cou->getCountryName();
}
// get display user info html style
require_once "views/profile/user_view_style.php";
} else {
// header("Location: http://localhost/tarboz/");
echo '<h1 style="text-align: center;">The Page Not Found</h1>';
}
include "footer.php";
?>