require "packages/info/domain/Category.php"; require "packages/pagination/Pagination.php"; $selected = isset($_GET["page"]) ? $_GET["page"] : 0; if (!isset($_GET["startYear"]) || !isset($_GET["startMonth"]) || !isset($_GET["startDay"])) { $from = null; } else { $from = $_GET["startYear"] . "-" . $_GET["startMonth"] . "-" . $_GET["startDay"]; } if (!isset($_GET["endYear"]) || !isset($_GET["endMonth"]) || !isset($_GET["endDay"])) { $to = null; } else { $to = $_GET["endYear"] . "-" . $_GET["endMonth"] . "-" . $_GET["endDay"]; } $news = new info\mapper\NewsMapper($pdo); try { $limitNews = $news->getData($selected, $_GET["type"], $from, $to); $count = $news->getCount($_GET["type"], $from, $to); } catch (Exception $e) { die($e->getMessage()); } $pagination = new pagination\Pagination($count, $selected); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <link rel="shortcut icon" href="img/favicon.png"> <link rel="stylesheet" type="text/css" href="css/reset.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <script src="js/scripts.js"></script> <script src="js/Partners.js"></script>
<?php session_start(); include "blocks/check.php"; require "../blocks/connect.php"; require "../packages/info/mapper/NewsMapper.php"; require "../packages/info/domain/News.php"; require "../packages/info/domain/Category.php"; require "../packages/pagination/Pagination.php"; $page = "news"; $selected = isset($_GET["page"]) ? $_GET["page"] : 0; $news = new info\mapper\NewsMapper($pdo); try { $limitNews = $news->getData($selected, $_GET["type"]); $count = $news->getCount($_GET["type"]); } catch (Exception $e) { die($e->getMessage()); } $pagination = new pagination\Pagination($count, $selected); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="../css/reset.css"> <link rel="stylesheet" type="text/css" href="Bootstrap/styles/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <script src="Bootstrap/js/jquery-1.11.1.min.js"></script> <script src="Bootstrap/js/bootstrap.min.js"></script> <script src="../js/scripts.js"></script> <script src="js/del.js"></script>