- Timestamp:
- Mar 24, 2009, 2:15:00 PM (16 years ago)
- Location:
- www
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
www/sql/full.sql
r144 r169 1 1 -- phpMyAdmin SQL Dump 2 -- version 3.1. 22 -- version 3.1.3 3 3 -- http://www.phpmyadmin.net 4 4 -- 5 5 -- Počítač: localhost 6 -- Vygenerováno: Neděle 01. února 2009, 18:357 -- Verze MySQL: 5.0. 676 -- Vygenerováno: Úterý 24. března 2009, 13:43 7 -- Verze MySQL: 5.0.51 8 8 -- Verze PHP: 5.2.6 9 9 … … 22 22 CREATE TABLE IF NOT EXISTS `ChatHistory` ( 23 23 `Id` int(11) NOT NULL auto_increment, 24 `Nick` varchar(64) NOT NULL ,24 `Nick` varchar(64) NOT NULL default '', 25 25 `Text` text NOT NULL, 26 26 `Time` datetime NOT NULL default '0000-00-00 00:00:00', 27 27 `Color` int(11) NOT NULL default '0', 28 `RoomName` varchar(32) NOT NULL ,28 `RoomName` varchar(32) NOT NULL default '', 29 29 `RoomType` int(11) NOT NULL default '0', 30 `Host` varchar(255) NOT NULL, 31 PRIMARY KEY (`Id`) 32 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=524350 ; 33 34 -- -------------------------------------------------------- 35 36 -- 37 -- Struktura tabulky `FinanceAdvances` 38 -- 39 40 CREATE TABLE IF NOT EXISTS `FinanceAdvances` ( 41 `Id` int(11) NOT NULL auto_increment, 42 `Direction` enum('In','Out') collate utf8_czech_ci NOT NULL, 43 `Subject` int(11) NOT NULL, 44 `Value` float NOT NULL, 45 `TimeCreation` datetime NOT NULL, 46 `TimePass` datetime NOT NULL, 47 `CashFlowId` int(11) NOT NULL, 48 PRIMARY KEY (`Id`) 49 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=322 ; 30 `Host` varchar(255) NOT NULL default '', 31 PRIMARY KEY (`Id`) 32 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=528576 ; 33 34 -- -------------------------------------------------------- 35 36 -- 37 -- Struktura tabulky `DocumentLine` 38 -- 39 40 CREATE TABLE IF NOT EXISTS `DocumentLine` ( 41 `Id` int(11) NOT NULL auto_increment, 42 `Name` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL, 43 `Shortcut` varchar(16) character set utf8 collate utf8_czech_ci NOT NULL, 44 `NextNumber` int(11) NOT NULL, 45 PRIMARY KEY (`Id`), 46 UNIQUE KEY `Shortcut` (`Shortcut`) 47 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; 48 49 -- -------------------------------------------------------- 50 51 -- 52 -- Struktura tabulky `FinanceAdvances_old` 53 -- 54 55 CREATE TABLE IF NOT EXISTS `FinanceAdvances_old` ( 56 `Id` int(11) NOT NULL auto_increment, 57 `Direction` enum('In','Out') collate utf8_czech_ci NOT NULL default 'In', 58 `Subject` int(11) NOT NULL default '0', 59 `Value` float NOT NULL default '0', 60 `TimeCreation` datetime NOT NULL default '0000-00-00 00:00:00', 61 `TimePass` datetime NOT NULL default '0000-00-00 00:00:00', 62 `CashFlowId` int(11) NOT NULL default '0', 63 PRIMARY KEY (`Id`) 64 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1466 ; 50 65 51 66 -- -------------------------------------------------------- … … 56 71 57 72 CREATE TABLE IF NOT EXISTS `FinanceAssetsHistory` ( 58 `AssetsId` int(11) NOT NULL ,59 `Time` datetime NOT NULL ,60 `Text` varchar(255) collate utf8_czech_ci NOT NULL ,61 `User` int(11) NOT NULL ,73 `AssetsId` int(11) NOT NULL default '0', 74 `Time` datetime NOT NULL default '0000-00-00 00:00:00', 75 `Text` varchar(255) collate utf8_czech_ci NOT NULL default '', 76 `User` int(11) NOT NULL default '0', 62 77 KEY `AssetsId` (`AssetsId`) 63 78 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; … … 66 81 67 82 -- 68 -- Struktura tabulky `FinanceCashFlow` 69 -- 70 71 CREATE TABLE IF NOT EXISTS `FinanceCashFlow` ( 72 `Id` int(11) NOT NULL auto_increment, 73 `Subject` int(11) NOT NULL, 74 `Text` varchar(255) collate utf8_czech_ci NOT NULL, 83 -- Struktura tabulky `FinanceBills` 84 -- 85 86 CREATE TABLE IF NOT EXISTS `FinanceBills` ( 87 `Id` int(11) NOT NULL auto_increment, 88 `TimeFrom` datetime NOT NULL default '0000-00-00 00:00:00', 89 `Subject` int(11) NOT NULL default '0', 90 `TimeTo` datetime NOT NULL default '0000-00-00 00:00:00', 91 `TimeCreate` datetime NOT NULL default '0000-00-00 00:00:00', 92 `TimeDue` datetime NOT NULL default '0000-00-00 00:00:00', 93 `BillCode` varchar(32) collate latin2_czech_cs NOT NULL, 94 `Type` enum('invoice','income') collate latin2_czech_cs NOT NULL, 95 PRIMARY KEY (`Id`) 96 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=1707 ; 97 98 -- -------------------------------------------------------- 99 100 -- 101 -- Struktura tabulky `FinanceBillsItems` 102 -- 103 104 CREATE TABLE IF NOT EXISTS `FinanceBillsItems` ( 105 `Id` int(11) NOT NULL auto_increment, 106 `Bill` int(11) NOT NULL default '0', 107 `Description` varchar(255) collate latin2_czech_cs NOT NULL, 108 `Price` float NOT NULL default '0', 109 `Quantity` float NOT NULL default '1', 110 PRIMARY KEY (`Id`) 111 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=13248 ; 112 113 -- -------------------------------------------------------- 114 115 -- 116 -- Struktura tabulky `FinanceCashFlow_old` 117 -- 118 119 CREATE TABLE IF NOT EXISTS `FinanceCashFlow_old` ( 120 `Id` int(11) NOT NULL auto_increment, 121 `BillCode` varchar(16) collate utf8_czech_ci NOT NULL, 122 `Subject` int(11) NOT NULL default '0', 123 `Text` varchar(255) collate utf8_czech_ci NOT NULL default '', 124 `Time` datetime NOT NULL default '0000-00-00 00:00:00', 125 `Taxable` tinyint(1) NOT NULL default '0', 126 `Cash` tinyint(1) NOT NULL default '0', 127 `Value` float NOT NULL default '0', 128 `Bill` int(11) NOT NULL default '0', 129 PRIMARY KEY (`Id`) 130 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=434 ; 131 132 -- -------------------------------------------------------- 133 134 -- 135 -- Struktura tabulky `FinanceClaimsLiabilities` 136 -- 137 138 CREATE TABLE IF NOT EXISTS `FinanceClaimsLiabilities` ( 139 `Id` int(11) NOT NULL auto_increment, 140 `BillCode` varchar(16) collate utf8_czech_ci NOT NULL, 141 `Subject` int(11) NOT NULL default '0', 142 `TimeCreation` datetime NOT NULL default '0000-00-00 00:00:00', 143 `TimeDue` datetime NOT NULL default '0000-00-00 00:00:00', 144 `TimePayment` datetime NOT NULL default '0000-00-00 00:00:00', 145 `Value` float NOT NULL default '0', 146 `Bill` int(11) NOT NULL default '0', 147 `Text` varchar(255) collate utf8_czech_ci NOT NULL default '', 148 PRIMARY KEY (`Id`) 149 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4182 ; 150 151 -- -------------------------------------------------------- 152 153 -- 154 -- Struktura tabulky `FinanceLog` 155 -- 156 157 CREATE TABLE IF NOT EXISTS `FinanceLog` ( 158 `Id` int(11) NOT NULL auto_increment, 159 `Time` datetime NOT NULL default '0000-00-00 00:00:00', 160 `Text` varchar(255) collate utf8_czech_ci NOT NULL default '', 161 PRIMARY KEY (`Id`) 162 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 163 164 -- -------------------------------------------------------- 165 166 -- 167 -- Struktura tabulky `FinanceOperation` 168 -- 169 170 CREATE TABLE IF NOT EXISTS `FinanceOperation` ( 171 `Id` int(11) NOT NULL auto_increment, 75 172 `Time` datetime NOT NULL, 173 `Subject` int(11) NOT NULL default '0', 174 `Cash` int(11) NOT NULL default '0', 175 `Value` float NOT NULL, 176 `BillCode` varchar(32) collate utf8_czech_ci NOT NULL, 76 177 `Taxable` tinyint(1) NOT NULL, 77 `Cash` tinyint(1) NOT NULL,78 `Value` float NOT NULL,79 `Bill` int(11) NOT NULL,80 PRIMARY KEY (`Id`)81 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=112 ;82 83 -- --------------------------------------------------------84 85 --86 -- Struktura tabulky `FinanceClaimsLiabilities`87 --88 89 CREATE TABLE IF NOT EXISTS `FinanceClaimsLiabilities` (90 `Id` int(11) NOT NULL auto_increment,91 `Subject` int(11) NOT NULL,92 `TimeCreation` datetime NOT NULL,93 `TimeDue` datetime NOT NULL,94 `TimePayment` datetime NOT NULL,95 `Value` float NOT NULL,96 178 `Bill` int(11) NOT NULL, 97 179 `Text` varchar(255) collate utf8_czech_ci NOT NULL, 98 PRIMARY KEY (`Id`) 99 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=258 ; 100 101 -- -------------------------------------------------------- 102 103 -- 104 -- Struktura tabulky `FinanceLog` 105 -- 106 107 CREATE TABLE IF NOT EXISTS `FinanceLog` ( 108 `Id` int(11) NOT NULL auto_increment, 109 `Time` datetime NOT NULL, 110 `Text` varchar(255) collate utf8_czech_ci NOT NULL, 180 `Network` int(11) NOT NULL default '1', 181 PRIMARY KEY (`Id`) 182 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4205 ; 183 184 -- -------------------------------------------------------- 185 186 -- 187 -- Struktura tabulky `FinanceSmallAssets` 188 -- 189 190 CREATE TABLE IF NOT EXISTS `FinanceSmallAssets` ( 191 `Id` int(11) NOT NULL auto_increment, 192 `Text` varchar(255) collate utf8_czech_ci NOT NULL default '', 193 `PricePurchase` float NOT NULL default '0', 194 `TimeEnlistment` datetime NOT NULL default '0000-00-00 00:00:00', 195 `TimeElimination` datetime NOT NULL default '0000-00-00 00:00:00', 196 `SupplySubject` int(11) NOT NULL default '0', 197 `DeviceId` varchar(128) collate utf8_czech_ci NOT NULL default '', 111 198 PRIMARY KEY (`Id`) 112 199 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 113 114 -- --------------------------------------------------------115 116 --117 -- Struktura tabulky `FinanceSmallAssets`118 --119 120 CREATE TABLE IF NOT EXISTS `FinanceSmallAssets` (121 `Id` int(11) NOT NULL auto_increment,122 `Text` varchar(255) collate utf8_czech_ci NOT NULL,123 `PricePurchase` float NOT NULL,124 `TimeEnlistment` datetime NOT NULL,125 `TimeElimination` datetime NOT NULL,126 `SupplySubject` int(11) NOT NULL,127 `DeviceId` varchar(128) collate utf8_czech_ci NOT NULL,128 PRIMARY KEY (`Id`)129 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;130 131 -- --------------------------------------------------------132 133 --134 -- Struktura tabulky `finance_bills`135 --136 137 CREATE TABLE IF NOT EXISTS `finance_bills` (138 `id` int(11) NOT NULL auto_increment,139 `time_from` datetime NOT NULL default '0000-00-00 00:00:00',140 `user_id` int(11) NOT NULL default '0',141 `pdf` mediumblob NOT NULL,142 `time_to` datetime NOT NULL default '0000-00-00 00:00:00',143 `time_create` datetime NOT NULL default '0000-00-00 00:00:00',144 `time_due` datetime NOT NULL default '0000-00-00 00:00:00',145 PRIMARY KEY (`id`)146 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=336 ;147 148 -- --------------------------------------------------------149 150 --151 -- Struktura tabulky `finance_bills_items`152 --153 154 CREATE TABLE IF NOT EXISTS `finance_bills_items` (155 `id` int(11) NOT NULL auto_increment,156 `bill_id` int(11) NOT NULL default '0',157 `description` varchar(255) collate latin2_czech_cs NOT NULL default '',158 `price` float NOT NULL default '0',159 `quantity` float NOT NULL default '1',160 PRIMARY KEY (`id`)161 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=3861 ;162 200 163 201 -- -------------------------------------------------------- … … 208 246 `BaseTariffPrice` int(11) NOT NULL default '0', 209 247 `TopTariffPrice` int(11) NOT NULL default '0', 210 `member_count` int(11) NOT NULL, 211 PRIMARY KEY (`id`) 212 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=64 ; 248 `member_count` int(11) NOT NULL default '0', 249 `investment` int(11) NOT NULL, 250 PRIMARY KEY (`id`) 251 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=75 ; 213 252 214 253 -- -------------------------------------------------------- … … 227 266 `bill_id` int(11) NOT NULL default '0', 228 267 `group` int(11) NOT NULL default '1', 229 ` Taxable` int(11) NOT NULL,268 `cash` int(11) NOT NULL default '0', 230 269 `BillCode` varchar(16) collate latin2_czech_cs NOT NULL, 270 `Network` int(11) NOT NULL default '1', 271 `Taxable` int(11) NOT NULL default '1', 231 272 `Invoice` int(11) NOT NULL, 232 `cash` int(11) NOT NULL, 233 PRIMARY KEY (`id`) 234 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=2565 ; 273 `Source` int(11) NOT NULL, 274 `Destination` int(11) NOT NULL, 275 PRIMARY KEY (`id`) 276 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=4158 ; 235 277 236 278 -- -------------------------------------------------------- … … 279 321 `used` int(11) NOT NULL default '1', 280 322 PRIMARY KEY (`id`) 281 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT= 260;323 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=347 ; 282 324 283 325 -- -------------------------------------------------------- … … 354 396 355 397 CREATE TABLE IF NOT EXISTS `Log` ( 356 `Time` datetime NOT NULL ,357 `User` int(11) NOT NULL ,358 `Module` varchar(64) collate utf8_czech_ci NOT NULL ,359 `Operation` varchar(255) collate utf8_czech_ci NOT NULL ,360 `Value` varchar(255) collate utf8_czech_ci NOT NULL ,398 `Time` datetime NOT NULL default '0000-00-00 00:00:00', 399 `User` int(11) NOT NULL default '0', 400 `Module` varchar(64) collate utf8_czech_ci NOT NULL default '', 401 `Operation` varchar(255) collate utf8_czech_ci NOT NULL default '', 402 `Value` varchar(255) collate utf8_czech_ci NOT NULL default '', 361 403 KEY `Time` (`Time`) 362 404 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; … … 370 412 CREATE TABLE IF NOT EXISTS `Meals` ( 371 413 `Date` date NOT NULL default '0000-00-00', 372 `Soup` varchar(255) NOT NULL,373 `Meal` varchar(255) NOT NULL,414 `Soup` varchar(255) collate utf8_czech_ci NOT NULL, 415 `Meal` varchar(255) collate utf8_czech_ci NOT NULL, 374 416 `Status` int(11) NOT NULL default '0', 375 417 UNIQUE KEY `date` (`Date`) 376 ) ENGINE=MyISAM DEFAULT CHARSET= latin2;418 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC; 377 419 378 420 -- -------------------------------------------------------- … … 383 425 384 426 CREATE TABLE IF NOT EXISTS `MealsInfo` ( 385 `Info` text NOT NULL,427 `Info` text collate utf8_czech_ci NOT NULL, 386 428 `Price` int(11) NOT NULL default '0' 387 ) ENGINE=MyISAM DEFAULT CHARSET=latin2; 429 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC; 430 431 -- -------------------------------------------------------- 432 433 -- 434 -- Struktura tabulky `Member` 435 -- 436 437 CREATE TABLE IF NOT EXISTS `Member` ( 438 `Id` int(11) NOT NULL auto_increment, 439 `Subject` int(11) NOT NULL, 440 `ResponsibleUser` int(11) NOT NULL, 441 `FamilyMemberCount` int(11) NOT NULL, 442 `MembershipDate` date NOT NULL, 443 `MemberState` int(11) NOT NULL, 444 `InternetTariffCurrentMonth` int(11) NOT NULL, 445 `InternetTariffNextMonth` int(11) NOT NULL, 446 `GPS` int(11) NOT NULL, 447 `BillingPeriod` enum('never','monthly','quarterly','half-yearly','yearly') collate utf8_czech_ci NOT NULL default 'monthly', 448 `NetworkSegment` int(11) NOT NULL, 449 PRIMARY KEY (`Id`) 450 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=98 ; 451 452 -- -------------------------------------------------------- 453 454 -- 455 -- Struktura tabulky `MemberPayment` 456 -- 457 458 CREATE TABLE IF NOT EXISTS `MemberPayment` ( 459 `Id` int(11) NOT NULL auto_increment, 460 `Member` int(11) NOT NULL, 461 `MonthlyTotal` float NOT NULL, 462 `MonthlyInternet` float NOT NULL, 463 `MonthlyConsumption` float NOT NULL, 464 `NetworkDevice` float NOT NULL, 465 `MonthlyPlus` float NOT NULL, 466 `Cash` float NOT NULL, 467 PRIMARY KEY (`Id`) 468 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=83 ; 388 469 389 470 -- -------------------------------------------------------- … … 395 476 CREATE TABLE IF NOT EXISTS `NetworkDeviceHistory` ( 396 477 `Id` int(11) NOT NULL auto_increment, 397 `Device` int(11) NOT NULL ,398 `Time` datetime NOT NULL ,399 `Action` int(11) NOT NULL ,400 `Notice` varchar(255) collate utf8_czech_ci NOT NULL ,478 `Device` int(11) NOT NULL default '0', 479 `Time` datetime NOT NULL default '0000-00-00 00:00:00', 480 `Action` int(11) NOT NULL default '0', 481 `Notice` varchar(255) collate utf8_czech_ci NOT NULL default '', 401 482 PRIMARY KEY (`Id`) 402 483 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 484 485 -- -------------------------------------------------------- 486 487 -- 488 -- Struktura tabulky `NetworkSubnet` 489 -- 490 491 CREATE TABLE IF NOT EXISTS `NetworkSubnet` ( 492 `Id` int(11) NOT NULL auto_increment, 493 `AddressRange` varchar(255) collate utf8_czech_ci NOT NULL, 494 `Mask` int(11) NOT NULL, 495 `DHCP` varchar(255) collate utf8_czech_ci NOT NULL, 496 `Gateway` varchar(255) collate utf8_czech_ci NOT NULL, 497 `WINS` varchar(255) collate utf8_czech_ci NOT NULL, 498 `DNS` varchar(255) collate utf8_czech_ci NOT NULL, 499 `Domain` varchar(255) collate utf8_czech_ci NOT NULL, 500 `NTP` varchar(255) collate utf8_czech_ci NOT NULL, 501 PRIMARY KEY (`Id`) 502 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ; 403 503 404 504 -- -------------------------------------------------------- … … 423 523 `shop` varchar(64) NOT NULL default '', 424 524 `deprecated_price` int(11) NOT NULL default '0', 425 `TimeEnlistment` datetime NOT NULL, 426 `TimeElimination` datetime NOT NULL, 427 PRIMARY KEY (`id`) 428 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=161 ; 525 `TimeEnlistment` datetime NOT NULL default '0000-00-00 00:00:00', 526 `TimeElimination` datetime NOT NULL default '0000-00-00 00:00:00', 527 `StockCard` int(11) NOT NULL, 528 PRIMARY KEY (`id`) 529 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=160 ; 429 530 430 531 -- -------------------------------------------------------- … … 475 576 CREATE TABLE IF NOT EXISTS `news` ( 476 577 `id` int(11) NOT NULL auto_increment, 477 `title` varchar(255) c haracter set utf8 collate utf8_czech_ci NOT NULL,478 `content` text c haracter set utf8 collate utf8_czech_ci NOT NULL,578 `title` varchar(255) collate utf8_czech_ci NOT NULL default '', 579 `content` text collate utf8_czech_ci NOT NULL, 479 580 `date` datetime NOT NULL default '0000-00-00 00:00:00', 480 581 `target_date` datetime NOT NULL default '0000-00-00 00:00:00', 481 `author` varchar(32) c haracter set utf8 collate utf8_czech_ci NOT NULL,482 `ip` varchar(16) c haracter set utf8 collate utf8_czech_ci NOT NULL,582 `author` varchar(32) collate utf8_czech_ci NOT NULL default 'Anonym', 583 `ip` varchar(16) collate utf8_czech_ci NOT NULL default '', 483 584 `category` int(11) NOT NULL default '0', 484 `enclosure` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL, 485 `User` int(11) NOT NULL, 486 PRIMARY KEY (`id`) 487 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=1444 ; 585 `enclosure` varchar(255) collate utf8_czech_ci NOT NULL default '', 586 `User` int(11) NOT NULL default '0', 587 PRIMARY KEY (`id`), 588 KEY `category` (`category`), 589 KEY `date` (`date`) 590 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=30854 ; 488 591 489 592 -- -------------------------------------------------------- … … 495 598 CREATE TABLE IF NOT EXISTS `news_category` ( 496 599 `id` int(11) NOT NULL auto_increment, 497 `caption` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL,600 `caption` varchar(255) NOT NULL default '', 498 601 `permission` int(11) NOT NULL default '0', 499 602 PRIMARY KEY (`id`) … … 508 611 CREATE TABLE IF NOT EXISTS `PermissionGroup` ( 509 612 `Id` int(11) NOT NULL auto_increment, 510 `Description` varchar(255) collate utf8_czech_ci NOT NULL ,613 `Description` varchar(255) collate utf8_czech_ci NOT NULL default '', 511 614 PRIMARY KEY (`Id`) 512 615 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ; … … 519 622 520 623 CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` ( 521 `Group` int(11) NOT NULL ,522 `GroupOrOperation` int(11) NOT NULL ,523 `Type` enum('Group','Operation') collate utf8_czech_ci NOT NULL 624 `Group` int(11) NOT NULL default '0', 625 `GroupOrOperation` int(11) NOT NULL default '0', 626 `Type` enum('Group','Operation') collate utf8_czech_ci NOT NULL default 'Group' 524 627 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 525 628 … … 532 635 CREATE TABLE IF NOT EXISTS `PermissionOperation` ( 533 636 `Id` int(11) NOT NULL auto_increment, 534 `Module` varchar(64) collate utf8_czech_ci NOT NULL ,535 `Operation` varchar(128) collate utf8_czech_ci NOT NULL ,536 `Item` varchar(64) collate utf8_czech_ci NOT NULL ,637 `Module` varchar(64) collate utf8_czech_ci NOT NULL default '', 638 `Operation` varchar(128) collate utf8_czech_ci NOT NULL default '', 639 `Item` varchar(64) collate utf8_czech_ci NOT NULL default '', 537 640 `ItemId` int(11) NOT NULL default '0', 538 641 PRIMARY KEY (`Id`) 539 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 28;642 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=37 ; 540 643 541 644 -- -------------------------------------------------------- … … 546 649 547 650 CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` ( 548 `User` int(11) NOT NULL ,549 `GroupOrOperation` int(11) NOT NULL ,550 `Type` enum('Group','Operation') collate utf8_czech_ci NOT NULL 651 `User` int(11) NOT NULL default '0', 652 `GroupOrOperation` int(11) NOT NULL default '0', 653 `Type` enum('Group','Operation') collate utf8_czech_ci NOT NULL default 'Group' 551 654 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 552 655 … … 565 668 `last_time` datetime NOT NULL default '0000-00-00 00:00:00', 566 669 PRIMARY KEY (`id`) 567 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT= 7;670 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; 568 671 569 672 -- -------------------------------------------------------- … … 584 687 585 688 -- 689 -- Struktura tabulky `StockCard` 690 -- 691 692 CREATE TABLE IF NOT EXISTS `StockCard` ( 693 `Id` int(11) NOT NULL auto_increment, 694 `Name` varchar(255) NOT NULL, 695 `SellPrice` float NOT NULL, 696 `Consumption` int(11) NOT NULL COMMENT 'In Watts', 697 PRIMARY KEY (`Id`) 698 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 699 700 -- -------------------------------------------------------- 701 702 -- 586 703 -- Struktura tabulky `Subject` 587 704 -- … … 589 706 CREATE TABLE IF NOT EXISTS `Subject` ( 590 707 `Id` int(11) NOT NULL auto_increment, 591 `Name` varchar(64) collate utf8_czech_ci NOT NULL, 592 `AddressStreet` varchar(64) collate utf8_czech_ci NOT NULL, 593 `AddressTown` varchar(64) collate utf8_czech_ci NOT NULL, 594 `AddressPSC` int(11) NOT NULL, 595 `IC` int(11) NOT NULL, 596 `DIC` varchar(32) collate utf8_czech_ci NOT NULL, 597 `FamilyMemberCount` int(11) NOT NULL, 598 `MapPositionX` float NOT NULL, 599 `MapPositionY` float NOT NULL, 600 `NetworkSegment` int(11) NOT NULL, 601 `InternetTariffCurrentMonth` int(11) NOT NULL, 602 `InternetTariffNextMonth` int(11) NOT NULL, 603 `MembershipDate` date NOT NULL, 604 PRIMARY KEY (`Id`) 605 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=75 ; 708 `Name` varchar(64) collate utf8_czech_ci NOT NULL default '', 709 `AddressStreet` varchar(64) collate utf8_czech_ci NOT NULL default '', 710 `AddressTown` varchar(64) collate utf8_czech_ci NOT NULL default '', 711 `AddressPSC` int(11) NOT NULL default '0', 712 `IC` int(11) NOT NULL default '0', 713 `DIC` varchar(32) collate utf8_czech_ci NOT NULL default '', 714 `MapPositionX` float NOT NULL default '0', 715 `MapPositionY` float NOT NULL default '0', 716 `WWW` varchar(255) collate utf8_czech_ci NOT NULL, 717 PRIMARY KEY (`Id`) 718 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=105 ; 606 719 607 720 -- -------------------------------------------------------- … … 612 725 613 726 CREATE TABLE IF NOT EXISTS `SubjectOpenTime` ( 614 `Subject` int(11) NOT NULL ,615 `UpdateTime` datetime NOT NULL ,616 `Notice` varchar(255) collate utf8_czech_ci NOT NULL ,727 `Subject` int(11) NOT NULL default '0', 728 `UpdateTime` datetime NOT NULL default '0000-00-00 00:00:00', 729 `Notice` varchar(255) collate utf8_czech_ci NOT NULL default '', 617 730 PRIMARY KEY (`Subject`) 618 731 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; … … 626 739 CREATE TABLE IF NOT EXISTS `SubjectOpenTimeInterval` ( 627 740 `Id` int(11) NOT NULL auto_increment, 628 `Subject` int(11) NOT NULL, 629 `OpenTime` datetime NOT NULL, 630 `CloseTime` datetime NOT NULL, 631 PRIMARY KEY (`Id`) 632 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=51 ; 741 `Subject` int(11) NOT NULL default '0', 742 `DayOfWeek` int(11) NOT NULL default '0', 743 `OpenTime` datetime NOT NULL default '0000-00-00 00:00:00', 744 `CloseTime` datetime NOT NULL default '0000-00-00 00:00:00', 745 PRIMARY KEY (`Id`) 746 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=50 ; 747 748 -- -------------------------------------------------------- 749 750 -- 751 -- Struktura tabulky `sunrisechat_history` 752 -- 753 754 CREATE TABLE IF NOT EXISTS `sunrisechat_history` ( 755 `id` int(11) NOT NULL auto_increment, 756 `nick` varchar(64) NOT NULL default '', 757 `text` text NOT NULL, 758 `time` datetime NOT NULL default '0000-00-00 00:00:00', 759 `color` int(11) NOT NULL default '0', 760 `roomname` varchar(32) NOT NULL default '', 761 `roomtype` int(11) NOT NULL default '0', 762 PRIMARY KEY (`id`) 763 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=528523 ; 633 764 634 765 -- -------------------------------------------------------- … … 650 781 `info` varchar(255) character set latin2 NOT NULL default '', 651 782 PRIMARY KEY (`id`) 652 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=65950 ; 783 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=78758 ; 784 785 -- -------------------------------------------------------- 786 787 -- 788 -- Struktura tabulky `test` 789 -- 790 791 CREATE TABLE IF NOT EXISTS `test` ( 792 `text` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL 793 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 653 794 654 795 -- -------------------------------------------------------- … … 672 813 673 814 -- 674 -- Struktura tabulky `TrafficShaping`675 --676 677 CREATE TABLE IF NOT EXISTS `TrafficShaping` (678 `Id` int(11) NOT NULL auto_increment,679 `Host` int(11) NOT NULL,680 `Download` int(11) NOT NULL,681 `Upload` int(11) NOT NULL,682 PRIMARY KEY (`Id`)683 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;684 685 -- --------------------------------------------------------686 687 --688 815 -- Struktura tabulky `User` 689 816 -- … … 691 818 CREATE TABLE IF NOT EXISTS `User` ( 692 819 `Id` int(11) NOT NULL auto_increment, 693 `Name` varchar(64) collate utf8_czech_ci NOT NULL ,694 `FirstName` varchar(128) collate utf8_czech_ci NOT NULL ,695 `SecondName` varchar(128) collate utf8_czech_ci NOT NULL ,696 `Nick` varchar(128) collate utf8_czech_ci NOT NULL ,697 `Password` varchar(255)collate utf8_czech_ci NOT NULL,698 `Email` varchar(128) collate utf8_czech_ci NOT NULL ,699 `LastIpAddress` varchar(16) collate utf8_czech_ci NOT NULL ,700 `LastLoginTime` datetime NOT NULL ,701 `RegistrationTime` datetime NOT NULL ,702 ` Subject` int(11) NOT NULL,703 `Locked` tinyint(1) NOT NULL default ' 0',704 ` PhoneNumber` varchar(32) collate utf8_czech_ci NOT NULL,705 ` ICQ` int(11) NOT NULL,706 PRIMARY KEY (`Id`),707 UNIQUE KEY `Name` (`Name`)708 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 73;820 `Name` varchar(64) collate utf8_czech_ci NOT NULL default '', 821 `FirstName` varchar(128) collate utf8_czech_ci NOT NULL default '', 822 `SecondName` varchar(128) collate utf8_czech_ci NOT NULL default '', 823 `Nick` varchar(128) collate utf8_czech_ci NOT NULL default '', 824 `Password` text collate utf8_czech_ci NOT NULL, 825 `Email` varchar(128) collate utf8_czech_ci NOT NULL default '', 826 `LastIpAddress` varchar(16) collate utf8_czech_ci NOT NULL default '', 827 `LastLoginTime` datetime NOT NULL default '0000-00-00 00:00:00', 828 `RegistrationTime` datetime NOT NULL default '0000-00-00 00:00:00', 829 `Member` int(11) NOT NULL, 830 `Locked` tinyint(1) NOT NULL default '1', 831 `ICQ` int(11) NOT NULL default '0', 832 `PhoneNumber` varchar(32) collate utf8_czech_ci NOT NULL default '', 833 `InitPassword` varchar(255) collate utf8_czech_ci NOT NULL, 834 PRIMARY KEY (`Id`) 835 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=99 ; 709 836 710 837 -- -------------------------------------------------------- … … 716 843 CREATE TABLE IF NOT EXISTS `UserOnline` ( 717 844 `Id` int(11) NOT NULL auto_increment, 718 `User` int(11) NOT NULL, 719 `LoginTime` datetime NOT NULL, 720 `ActivityTime` datetime NOT NULL, 721 `SessionId` varchar(255) collate utf8_czech_ci NOT NULL, 722 `IpAddress` varchar(16) collate utf8_czech_ci NOT NULL, 723 `HostName` varchar(255) collate utf8_czech_ci NOT NULL, 845 `User` int(11) NOT NULL default '0', 846 `ActivityTime` datetime NOT NULL default '0000-00-00 00:00:00', 847 `LoginTime` datetime NOT NULL default '0000-00-00 00:00:00', 848 `SessionId` varchar(255) collate utf8_czech_ci NOT NULL default '', 849 `IpAddress` varchar(16) collate utf8_czech_ci NOT NULL default '', 850 `HostName` varchar(255) collate utf8_czech_ci NOT NULL default '', 851 `ScriptName` varchar(255) collate utf8_czech_ci NOT NULL, 724 852 PRIMARY KEY (`Id`), 725 853 KEY `User` (`User`) 726 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 11;727 728 -- -------------------------------------------------------- 729 730 -- 731 -- Struktura tabulky `users `732 -- 733 734 CREATE TABLE IF NOT EXISTS `users ` (854 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ; 855 856 -- -------------------------------------------------------- 857 858 -- 859 -- Struktura tabulky `users_old` 860 -- 861 862 CREATE TABLE IF NOT EXISTS `users_old` ( 735 863 `id` int(11) NOT NULL auto_increment, 736 864 `first_name` varchar(64) character set latin2 collate latin2_czech_cs NOT NULL default '', … … 761 889 `inet_tarif_next` int(11) NOT NULL default '2', 762 890 `monthly_inet` int(11) NOT NULL default '0', 763 `subject_name` varchar( 255) character set utf8 collate utf8_czech_ci NOT NULL,891 `subject_name` varchar(128) character set utf8 collate utf8_czech_ci NOT NULL default '', 764 892 `street` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL default '', 765 893 `town` varchar(64) character set utf8 collate utf8_czech_ci NOT NULL default '', 766 894 `psc` int(11) NOT NULL default '0', 767 895 `ico` int(11) NOT NULL default '0', 768 `dic` varchar(32) NOT NULL ,769 ` User` int(11) NOT NULL,896 `dic` varchar(32) NOT NULL default '', 897 `BillingPeriod` enum('never','monthly','quarterly','half-yearly','yearly') NOT NULL default 'monthly', 770 898 PRIMARY KEY (`id`), 771 899 UNIQUE KEY `nick` (`nick`) 772 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=72 ; 900 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=98 ; 901 902 -- -------------------------------------------------------- 903 904 -- 905 -- Struktura tabulky `users_online` 906 -- 907 908 CREATE TABLE IF NOT EXISTS `users_online` ( 909 `id` int(11) NOT NULL auto_increment, 910 `user` int(11) NOT NULL default '0', 911 `time` int(11) NOT NULL default '0', 912 `session` varchar(128) character set latin2 NOT NULL default '', 913 `ip` varchar(64) character set latin2 NOT NULL default '', 914 PRIMARY KEY (`id`) 915 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=282 ; 773 916 774 917 -- -------------------------------------------------------- -
www/sunrisechat/network.php
r8 r169 1 1 <?php 2 2 3 include_once('../global.php'); 4 include_once('code.php'); 3 include('../global.php'); 5 4 6 $User = array(0 => array(' fullname' => ''));7 $DbResult = $Database->select(' users', '*,CONCAT(second_name, " ",first_name) as fullname');5 $User = array(0 => array('Fullname' => '')); 6 $DbResult = $Database->select('User', '*, CONCAT(SecondName, " ", FirstName) as Fullname'); 8 7 while($Row = $DbResult->fetch_array()) 9 8 { 10 $User[$Row[' id']] = $Row;9 $User[$Row['Id']] = $Row; 11 10 } 12 11 … … 14 13 while($Row = $DbResult->fetch_array()) 15 14 { 16 $Row = $Row['id'].':'.$Row['parent'].':'.$Row['name'].':'.$Row['IP'].':'. $User[$Row['user']]['fullname'].':'.$Row['block']."\n";17 $Row = StrTr($Row, "\xA9\xAB\xAE\xB9\xBB\xBE", "\x8A\x8D\x8E\x9A\x9D\x9E");15 $Row = $Row['id'].':'.$Row['parent'].':'.$Row['name'].':'.$Row['IP'].':'.trim($User[$Row['user']]['Fullname']).':'.$Row['block']."\n"; 16 $Row = FromUTF8($Row, 'win1250'); 18 17 echo($Row); 19 18 } -
www/user.php
r168 r169 16 16 define('BAD_PASSWORD', 'Špatné heslo.'); 17 17 define('USER_NOT_FOUND', 'Uživatel nenalezen.'); 18 define('USER_TIMEOUT', 300); // in seconds19 18 define('USER_PASSWORD_RECOVERY_SUCCESS', 'Přihlašovací údaje byly odeslány na zadanou emailovou adresu.'); 20 19 define('USER_PASSWORD_RECOVERY_FAIL', 'Podle zadaných údajů nebyl nalezen žádný uživatel.'); … … 32 31 var $User = array(); 33 32 var $DefaultRole = 2; 34 var $AnonymousUserId = 96; 33 var $AnonymousUserId = 98; 34 var $OnlineStateTimeout = 600; // in seconds 35 35 36 36 function Check() … … 62 62 63 63 // Remove nonactive users 64 $DbResult = $this->Database->select('UserOnline', 'Id, User', 'ActivityTime < DATE_SUB(NOW(), INTERVAL '. USER_TIMEOUT.' SECOND)');64 $DbResult = $this->Database->select('UserOnline', 'Id, User', 'ActivityTime < DATE_SUB(NOW(), INTERVAL '.$this->OnlineStateTimeout.' SECOND)'); 65 65 while($DbRow = $DbResult->fetch_array()) 66 66 { … … 134 134 else 135 135 { 136 $this->Database->update('User', 'Id='.$Row['Id'], array('LastLoginTime' => 'NOW()' ));136 $this->Database->update('User', 'Id='.$Row['Id'], array('LastLoginTime' => 'NOW()', 'LastIpAddress' => GetRemoteAddress())); 137 137 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $Row['Id'])); 138 138 // načtení stavu stromu
Note:
See TracChangeset
for help on using the changeset viewer.