-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Počítač: localhost
-- Vytvořeno: Úte 19. kvě 2015, 17:24
-- Verze serveru: 5.6.21
-- Verze PHP: 5.6.3

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Databáze: `project`
--

-- --------------------------------------------------------

--
-- Struktura tabulky `article`
--

CREATE TABLE IF NOT EXISTS `article` (
`id` int(11) NOT NULL,
  `menu_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `name` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `extract` text COLLATE utf8_czech_ci NOT NULL,
  `content` text COLLATE utf8_czech_ci NOT NULL,
  `created` datetime DEFAULT NULL,
  `last_update` datetime DEFAULT NULL,
  `visible` tinyint(1) NOT NULL,
  `date_end` date DEFAULT NULL,
  `archived` tinyint(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `article`
--

INSERT INTO `article` (`id`, `menu_id`, `user_id`, `name`, `extract`, `content`, `created`, `last_update`, `visible`, `date_end`, `archived`) VALUES
(3, 25, NULL, 'Článek 1', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.</p>\n', '2015-04-12 23:22:21', '2015-05-04 21:31:10', 0, '2029-05-20', 1),
(6, 25, NULL, 'Článek 2', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.</p>\n\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.</p>\n', '2015-04-13 13:39:15', '2015-05-04 21:30:53', 0, '2029-05-20', 0);

-- --------------------------------------------------------

--
-- Struktura tabulky `category`
--

CREATE TABLE IF NOT EXISTS `category` (
`id` int(11) NOT NULL,
  `name` varchar(300) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime NOT NULL,
  `last_update` datetime NOT NULL,
  `visible` tinyint(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `category`
--

INSERT INTO `category` (`id`, `name`, `created`, `last_update`, `visible`) VALUES
(1, 'Obecně závazné vyhlášky', '2015-04-25 00:00:00', '2015-04-25 00:00:00', 0),
(2, 'Dokumenty orgánů obce a obecních úřadů', '2015-04-25 00:00:00', '2015-04-25 00:00:00', 0),
(3, 'Územní plány', '2015-04-25 00:00:00', '2015-04-25 00:00:00', 0);

-- --------------------------------------------------------

--
-- Struktura tabulky `councilor`
--

CREATE TABLE IF NOT EXISTS `councilor` (
`id` int(11) NOT NULL,
  `first_name` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `last_name` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `title_before` varchar(15) COLLATE utf8_czech_ci DEFAULT NULL,
  `title_after` varchar(15) COLLATE utf8_czech_ci DEFAULT NULL,
  `function` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `photo` varchar(400) COLLATE utf8_czech_ci DEFAULT NULL,
  `phone` varchar(50) COLLATE utf8_czech_ci DEFAULT NULL,
  `email` varchar(200) COLLATE utf8_czech_ci DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `councilor`
--

INSERT INTO `councilor` (`id`, `first_name`, `last_name`, `title_before`, `title_after`, `function`, `photo`, `phone`, `email`) VALUES
(1, 'Karel', 'Pekárek', 'Ing.', 'PhD.', 'Starosta', NULL, '89797898', 'karelpeca@obec.cz'),
(2, 'Lukáš', 'Janíček', '', '', 'Místostarosta', NULL, '', 'obcov@obec.cz');

-- --------------------------------------------------------

--
-- Struktura tabulky `document`
--

CREATE TABLE IF NOT EXISTS `document` (
`id` int(11) NOT NULL,
  `category_id` int(11) DEFAULT NULL,
  `name` varchar(300) COLLATE utf8_czech_ci NOT NULL,
  `path` varchar(400) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime DEFAULT NULL,
  `date_end` date DEFAULT NULL,
  `date_from` date DEFAULT NULL,
  `archived` tinyint(1) NOT NULL,
  `visible` tinyint(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `document`
--

INSERT INTO `document` (`id`, `category_id`, `name`, `path`, `created`, `date_end`, `date_from`, `archived`, `visible`) VALUES
(1, 1, 'Snímek', '/documents/1/1_Snimek-obrazovky-2015-04-22-v-13.21.48.png', '2015-04-25 00:00:00', '2015-05-06', '2015-04-16', 1, 0),
(4, 1, '4_BP-Funkce.txt', '/documents/1/4_BP-Funkce.txt', '2015-04-25 00:00:00', '2015-04-28', '2015-04-24', 1, 0),
(6, 1, '6_Potvrzeni-o-provedene-platbe.pdf', '/documents/1/6_Potvrzeni-o-provedene-platbe.pdf', '2015-04-26 00:00:00', '2015-04-23', '2015-04-09', 0, 1),
(7, 1, '7_Potvrzeni-o-provedene-platbe.pdf', '/documents/1/7_Potvrzeni-o-provedene-platbe.pdf', '2015-04-26 00:00:00', '2015-09-24', '2015-04-14', 0, 1),
(8, 1, '8_Potvrzeni-o-provedene-platbe.pdf', '/documents/1/8_Potvrzeni-o-provedene-platbe.pdf', '2015-04-26 00:00:00', '2015-05-05', '2015-04-02', 0, 0);

-- --------------------------------------------------------

--
-- Struktura tabulky `gallery`
--

CREATE TABLE IF NOT EXISTS `gallery` (
`id` int(11) NOT NULL,
  `name` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `content` text COLLATE utf8_czech_ci,
  `created` datetime DEFAULT NULL,
  `visible` tinyint(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `gallery`
--

INSERT INTO `gallery` (`id`, `name`, `content`, `created`, `visible`) VALUES
(1, 'Album 1', 'dolor sit amet, consectetur adipiscing elit. Maecenas viverra auctor ligula, id facilisis leo laoreet in. Pellentesque consectetur, magna eget laoreet aliquam, massa lorem semper enim, quis ullamcorper est neque quis velit. Pellentesque sagittis sem et tempus porta. Mauris in dolor est. Duis gravida, sapien vitae molestie fermentum, velit erat gravida sem, eget bibendum libero metus vitae sem. Donec eget suscipit leo. Morbi ac varius nibh. Nulla blandit nisl eget enim commodo, eget fringilla diam dictum. Vestibulum rhoncus mi ut varius accumsan. Ut facilisis nec orci in accumsan. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed et lectus quis justo convallis aliquam tincidunt ut purus. Etiam sit amet sapien fermentum leo tristique vulputate id a magna.', '2015-04-12 23:26:00', 0),
(2, 'Album 2', 'dolor sit amet, consectetur adipiscing elit. Maecenas viverra auctor ligula, id facilisis leo laoreet in. Pellentesque consectetur, magna eget laoreet aliquam, massa lorem semper enim, quis ullamcorper est neque quis velit. Pellentesque sagittis sem et tempus porta. Mauris in dolor est. Duis gravida, sapien vitae molestie fermentum, velit erat gravida sem, eget bibendum libero metus vitae sem. Donec eget suscipit leo. Morbi ac varius nibh. Nulla blandit nisl eget enim commodo, eget fringilla diam dictum. Vestibulum rhoncus mi ut varius accumsan. Ut facilisis nec orci in accumsan. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed et lectus quis justo convallis aliquam tincidunt ut purus. Etiam sit amet sapien fermentum leo tristique vulputate id a magna.', '2015-04-23 02:32:30', 0);

-- --------------------------------------------------------

--
-- Struktura tabulky `info`
--

CREATE TABLE IF NOT EXISTS `info` (
`id` int(10) unsigned NOT NULL,
  `name` varchar(400) COLLATE utf8_czech_ci NOT NULL,
  `web` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `ic` varchar(15) COLLATE utf8_czech_ci NOT NULL,
  `dic` varchar(20) COLLATE utf8_czech_ci NOT NULL,
  `street` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `city` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `psc` varchar(6) COLLATE utf8_czech_ci NOT NULL,
  `phone` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `fax` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `bank` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `mon` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `tue` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `wed` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `thu` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `fri` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `sat` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `sun` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `region` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `district` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `population` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `area` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `facebook` varchar(400) COLLATE utf8_czech_ci DEFAULT NULL,
  `google_plus` varchar(400) COLLATE utf8_czech_ci DEFAULT NULL,
  `twitter` varchar(400) COLLATE utf8_czech_ci DEFAULT NULL,
  `youtube` varchar(400) COLLATE utf8_czech_ci DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `info`
--

INSERT INTO `info` (`id`, `name`, `web`, `ic`, `dic`, `street`, `city`, `psc`, `phone`, `fax`, `email`, `bank`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`, `region`, `district`, `population`, `area`, `facebook`, `google_plus`, `twitter`, `youtube`) VALUES
(1, 'Brno', 'www.obec.cz', '9676987', 'CZ0809986', 'Obcová 16', 'Obcov', '989786', '89797898', '', 'obcov@obec.cz', '879709890070/0111', '08:00 - 12:00, 13:00 - 16:00', 'zavřeno', '08:00 - 12:00, 13:00 - 16:00', '08:00 - 12:00, 13:00 - 16:00', 'zavřeno', 'zavřeno', 'zavřeno', 'Jihomoravský', 'Brno - venkov', '1403', '2,64 km', 'http://www.facebook.com/jmenoObce', '', 'http://twitter.com/obec', '');

-- --------------------------------------------------------

--
-- Struktura tabulky `menu`
--

CREATE TABLE IF NOT EXISTS `menu` (
`id` int(11) NOT NULL,
  `menu_id` int(11) DEFAULT NULL,
  `name` varchar(80) COLLATE utf8_czech_ci NOT NULL,
  `url_name` varchar(80) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime NOT NULL,
  `order` smallint(6) NOT NULL,
  `content` text COLLATE utf8_czech_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_czech_ci DEFAULT NULL,
  `lvl` tinyint(1) NOT NULL,
  `last_update` datetime NOT NULL,
  `hp` tinyint(1) NOT NULL,
  `visible` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `menu`
--

INSERT INTO `menu` (`id`, `menu_id`, `name`, `url_name`, `created`, `order`, `content`, `type`, `lvl`, `last_update`, `hp`, `visible`) VALUES
(20, NULL, 'Obecní úřad', 'obecni-urad', '2015-04-12 19:13:14', 8, '', 'info', 1, '0000-00-00 00:00:00', 0, 1),
(25, NULL, 'Aktuality', 'aktuality', '2015-04-12 23:22:13', 2, '', 'articles', 1, '0000-00-00 00:00:00', 1, 1),
(26, NULL, 'Doprava', 'doprava', '2015-04-13 00:44:16', 11, '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas viverra auctor ligula, id facilisis leo laoreet in. Pellentesque consectetur, magna eget laoreet aliquam, massa lorem semper enim, quis ullamcorper est neque quis velit. Pellentesque sagittis sem et tempus porta. Mauris in dolor est. Duis gravida, sapien vitae molestie fermentum, velit erat gravida sem, eget bibendum libero metus vitae sem. Donec eget suscipit leo. Morbi ac varius nibh. Nulla blandit nisl eget enim commodo, eget fringilla diam dictum. Vestibulum rhoncus mi ut varius accumsan. Ut facilisis nec orci in accumsan. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed et lectus quis justo convallis aliquam tincidunt ut purus. Etiam sit amet sapien fermentum leo tristique vulputate id a magna.</p>\n\n<p>Nulla eleifend lectus at massa posuere, vel auctor arcu tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt quam nunc, et dapibus lacus congue eu. Vestibulum at tellus aliquam, ullamcorper turpis in, porta risus. Cras sit amet est eros. Mauris maximus, justo non varius luctus, leo augue varius libero, rhoncus tempus eros enim vel sem. Sed rutrum hendrerit ipsum, interdum semper velit. Donec rutrum ornare maximus. Quisque aliquam varius urna, et feugiat eros interdum eget. Duis accumsan finibus placerat. Donec volutpat id ipsum eu sodales. Nunc erat urna, molestie id purus ut, ullamcorper pretium metus. Quisque ultricies risus eu quam pharetra mollis. Donec consequat dui sed metus tempor dapibus. Praesent malesuada lectus vel elementum elementum.</p>\n\n<p>Praesent condimentum tincidunt risus, ac sodales libero blandit a. Interdum et malesuada fames ac ante ipsum primis in faucibus. Mauris pulvinar sed libero vel convallis. Praesent in turpis volutpat, tincidunt lorem a, auctor ex. Ut ac lectus tristique, facilisis elit nec, fringilla sapien. Morbi feugiat laoreet viverra. Aliquam tincidunt mi ac rutrum pretium. In efficitur neque et urna viverra viverra et a ex. Integer vitae condimentum ex. Morbi pulvinar scelerisque arcu ut viverra. Donec laoreet tristique purus, eget lacinia arcu laoreet ut. Maecenas sagittis ante sit amet odio auctor, hendrerit dapibus lorem tincidunt. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc id risus sodales, feugiat nisl a, lacinia orci.</p>\n\n<p>Cras mollis consectetur elit. Aliquam sollicitudin dui in pretium imperdiet. Morbi et dolor eu augue mattis rutrum. Nullam sem lectus, hendrerit ac dictum pulvinar, fringilla non elit. In ac elit lobortis, sagittis odio quis, ultricies ex. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras imperdiet id ligula in fringilla.</p>\n\n<p>Nulla ut venenatis lorem. Aenean ac cursus turpis. Curabitur tempus metus tellus, eget sollicitudin nibh sagittis vel. Nullam eu aliquet urna, tempus auctor felis. Maecenas tempor interdum dui, vitae scelerisque risus ultricies sit amet. Sed vel libero ut lectus suscipit placerat. Phasellus laoreet rhoncus erat, vitae fringilla ante dictum non. Fusce imperdiet, purus ut vulputate auctor, diam urna eleifend ligula, eu mattis neque felis eget tellus. Vivamus condimentum metus in quam iaculis, a tristique leo blandit. Integer pharetra mauris eget sem gravida, vitae interdum nulla mattis. Quisque tincidunt purus lacus, id porttitor massa sagittis non.</p>\n', 'text', 1, '0000-00-00 00:00:00', 0, 1),
(27, NULL, 'Služby', 'sluzby', '2015-04-13 11:05:18', 9, '', 'services', 1, '0000-00-00 00:00:00', 0, 1),
(28, NULL, 'Historie', 'historie', '2015-04-13 13:03:11', 12, '<p>dolor sit amet, consectetur adipiscing elit. <strong>Maecenas</strong> viverra auctor ligula, id facilisis leo laoreet in. Pellentesque consectetur, magna eget laoreet aliquam, massa lorem semper enim, quis ullamcorper est neque quis velit. Pellentesque sagittis sem et tempus porta. Mauris in dolor est. Duis gravida, sapien vitae molestie fermentum, velit erat gravida sem, eget bibendum libero metus vitae sem. Donec eget suscipit leo. Morbi ac varius nibh. Nulla blandit nisl eget enim commodo, eget fringilla diam dictum. Vestibulum rhoncus mi ut varius accumsan. Ut facilisis nec orci in accumsan. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed et lectus quis justo convallis aliquam tincidunt ut purus. Etiam sit amet sapien fermentum leo tristique vulputate id a magna.</p>\n\n<p>Nulla eleifend lectus at massa posuere, vel auctor arcu tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt quam nunc, et dapibus lacus congue eu. Vestibulum at tellus aliquam, ullamcorper turpis in, porta risus. Cras sit amet est eros. Mauris maximus, justo non varius luctus, leo augue varius libero, rhoncus tempus eros enim vel sem. Sed rutrum hendrerit ipsum, interdum semper velit. Donec rutrum ornare maximus. Quisque aliquam varius urna, et feugiat eros interdum eget. Duis accumsan finibus placerat. Donec volutpat id ipsum eu sodales. Nunc erat urna, molestie id purus ut, ullamcorper pretium metus. Quisque ultricies risus eu quam pharetra mollis. Donec consequat dui sed metus tempor dapibus. Praesent malesuada lectus vel elementum elementum.</p>\n\n<p>Praesent condimentum tincidunt risus, ac sodales libero blandit a. Interdum et malesuada fames ac ante ipsum primis in faucibus. Mauris pulvinar sed libero vel convallis. Praesent in turpis volutpat, tincidunt lorem a, auctor ex. Ut ac lectus tristique, facilisis elit nec, fringilla sapien. Morbi feugiat laoreet viverra. Aliquam tincidunt mi ac rutrum pretium. In efficitur neque et urna viverra viverra et a ex. Integer vitae condimentum ex. Morbi pulvinar scelerisque arcu ut viverra. Donec laoreet tristique purus, eget lacinia arcu laoreet ut. Maecenas sagittis ante sit amet odio auctor, hendrerit dapibus lorem tincidunt. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc id risus sodales, feugiat nisl a, lacinia orci.</p>\n\n<p>Cras mollis consectetur elit. Aliquam sollicitudin dui in pretium imperdiet. Morbi et dolor eu augue mattis rutrum. Nullam sem lectus, hendrerit ac dictum pulvinar, fringilla non elit. In ac elit lobortis, sagittis odio quis, ultricies ex. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras imperdiet id ligula in fringilla.</p>\n\n<p>Nulla ut venenatis lorem. Aenean ac cursus turpis. Curabitur tempus metus tellus, eget sollicitudin nibh sagittis vel. Nullam eu aliquet urna, tempus auctor felis. Maecenas tempor interdum dui, vitae scelerisque risus ultricies sit amet. Sed vel libero ut lectus suscipit placerat. Phasellus laoreet rhoncus erat, vitae fringilla ante dictum non. Fusce imperdiet, purus ut vulputate auctor, diam urna eleifend ligula, eu mattis neque felis eget tellus. Vivamus condimentum metus in quam iaculis, a tristique leo blandit. Integer pharetra mauris eget sem gravida, vitae interdum nulla mattis. Quisque tincidunt purus lacus, id porttitor massa sagittis non.</p>\n', 'text', 1, '0000-00-00 00:00:00', 0, 1),
(29, 20, 'Zastupitelé', 'zastupitele', '2015-04-13 21:53:45', 9, '', 'councilors', 2, '0000-00-00 00:00:00', 0, 1),
(30, NULL, 'Galerie', 'galerie', '2015-04-23 02:16:25', 10, '', 'gallery', 1, '0000-00-00 00:00:00', 0, 1),
(33, 20, 'Úřední deska', 'uredni-deska', '2015-04-25 18:53:35', 7, '', 'board', 2, '0000-00-00 00:00:00', 0, 1),
(34, 28, 'Kronika', 'kronika', '2015-04-25 19:18:11', 0, '', 'text', 2, '0000-00-00 00:00:00', 0, 1),
(36, 20, 'Povinné informace', 'povinne-informace', '2015-04-25 19:20:45', 8, '', 'text', 2, '0000-00-00 00:00:00', 0, 1),
(37, 20, 'E-Podatelna', 'e-podatelna', '2015-04-26 12:13:02', 10, '', 'registry', 2, '0000-00-00 00:00:00', 0, 1);

-- --------------------------------------------------------

--
-- Struktura tabulky `photo`
--

CREATE TABLE IF NOT EXISTS `photo` (
`id` int(11) NOT NULL,
  `gallery_id` int(11) NOT NULL,
  `name` varchar(300) COLLATE utf8_czech_ci NOT NULL,
  `path` varchar(400) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `photo`
--

INSERT INTO `photo` (`id`, `gallery_id`, `name`, `path`, `created`) VALUES
(2, 1, '2_Snimek-obrazovky-2015-04-22-v-13.21.48.png', '/photos/1/2_Snimek-obrazovky-2015-04-22-v-13.21.48.png', '2015-04-23 02:44:40'),
(3, 2, '3_Povleceme-baner-6.png', '/photos/2/3_Povleceme-baner-6.png', '2015-04-23 03:30:41');

-- --------------------------------------------------------

--
-- Struktura tabulky `registry`
--

CREATE TABLE IF NOT EXISTS `registry` (
`id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `name` varchar(200) COLLATE utf8_czech_ci NOT NULL,
  `email` varchar(300) COLLATE utf8_czech_ci NOT NULL,
  `street` varchar(200) COLLATE utf8_czech_ci NOT NULL,
  `city` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `text` text COLLATE utf8_czech_ci,
  `approved` tinyint(1) NOT NULL DEFAULT '0',
  `filename` varchar(300) COLLATE utf8_czech_ci DEFAULT NULL,
  `path` varchar(400) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `registry`
--

INSERT INTO `registry` (`id`, `user_id`, `name`, `email`, `street`, `city`, `text`, `approved`, `filename`, `path`, `created`) VALUES
(2, NULL, 'Hospoda na mýtince', 'karelpeca@obec.cz', 'Obcova 16', 'Brno', 'dasda', 1, NULL, '', '2015-04-26 13:09:58'),
(3, NULL, 'Lukáš Janíček', 'lukassjanicek@gmail.com', 'Lesní 19', 'Brno', 'dasdasdasdasdsadasdsadsadsadsadas', 1, NULL, '', '2015-04-26 14:05:42'),
(4, NULL, 'Jakub Škorpík', 'obcov@obec.cz', 'Obcova 16', 'Brno', 'dasdsad', 1, NULL, '', '2015-04-26 14:09:27'),
(7, NULL, 'Novinky', 'obcov@obec.cz', 'Obcova 16', 'Obcov', '', 1, '7_Potvrzeni-o-provedene-platbe.pdf', 'files/registry/7_Potvrzeni-o-provedene-platbe.pdf', '2015-04-26 14:40:08'),
(8, NULL, 'Karlik', 'pekos@pokos.cz', 'asdas', 'asdas', 'dasdas', 0, '8_BP-Funkce.txt', 'files/registry/8_BP-Funkce.txt', '2015-04-26 15:02:54'),
(9, NULL, 'Hospoda na mýtince', 'obcov@obec.cz', 'Obcová 16', 'jh', 'jhjhbj', 0, NULL, '', '2015-05-18 10:21:27');

-- --------------------------------------------------------

--
-- Struktura tabulky `service`
--

CREATE TABLE IF NOT EXISTS `service` (
`id` int(11) NOT NULL,
  `name` varchar(200) COLLATE utf8_czech_ci NOT NULL,
  `address` varchar(200) COLLATE utf8_czech_ci NOT NULL,
  `phone` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `email` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `content` text COLLATE utf8_czech_ci NOT NULL,
  `ref_person` varchar(200) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime DEFAULT NULL,
  `last_update` datetime DEFAULT NULL,
  `type` varchar(20) COLLATE utf8_czech_ci DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `service`
--

INSERT INTO `service` (`id`, `name`, `address`, `phone`, `email`, `content`, `ref_person`, `created`, `last_update`, `type`) VALUES
(2, 'Hospoda na mýtince', 'obcov', '89797898', 'obcov@obec.cz', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.</p>\n', 'Karel Pekárek', '2015-04-13 00:00:00', '2015-04-23 00:00:00', 'shop'),
(3, 'SK Slavoj Houslice', 'Obcov 14', '1333133', 'obcov@obec.cz', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pulvinar non sapien non tincidunt. Aliquam ultricies tempor eros, eu faucibus lorem blandit sodales. Integer viverra volutpat malesuada. Nullam vel auctor turpis. Proin magna leo, pharetra at leo nec, dictum pellentesque arcu. Integer ultricies velit mi. Curabitur tempor ut ligula sed ultricies. Sed hendrerit dui ultrices lorem maximus tempus. Praesent imperdiet diam congue odio ultricies, vel dictum massa tempus. Aenean nulla lectus, sodales ac lorem id, venenatis hendrerit sem. Donec rutrum elit non elit gravida, sit amet gravida mauris venenatis. Praesent accumsan consectetur erat at tincidunt.</p>\n', 'Karel Pekárek', '2015-04-23 00:00:00', '2015-04-23 00:00:00', 'sport');

-- --------------------------------------------------------

--
-- Struktura tabulky `user`
--

CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL,
  `first_name` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `last_name` varchar(100) COLLATE utf8_czech_ci NOT NULL,
  `photo` varchar(400) COLLATE utf8_czech_ci DEFAULT NULL,
  `role` varchar(80) COLLATE utf8_czech_ci DEFAULT NULL,
  `username` varchar(50) COLLATE utf8_czech_ci NOT NULL,
  `password` varchar(150) COLLATE utf8_czech_ci NOT NULL,
  `created` datetime DEFAULT NULL,
  `invalidate` datetime DEFAULT NULL,
  `deleted` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

--
-- Vypisuji data pro tabulku `user`
--

INSERT INTO `user` (`id`, `first_name`, `last_name`, `photo`, `role`, `username`, `password`, `created`, `invalidate`, `deleted`) VALUES
(1, 'Lukáš', 'Janíček', NULL, 'superadmin', 'lukassjanicek', '$2y$10$868b3BUi4g5RvgOCT2HMwu3xMWnFM4h9ZoCdSo9mpc33/fV8jko.a', '2015-04-13 19:34:27', '2015-05-18 07:43:56', NULL),
(2, 'Jiří', 'Třináctý', NULL, 'admin', '13tyyy', '$2y$10$dCUNRovGpO0wGb0NCIPvM.PKI6VNdKEUwaVhZPlJ9Crpp76hQqRJ6', '2015-05-18 07:50:31', '2015-05-18 11:45:58', NULL);

--
-- Klíče pro exportované tabulky
--

--
-- Klíče pro tabulku `article`
--
ALTER TABLE `article`
 ADD PRIMARY KEY (`id`), ADD KEY `content_category_id` (`menu_id`), ADD KEY `user_id` (`user_id`);

--
-- Klíče pro tabulku `category`
--
ALTER TABLE `category`
 ADD PRIMARY KEY (`id`);

--
-- Klíče pro tabulku `councilor`
--
ALTER TABLE `councilor`
 ADD PRIMARY KEY (`id`);

--
-- Klíče pro tabulku `document`
--
ALTER TABLE `document`
 ADD PRIMARY KEY (`id`), ADD KEY `category_id` (`category_id`);

--
-- Klíče pro tabulku `gallery`
--
ALTER TABLE `gallery`
 ADD PRIMARY KEY (`id`);

--
-- Klíče pro tabulku `info`
--
ALTER TABLE `info`
 ADD PRIMARY KEY (`id`);

--
-- Klíče pro tabulku `menu`
--
ALTER TABLE `menu`
 ADD PRIMARY KEY (`id`), ADD KEY `menu_id` (`menu_id`);

--
-- Klíče pro tabulku `photo`
--
ALTER TABLE `photo`
 ADD PRIMARY KEY (`id`), ADD KEY `gallery_id` (`gallery_id`);

--
-- Klíče pro tabulku `registry`
--
ALTER TABLE `registry`
 ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`);

--
-- Klíče pro tabulku `service`
--
ALTER TABLE `service`
 ADD PRIMARY KEY (`id`);

--
-- Klíče pro tabulku `user`
--
ALTER TABLE `user`
 ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT pro tabulky
--

--
-- AUTO_INCREMENT pro tabulku `article`
--
ALTER TABLE `article`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT pro tabulku `category`
--
ALTER TABLE `category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT pro tabulku `councilor`
--
ALTER TABLE `councilor`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT pro tabulku `document`
--
ALTER TABLE `document`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT pro tabulku `gallery`
--
ALTER TABLE `gallery`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT pro tabulku `info`
--
ALTER TABLE `info`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pro tabulku `menu`
--
ALTER TABLE `menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT pro tabulku `photo`
--
ALTER TABLE `photo`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT pro tabulku `registry`
--
ALTER TABLE `registry`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT pro tabulku `service`
--
ALTER TABLE `service`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT pro tabulku `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- Omezení pro exportované tabulky
--

--
-- Omezení pro tabulku `article`
--
ALTER TABLE `article`
ADD CONSTRAINT `article_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `article_ibfk_3` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Omezení pro tabulku `document`
--
ALTER TABLE `document`
ADD CONSTRAINT `document_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Omezení pro tabulku `menu`
--
ALTER TABLE `menu`
ADD CONSTRAINT `menu_ibfk_1` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Omezení pro tabulku `photo`
--
ALTER TABLE `photo`
ADD CONSTRAINT `photo_ibfk_1` FOREIGN KEY (`gallery_id`) REFERENCES `gallery` (`id`);

--
-- Omezení pro tabulku `registry`
--
ALTER TABLE `registry`
ADD CONSTRAINT `registry_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
