forked from codixor/TVSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.php
36 lines (25 loc) · 920 Bytes
/
user.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
<?php
$user = new User();
if (isset($profile_username) && $profile_username){
$profile_user = $user->getByUsername($profile_username);
if ($profile_user){
$profile_favorite_shows = $user->getFavoriteShows($profile_user['id'],false,$language);
$profile_favorite_movies = $user->getFavoriteMovies($profile_user['id'],false,$language);
if (isset($_SESSION['loggeduser_id'])){
$profile_followers = $user->getFollowers($profile_user['id']);
if (array_key_exists($_SESSION['loggeduser_id'],$profile_followers)){
$smarty->assign("is_follower",1);
} else {
$smarty->assign("is_follower",0);
}
}
$smarty->assign("profile_user",$profile_user);
$smarty->assign("profile_favorite_shows",$profile_favorite_shows);
$smarty->assign("profile_favorite_movies",$profile_favorite_movies);
} else {
$smarty->assign("no_user",1);
}
} else {
$smarty->assign("no_user",1);
}
?>