<?
#-----------------------------------------------------#
# ============ЗАГРУЗ-ЦЕНТР============= #
# Автор : Sea #
# E-mail : [email protected] #
# ICQ : 355152215 #
# Вы не имеете права распространять данный скрипт. #
# По всем вопросам пишите в ICQ. #
#-----------------------------------------------------#
include 'moduls/ini.php';
include 'moduls/header.php';
if(!$level)
{
print "Введите ваши данные:<br>
<form action='install.php?level=1' method='post'>
Пароль админа:<br>
<input name='pass' type='text' value='123'><br>
Сервер MySQL:<br>
<input name='serv' type='text' value='localhost'><br>
База данных:<br>
<input name='db' type='text' value='FileBase'><br>
Пользoватель:<br>
<input name='userbd' type='text' value='file'><br>
Пароль:<br>
<input name='passbd' type='text' value='1234'><br>
<input type='submit' value='Установка'>
</form>";
}
if($level==1)
{
$file = fopen("moduls/config.php","w");
fputs($file,'<?
$SERVERmysql = "'.$serv.'";
$DB = "'.$db.'";
$DB_USER = "'.$userbd.'";
$DB_PASS = "'.$passbd.'";
?>');
fclose($file);
chmod("moduls/config.php",0655);
if(!file_exists("moduls/config.php")) die("Ошибка при создании файла config.php");
include "moduls/config.php";
include "moduls/connect.php";
include "moduls/fun.php";
$query = mysql_query("DROP TABLE `files`,`setting`,`loginlog`,`komments`;");
$sql="CREATE TABLE `files` (
`id` int(11) NOT NULL auto_increment,
`path` text NOT NULL,
`infolder` text NOT NULL,
`name` text NOT NULL,
`priority` int(3) NOT NULL default '0',
`size` bigint(20) NOT NULL ,
`about` text NOT NULL,
`fastabout` text NOT NULL,
`loads` int(11) NOT NULL default '0',
`timeload` text NOT NULL,
`timeupload` int(11) NOT NULL,
`ips` text NOT NULL,
`yes` int(4) NOT NULL default '0',
`no` int(4) NOT NULL default '0',
PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$res = mysql_query($sql);
$error = mysql_error();
if($error!="") $er = $error."<br>";
$sql="CREATE TABLE `komments` (
`id` int(11) NOT NULL auto_increment,
`file_id` int(11) NOT NULL,
`name` text NOT NULL,
`text` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$res = mysql_query($sql);
$error = mysql_error();
if($error!="") $er .= $error."<br>";
$sql="CREATE TABLE `online` (
`id` int(11) NOT NULL auto_increment,
`ip` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$res = mysql_query($sql);
$query = mysql_query("INSERT INTO `online` (`time`) VALUES ('0');");
$error = mysql_error();
if($error!="") $er .= $error."<br>";
$sql="CREATE TABLE `setting` (
`id` int(11) NOT NULL auto_increment,
`name` text NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`id`)) TYPE=MyISAM DEFAULT CHARSET=utf8;";
$res = mysql_query($sql);
$error = mysql_error();
if($error!="") $er .= $error."<br>";
$sql="CREATE TABLE `loginlog` (
`id` int(11) NOT NULL auto_increment,
`ua` text NOT NULL,
`ip` text NOT NULL,
`time` int(11) NOT NULL,
`access_num` int(3) NOT NULL,
PRIMARY KEY (`id`)) TYPE=MyISAM DEFAULT CHARSET=utf8;";
$res = mysql_query($sql);
$error = mysql_error();
if($error!="") $er .= $error."<br>";
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'password','".md5(trim($pass))."');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'path', 'files');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'opath','about');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'spath', 'screen');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'mp3path', 'mp3data');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'limit', '10');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'klimit', '25');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'onpage', '10');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'prew', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'sort', 'name');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'pagehand', '10');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'hackmess', 'Отсоси,хакер недоношенный!');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'countban', '2');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'autologin', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'timeban', '10');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'site_url', 'http://');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'zag', 'Загруз центр');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'day_new', '2');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'komments_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'top_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'ext', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'delete_dir', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'delete_file', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'search_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'eval_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'stat_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'onpage_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'preview_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'prev_size', '40*40');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'top_num', '20');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'pagehand_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'zip_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'jad_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'cut_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'buy_change', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'online', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'online_time', '60');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'buy', '[url]http://simpro.in[/url][b][red]Все сюда![/red][/b]\n[url]http://forum.s-c.ru[/url][b]Лучший форум[/b]');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'randbuy', '0');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'zakaz', '1');");
$query = mysql_query("INSERT INTO `setting` (`name`,`value`) VALUES ( 'zakaz_email', '[email protected]');");
$query = mysql_query("INSERT INTO `loginlog` (`ua`, `ip`, `time`) VALUES ('', '', '');");
print 'Установка закончена';
}
?>