forked from kgnfth/tvstreamscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew-movies.php
41 lines (32 loc) · 825 Bytes
/
new-movies.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
<?php
if (!$global_settings['maxmoviesperpage']){
$maxperpage = 40;
} else {
$maxperpage = $global_settings['maxmoviesperpage'];
}
$movies = $movie->getLatest($maxperpage,$language);
if (!count($movies)){
$movies = '';
} else {
if ($logged){
$user = new User();
if (!isset($_SESSION['loggeduser_seen_movies'])){
$seen = $user->getSeenMovies(null,true);
} else {
$seen = $_SESSION['loggeduser_seen_movies'];
}
} else {
$seen = array();
}
foreach($movies as $key=>$val){
$movies[$key]['title']=stripslashes(stripslashes($movies[$key]['title']));
$movies[$key]['description']=stripslashes(stripslashes($movies[$key]['description']));
if (in_array($key,$seen)){
$movies[$key]['seen'] = 1;
} else {
$movies[$key]['seen'] = 0;
}
}
}
$smarty->assign("movies",$movies);
?>