-- http://www.phpmyadmin.net
--
-- Počítač: localhost
-- Vygenerováno: Středa 09. prosince 2009, 07:52
-- Verze MySQL: 5.0.84
-- Verze PHP: 5.2.9


--
-- Databáze: `centrala`
--

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

--
-- Struktura tabulky `ChatHistory`
--

CREATE TABLE IF NOT EXISTS `ChatHistory` (
  `Id` int(11) NOT NULL auto_increment,
  `Nick` varchar(64) collate utf8_czech_ci NOT NULL,
  `Text` text collate utf8_czech_ci NOT NULL,
  `Time` datetime NOT NULL default '0000-00-00 00:00:00',
  `Color` int(11) NOT NULL default '0',
  `RoomName` varchar(32) collate utf8_czech_ci NOT NULL,
  `RoomType` int(11) NOT NULL default '0',
  `Host` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=528576 ;

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

--
-- Struktura tabulky `DocumentLine`
--

CREATE TABLE IF NOT EXISTS `DocumentLine` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `Shortcut` varchar(16) collate utf8_czech_ci NOT NULL,
  `NextNumber` int(11) NOT NULL,
  PRIMARY KEY  (`Id`),
  UNIQUE KEY `Shortcut` (`Shortcut`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7 ;

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

--
-- Struktura tabulky `EmailQueue`
--

CREATE TABLE IF NOT EXISTS `EmailQueue` (
  `Id` int(11) NOT NULL auto_increment,
  `Time` datetime NOT NULL,
  `Address` varchar(255) collate utf8_czech_ci NOT NULL,
  `Subject` varchar(255) collate utf8_czech_ci NOT NULL,
  `Content` text collate utf8_czech_ci NOT NULL,
  `Headers` varchar(255) collate utf8_czech_ci NOT NULL,
  `Archive` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=41 ;

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

--
-- Struktura tabulky `File`
--

CREATE TABLE IF NOT EXISTS `File` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(256) collate utf8_czech_ci NOT NULL,
  `Size` int(11) NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ;

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

--
-- Struktura tabulky `FinanceAssetsHistory`
--

CREATE TABLE IF NOT EXISTS `FinanceAssetsHistory` (
  `AssetsId` int(11) NOT NULL default '0',
  `Time` datetime NOT NULL default '0000-00-00 00:00:00',
  `Text` varchar(255) collate utf8_czech_ci NOT NULL default '',
  `User` int(11) NOT NULL default '0',
  KEY `AssetsId` (`AssetsId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `FinanceBillingPeriod`
--

CREATE TABLE IF NOT EXISTS `FinanceBillingPeriod` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `MonthCount` int(11) NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;

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

--
-- Struktura tabulky `FinanceBills`
--

CREATE TABLE IF NOT EXISTS `FinanceBills` (
  `Id` int(11) NOT NULL auto_increment,
  `TimeFrom` datetime NOT NULL default '0000-00-00 00:00:00',
  `Subject` int(11) NOT NULL default '0',
  `TimeTo` datetime NOT NULL default '0000-00-00 00:00:00',
  `TimeCreate` datetime NOT NULL default '0000-00-00 00:00:00',
  `TimeDue` datetime NOT NULL default '0000-00-00 00:00:00',
  `BillCode` varchar(32) collate utf8_czech_ci NOT NULL,
  `Type` enum('invoice','income') collate utf8_czech_ci NOT NULL,
  `Cash` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1941 ;

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

--
-- Struktura tabulky `FinanceBillsItems`
--

CREATE TABLE IF NOT EXISTS `FinanceBillsItems` (
  `Id` int(11) NOT NULL auto_increment,
  `Bill` int(11) NOT NULL default '0',
  `Description` varchar(255) collate utf8_czech_ci NOT NULL,
  `Price` float NOT NULL default '0',
  `Quantity` float NOT NULL default '1',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=13482 ;

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

--
-- Struktura tabulky `FinanceClaimsLiabilities`
--

CREATE TABLE IF NOT EXISTS `FinanceClaimsLiabilities` (
  `Id` int(11) NOT NULL auto_increment,
  `BillCode` varchar(16) collate utf8_czech_ci NOT NULL,
  `Subject` int(11) NOT NULL default '0',
  `TimeCreation` datetime NOT NULL default '0000-00-00 00:00:00',
  `TimeDue` datetime NOT NULL default '0000-00-00 00:00:00',
  `TimePayment` datetime NOT NULL default '0000-00-00 00:00:00',
  `Value` float NOT NULL default '0',
  `Bill` int(11) NOT NULL default '0',
  `Text` varchar(255) collate utf8_czech_ci NOT NULL default '',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4455 ;

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

--
-- Struktura tabulky `FinanceLog`
--

CREATE TABLE IF NOT EXISTS `FinanceLog` (
  `Id` int(11) NOT NULL auto_increment,
  `Time` datetime NOT NULL default '0000-00-00 00:00:00',
  `Text` varchar(255) collate utf8_czech_ci NOT NULL default '',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;

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

--
-- Struktura tabulky `FinanceOperation`
--

CREATE TABLE IF NOT EXISTS `FinanceOperation` (
  `Id` int(11) NOT NULL auto_increment,
  `Time` datetime NOT NULL,
  `Subject` int(11) NOT NULL default '0',
  `Cash` int(11) NOT NULL default '0',
  `Value` float NOT NULL,
  `BillCode` varchar(32) collate utf8_czech_ci NOT NULL,
  `Taxable` tinyint(1) NOT NULL default '1',
  `Bill` int(11) NOT NULL,
  `Text` varchar(255) collate utf8_czech_ci NOT NULL default 'Vklad',
  `Network` int(11) NOT NULL default '1',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4311 ;

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

--
-- Struktura tabulky `FinanceSmallAssets`
--

CREATE TABLE IF NOT EXISTS `FinanceSmallAssets` (
  `Id` int(11) NOT NULL auto_increment,
  `Text` varchar(255) collate utf8_czech_ci NOT NULL default '',
  `PricePurchase` float NOT NULL default '0',
  `TimeEnlistment` datetime NOT NULL default '0000-00-00 00:00:00',
  `TimeElimination` datetime NOT NULL default '0000-00-00 00:00:00',
  `SupplySubject` int(11) NOT NULL default '0',
  `DeviceId` varchar(128) collate utf8_czech_ci NOT NULL default '',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;

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

--
-- Struktura tabulky `FinanceTariff`
--

CREATE TABLE IF NOT EXISTS `FinanceTariff` (
  `Id` int(11) NOT NULL auto_increment,
  `Tariff` int(11) NOT NULL default '0',
  `Period` int(11) NOT NULL default '0',
  `Name` varchar(32) collate utf8_czech_ci NOT NULL,
  `Group` int(11) NOT NULL default '0',
  `SpeedMin` int(11) NOT NULL default '0',
  `SpeedMax` int(11) NOT NULL default '0',
  `UploadAsymmetry` int(11) NOT NULL default '1',
  `Price` int(11) NOT NULL default '0',
  `MemberCount` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=33 ;

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

--
-- Struktura tabulky `finance_charge`
--

CREATE TABLE IF NOT EXISTS `finance_charge` (
  `period` int(11) NOT NULL default '0',
  `internet` int(11) NOT NULL default '0',
  `internet_speed` int(11) NOT NULL default '0',
  `internet_speed_reserve` int(11) NOT NULL default '0',
  `administration_per_user` int(20) NOT NULL default '0',
  `kWh` int(11) NOT NULL default '0',
  `base_speed_element` int(11) NOT NULL default '0',
  `BaseTariffPrice` int(11) NOT NULL default '0',
  `TopTariffPrice` int(11) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `finance_groups`
--

CREATE TABLE IF NOT EXISTS `finance_groups` (
  `Id` int(11) NOT NULL auto_increment,
  `Description` varchar(128) collate utf8_czech_ci NOT NULL default '',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;

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

--
-- Struktura tabulky `finance_monthly_overall`
--

CREATE TABLE IF NOT EXISTS `finance_monthly_overall` (
  `id` int(11) NOT NULL auto_increment,
  `money` int(11) NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00',
  `administration` int(11) NOT NULL default '0',
  `kWh` int(11) NOT NULL default '0',
  `administration_total` int(11) NOT NULL default '0',
  `consumption_total` int(11) NOT NULL default '0',
  `total_paid` int(11) NOT NULL default '0',
  `BaseTariffPrice` int(11) NOT NULL default '0',
  `TopTariffPrice` int(11) NOT NULL default '0',
  `member_count` int(11) NOT NULL default '0',
  `investment` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=78 ;

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

--
-- Struktura tabulky `History`
--

CREATE TABLE IF NOT EXISTS `History` (
  `Id` int(11) NOT NULL auto_increment,
  `Date` date NOT NULL,
  `Text` text collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=21 ;

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

--
-- Struktura tabulky `HostedProject`
--

CREATE TABLE IF NOT EXISTS `HostedProject` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `Homepage` varchar(255) collate utf8_czech_ci NOT NULL,
  `User` int(255) NOT NULL COMMENT 'User.Id',
  `TimeCreate` datetime NOT NULL,
  `Server` int(11) default NULL COMMENT 'NetworkDevice.Id',
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;

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

--
-- Struktura tabulky `hosts_topology`
--

CREATE TABLE IF NOT EXISTS `hosts_topology` (
  `host` int(11) NOT NULL default '0',
  `depth` int(11) NOT NULL default '0',
  `pos` int(11) NOT NULL default '0',
  `first` int(11) NOT NULL default '0',
  `last` int(11) NOT NULL default '0',
  PRIMARY KEY  (`host`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `Hyperlink`
--

CREATE TABLE IF NOT EXISTS `Hyperlink` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `URL` varchar(255) collate utf8_czech_ci NOT NULL,
  `Group` int(11) NOT NULL,
  `IconFile` varchar(255) collate utf8_czech_ci NOT NULL,
  `PermissionModule` varchar(255) collate utf8_czech_ci NOT NULL,
  `PermissionOperation` varchar(255) collate utf8_czech_ci NOT NULL,
  `Enable` int(11) NOT NULL default '1',
  PRIMARY KEY  (`Id`),
  KEY `Group` (`Group`),
  KEY `Enable` (`Enable`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=57 ;

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

--
-- Struktura tabulky `HyperlinkGroup`
--

CREATE TABLE IF NOT EXISTS `HyperlinkGroup` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9 ;

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

--
-- Struktura tabulky `Log`
--

CREATE TABLE IF NOT EXISTS `Log` (
  `Time` datetime NOT NULL default '0000-00-00 00:00:00',
  `User` int(11) NOT NULL default '0',
  `Module` varchar(64) collate utf8_czech_ci NOT NULL default '',
  `Operation` varchar(255) collate utf8_czech_ci NOT NULL default '',
  `Value` varchar(255) collate utf8_czech_ci NOT NULL default '',
  KEY `Time` (`Time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `Meals`
--

CREATE TABLE IF NOT EXISTS `Meals` (
  `Date` date NOT NULL default '0000-00-00',
  `Soup` varchar(255) collate utf8_czech_ci NOT NULL,
  `Meal` varchar(255) collate utf8_czech_ci NOT NULL,
  `Status` int(11) NOT NULL default '0',
  UNIQUE KEY `date` (`Date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;

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

--
-- Struktura tabulky `MealsInfo`
--

CREATE TABLE IF NOT EXISTS `MealsInfo` (
  `Info` text collate utf8_czech_ci NOT NULL,
  `Price` int(11) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;

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

--
-- Struktura tabulky `Member`
--

CREATE TABLE IF NOT EXISTS `Member` (
  `Id` int(11) NOT NULL auto_increment,
  `Subject` int(11) NOT NULL,
  `ResponsibleUser` int(11) NOT NULL,
  `FamilyMemberCount` int(11) NOT NULL,
  `MembershipDate` date NOT NULL,
  `MemberState` int(11) NOT NULL,
  `InternetTariffCurrentMonth` int(11) NOT NULL,
  `InternetTariffNextMonth` int(11) NOT NULL,
  `GPS` int(11) NOT NULL,
  `BillingPeriod` int(11) NOT NULL default '2',
  `NetworkSegment` int(11) NOT NULL,
  `BillingPeriodNext` int(11) NOT NULL default '2',
  `BillingPeriodLastDate` date NOT NULL,
  `Hire` float NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=103 ;

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

--
-- Struktura tabulky `MemberPayment`
--

CREATE TABLE IF NOT EXISTS `MemberPayment` (
  `Id` int(11) NOT NULL auto_increment,
  `Member` int(11) NOT NULL,
  `MonthlyTotal` float NOT NULL,
  `MonthlyInternet` float NOT NULL,
  `MonthlyConsumption` float NOT NULL,
  `NetworkDevice` float NOT NULL,
  `MonthlyPlus` float NOT NULL,
  `Cash` float NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=87 ;

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

--
-- Struktura tabulky `NetworkAP`
--

CREATE TABLE IF NOT EXISTS `NetworkAP` (
  `Id` int(11) NOT NULL auto_increment,
  `SSID` varchar(255) collate utf8_czech_ci NOT NULL,
  `Frequency` int(11) NOT NULL,
  `ChannelWidth` int(11) NOT NULL default '20',
  `NetworkDevice` int(11) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=31 ;

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

--
-- Struktura tabulky `NetworkConfiguration`
--

CREATE TABLE IF NOT EXISTS `NetworkConfiguration` (
  `Id` int(11) NOT NULL auto_increment,
  `Caption` varchar(255) collate utf8_czech_ci NOT NULL,
  `Execute` varchar(255) collate utf8_czech_ci NOT NULL,
  `Changed` int(11) NOT NULL default '0',
  `LastTime` datetime NOT NULL default '0000-00-00 00:00:00',
  `ExecutionTime` int(11) NOT NULL,
  `Enabled` int(11) NOT NULL default '1',
  `Period` int(11) NOT NULL default '60',
  `Log` mediumtext collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ;

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

--
-- Struktura tabulky `NetworkDevice`
--

CREATE TABLE IF NOT EXISTS `NetworkDevice` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `Member` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `PositionLatitude` double NOT NULL default '0',
  `PositionLongitude` double NOT NULL default '0',
  `Used` int(11) NOT NULL default '1',
  `Online` int(11) NOT NULL default '0',
  `LastOnline` datetime NOT NULL,
  PRIMARY KEY  (`Id`),
  KEY `Member` (`Member`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=413 ;

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

--
-- Struktura tabulky `NetworkDeviceHistory`
--

CREATE TABLE IF NOT EXISTS `NetworkDeviceHistory` (
  `Id` int(11) NOT NULL auto_increment,
  `Device` int(11) NOT NULL default '0',
  `Time` datetime NOT NULL default '0000-00-00 00:00:00',
  `Action` int(11) NOT NULL default '0',
  `Notice` varchar(255) collate utf8_czech_ci NOT NULL default '',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;

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

--
-- Struktura tabulky `NetworkDeviceType`
--

CREATE TABLE IF NOT EXISTS `NetworkDeviceType` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `ShowOnline` int(11) NOT NULL default '0',
  `IconName` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=10 ;

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

--
-- Struktura tabulky `NetworkDomainAlias`
--

CREATE TABLE IF NOT EXISTS `NetworkDomainAlias` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `Target` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=20 ;

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

--
-- Struktura tabulky `NetworkInterface`
--

CREATE TABLE IF NOT EXISTS `NetworkInterface` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(16) collate utf8_czech_ci NOT NULL,
  `Type` int(11) NOT NULL,
  `MAC` varchar(17) collate utf8_czech_ci NOT NULL,
  `LocalIP` varchar(16) collate utf8_czech_ci NOT NULL,
  `ExternalIP` varchar(16) collate utf8_czech_ci NOT NULL,
  `CZFreeIP` varchar(16) collate utf8_czech_ci NOT NULL,
  `Device` int(11) NOT NULL,
  `Online` int(11) NOT NULL default '0',
  `LastOnline` datetime NOT NULL,
  PRIMARY KEY  (`Id`),
  KEY `Device` (`Device`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=440 ;

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

--
-- Struktura tabulky `NetworkInterfaceStat`
--

CREATE TABLE IF NOT EXISTS `NetworkInterfaceStat` (
  `NetworkInterface` int(11) NOT NULL default '0',
  `Time` datetime NOT NULL default '0000-00-00 00:00:00',
  `PingCount` smallint(11) NOT NULL default '0',
  KEY `host_id` (`NetworkInterface`),
  KEY `time` (`Time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `NetworkInterfaceType`
--

CREATE TABLE IF NOT EXISTS `NetworkInterfaceType` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `MaxSpeed` int(11) NOT NULL,
  `FullDuplex` int(11) NOT NULL default '1',
  `Color` varchar(6) collate utf8_czech_ci NOT NULL default 'ffffff',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ;

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

--
-- Struktura tabulky `NetworkLink`
--

CREATE TABLE IF NOT EXISTS `NetworkLink` (
  `Id` int(11) NOT NULL auto_increment,
  `Type` int(11) NOT NULL,
  `Interface1` int(11) NOT NULL,
  `Interface2` int(11) NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=356 ;

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

--
-- Struktura tabulky `NetworkMark`
--

CREATE TABLE IF NOT EXISTS `NetworkMark` (
  `Id` int(11) NOT NULL auto_increment,
  `Comment` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`),
  KEY `Comment` (`Comment`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=575 ;

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

--
-- Struktura tabulky `NetworkSubnet`
--

CREATE TABLE IF NOT EXISTS `NetworkSubnet` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `AddressRange` varchar(255) collate utf8_czech_ci NOT NULL,
  `Mask` int(11) NOT NULL,
  `DHCP` varchar(255) collate utf8_czech_ci NOT NULL,
  `Gateway` varchar(255) collate utf8_czech_ci NOT NULL,
  `WINS` varchar(255) collate utf8_czech_ci NOT NULL,
  `DNS` varchar(255) collate utf8_czech_ci NOT NULL,
  `Domain` varchar(255) collate utf8_czech_ci NOT NULL,
  `NTP` varchar(255) collate utf8_czech_ci NOT NULL,
  `Member` int(11) NOT NULL default '0',
  `ExtAddressRange` varchar(255) collate utf8_czech_ci NOT NULL,
  `ExtMask` int(11) NOT NULL default '32',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 ;

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

--
-- Struktura tabulky `network_devices`
--

CREATE TABLE IF NOT EXISTS `network_devices` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(128) collate utf8_czech_ci NOT NULL,
  `price` int(11) NOT NULL default '0',
  `count` int(11) NOT NULL default '1',
  `date` date NOT NULL default '0000-00-00',
  `segment` int(11) NOT NULL default '0',
  `used` int(11) NOT NULL default '0',
  `consumption` int(11) NOT NULL default '0',
  `user` int(11) NOT NULL default '0',
  `info` text collate utf8_czech_ci NOT NULL,
  `channel` int(11) NOT NULL default '0',
  `device_id` varchar(255) collate utf8_czech_ci NOT NULL,
  `shop` varchar(64) collate utf8_czech_ci NOT NULL,
  `deprecated_price` int(11) NOT NULL default '0',
  `TimeEnlistment` datetime NOT NULL default '0000-00-00 00:00:00',
  `TimeElimination` datetime NOT NULL default '0000-00-00 00:00:00',
  `StockCard` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=162 ;

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

--
-- Struktura tabulky `network_segments`
--

CREATE TABLE IF NOT EXISTS `network_segments` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(128) collate utf8_czech_ci NOT NULL,
  `price` int(11) NOT NULL default '0',
  `parent` int(11) NOT NULL default '0',
  `users` int(11) NOT NULL default '0',
  `consumption` int(11) NOT NULL default '0',
  `users_overheads` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=33 ;

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

--
-- Struktura tabulky `News`
--

CREATE TABLE IF NOT EXISTS `News` (
  `Id` int(11) NOT NULL auto_increment,
  `Title` varchar(255) collate utf8_czech_ci NOT NULL,
  `Content` text collate utf8_czech_ci NOT NULL,
  `Date` datetime NOT NULL default '0000-00-00 00:00:00',
  `TargetDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `Author` varchar(32) collate utf8_czech_ci NOT NULL,
  `IP` varchar(16) collate utf8_czech_ci NOT NULL,
  `Category` int(11) NOT NULL default '0',
  `Enclosure` varchar(255) collate utf8_czech_ci NOT NULL,
  `User` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`),
  KEY `category` (`Category`),
  KEY `date` (`Date`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=30935 ;

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

--
-- Struktura tabulky `NewsCategory`
--

CREATE TABLE IF NOT EXISTS `NewsCategory` (
  `Id` int(11) NOT NULL auto_increment,
  `Caption` varchar(255) collate utf8_czech_ci NOT NULL,
  `Permission` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ;

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

--
-- Struktura tabulky `Panel`
--

CREATE TABLE IF NOT EXISTS `Panel` (
  `Id` int(11) NOT NULL auto_increment,
  `Module` varchar(255) collate utf8_czech_ci NOT NULL,
  `Parameters` varchar(255) collate utf8_czech_ci NOT NULL,
  `Order` int(11) NOT NULL,
  `PanelColumn` int(11) NOT NULL,
  PRIMARY KEY  (`Id`),
  KEY `PanelColumn` (`PanelColumn`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=12 ;

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

--
-- Struktura tabulky `PanelColumn`
--

CREATE TABLE IF NOT EXISTS `PanelColumn` (
  `Id` int(11) NOT NULL auto_increment,
  `Width` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=5 ;

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

--
-- Struktura tabulky `PermissionGroup`
--

CREATE TABLE IF NOT EXISTS `PermissionGroup` (
  `Id` int(11) NOT NULL auto_increment,
  `Description` varchar(255) collate utf8_czech_ci NOT NULL default '',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;

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

--
-- Struktura tabulky `PermissionGroupAssignment`
--

CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` (
  `Group` int(11) NOT NULL default '0',
  `GroupOrOperation` int(11) NOT NULL default '0',
  `Type` enum('Group','Operation') collate utf8_czech_ci NOT NULL default 'Group'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `PermissionOperation`
--

CREATE TABLE IF NOT EXISTS `PermissionOperation` (
  `Id` int(11) NOT NULL auto_increment,
  `Module` varchar(64) collate utf8_czech_ci NOT NULL default '',
  `Operation` varchar(128) collate utf8_czech_ci NOT NULL default '',
  `Item` varchar(64) collate utf8_czech_ci NOT NULL default '',
  `ItemId` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=40 ;

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

--
-- Struktura tabulky `PermissionUserAssignment`
--

CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` (
  `User` int(11) NOT NULL default '0',
  `GroupOrOperation` int(11) NOT NULL default '0',
  `Type` enum('Group','Operation') collate utf8_czech_ci NOT NULL default 'Group'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `StockCard`
--

CREATE TABLE IF NOT EXISTS `StockCard` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `SellPrice` float NOT NULL,
  `Consumption` int(11) NOT NULL COMMENT 'In Watts',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;

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

--
-- Struktura tabulky `Subject`
--

CREATE TABLE IF NOT EXISTS `Subject` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(64) collate utf8_czech_ci NOT NULL default '',
  `AddressStreet` varchar(64) collate utf8_czech_ci NOT NULL default '',
  `AddressTown` varchar(64) collate utf8_czech_ci NOT NULL default '',
  `AddressPSC` int(11) NOT NULL default '0',
  `IC` varchar(32) collate utf8_czech_ci NOT NULL,
  `DIC` varchar(32) collate utf8_czech_ci NOT NULL default '',
  `MapPositionX` float NOT NULL default '0',
  `MapPositionY` float NOT NULL default '0',
  `WWW` varchar(255) collate utf8_czech_ci NOT NULL,
  `Note` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=117 ;

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

--
-- Struktura tabulky `SubjectOpenTime`
--

CREATE TABLE IF NOT EXISTS `SubjectOpenTime` (
  `Subject` int(11) NOT NULL default '0',
  `UpdateTime` datetime NOT NULL default '0000-00-00 00:00:00',
  `Notice` varchar(255) collate utf8_czech_ci NOT NULL default '',
  `Photo` int(11) NOT NULL,
  PRIMARY KEY  (`Subject`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `SubjectOpenTimeDay`
--

CREATE TABLE IF NOT EXISTS `SubjectOpenTimeDay` (
  `Subject` int(11) NOT NULL,
  `Day` int(11) NOT NULL,
  `Open1` int(11) NOT NULL,
  `Close1` int(11) NOT NULL,
  `Open2` int(11) NOT NULL,
  `Close2` int(11) NOT NULL,
  KEY `Subject` (`Subject`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

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

--
-- Struktura tabulky `Task`
--

CREATE TABLE IF NOT EXISTS `Task` (
  `Id` int(11) NOT NULL auto_increment,
  `TimeCreate` datetime NOT NULL,
  `TimeFinished` datetime default NULL,
  `Description` text collate utf8_czech_ci NOT NULL,
  `Conclusion` text collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`),
  KEY `TimeCreate` (`TimeCreate`),
  KEY `TimeFinished` (`TimeFinished`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=13 ;

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

--
-- Struktura tabulky `TKR`
--

CREATE TABLE IF NOT EXISTS `TKR` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(16) collate utf8_czech_ci NOT NULL,
  `Frequency` int(11) NOT NULL default '0',
  `Norm` varchar(8) collate utf8_czech_ci NOT NULL,
  `Homepage` varchar(255) collate utf8_czech_ci NOT NULL,
  `Language` varchar(32) collate utf8_czech_ci NOT NULL,
  `ShortName` varchar(16) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=25 ;

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

--
-- Struktura tabulky `User`
--

CREATE TABLE IF NOT EXISTS `User` (
  `Id` int(11) NOT NULL auto_increment,
  `Login` varchar(64) collate utf8_czech_ci NOT NULL,
  `Name` varchar(128) collate utf8_czech_ci NOT NULL,
  `Password` varchar(255) collate utf8_czech_ci NOT NULL,
  `Email` varchar(128) collate utf8_czech_ci NOT NULL default '',
  `LastIpAddress` varchar(16) collate utf8_czech_ci NOT NULL default '',
  `LastLoginTime` datetime NOT NULL default '0000-00-00 00:00:00',
  `RegistrationTime` datetime NOT NULL default '0000-00-00 00:00:00',
  `Member` int(11) NOT NULL,
  `Locked` tinyint(1) NOT NULL default '0',
  `ICQ` int(11) NOT NULL default '0',
  `PhoneNumber` varchar(32) collate utf8_czech_ci NOT NULL default '',
  `InitPassword` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`),
  UNIQUE KEY `Name` (`Login`),
  UNIQUE KEY `Nick` (`Name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=111 ;

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

--
-- Struktura tabulky `UserOnline`
--

CREATE TABLE IF NOT EXISTS `UserOnline` (
  `Id` int(11) NOT NULL auto_increment,
  `User` int(11) NOT NULL default '0',
  `ActivityTime` datetime NOT NULL default '0000-00-00 00:00:00',
  `LoginTime` datetime NOT NULL default '0000-00-00 00:00:00',
  `SessionId` varchar(255) collate utf8_czech_ci NOT NULL default '',
  `IpAddress` varchar(16) collate utf8_czech_ci NOT NULL default '',
  `HostName` varchar(255) collate utf8_czech_ci NOT NULL default '',
  `ScriptName` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`),
  KEY `User` (`User`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=25044 ;

--
-- Omezení pro exportované tabulky
--

--
-- Omezení pro tabulku `Hyperlink`
--
ALTER TABLE `Hyperlink`
  ADD CONSTRAINT `Hyperlink_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `HyperlinkGroup` (`Id`);

--
-- Omezení pro tabulku `Panel`
--
ALTER TABLE `Panel`
  ADD CONSTRAINT `Panel_ibfk_1` FOREIGN KEY (`PanelColumn`) REFERENCES `PanelColumn` (`Id`);
