<?php
$sql = array();
$sql[] = "CREATE TABLE `album` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`pass` varchar(100) NOT NULL,
`time` int(11) NOT NULL,
`name` varchar(1024) NOT NULL,
`closed` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `album_cmt` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ida` varchar(1000) NOT NULL,
`id_user` int(11) NOT NULL,
`msg` varchar(1000) NOT NULL,
`time` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `album_likes` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ida` varchar(1000) NOT NULL,
`id_user` varchar(1000) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `album_photo` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`check` int(11) NOT NULL,
`album` int(11) NOT NULL,
`time` int(11) NOT NULL,
`msg` varchar(1024) NOT NULL,
`name` varchar(254) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `cont` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_ser` int(11) NOT NULL,
`id_ger` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `forum_cats` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`about` text NOT NULL,
`id_user` int(11) NOT NULL,
`time` int(11) NOT NULL,
`closed` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `forum_msg` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_cat` int(11) NOT NULL,
`id_topic` int(5) NOT NULL,
`id_user` int(11) NOT NULL,
`text` text NOT NULL,
`time` int(10) NOT NULL,
`edit_by` int(11) NOT NULL,
`edit_time` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `forum_topics` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_cat` int(11) NOT NULL,
`title` varchar(50) DEFAULT NULL,
`id_user` int(11) NOT NULL,
`time` int(10) NOT NULL,
`who_close` int(11) NOT NULL,
`closed` int(1) NOT NULL,
`view` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `friends` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(100) NOT NULL DEFAULT '0',
`fid` int(100) NOT NULL DEFAULT '0',
`time` int(100) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `friend_reqs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
`fid` int(11) NOT NULL DEFAULT '0',
`msg` varchar(200) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `messages` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_ser` int(11) NOT NULL,
`id_ger` int(11) NOT NULL,
`msg` text NOT NULL,
`time` int(11) NOT NULL,
`cont` int(11) NOT NULL,
`read` int(2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `notice` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_id` int(11) NOT NULL,
`type` varchar(11) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
`time` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`read` int(11) NOT NULL DEFAULT '0',
`pages` int(11) NOT NULL,
`id_from` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `smiles` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`image` varchar(50) NOT NULL,
`text` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `status` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`from_id` int(11) NOT NULL DEFAULT '0',
`text` text COLLATE utf8_unicode_ci NOT NULL,
`time` int(12) NOT NULL,
`timeline_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `status_cmt` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_status` int(11) NOT NULL,
`msg` text NOT NULL,
`page` int(11) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `status_like` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_status` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql[] = "CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`nick` varchar(255) NOT NULL,
`pass` varchar(255) NOT NULL,
`mail` varchar(255) NOT NULL,
`gender` varchar(1) NOT NULL,
`dob` varchar(10) NOT NULL,
`province` varchar(255) NOT NULL,
`looking_for` int(1) NOT NULL,
`inter` varchar(255) CHARACTER SET utf8 NOT NULL,
`about_me` varchar(255) NOT NULL,
`rela` varchar(255) NOT NULL,
`level` int(11) NOT NULL,
`ctime` varchar(20) NOT NULL,
`regtime` int(11) NOT NULL,
`last_active` int(11) NOT NULL,
`avatar` varchar(255) NOT NULL,
`language` varchar(255) NOT NULL,
`wk` longtext CHARACTER SET utf8 NOT NULL,
`post` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
for( $i = 0; $i < count($sql); $i++ )
{
mysql_query($sql[$i]);
}
?>