Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "<html>\n<head>\n \n <meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">\n </head>\n<body>\n\n ";
- ini_set( "display_errors", "on" );
- ini_set( "display_startup_errors", "on" );
- file_put_contents( "tmp_test", "" );
- if ( !file_exists( "tmp_test" ) )
- {
- echo "уÑтановите права 777 на дииректорию";
- exit( );
- }
- else
- {
- @unlink( "tmp_test" );
- }
- if ( preg_match( "/nginx/i", $_SERVER['SERVER_SOFTWARE'] ) )
- {
- echo "ВЫ иÑпользуете NGINX, будет Ñоздана ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ вебÑервера<br><br>";
- }
- echo "magic_quotes_gpc должно быть <b>Off</b><br>";
- if ( get_magic_quotes_gpc( ) && preg_match( "/nginx/i", $_SERVER['SERVER_SOFTWARE'] ) )
- {
- exit( );
- }
- if ( !function_exists( "curl_init" ) )
- {
- echo "уÑтановите CURL";
- exit( );
- }
- if ( !function_exists( "exec" ) )
- {
- echo "включите exec";
- exit( );
- }
- $admin_user = "";
- $admin_pass = "";
- if ( $_POST['proc'] == "mysql_setup" )
- {
- $log = "";
- if ( $_POST['admin_user'] == "" )
- {
- $log .= "<font color=red>введите логин</font><br>";
- }
- if ( $_POST['admin_pass'] == "" )
- {
- $log .= "<font color=red>введите пароль</font><br>";
- }
- if ( $_POST['dbhost'] == "" )
- {
- $log .= "<font color=red>введите хоcт</font><br>";
- }
- if ( $_POST['dbname'] == "" )
- {
- $log .= "<font color=red>введите Ð¸Ð¼Ñ Ð±Ð°Ð·Ñ‹</font><br>";
- }
- if ( $_POST['dbuser'] == "" )
- {
- $log .= "<font color=red>введите Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð±Ð°Ð·Ñ‹</font><br>";
- }
- if ( $_POST['dbpass'] == "" )
- {
- $log .= "<font color=red>введите пароль Ð´Ð»Ñ Ð±Ð°Ð·Ñ‹</font><br>";
- }
- $config['host'] = addslashes( $_POST['dbhost'] );
- $config['dbname'] = addslashes( $_POST['dbname'] );
- $config['user'] = addslashes( $_POST['dbuser'] );
- $config['pass'] = addslashes( $_POST['dbpass'] );
- $config['mode'] = "local";
- if ( $log == "" )
- {
- if ( @!_obfuscate_DRgtBTAdEh47NTcCAgpcGAtbBRMGNSIÿ( @$config['dbname'], @$link ) )
- {
- @$log .= "<font color=red>ОШИБКРÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ðº mysql, введите правильно данные</font><br>";
- }
- }
- if ( @( 0 < @_obfuscate_DR0UPhwFMhwDMRICFy03MjsrIgIXKREÿ( @$tables ) ) )
- {
- if ( @isset( $_POST['db_cleaner'] ) )
- {
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( @"DROP TABLE {$results['0']}" );
- }
- if ( @( 0 < @_obfuscate_DR0UPhwFMhwDMRICFy03MjsrIgIXKREÿ( @$tables ) ) )
- {
- echo "ошибка очиÑтки базы, очиÑтите базу в ручном режиме и <a href=\"install.php\">повторите уÑтановку</a>";
- exit( );
- }
- }
- else
- {
- echo "<font color=red>база Ñодержит таблицы</font> Ñкрипт можно уÑтанавливать только в пуÑтую базу данных<br>\n ОчиÑтите базу данных или Ñоздайте новую.<br>\n <a href=\"install.php\">повторить</a>";
- exit( );
- }
- }
- if ( @( $log != "" ) )
- {
- echo $log;
- exit( );
- }
- if ( @( $log == "" ) )
- {
- if ( @( _obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "CREATE TABLE IF NOT EXISTS `a_blocks` (\n `name` char(32) NOT NULL,\n `ads` text NOT NULL,\n UNIQUE KEY `name` (`name`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;" ) && _obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "INSERT INTO `a_blocks` (`name`, `ads`) VALUES\n ('tags', '');\n " ) ) )
- {
- @$log .= "Таблица a_blocks - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица a_blocks - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `dtags` (\n `id` int(11) NOT NULL,\n `tid` mediumint(7) NOT NULL,\n `duration` smallint(4) NOT NULL,\n `clicks` mediumint(7) NOT NULL,\n `ctr` decimal(11,10) NOT NULL,\n `date` int(11) NOT NULL,\n UNIQUE KEY `id_tid_ctr` (`id`,`tid`,`ctr`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;" ) )
- {
- @$log .= "Таблица dtags - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица dtags - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `ids` (\n `i` mediumint(10) NOT NULL AUTO_INCREMENT,\n `id` mediumint(10) NOT NULL,\n PRIMARY KEY (`i`),\n UNIQUE KEY `id` (`id`)\n) ENGINE=MEMORY DEFAULT CHARSET=latin1;" ) )
- {
- @$log .= "Таблица ids - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица ids - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\n \n CREATE TABLE IF NOT EXISTS `importer_logs` (\n `profile` varchar(255) NOT NULL,\n `num` int(11) NOT NULL,\n `date_import` int(11) NOT NULL,\n `status` set('ready','running','done') NOT NULL DEFAULT 'ready',\n KEY `index` (`profile`,`date_import`,`status`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n" ) )
- {
- @$log .= "Таблица importer_logs - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица importer_logs - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `intraff` (\n `rid` char(32) NOT NULL,\n `ref` char(32) NOT NULL,\n `ip` char(15) NOT NULL,\n `time` decimal(15,4) NOT NULL,\n UNIQUE KEY `time` (`time`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица intraff - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица intraff - <font color=red>ошибка</font><br>";
- }
- if ( @( _obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `niches` (\n `id` smallint(6) NOT NULL AUTO_INCREMENT,\n `name` varchar(22) NOT NULL,\n `title` varchar(255) NOT NULL,\n `desc` varchar(1024) NOT NULL,\n `keys` varchar(128) NOT NULL,\n `url` char(255) NOT NULL,\n `num` mediumint(7) NOT NULL,\n `skim_url` text NOT NULL,\n `skim_prc` int(3) NOT NULL,\n `thumb` varchar(128) NOT NULL,\n `clicks` int(8) NOT NULL,\n `ads` text NOT NULL,\n `hits` int(8) NOT NULL,\n `ctr` float NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `name_clicks_num` (`name`,`clicks`,`num`),\n UNIQUE KEY `name` (`name`),\n KEY `ctr` (`ctr`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n" ) && _obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\n INSERT INTO `niches` (`name`, `title`, `desc`, `keys`, `url`, `num`, `skim_url`, `skim_prc`, `thumb`, `clicks`, `ads`, `hits`, `ctr`) \nVALUES\n ('main', 'all tubes', 'some desc', '*', '', 0, 'a:1:{i:0;s:0:\"\";}', 0, '', 0, '', 0, 0),\n ('anal', 'anal tubes', 'some desc', 'anal*', '', 0, 'a:1:{i:0;s:0:\"\";}', 0, '', 0, '', 0, 0),\n ('black_anal', 'black anal', 'some desc', '(black+anal)', '', 0, 'a:1:{i:0;s:0:\"\";}', 0, '', 0, '', 0, 0);" ) ) )
- {
- @$log .= "Таблица niches - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица niches - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `pstats` (\n `id` char(32) NOT NULL,\n `ids` text NOT NULL,\n `i` int(6) NOT NULL,\n `date` int(12) NOT NULL,\n UNIQUE KEY `id` (`id`),\n KEY `date` (`date`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица pstats - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица pstats - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `stats_d` (\n `day` int(8) NOT NULL,\n `hits` int(7) NOT NULL,\n `clicks` int(7) NOT NULL,\n `prod` float NOT NULL,\n `la` float NOT NULL,\n PRIMARY KEY (`day`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица stats_d - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица stats_d - <font color=red>ошибка</font><br>";
- }
- if ( @( _obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `stats_h` (\n `hour` int(2) NOT NULL,\n `hits` int(6) NOT NULL DEFAULT '0',\n `clicks` int(6) NOT NULL DEFAULT '0',\n `prod` float NOT NULL DEFAULT '0',\n `la` float NOT NULL,\n UNIQUE KEY `hour` (`hour`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) && _obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\n INSERT INTO `stats_h` (`hour`, `hits`, `clicks`, `prod`, `la`) VALUES\n (0, 0, 0, 0, 0),\n (1, 0, 0, 0, 0),\n (2, 0, 0, 0, 0),\n (3, 0, 0, 0, 0),\n (4, 0, 0, 0, 0),\n (5, 0, 0, 0, 0),\n (6, 0, 0, 0, 0),\n (7, 0, 0, 0, 0),\n (8, 0, 0, 0, 0),\n (9, 0, 0, 0, 0),\n (10, 0, 0, 0, 0),\n (11, 0, 0, 0, 0),\n (12, 0, 0, 0, 0),\n (13, 0, 0, 0, 0),\n (14, 0, 0, 0, 0),\n (15, 0, 0, 0, 0),\n (16, 0, 0, 0, 0),\n (17, 0, 0, 0, 0),\n (18, 0, 0, 0, 0),\n (19, 0, 0, 0, 0),\n (20, 0, 0, 0, 0),\n (21, 0, 0, 0, 0),\n (22, 0, 0, 0, 0),\n (23, 0, 0, 0, 0),\n (24, 0, 0, 0, 0);" ) ) )
- {
- @$log .= "Таблица stats_h - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица stats_h - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `tags` (\n `id` int(11) NOT NULL,\n `tags` char(255) NOT NULL,\n `ctr` decimal(11,10) NOT NULL,\n `clicks` mediumint(9) NOT NULL,\n `duration` mediumint(9) NOT NULL,\n KEY `ctr` (`ctr`)\n) ENGINE=MEMORY DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица tags - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица tags - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `tags_stats` (\n `tid` mediumint(7) NOT NULL AUTO_INCREMENT,\n `tag` varchar(12) NOT NULL,\n `num` mediumint(8) NOT NULL,\n PRIMARY KEY (`tag`),\n KEY `tid` (`tid`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица tags_stats - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица tags_stats - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `templates` (\n `name` varchar(32) NOT NULL,\n `template` MEDIUMTEXT NOT NULL,\n UNIQUE KEY `name` (`name`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица templates - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица templates - <font color=red>ошибка</font><br>";
- }
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( @"INSERT INTO `templates` (`name`,`template`) VALUES ('main','{$main_tmpl}')" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( @"INSERT INTO `templates` (`name`,`template`) VALUES ('sub','{$main_sub_tmpl}')" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( @"INSERT INTO `templates` (`name`,`template`) VALUES ('embed','{$video_tmpl}')" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "INSERT INTO `templates` (`name`,`template`) VALUES ('embed_sub','')" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( " INSERT INTO `templates` (`name` ,`template`) VALUES ('categories', '');" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( " INSERT INTO `templates` (`name` ,`template` )VALUES ('categories_sub', '');" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `templates_history` (\n `time` int(11) NOT NULL,\n `marker` varchar(32) NOT NULL,\n `name` varchar(32) NOT NULL,\n `template` mediumtext NOT NULL\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n" );
- @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "ALTER TABLE `templates_history` ADD UNIQUE `time_name`(\n`time` ,\n`name`\n);" );
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `th_hash` (\n `id` int(11) NOT NULL,\n `hash` char(32) NOT NULL,\n KEY `id` (`id`),\n UNIQUE KEY `hash` (`hash`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;\n " ) )
- {
- @$log .= "Таблица th_hash - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица th_hash - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\n\nCREATE TABLE IF NOT EXISTS `w_content` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `oid` char(40) NOT NULL,\n `kid` char(16) NOT NULL,\n `prov` char(32) NOT NULL,\n `url` char(255) NOT NULL,\n `title` char(255) NOT NULL,\n `title_pre_syn` char(255) NOT NULL,\n `desc` text NOT NULL,\n `tags` char(255) DEFAULT NULL,\n `thumbs` text NOT NULL,\n `flv_file` char(255) NOT NULL,\n `flv_hotlink_file` char(255) NOT NULL,\n `embed` text NOT NULL,\n `embed_code` text NOT NULL,\n `duration` int(5) NOT NULL,\n `date` int(11) NOT NULL,\n `date_import` int(11) NOT NULL,\n `r` mediumint(5) NOT NULL DEFAULT '0',\n `t_r` int(8) NOT NULL,\n `clicks` mediumint(7) NOT NULL,\n `t_clicks` int(8) NOT NULL,\n `l_clicks` mediumint(5) NOT NULL,\n `ctr` decimal(11,10) NOT NULL,\n `rs` tinyint(4) NOT NULL,\n `at` tinyint(2) NOT NULL,\n `t0_ctr` float NOT NULL,\n `t1_ctr` float NOT NULL,\n `t3_ctr` float NOT NULL,\n `status` enum('0','1','2','6','7','8','9') NOT NULL,\n `preloaded` set('yes','no') NOT NULL DEFAULT 'no',\n `lr` int(12) NOT NULL,\n `info` text NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `oid` (`oid`,`prov`),\n KEY `status` (`status`),\n KEY `r` (`r`,`clicks`,`ctr`,`at`),\n KEY `rs` (`rs`),\n KEY `ctr` (`ctr`),\n KEY `duration` (`duration`),\n KEY `preloaded` (`preloaded`),\n KEY `prov_status_ctr` (`prov`,`status`,`ctr`),\n KEY `date_import` (`date_import`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC PACK_KEYS=0;\n " ) )
- {
- @$log .= "Таблица w_content - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица w_content - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `_intraff` (\n `rid` char(32) NOT NULL,\n `ref` char(32) NOT NULL,\n `ip` char(15) NOT NULL,\n `time` decimal(15,4) NOT NULL\n) ENGINE=MEMORY DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица _intraff - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица _intraff - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `_rids` (\n `rid` char(32) NOT NULL,\n `num` mediumint(4) NOT NULL,\n UNIQUE KEY `rid` (`rid`)\n) ENGINE=MEMORY DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица _rids - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица _rids - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `_tags` (\n `id` int(11) NOT NULL,\n `tid` mediumint(7) NOT NULL,\n `duration` smallint(4) NOT NULL,\n `clicks` mediumint(7) NOT NULL,\n `ctr` decimal(11,10) NOT NULL,\n `date` int(11) NOT NULL,\n KEY `tid` (`tid`)\n) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;\n " ) )
- {
- @$log .= "Таблица _tags - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица _tags - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "\nCREATE TABLE IF NOT EXISTS `jobs` (\n `name` char(32) NOT NULL,\n `time` CHAR( 15 ) NOT NULL DEFAULT '0',\n `status` tinyint(1) NOT NULL DEFAULT '0',\n PRIMARY KEY `name` (`name`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n " ) )
- {
- @$log .= "Таблица jobs - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица jobs - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "CREATE TABLE IF NOT EXISTS `search_keys` \n (\n `key` char(32) NOT NULL,\n `num` mediumint(6) NOT NULL,\n UNIQUE KEY `key` (`key`)\n ) \n ENGINE=MEMORY DEFAULT CHARSET=latin1;" ) )
- {
- @$log .= "Таблица search_keys - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица search_keys - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "CREATE TABLE IF NOT EXISTS `sponsors` (\n `prov` char(64) NOT NULL,\n `title` VARCHAR( 255 ) NOT NULL,\n `desc` text NOT NULL,\n `links` text NOT NULL,\n `ads` text NOT NULL,\n PRIMARY KEY (`prov`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1;" ) )
- {
- @$log .= "Таблица sponsors - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "Таблица sponsors - <font color=red>ошибка</font><br>";
- }
- if ( @_obfuscate_DSUlIRwPHBoWHCEcDCg4CR8aBwUhBxEÿ( "INSERT INTO `sponsors` (\n`prov` ,\n`title` ,\n`desc` ,\n`links`,\n`ads`\n)\nVALUES (\n'import_main', '', '', '','')" ) )
- {
- @$log .= "...insert in sponsors - <font color=\"green\">ок</font><br>";
- }
- else
- {
- @$log .= "...insert in sponsors - <font color=red>ошибка</font><br>";
- }
- if ( @file_exists( "files/config" ) )
- {
- @unlink( "files/config" );
- }
- if ( @file_exists( "files/update.inc" ) )
- {
- @unlink( "files/update.inc" );
- }
- @preg_match( "/(.*)install\\.php.*/", @$_SERVER['REQUEST_URI'], @$matches );
- @$config['index_dir_url'] = "http://{$_SERVER['HTTP_HOST']}{$matches['1']}";
- @$config['http_host'] = $_SERVER['HTTP_HOST'];
- @$config['syn_mode'] = "0";
- if ( @!file_put_contents( "files/config", @serialize( @$config ) ) )
- {
- @$log .= "<font color=red>ошибка</font> ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³Ð°!<br>";
- }
- @$settings['grab_status'] = "noactive";
- @$settings['ignore_grub_thread'] = "off";
- @$settings['grub_to_preload'] = "off";
- @$settings['ban_keys'] = "gay*,trann*,shemal*";
- @$settings['good_keys'] = "";
- @$settings['tubes'] = array( "pornhub" );
- @$settings['grab_min_thumbs'] = "checked";
- @$settings['content_limit'] = "10000";
- @$settings['duration_limit'] = "60";
- @$settings['grab_thumbs_limit'] = "5";
- @$settings['im_command_line'] = "auto";
- @$settings['thumbs_size'] = "";
- @$settings['thumbs_crop_size'] = "320x240";
- if ( @file_exists( "files/settings" ) )
- {
- @unlink( "files/settings" );
- }
- if ( @!file_put_contents( "files/settings", @serialize( @$settings ) ) )
- {
- @$log .= "<font color=red>ошибка</font> ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð½Ð°Ñтроек!<br>";
- }
- @$auth['user'] = $admin_user;
- @$auth['pass'] = $admin_pass;
- if ( @file_exists( "files/auth" ) )
- {
- @unlink( "files/auth" );
- }
- if ( @!file_put_contents( "files/auth", @$auth ) )
- {
- @$log .= "<font color=red>ошибка</font> ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° аутенфикации!<br>";
- }
- echo $log;
- if ( @strpos( @$log, "ошибка" ) )
- {
- echo "<br><b>Ñкрипт не уÑтановлен, иÑправьте ошибки</b><br><a href=\"install.php\">повторить</a>";
- exit( );
- }
- if ( @!$php_path )
- {
- @$php_path = "{YOUR PATH TO PHP}";
- }
- echo "<h4>Ñкрипт уÑпешно уÑтановлен</h4><br>";
- @$htstr = @"\nOptions -Indexes\n \nRewriteEngine On\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^(duration|views|date)/?$ index.php?by=$1 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^t/([a-z\\-]{3,64})/p([0-9]{1,3})/?$ index.php?t=$1&p=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^([a-z_-]{3,22})/p([0-9]{1,3})/?$ index.php?n=$1&p=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^([a-z_-]{3,22})/?$ index.php?n=$1 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^p([0-9]{1,3})/?$ index.php?n=main&p=$1 [L]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^t/([a-z\\-]{3,64})/?$ index.php?t=$1 [L,NC]\n\n\n\n\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^([a-z_-]{3,22})/(v[0-9]{1,9})/?$ index.php?n=$1&id=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^(v[0-9]{1,9})/?$ index.php?id=$1 [L]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^t/([a-z\\-]{3,64})/(v[0-9]{1,9})/?$ index.php?t=$1&id=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^.+/t/([a-z\\-]{3,64})/(v[0-9]{1,9})/?$ index.php?t=$1&id=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^.+/([a-z_-]{3,22})/(v[0-9]{1,9})/?$ index.php?n=$1&id=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n\nRewriteRule ^.+/(v[0-9]{1,9})/?$ index.php?id=$1 [L]\n\n\n\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^t/([a-z\\-]{3,64})/(duration|views|date)/?$ index.php?t=$1&by=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^t/([a-z\\-]{3,64})/p([0-9]{1,2})/(duration|views|date)/?$ index.php?t=$1&p=$2&by=$3 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^([a-z_-]{3,22})/p([0-9]{1,2})/(duration|views|date)/?$ index.php?n=$1&p=$2&by=$3 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^p([0-9]{1,3})/(duration|views|date)/?$ index.php?p=$1&by=$2 [L,NC]\n\n#RewriteCond %{REQUEST_FILENAME} !-d\n \nRewriteRule ^([a-z_-]{3,22})/(duration|views|date)/?$ index.php?n=$1&by=$2 [L,NC]\n\n";
- if ( @get_magic_quotes_gpc( ) )
- {
- @$htstr .= "php_flag magic_quotes_gpc Off\n";
- }
- @$echo_htstr = @$Tmp_403."добавьте Ñти Ñтроки в htaccess. ModRewrite должен быть включен, Ð´Ð»Ñ NGINX правила Ñмотрите на ixi.tv<br>\n <textarea cols=100 rows=18>{$htstr}</textarea><br>";
- if ( @!file_exists( ".htaccess" ) )
- {
- if ( @!file_put_contents( ".htaccess", @$htstr ) )
- {
- echo $echo_htstr;
- }
- }
- else
- {
- echo $echo_htstr;
- }
- @$cron = @"* * * * * cd {$path}/files && {$php_path} cron.php 1>/dev/null 2>/dev/null";
- echo "<h4>добавьте задание в крон <br>\n <textarea rows=1 cols=120>{$cron}</textarea><br><br>\n а затем перейдите в <a href='admin.php?e=s' target='_blank'>админку</a></h4>\n ";
- echo "\n ваш логин {$user}<br>\n ваш пароль {$pass}<br>\n <br><br><br><br><br>\n\n";
- @unlink( "install.php" );
- exit( );
- }
- }
- if ( @( $_GET['proc'] == "install" ) )
- {
- @$log = "";
- @$url = "http://tuberotator.com/src/install_tr.0.6.3i.tar";
- @_obfuscate_DTcEBzULPR8dFBYeHA8kNxs8GyMMAjIÿ( @$ch, @CURLOPT_URL, @$url );
- @_obfuscate_DTcEBzULPR8dFBYeHA8kNxs8GyMMAjIÿ( @$ch, @CURLOPT_TIMEOUT, 20 );
- @_obfuscate_DTcEBzULPR8dFBYeHA8kNxs8GyMMAjIÿ( @$ch, @CURLOPT_RETURNTRANSFER, 1 );
- @_obfuscate_DTEJECoVNCU5Dz8aCiEUIhoHJwxAEyIÿ( @$ch );
- if ( @( $Var_11472['http_code'] == "404" || $info['size_download'] < "100000" ) )
- {
- echo "<br>Возможно ваш инÑталлÑтор уÑтарел, <a href=\"http://www.tuberotator.com/\">Ñкачайте</a> более Ñвежий";
- exit( );
- }
- else
- {
- @file_put_contents( "install_tr.tar", @$archive );
- if ( @!file_exists( "install_tr.tar" ) )
- {
- echo "не могу Ñделать запиÑÑŒ в текущую диру, проверьте права";
- exit( );
- }
- }
- if ( @empty( $tar_path ) )
- {
- @$tar_path = "tar";
- }
- @exec( @"{$tar_path} -xpf install_tr.tar" );
- @unlink( "install_tr.tar" );
- if ( @( !file_exists( "files" ) || !file_exists( "files/.htaccess" ) ) )
- {
- echo "ошибка в Ñтруктуре, возможно не хватает прав или проблема Ñ tar";
- exit( );
- }
- echo "Ñтруктура уÑпешно Ñоздана<br>";
- @unlink( "files/update.inc" );
- echo "\n <form action='install.php' method='POST'>\n <h4>Логин и пароль Ð´Ð»Ñ Ð°Ð´Ð¼Ð¸Ð½ÐºÐ¸</h4>\n <input type='text' name='admin_user' value='{$admin_user}'>User<br>\n <input type='password' name='admin_pass' value='{$admin_pass}'> Pass<br><br><br>\n <h4>УÑтановки MYSQL</h4>\n <input type='text' name='dbhost' value='localhost'>Mysql Host<br>\n <input type='text' name='dbname'>Mysql DB Name<br>\n <input type='text' name='dbuser'>Mysql User<br>\n <input type='password' name='dbpass'>Mysql Pass<br>\n <input type='checkbox' name='db_cleaner'> очиÑтить базу<br>\n <input type='hidden' name='proc' value='mysql_setup'>\n <input type='submit' value='next'>\n </form>\n";
- exit( );
- }
- echo "<a href=\"install.php?proc=install\">УÑтановить Tube Rotator</a><br>";
- echo "\n</body>\n</html>\n";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement