1. PHP / Говнокод #14554

    +154

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 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>
    	';
    }
    ?>

    Запостил: alexkor, 13 Февраля 2014

    Комментарии (2) RSS

    Добавить комментарий