<?php
include '../sys/dbconnect.php';
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD HTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html lang="ru">
<head>
<meta http-equiv="content-Type" content="text/html; charset=UTF-8">
<title>Установка</title>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div class="title">Мастер установки</div>
<div class="menu">
<?php
mysql_query(" CREATE TABLE IF NOT EXISTS `obmencat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
");
mysql_query("CREATE TABLE IF NOT EXISTS `obmen` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_cat` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`desc` text NOT NULL,
`file` varchar(50) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
");
mysql_query("CREATE TABLE IF NOT EXISTS `config` (
`id` int(11) NOT NULL,
`theme` varchar(100) NOT NULL,
`points_page` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
");
mysql_query("INSERT INTO `config` (`id`, `theme`, `points_page`) VALUES
");
mysql_query("CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(32) NOT NULL,
`pass` varchar(64) NOT NULL,
`mail` varchar(72) NOT NULL,
`pol` enum('0','1') NOT NULL DEFAULT '1',
`status` enum('user','moder','admin') NOT NULL,
`access` int(11) unsigned NOT NULL DEFAULT '0',
`date_last` int(11) NOT NULL,
`date_reg` int(11) NOT NULL,
`rate_bad` mediumint(5) NOT NULL,
`rate_good` mediumint(5) NOT NULL,
`points_page` int(11) NOT NULL,
`theme` varchar(64) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `login` (`login`),
UNIQUE KEY `mail` (`mail`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9
");
mysql_query("CREATE TABLE IF NOT EXISTS `user_ank` (
`id_user` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`age` int(5) NOT NULL,
`sity` varchar(32) NOT NULL,
`dey` varchar(100) NOT NULL,
`icq` int(11) NOT NULL,
`site` varchar(32) NOT NULL,
`osebe` varchar(3000) NOT NULL,
UNIQUE KEY `id_user` (`id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
");
mysql_query("CREATE TABLE IF NOT EXISTS `news` (
`id` int(11) NOT NULL auto_increment,
`text` text NOT NULL,
`date` char(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
");
mysql_query("INSERT INTO `news` (`id`, `text`, `date`) VALUES
(2, 'Поздравляем!Вы установили WAPCMS 1.0.1 beta*', '27.09.2011')
");
mysql_query("CREATE TABLE IF NOT EXISTS `admin` (
`pass` char(20) NOT NULL,
PRIMARY KEY (`pass`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
");
mysql_query("CREATE TABLE IF NOT EXISTS `ad` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`link` varchar(100) NOT NULL,
`timetill` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
");
mysql_query("CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
");
mysql_query("CREATE TABLE IF NOT EXISTS `loads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_cat` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`desc` text NOT NULL,
`file` varchar(50) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
");
mysql_query("CREATE TABLE cat
(
id int NOT NULL,
name text NOT NULL,
info text NOT NULL
)
");
mysql_query("CREATE TABLE statuses
(
idcat int NOT NULL,
id int NOT NULL,
status text NOT NULL,
data text NOT NULL,
rating int NOT NULL,
time text NOT NULL
)
");
mysql_query("CREATE TABLE IF NOT EXISTS `forum_cat` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=4");
mysql_query("CREATE TABLE IF NOT EXISTS `forum_podcat` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`refid` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=4");
mysql_query("CREATE TABLE IF NOT EXISTS `forum_post` (
`id` int(7) NOT NULL AUTO_INCREMENT,
`time` varchar(20) NOT NULL,
`id_user` int(7) NOT NULL,
`text` text NOT NULL,
`tema` int(6) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=15");
mysql_query("CREATE TABLE IF NOT EXISTS `forum_tem` (
`id` int(6) NOT NULL AUTO_INCREMENT,
`id_user` int(6) NOT NULL,
`time` varchar(15) NOT NULL,
`name` varchar(25) NOT NULL,
`cat` int(6) NOT NULL,
`close` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=9");
echo mysql_error().'SQL запросы успешно выполнены!<br><a href="step4.php">Далее</a>';
?>
</div>
<div class="foot">WapCMS 1.0.2 Beta</div>
</body>
</html>