<?php
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title']= 'Файлы';
include_once '../../sys/inc/thead.php';
title();
aut();
only_reg();
mysql_query("CREATE TABLE IF NOT EXISTS `user_files_mod_papka` (
`id` int(11) NOT NULL auto_increment,
`kto_id` int(11) NOT NULL,
`name` varchar(16) NOT NULL,
`opis` varchar(512) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
mysql_query("ALTER TABLE `user_files_mod_papka` ADD `pass_set` INT( 11 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_papka` ADD `pass` VARCHAR( 8 ) DEFAULT '0' NOT NULL ;");
mysql_query("CREATE TABLE IF NOT EXISTS `user_files_mod_files` (
`id` int(11) NOT NULL auto_increment,
`kto_id` int(11) NOT NULL,
`name` varchar(64) NOT NULL,
`opis` varchar(512) NOT NULL,
`dir` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `pass_set` INT( 11 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `pass` VARCHAR( 8 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `filename` VARCHAR( 256 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `size` VARCHAR( 16 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `screen_set` INT( 11 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `screen` VARCHAR( 256 ) DEFAULT '0' NOT NULL ;");
mysql_query("ALTER TABLE `user_files_mod_files` ADD `prosm` INT( 11 ) DEFAULT '0' NOT NULL ;");
mysql_query("CREATE TABLE IF NOT EXISTS `user_files_mod_komm` (
`id` int(11) NOT NULL auto_increment,
`kto_id` int(11) NOT NULL,
`msg` varchar(512) NOT NULL,
`file` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
mysql_query("CREATE TABLE IF NOT EXISTS `user_files_mod_zakl` (
`id` int(11) NOT NULL auto_increment,
`kto_id` int(11) NOT NULL,
`file` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
mysql_query("CREATE TABLE IF NOT EXISTS `user_files_mod_rating` (
`id` int(11) NOT NULL auto_increment,
`kto_id` int(11) NOT NULL,
`file` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
mysql_query("ALTER TABLE `user_files_mod_rating` ADD `status` VARCHAR( 32 ) DEFAULT '0' NOT NULL ;");

echo '<div class="links">';
echo 'Таблицы залиты.<br/>';
echo '</div>';

include_once '../../sys/inc/tfoot.php';
?>