- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
<?php
session_start();
include("database.php");
include("filter.php");
$filter = new Filter();
isset($_GET['cat']) ? $id = $filter->Symbols($_GET['cat']) : exit("Вы зашли на страницу без параметра!");
if ( !isset($_POST['class']) && empty($_POST['class']) )
{
include('header.php');
echo '
<title>Title</title>
';
include('slider.php');
echo '
<div id="Content">
';
}
$query_amount = $mysqli->query("SELECT COUNT(id) FROM `page_film` WHERE `genre_film`='$id' ");
$amount_film = $query_amount->fetch_row();
$query = $mysqli->query("SELECT * FROM `page_film` WHERE `genre_film`='$id' ORDER BY `id` DESC ");
if ( $amount_film[0] > 0 )
while( $row = $query->fetch_array(MYSQLI_ASSOC) )
echo '
<div class="block-film">
<a class="block-link-image" href="../films/film.php?id='.$row['id'].'">
<img src="'.$row['poster'].'" />
</a>
<div class="block-film-text">
<p class="film-name">
<a href="../films/film.php?id='.$row['id'].'">'.$row['title'].'</a>
</p>
<p class="film-mini-name">
<a href="../films/film.php?id='.$row['id'].'">'.$row['desc'].'</a>
</p>
<p class="film-genre"><span>'.$row['genre'].'</span></p>
<p class="film-description">'.$row['description'].'</p>
</div>
</div>
';
if ( !isset($_POST['class']) && empty($_POST['class']) )
{
echo '
</div>
</body>
</html>
';
}
?>
Konardo 13.02.2014 16:34 # −13
Konardo 13.02.2014 19:04 # −12