Gal visdelto imetu visa koda:
$lenteles = <<<lenteles
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `nera_adresai` (
`id` int(3) NOT NULL,
`rodymas` int(1) NOT NULL,
`adresas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`pavadinimas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
INSERT INTO `nera_adresai` (`id`, `rodymas`, `adresas`, `pavadinimas`) VALUES
(1, 1, '/index.php', 'Pagrindinis');
CREATE TABLE IF NOT EXISTS `nera_informacija` (
`elementas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`reiksme` text collate utf8_lithuanian_ci NOT NULL,
PRIMARY KEY (`elementas`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
INSERT INTO `nera_informacija` (`elementas`, `reiksme`) VALUES
('title', 'Micro tvs'),
('koduote', 'UTF-8'),
('pastas', '-'),
('tema', 'test'),
('description', 'MicroTVS'),
('keywords', 'micro,tvs,microtvs'),
('ijunktas', '0'),
('isjunktas_zinute', '<p>Puslapis laikinai tvarkomas.</p>');
CREATE TABLE IF NOT EXISTS `nera_naujienos` (
`id` int(5) NOT NULL auto_increment,
`autorius` int(5) NOT NULL,
`pavadinimas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`pradzia` text collate utf8_lithuanian_ci NOT NULL,
`galas` text collate utf8_lithuanian_ci NOT NULL,
`data` datetime NOT NULL,
`redagavo` int(5) NOT NULL default '0',
`kada` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci AUTO_INCREMENT=0 ;
CREATE TABLE IF NOT EXISTS `nera_paneles` (
`id` int(3) NOT NULL,
`lygis` int(2) NOT NULL,
`rodymas` int(1) NOT NULL,
`vieta` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`pavadinimas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`turinys` text collate utf8_lithuanian_ci NOT NULL,
PRIMARY KEY (`id`,`lygis`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
INSERT INTO `nera_paneles` (`id`, `lygis`, `rodymas`, `vieta`, `pavadinimas`, `turinys`) VALUES
(1, 1, 1, 'vartotojas', 'Vartotojo panele', '');
CREATE TABLE IF NOT EXISTS `nera_pridetiniai` (
`pavadinimas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`text` text collate utf8_lithuanian_ci NOT NULL,
PRIMARY KEY (`pavadinimas`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
CREATE TABLE IF NOT EXISTS `nera_priminimas` (
`sifras` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`nikas` int(6) NOT NULL,
`data` datetime NOT NULL,
`panaudota` int(1) NOT NULL,
PRIMARY KEY (`sifras`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
CREATE TABLE IF NOT EXISTS `nera_sesija` (
`ip` varchar(15) collate utf8_lithuanian_ci NOT NULL,
`vartotojas` int(5) NOT NULL,
`pasibaigs` datetime NOT NULL,
PRIMARY KEY (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
CREATE TABLE IF NOT EXISTS `nera_vartotojai` (
`id` int(5) NOT NULL auto_increment,
`nikas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`passwordas` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`data` datetime NOT NULL,
`emeil` varchar(255) collate utf8_lithuanian_ci NOT NULL,
`privilegijos` int(1) NOT NULL,
`raide` varchar(1) collate utf8_lithuanian_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci AUTO_INCREMENT=0 ;
lenteles;
mysql_query($lenteles) or die(mysql_error());