free_sql("SELECT `sbor_deneg` FROM `pages` LIMIT 1"); //if (!$res) { $db->free_sql2("ALTER TABLE `pages` ADD `sbor_deneg` varchar(1) COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `pages` ADD `likes` int(10) COLLATE 'utf8_general_ci' NULL;"); //} $db->free_sql2("ALTER TABLE `pages` ADD `rss` varchar(1) NULL;"); $db->free_sql2("ALTER TABLE `pages` ADD `abtime` varchar(15) NULL;"); #$db->free_sql2("ALTER TABLE `pages` ADD `rss` varchar(1) NULL;"); $db->free_sql2("ALTER TABLE `page_cat` CHANGE `txt` `txt` varchar(250) COLLATE 'utf8_general_ci' NULL AFTER `id`, CHANGE `site` `site` varchar(254) COLLATE 'utf8_general_ci' NULL AFTER `txt`, CHANGE `alias` `alias` varchar(254) COLLATE 'utf8_general_ci' NULL AFTER `site`, CHANGE `parent` `parent` int(10) NULL DEFAULT '0' AFTER `alias`, CHANGE `public` `public` int(1) NULL DEFAULT '1' AFTER `parent`, CHANGE `description` `description` longtext COLLATE 'utf8_general_ci' NULL AFTER `public`, CHANGE `keywords` `keywords` longtext COLLATE 'utf8_general_ci' NULL AFTER `description`;"); $db->free_sql2("ALTER TABLE `pages` ADD `likes` int(10) NULL;"); $db->free_sql2("ALTER TABLE `users` ADD `fio` varchar(254) COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `users` ADD `about` longtext COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `users` ADD `ss_facebook` varchar(254) COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `users` ADD `ss_vk` varchar(254) COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `users` ADD `ss_ok` varchar(254) COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `users` ADD `ss_ig` varchar(254) COLLATE 'utf8_general_ci' NULL;"); $db->free_sql2("ALTER TABLE `pages` ADD `post_type` varchar(254) COLLATE 'utf8_general_ci' NULL DEFAULT 'page';"); /* написать комменты */ /*$db->free_sql(" CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `login` varchar(50) NOT NULL, `email` varchar(100) NOT NULL, `pwd` varchar(50) NOT NULL, `act` tinyint(1) NOT NULL DEFAULT '0', `actcode` varchar(10) NOT NULL, `site` varchar(256) NOT NULL, `ip` varchar(256) NOT NULL, `regdata` varchar(256) NOT NULL, `lostdata` varchar(256) NOT NULL, `ref` int(10) NOT NULL, `repa` int(10) NOT NULL, `reg_ip` varchar(20) NOT NULL, `ava` varchar(20) NOT NULL, `balans` longtext, `pd` varchar(1) DEFAULT NULL, `yad` longtext, `qiwi` longtext, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); $db->free_sql(" INSERT INTO `users` (`id`, `login`, `email`, `pwd`, `act`, `actcode`, `site`, `ip`, `regdata`, `lostdata`, `ref`, `repa`, `reg_ip`, `ava`, `balans`, `pd`, `yad`, `qiwi`) VALUES (1,'YurecNT','info@info.ru','202cb962ac59075b964b07152d234b70',1,'0','','','1505382760','',0,0,'46.165.49.31','',NULL,NULL,NULL,NULL); "); $db->free_sql(" CREATE TABLE IF NOT EXISTS `users_groupe` ( `id` int(10) NOT NULL AUTO_INCREMENT, `dostup` varchar(1) NOT NULL DEFAULT 'u', `user_id` int(10) NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), CONSTRAINT `users_groupe_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); $db->free_sql(" INSERT INTO `users_groupe` (`id`, `dostup`, `user_id`) VALUES (1,'a',1); ");*/ ?>