-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
executable file
·41 lines (31 loc) · 883 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>LX' Filmdb</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="css/newfilmdb.css" type="text/css"/>
</head>
<body>
<?php
require ( 'lib_imdb.php' );
require ( 'lib_omdb.php' );
require ( 'lib_sqlitedb.php' );
require ( 'lib_html.php' );
$db = new sqlitedb();
$_REQUEST [ 'genre' ][] = -3; // -Short
$_REQUEST [ 'type' ][] = 1; // Movie
$movies = $db -> getMovieList ( $db -> getFilters ( $_REQUEST ) );
echo getDashboard ( count ( $movies ) );
echo '<section id="list">';
foreach ( $movies as $movie )
echo getMovieSnippet ( $movie );
echo '</section>';
$random = array_rand ( $movies );
echo '<aside id="details">';
echo getMovieDetails ( $movies [ $random ][ 'imdb_id' ] );
echo '</aside>';
?>
<script src="js/jquery-1.7.min.js"></script>
<script src="js/newfilmdb.js"></script>
</body>
</html>