-- http://www.phpmyadmin.net
--
-- Počítač: 127.0.0.1
-- Vytvořeno: Pon 05. led 2015, 16:53
-- Verze serveru: 5.6.15-log
-- Verze PHP: 5.5.8




--
-- Databáze: `neumann`
--
CREATE DATABASE IF NOT EXISTS `neumann` DEFAULT CHARACTER SET utf8 COLLATE utf8_czech_ci;
USE `neumann`;

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

--
-- Struktura tabulky `address`
--

CREATE TABLE IF NOT EXISTS `address` (
`id_address` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `street` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `number` int(11) NOT NULL,
  `town` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `state` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `zip_code` int(5) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;

--
-- Vypisuji data pro tabulku `address`
--

INSERT INTO `address` (`id_address`, `id_user`, `street`, `number`, `town`, `state`, `zip_code`) VALUES
(1, 1, 'Brněnská', 1, 'Plzeň', 'Česká republika', 32300);

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

--
-- Struktura tabulky `category`
--

CREATE TABLE IF NOT EXISTS `category` (
`id_category` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `desc` text COLLATE utf8_czech_ci NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;

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

INSERT INTO `category` (`id_category`, `name`, `desc`) VALUES
(1, 'Sci-fi', 'Science fiction'),
(2, 'Fantasy', 'Fantasy'),
(3, 'Dobrodružství', 'Dobrodružství');

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

--
-- Struktura tabulky `item`
--

CREATE TABLE IF NOT EXISTS `item` (
`id_item` int(11) NOT NULL,
  `name` varchar(512) COLLATE utf8_czech_ci NOT NULL,
  `short_desc` varchar(1024) COLLATE utf8_czech_ci NOT NULL,
  `full_desc` text COLLATE utf8_czech_ci NOT NULL,
  `price` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `specific_features` text COLLATE utf8_czech_ci,
  `photo` mediumblob,
  `id_category` int(11) NOT NULL,
  `is_discount` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=23 ;

--
-- Vypisuji data pro tabulku `item`
--

INSERT INTO `item` (`id_item`, `name`, `short_desc`, `full_desc`, `price`, `quantity`, `specific_features`, `photo`, `id_category`, `is_discount`) VALUES
(1, 'Produkt', 'Krátký popisek', 'Dlouhý popisek', 100, 2, NULL, 0x[encoded data, 79482 characters], 1, 1);
INSERT INTO `item` (`id_item`, `name`, `short_desc`, `full_desc`, `price`, `quantity`, `specific_features`, `photo`, `id_category`, `is_discount`) VALUES
(2, 'Produkt 2', 'Krátký popisek', 'Dlouhý popisek', 2990, 20, NULL, 0x[encoded data, 73004 characters], 2, 0);
INSERT INTO `item` (`id_item`, `name`, `short_desc`, `full_desc`, `price`, `quantity`, `specific_features`, `photo`, `id_category`, `is_discount`) VALUES
(3, 'Produkt 3', 'Krátký popisek', 'Dlouhý popisek', 1000, 2, NULL, 0x[encoded data, 74454 characters], 1, 0);
INSERT INTO `item` (`id_item`, `name`, `short_desc`, `full_desc`, `price`, `quantity`, `specific_features`, `photo`, `id_category`, `is_discount`) VALUES
(16, 'Produkt 5', 'asdf', 'asdf', 123, 4, NULL, 0x[encoded data, 85138 characters], 1, 1);
INSERT INTO `item` (`id_item`, `name`, `short_desc`, `full_desc`, `price`, `quantity`, `specific_features`, `photo`, `id_category`, `is_discount`) VALUES
(17, 'test', 'asdf', 'asdf', 100, 11, NULL, 0x[encoded data, 71280 characters], 1, 0);
INSERT INTO `item` (`id_item`, `name`, `short_desc`, `full_desc`, `price`, `quantity`, `specific_features`, `photo`, `id_category`, `is_discount`) VALUES
(18, 'Produkt 4', 'Krátký popisek', 'Dlouhý popisek', 499, 12, NULL, 0x[encoded data, 38648 characters], 1, 0),
(19, 'Produkt 6', 'Krátký popisek', 'Dlouhý popisek', 3476, 7, NULL, 0x89504e470d0a1a0a0000000d49484452000000c8000000fa040300000016c4150b0000001b504c54453498dbffffffe5f2facce5f6b2d8f199cbed66b1e44da4df80bee85b9ff2bb000002a949444154789ced95cd73d2401887b78564735d40cb91a4b5edd180558fa4c3d81e49b59c4375068e292de2910c53e5cf76bf82296163228e177fcf30b009d9f7d98f77df1002000000000000000000000000000000000000000000000000000000ff8a7964ba28cfa1e7f5de8c0a1eb81f9a2e7e71e9095e1b631c9c0c065dd68aab4a687660fe40d0374b84df0eceaa4aec1799db9eb17746429ce65e92e352121244fb485ae524e3dd3bfa7725f7fd3d24342b2c967c8e88f349b81e5d7621b3cdbe6c5cc43cae239fb1fa5a4207f11f4a8624595acce381acc6f5937f2a6e06afd637e7fc1feb485cd53a5a7277466c26d1896fb7cb499288243ffc2bd10cb988ba11217531c030dc96884ca4eba7d67abd261bc9f4bbf9a46d243cd393953c2cb6dcc5198f38e636e2b06d4920f725bb5c4e3b60acb1fc9da4c6279c74e5606a47aa1f8f26af832dc9835a9b6712f67eb158998f9a92cc5d3eba44f5d679d6941f22933b2ba15e94975c8befb0a076357b5d97bde5ada4a382aa69fb69ce6c6d7cf28ee4248afa4bb38417c8db8968256a0aa11a6910eb9c792eb94dcf5d5e42cd47f26033c96499958491b34be2a6a7312f29289379495c24f1d3c77748bad567b27bb9465e7a00f792e89f200db3b5f1b353a3a4c272e91ae8a5b57593c2875242fd48deced7ab2a1b2f62a981faf29a97154726e7584a48bd6d9058e60a9693a8fd16e75ebe63282f2b7269a8dbc99695fcb8679df21222d7838f9fd4c404ee444cb1db0f3d2db154f8cc0e3831d135b5b464d69ad0554b76fb107f6989b8c9793c3f7ed412a20e7d7845bee99eb5e668310d0aea7d5e426e186bcab6251a22aeedb2c6b09e4a6c99c675fea7ee403ff277cb4951addfc1d7f4e560a70d3a8dcc4f8907a7936a0a0000000000000000000000000000000000000000000000000000fe477e022ccc8de947a614e70000000049454e44ae426082, 2, 1),
(20, 'Produkt 56', 'asdf', 'asdf', 1094, 5, NULL, 0x89504e470d0a1a0a0000000d49484452000000c8000000fa040300000016c4150b0000001b504c54451abc9cffffffe2f6f2c5eee6a9e5d98cddcd53ccb436c4a86fd5c126ea6961000002d649444154789ced95cd4fdb3018870d24718e75525a8e4d28e34ae8b4716c58191c099b60c71621c1b12d6ce3986a03fa67cf5f6df381d320a49d7e8f1071d2e47decd7af6d42000000000000000000000000000000000000000000000000000000e03f412f4d37797e570509c3dddec9b042b26dbac9f21030efcc1cc41b0cbe04ecf4cd929fd98ed9ec6cfe37304b7cf1efc61bbf55323acf3c8f4527e91a09991dbc47629bb2989758adf74826c62ee6248eb12f7524b131d939096dbe47e2af71ac24ce27429e06a27dccfc2bf9f426d8bd1271ffc8bbef0bc9c3695ee2ecd4946c137787245e97b793eefc9b37e40dcbfbf114bef0b8894cc7a19638e1988c98a0ad42d86d42ef9eab52a6246e8b4bee9be2455b646e2a0a213e17855392884a7c9c2767f379aa42581d3762cc1fae936c76b8e450c61af5c5c842de63394fb3a2c452f39249d7e6417c34a6171575ac24514a5c7f5f3565c4594a2c990dab20a1515a927c14e3a65176799625b2172e935feb3adb38107f4415775632fd408a920d3694aeb651c27abd50e6d3f5e4bd2e95ad0699c830342f71fd7159a212655e6b62833cb9141fba6a08b65afb3c57a3f41549d22765891e4268942c1792bb9395f0cbec1589b7ec6d56d250d7a8bea45d25f197af6727bea3aee6ddc5341243baaef7cb922d3d92b8f648f4c56ae83005090d872589a5e7a47ebaf41ec853b0d1178d550987f2c77b7d284c5612fd65c53e5994e81ae11d55591007d24cf4def1540fe2b42821aaf85d730997246abef9ba57753fd9d6a9997ab96d65d25fc548a470daa92fd96ae9fe93880fc0e9f2d6269f6dda5b6c906aa92c4a4ab6c5631a0ceb4b68f075fc188940d3e6ad139f8a1dc77ba1179f8fb5442d7abb39a6a9fe94467bb77771c5a95292103b60ec48b612de9071af19db230b0951651c33b63cdac527dd7567701e7a77ab5bcbc6afe78ab78a37000000000000000000000000000000000000000000000000000080d7f907b5797269c033a7650000000049454e44ae426082, 1, 0),
(21, 'Produkt 13', 'asdf', 'asdf', 1230, 4, NULL, NULL, 3, 1),
(22, 'Produkt 49', 'Krátký popisek', 'Dlouhý popisek', 4972, 12, NULL, 0x89504e470d0a1a0a0000000d49484452000000c8000000fa040300000016c4150b0000001b504c54451abc9cffffffe2f6f2c5eee6a9e5d98cddcd53ccb436c4a86fd5c126ea6961000002b349444154789ced964d57d3401486474832593249bf962614dd1a7a0eb86c6bb12c0d7ac0658b282cdba2c032452bf9d9ce574adb74127be0b8f17d16cd244dee7367e6ce2484000000000000000000000000000000000000000000000000000000c03f829e9a4e96b81d150509c3ddd6d1a04052359d2cf02b60ec6d81c4ebf5de05acbfb1e4c74262f7de713a0b5e9b25bef8b9f08cbd3549861f1e2ff7c4d3ae572221d3374f9128e2a44462d59e2e19b74b248e61463791bc308e8696d0ca3348dae512e78090594fb4bbcc3f93572f82dd3311f7a73cfb9449bef7d74aa64999a44adc0689bd266fc7cdf4a337e00dcbfb3c0b1f78dc58d6debe9638e1880c99a0bed4e5d0e8d012b7c625d71511cc1623371185d0e1c9dad59c4454e25d1a1fa7e952eaf765eb846cbde4927d196bd8d66939729ea6ab124bcdcbd270d19babaeb174e6922821aeaf528964443ec0961c0d6b4542a3242fb118f30725127ac223b94c3eadeb8cd7a32a496745327945f212279d75bdc42c61ad5628d3d0db82d39087ed1d329661e8b2c4f5476b24822fc6552037c8a353b9f7a89b6cb5f6f9580d933592b84d0c12d23177c5cf1a6e6351c20fd335126f3ebd79092f9ebf96d48b24fefcf6bcc4aaaf5e29ed8961b8ceb3d59097d8c64d3627d1076b47875991d070f00c12bd07f201561bde630987f2cf6b1d6afc94e122619628af62911f974c45f68ea732d04594976c30f17abef9ba57ef9871550fcdc45bda56f2afa838a7354bb66b3a7f12f10e384ddedae2b34d5bd906a996ca42def44076b9f41dbf20a1c1fbd15d24024d2a974ea72f761cef819e1c76b5442d7abb32a249f6c4deb7dbafc1e1061262cf3fa262de9071cf19db239984a832ee3096bd6fdd88157f77ad815e5dead6bc71f3bbe02ef9ff6033070000000000000000000000000000000000000000000000000000ff237f008716738182ac4a0f0000000049454e44ae426082, 3, 0);

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

--
-- Struktura tabulky `order`
--

CREATE TABLE IF NOT EXISTS `order` (
`id_order` int(11) NOT NULL,
  `id_user` int(11) DEFAULT NULL,
  `ordered_items` text COLLATE utf8_czech_ci NOT NULL,
  `billing_address` text COLLATE utf8_czech_ci NOT NULL,
  `shipping_address` text COLLATE utf8_czech_ci NOT NULL,
  `order_date` datetime NOT NULL,
  `id_status` int(11) NOT NULL,
  `total_price` int(11) NOT NULL,
  `discount` int(11) NOT NULL,
  `final_price` int(11) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;

--
-- Vypisuji data pro tabulku `order`
--

INSERT INTO `order` (`id_order`, `id_user`, `ordered_items`, `billing_address`, `shipping_address`, `order_date`, `id_status`, `total_price`, `discount`, `final_price`) VALUES
(1, 0, 'aced0005757200135b4c6a6176612e6c616e672e537472696e673badd256e7e91d7b47020000787000000001740017333a50726f64756b7420333a313a313030303a31303030', 'aced0005757200135b4c6a6176612e6c616e672e537472696e673badd256e7e91d7b47020000787000000006740008416e746f6ec3ad6e7400074e65756d616e6e7400126e65756d616e6e40746f6e64612e696e666f74000a42726ec49b6e736bc3a1740006506c7a65c5887400053332333030', 'aced000570', '2014-12-29 00:00:00', 1, 1000, 25, 750);

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

--
-- Struktura tabulky `order_status`
--

CREATE TABLE IF NOT EXISTS `order_status` (
`id_status` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_czech_ci NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=5 ;

--
-- Vypisuji data pro tabulku `order_status`
--

INSERT INTO `order_status` (`id_status`, `name`) VALUES
(1, 'Objednáno'),
(2, 'Připraveno'),
(3, 'Expedováno'),
(4, 'Zrušeno (STORNO)');

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

--
-- Struktura tabulky `page`
--

CREATE TABLE IF NOT EXISTS `page` (
`id_page` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `content` text COLLATE utf8_czech_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `id_user` int(11) NOT NULL,
  `last_modified` datetime NOT NULL,
  `meta_title` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `meta_desc` text COLLATE utf8_czech_ci NOT NULL,
  `meta_keys` varchar(1023) COLLATE utf8_czech_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;

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

--
-- Struktura tabulky `user`
--

CREATE TABLE IF NOT EXISTS `user` (
`id_user` int(11) NOT NULL,
  `login` varchar(64) COLLATE utf8_czech_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `pass` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `lastname` varchar(255) COLLATE utf8_czech_ci NOT NULL,
  `is_admin` tinyint(1) NOT NULL DEFAULT '0',
  `date_of_birth` datetime DEFAULT NULL,
  `valid` tinyint(1) NOT NULL DEFAULT '0',
  `discount` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;

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

INSERT INTO `user` (`id_user`, `login`, `email`, `pass`, `name`, `lastname`, `is_admin`, `date_of_birth`, `valid`, `discount`) VALUES
(1, 'tonda', 'neumann@tonda.info', 'tonda', 'Antonín', 'Neumann', 1, '1989-01-02 00:00:00', 1, 25),
(2, 'user1', 'user1@pia.cz', 'User@1234', 'John', 'Doe', 1, '2014-12-01 00:00:00', 1, 0),
(3, 'alois', 'antonin.neumann@seznam.cz', 'eea083b62231b96a620e017c77aae53725c5d8ea', 'Antonín Neumann', 'Neumann', 0, '2013-12-30 00:00:00', 0, 0),
(4, 'test', 'antonin.neumann@seznam.cz', 'eea083b62231b96a620e017c77aae53725c5d8ea', 'Antonín Neumann', 'Neumann', 0, '2013-12-30 00:00:00', 0, 0),
(5, 'asdf', 'test@test.cz', 'eea083b62231b96a620e017c77aae53725c5d8ea', '<script> alert("To ses ale lekl!"); </script>', 'test', 0, '2014-12-29 00:00:00', 0, 0);
(6, 'user2', 'user2@pia.cz', 'User@1234', 'John', 'Doe', 0, '2014-12-01 00:00:00', 1, 0),
(7, 'admin', 'admin@pia.cz', 'Admin@1234', 'John', 'Doe', 1, '2014-12-01 00:00:00', 1, 0);
--
-- Klíče pro exportované tabulky
--

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

--
-- Klíče pro tabulku `category`
--
ALTER TABLE `category`
 ADD PRIMARY KEY (`id_category`), ADD UNIQUE KEY `name` (`name`);

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

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

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

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

--
-- Klíče pro tabulku `user`
--
ALTER TABLE `user`
 ADD PRIMARY KEY (`id_user`), ADD UNIQUE KEY `login` (`login`);

--
-- AUTO_INCREMENT pro tabulky
--

--
-- AUTO_INCREMENT pro tabulku `address`
--
ALTER TABLE `address`
MODIFY `id_address` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pro tabulku `category`
--
ALTER TABLE `category`
MODIFY `id_category` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT pro tabulku `item`
--
ALTER TABLE `item`
MODIFY `id_item` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=23;
--
-- AUTO_INCREMENT pro tabulku `order`
--
ALTER TABLE `order`
MODIFY `id_order` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pro tabulku `order_status`
--
ALTER TABLE `order_status`
MODIFY `id_status` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT pro tabulku `page`
--
ALTER TABLE `page`
MODIFY `id_page` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pro tabulku `user`
--
ALTER TABLE `user`
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
