Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function [obfuscated]() {
- jeffbiibh( 'convert -version', $cdffjgjbaf );
- $cdffjgjbaf['0'];
- $cdffjgjbaf = ;
- if (cfjbfhahfe( '/ImageMagick/i', $cdffjgjbaf )) {
- return true;
- }
- return false;
- }
- echo '<html>
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="content-type">
- </head>
- <body>
- ';
- dhdjefbjca( 'display_errors', 'on' );
- dhdjefbjca( 'display_startup_errors', 'on' );
- caeceiehcj( 'tmp_test', '' );
- if (!djggccfei( 'tmp_test' )) {
- echo 'установите права 777 на дииректорию';
- exit( );
- }
- else {
- @bdieicdhdc( 'tmp_test' );
- }
- if (cfjbfhahfe( '/nginx/i', $_SERVER['SERVER_SOFTWARE'] )) {
- echo 'ВЫ используете NGINX, будет создана конфигурация для данного вебсервера<br><br>';
- }
- if (dbbhcghbhc( )) {
- echo 'magic_quotes_gpc должно быть <b>Off</b><br>';
- if (cfjbfhahfe( '/nginx/i', $_SERVER['SERVER_SOFTWARE'] )) {
- exit( );
- }
- }
- if (!bgedgjecje( 'curl_init' )) {
- echo 'установите CURL';
- exit( );
- }
- if (!bgedgjecje( '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>';
- }
- bfdjafjaaa( $_POST['admin_user'] );
- $admin_user = ;
- bfdjafjaaa( $_POST['admin_pass'] );
- $admin_pass = ;
- $config['host'] = bfdjafjaaa( $_POST['dbhost'] );
- $config['dbname'] = bfdjafjaaa( $_POST['dbname'] );
- $config['user'] = bfdjafjaaa( $_POST['dbuser'] );
- $config['pass'] = bfdjafjaaa( $_POST['dbpass'] );
- $config['mode'] = 'local';
- if ($log == '') {
- @jbhaebcdi( $config['host'], $config['user'], $config['pass'] );
- $link = ;
- if (!@bbbidggadj( $config['dbname'], $link )) {
- $log .= '<font color=red>ОШИБКА соединения к mysql, введите правильно данные</font><br>';
- }
- }
- dhhibbhajc( '' . 'SHOW TABLES FROM ' . $config['dbname'] );
- $tables = ;
- if (0 < ecfjgdcgdi( $tables )) {
- if (isset( $_POST['db_cleaner'] )) {
- hdgbfgffe( $tables );
- if ($results = ) {
- dhhibbhajc( '' . 'DROP TABLE ' . $results['0'] );
- }
- dhhibbhajc( '' . 'SHOW TABLES FROM ' . $config['dbname'] );
- $tables = ;
- if (0 < ecfjgdcgdi( $tables )) {
- echo 'ошибка очистки базы, очистите базу в ручном режиме и <a href="install.php">повторите установку</a>';
- exit( );
- }
- }
- else {
- echo '<font color=red>база содержит таблицы</font> скрипт можно устанавливать только в пустую базу данных<br>
- Очистите базу данных или создайте новую.<br>
- <a href="install.php">повторить</a>';
- exit( );
- }
- }
- if ($log != '') {
- echo $log;
- exit( );
- }
- if ($log == '') {
- if (( dhhibbhajc( 'CREATE TABLE IF NOT EXISTS `a_blocks` (
- `name` char(32) NOT NULL,
- `ads` text NOT NULL,
- UNIQUE KEY `name` (`name`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;' ) && dhhibbhajc( 'INSERT INTO `a_blocks` (`name`, `ads`) VALUES
- (\'tags\', \'\');
- ' ) )) {
- $log .= 'Таблица a_blocks - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица a_blocks - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `dtags` (
- `id` int(11) NOT NULL,
- `tid` mediumint(7) NOT NULL,
- `duration` smallint(4) NOT NULL,
- `clicks` mediumint(7) NOT NULL,
- `ctr` decimal(11,10) NOT NULL,
- `date` int(11) NOT NULL,
- UNIQUE KEY `id_tid_ctr` (`id`,`tid`,`ctr`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;' )) {
- $log .= 'Таблица dtags - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица dtags - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `ids` (
- `i` mediumint(10) NOT NULL AUTO_INCREMENT,
- `id` mediumint(10) NOT NULL,
- PRIMARY KEY (`i`),
- UNIQUE KEY `id` (`id`)
- ) ENGINE=MEMORY DEFAULT CHARSET=latin1;' )) {
- $log .= 'Таблица ids - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица ids - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `importer_logs` (
- `profile` varchar(255) NOT NULL,
- `num` int(11) NOT NULL,
- `date_import` int(11) NOT NULL,
- `status` set(\'ready\',\'running\',\'done\') NOT NULL DEFAULT \'ready\',
- KEY `index` (`profile`,`date_import`,`status`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица importer_logs - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица importer_logs - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `intraff` (
- `rid` char(32) NOT NULL,
- `ref` char(32) NOT NULL,
- `ip` char(15) NOT NULL,
- `time` decimal(15,4) NOT NULL,
- UNIQUE KEY `time` (`time`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица intraff - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица intraff - <font color=red>ошибка</font><br>';
- }
- if (( dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `niches` (
- `id` smallint(6) NOT NULL AUTO_INCREMENT,
- `name` varchar(22) NOT NULL,
- `title` varchar(255) NOT NULL,
- `desc` varchar(1024) NOT NULL,
- `keys` varchar(128) NOT NULL,
- `url` char(255) NOT NULL,
- `num` mediumint(7) NOT NULL,
- `skim_url` text NOT NULL,
- `skim_prc` int(3) NOT NULL,
- `thumb` varchar(128) NOT NULL,
- `clicks` int(8) NOT NULL,
- `ads` text NOT NULL,
- `hits` int(8) NOT NULL,
- `ctr` float NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `name_clicks_num` (`name`,`clicks`,`num`),
- UNIQUE KEY `name` (`name`),
- KEY `ctr` (`ctr`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' ) && dhhibbhajc( '
- INSERT INTO `niches` (`name`, `title`, `desc`, `keys`, `url`, `num`, `skim_url`, `skim_prc`, `thumb`, `clicks`, `ads`, `hits`, `ctr`)
- VALUES
- (\'main\', \'all tubes\', \'some desc\', \'*\', \'\', 0, \'a:1:{i:0;s:0:"";}\', 0, \'\', 0, \'\', 0, 0),
- (\'anal\', \'anal tubes\', \'some desc\', \'anal*\', \'\', 0, \'a:1:{i:0;s:0:"";}\', 0, \'\', 0, \'\', 0, 0),
- (\'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 (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `pstats` (
- `id` char(32) NOT NULL,
- `ids` text NOT NULL,
- `i` int(6) NOT NULL,
- `date` int(12) NOT NULL,
- UNIQUE KEY `id` (`id`),
- KEY `date` (`date`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица pstats - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица pstats - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `stats_d` (
- `day` int(8) NOT NULL,
- `hits` int(7) NOT NULL,
- `clicks` int(7) NOT NULL,
- `prod` float NOT NULL,
- `la` float NOT NULL,
- PRIMARY KEY (`day`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица stats_d - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица stats_d - <font color=red>ошибка</font><br>';
- }
- if (( dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `stats_h` (
- `hour` int(2) NOT NULL,
- `hits` int(6) NOT NULL DEFAULT \'0\',
- `clicks` int(6) NOT NULL DEFAULT \'0\',
- `prod` float NOT NULL DEFAULT \'0\',
- `la` float NOT NULL,
- UNIQUE KEY `hour` (`hour`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' ) && dhhibbhajc( '
- INSERT INTO `stats_h` (`hour`, `hits`, `clicks`, `prod`, `la`) VALUES
- (0, 0, 0, 0, 0),
- (1, 0, 0, 0, 0),
- (2, 0, 0, 0, 0),
- (3, 0, 0, 0, 0),
- (4, 0, 0, 0, 0),
- (5, 0, 0, 0, 0),
- (6, 0, 0, 0, 0),
- (7, 0, 0, 0, 0),
- (8, 0, 0, 0, 0),
- (9, 0, 0, 0, 0),
- (10, 0, 0, 0, 0),
- (11, 0, 0, 0, 0),
- (12, 0, 0, 0, 0),
- (13, 0, 0, 0, 0),
- (14, 0, 0, 0, 0),
- (15, 0, 0, 0, 0),
- (16, 0, 0, 0, 0),
- (17, 0, 0, 0, 0),
- (18, 0, 0, 0, 0),
- (19, 0, 0, 0, 0),
- (20, 0, 0, 0, 0),
- (21, 0, 0, 0, 0),
- (22, 0, 0, 0, 0),
- (23, 0, 0, 0, 0),
- (24, 0, 0, 0, 0);' ) )) {
- $log .= 'Таблица stats_h - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица stats_h - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `tags` (
- `id` int(11) NOT NULL,
- `tags` char(255) NOT NULL,
- `ctr` decimal(11,10) NOT NULL,
- `clicks` mediumint(9) NOT NULL,
- `duration` mediumint(9) NOT NULL,
- KEY `ctr` (`ctr`)
- ) ENGINE=MEMORY DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица tags - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица tags - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `tags_stats` (
- `tid` mediumint(7) NOT NULL AUTO_INCREMENT,
- `tag` varchar(12) NOT NULL,
- `num` mediumint(8) NOT NULL,
- PRIMARY KEY (`tag`),
- KEY `tid` (`tid`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица tags_stats - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица tags_stats - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `templates` (
- `name` varchar(32) NOT NULL,
- `template` MEDIUMTEXT NOT NULL,
- UNIQUE KEY `name` (`name`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица templates - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица templates - <font color=red>ошибка</font><br>';
- }
- bihdaihech( cfbhfgjbhi( 'files/index.tmpl.html' ) );
- $main_tmpl = ;
- bihdaihech( cfbhfgjbhi( 'files/sub.tmpl.html' ) );
- $main_sub_tmpl = ;
- bihdaihech( cfbhfgjbhi( 'files/video.tmpl.html' ) );
- $video_tmpl = ;
- dhhibbhajc( '' . 'INSERT INTO `templates` (`name`,`template`) VALUES (\'main\',\'' . $main_tmpl . '\')' );
- dhhibbhajc( '' . 'INSERT INTO `templates` (`name`,`template`) VALUES (\'sub\',\'' . $main_sub_tmpl . '\')' );
- dhhibbhajc( '' . 'INSERT INTO `templates` (`name`,`template`) VALUES (\'embed\',\'' . $video_tmpl . '\')' );
- dhhibbhajc( 'INSERT INTO `templates` (`name`,`template`) VALUES (\'embed_sub\',\'\')' );
- dhhibbhajc( ' INSERT INTO `templates` (`name` ,`template`) VALUES (\'categories\', \'\');' );
- dhhibbhajc( ' INSERT INTO `templates` (`name` ,`template` )VALUES (\'categories_sub\', \'\');' );
- dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `templates_history` (
- `time` int(11) NOT NULL,
- `marker` varchar(32) NOT NULL,
- `name` varchar(32) NOT NULL,
- `template` mediumtext NOT NULL
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' );
- dhhibbhajc( 'ALTER TABLE `templates_history` ADD UNIQUE `time_name`(
- `time` ,
- `name`
- );' );
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `th_hash` (
- `id` int(11) NOT NULL,
- `hash` char(32) NOT NULL,
- KEY `id` (`id`),
- UNIQUE KEY `hash` (`hash`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;
- ' )) {
- $log .= 'Таблица th_hash - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица th_hash - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `w_content` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `oid` char(40) NOT NULL,
- `kid` char(16) NOT NULL,
- `prov` char(32) NOT NULL,
- `url` char(255) NOT NULL,
- `title` char(255) NOT NULL,
- `title_pre_syn` char(255) NOT NULL,
- `desc` text NOT NULL,
- `tags` char(255) DEFAULT NULL,
- `thumbs` text NOT NULL,
- `flv_file` char(255) NOT NULL,
- `flv_hotlink_file` char(255) NOT NULL,
- `embed` text NOT NULL,
- `embed_code` text NOT NULL,
- `duration` int(5) NOT NULL,
- `date` int(11) NOT NULL,
- `date_import` int(11) NOT NULL,
- `r` mediumint(5) NOT NULL DEFAULT \'0\',
- `t_r` int(8) NOT NULL,
- `clicks` mediumint(7) NOT NULL,
- `t_clicks` int(8) NOT NULL,
- `l_clicks` mediumint(5) NOT NULL,
- `ctr` decimal(11,10) NOT NULL,
- `rs` tinyint(4) NOT NULL,
- `at` tinyint(2) NOT NULL,
- `t0_ctr` float NOT NULL,
- `t1_ctr` float NOT NULL,
- `t3_ctr` float NOT NULL,
- `status` enum(\'0\',\'1\',\'2\',\'6\',\'7\',\'8\',\'9\') NOT NULL,
- `preloaded` set(\'yes\',\'no\') NOT NULL DEFAULT \'no\',
- `lr` int(12) NOT NULL,
- `info` text NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `oid` (`oid`,`prov`),
- KEY `status` (`status`),
- KEY `r` (`r`,`clicks`,`ctr`,`at`),
- KEY `rs` (`rs`),
- KEY `ctr` (`ctr`),
- KEY `duration` (`duration`),
- KEY `preloaded` (`preloaded`),
- KEY `prov_status_ctr` (`prov`,`status`,`ctr`),
- KEY `date_import` (`date_import`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC PACK_KEYS=0;
- ' )) {
- $log .= 'Таблица w_content - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица w_content - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `_intraff` (
- `rid` char(32) NOT NULL,
- `ref` char(32) NOT NULL,
- `ip` char(15) NOT NULL,
- `time` decimal(15,4) NOT NULL
- ) ENGINE=MEMORY DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица _intraff - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица _intraff - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `_rids` (
- `rid` char(32) NOT NULL,
- `num` mediumint(4) NOT NULL,
- UNIQUE KEY `rid` (`rid`)
- ) ENGINE=MEMORY DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица _rids - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица _rids - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `_tags` (
- `id` int(11) NOT NULL,
- `tid` mediumint(7) NOT NULL,
- `duration` smallint(4) NOT NULL,
- `clicks` mediumint(7) NOT NULL,
- `ctr` decimal(11,10) NOT NULL,
- `date` int(11) NOT NULL,
- KEY `tid` (`tid`)
- ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;
- ' )) {
- $log .= 'Таблица _tags - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица _tags - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( '
- CREATE TABLE IF NOT EXISTS `jobs` (
- `name` char(32) NOT NULL,
- `time` CHAR( 15 ) NOT NULL DEFAULT \'0\',
- `status` tinyint(1) NOT NULL DEFAULT \'0\',
- PRIMARY KEY `name` (`name`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- ' )) {
- $log .= 'Таблица jobs - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица jobs - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( 'CREATE TABLE IF NOT EXISTS `search_keys`
- (
- `key` char(32) NOT NULL,
- `num` mediumint(6) NOT NULL,
- UNIQUE KEY `key` (`key`)
- )
- ENGINE=MEMORY DEFAULT CHARSET=latin1;' )) {
- $log .= 'Таблица search_keys - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица search_keys - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( 'CREATE TABLE IF NOT EXISTS `sponsors` (
- `prov` char(64) NOT NULL,
- `title` VARCHAR( 255 ) NOT NULL,
- `desc` text NOT NULL,
- `links` text NOT NULL,
- `ads` text NOT NULL,
- PRIMARY KEY (`prov`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;' )) {
- $log .= 'Таблица sponsors - <font color="green">ок</font><br>';
- }
- else {
- $log .= 'Таблица sponsors - <font color=red>ошибка</font><br>';
- }
- if (dhhibbhajc( 'INSERT INTO `sponsors` (
- `prov` ,
- `title` ,
- `desc` ,
- `links`,
- `ads`
- )
- VALUES (
- \'import_main\', \'\', \'\', \'\',\'\')' )) {
- $log .= '...insert in sponsors - <font color="green">ок</font><br>';
- }
- else {
- $log .= '...insert in sponsors - <font color=red>ошибка</font><br>';
- }
- if (djggccfei( 'files/config' )) {
- bdieicdhdc( 'files/config' );
- }
- if (djggccfei( 'files/update.inc' )) {
- bdieicdhdc( 'files/update.inc' );
- }
- cfjbfhahfe( '/(.*)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 (!caeceiehcj( 'files/config', cffafgagg( $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 (djggccfei( 'files/settings' )) {
- bdieicdhdc( 'files/settings' );
- }
- if (!caeceiehcj( 'files/settings', cffafgagg( $settings ) )) {
- $log .= '<font color=red>ошибка</font> создания настроек!<br>';
- }
- $auth['user'] = $admin_user;
- $auth['pass'] = $admin_pass;
- cffafgagg( $auth );
- $auth = ;
- if (djggccfei( 'files/auth' )) {
- bdieicdhdc( 'files/auth' );
- }
- if (!caeceiehcj( 'files/auth', $auth )) {
- $log .= '<font color=red>ошибка</font> создания файла аутенфикации!<br>';
- }
- echo $log;
- if (ddccahhejj( $log, 'ошибка' )) {
- echo '<br><b>скрипт не установлен, исправьте ошибки</b><br><a href="install.php">повторить</a>';
- exit( );
- }
- ddbbbdicgb( '.' );
- $path = ;
- ccecafhi( 'which php' );
- $php_path = ;
- if (!$php_path) {
- $php_path = '{YOUR PATH TO PHP}';
- }
- echo '<h4>скрипт успешно установлен</h4><br>';
- $htstr = '' . '
- Options -Indexes
- RewriteEngine On
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(duration|views|date)/?$ index.php?by=$1 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^t/([a-z\-]{3,64})/p([0-9]{1,3})/?$ index.php?t=$1&p=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^([a-z_-]{3,22})/p([0-9]{1,3})/?$ index.php?n=$1&p=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^([a-z_-]{3,22})/?$ index.php?n=$1 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^p([0-9]{1,3})/?$ index.php?n=main&p=$1 [L]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^t/([a-z\-]{3,64})/?$ index.php?t=$1 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^([a-z_-]{3,22})/(v[0-9]{1,9})/?$ index.php?n=$1&id=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(v[0-9]{1,9})/?$ index.php?id=$1 [L]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^t/([a-z\-]{3,64})/(v[0-9]{1,9})/?$ index.php?t=$1&id=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^.+/t/([a-z\-]{3,64})/(v[0-9]{1,9})/?$ index.php?t=$1&id=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^.+/([a-z_-]{3,22})/(v[0-9]{1,9})/?$ index.php?n=$1&id=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^.+/(v[0-9]{1,9})/?$ index.php?id=$1 [L]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^t/([a-z\-]{3,64})/(duration|views|date)/?$ index.php?t=$1&by=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^t/([a-z\-]{3,64})/p([0-9]{1,2})/(duration|views|date)/?$ index.php?t=$1&p=$2&by=$3 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^([a-z_-]{3,22})/p([0-9]{1,2})/(duration|views|date)/?$ index.php?n=$1&p=$2&by=$3 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^p([0-9]{1,3})/(duration|views|date)/?$ index.php?p=$1&by=$2 [L,NC]
- #RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^([a-z_-]{3,22})/(duration|views|date)/?$ index.php?n=$1&by=$2 [L,NC]
- ';
- if (dbbhcghbhc( )) {
- $htstr .= 'php_flag magic_quotes_gpc Off
- ';
- }
- $echo_htstr = '' . 'добавьте эти строки в htaccess. ModRewrite должен быть включен, для NGINX правила смотрите на ixi.tv<br>
- <textarea cols=100 rows=18>' . $htstr . '</textarea><br>';
- if (!djggccfei( '.htaccess' )) {
- if (!caeceiehcj( '.htaccess', $htstr )) {
- echo $echo_htstr;
- }
- }
- else {
- echo $echo_htstr;
- }
- $cron = '' . '* * * * * cd ' . $path . '/files && ' . $php_path . ' cron.php 1>/dev/null 2>/dev/null';
- cfichdaedd( '
- ', '', $cron );
- $cron = ;
- echo '' . '<h4>добавьте задание в крон <br>
- <textarea rows=1 cols=120>' . $cron . '</textarea><br><br>
- а затем перейдите в <a href=\'admin.php?e=s\' target=\'_blank\'>админку</a></h4>
- ';
- ceefcfbcde( cfbhfgjbhi( 'files/auth' ) );
- $auth = ;
- dcifigfaf( $auth['user'] );
- $user = ;
- dcifigfaf( $auth['pass'] );
- $pass = ;
- echo '' . '
- ваш логин ' . $user . '<br>
- ваш пароль ' . $pass . '<br>
- <br><br><br><br><br>
- ';
- @bdieicdhdc( 'install.php' );
- exit( );
- }
- }
- if ($_GET['proc'] == 'install') {
- $log = '';
- $_SERVER['HTTP_HOST'];
- $host = ;
- $url = 'http://tuberotator.com/src/install_tr.0.6.3i.tar';
- eaigfdfbgc( );
- $ch = ;
- cffehfebfc( $ch, CURLOPT_URL, $url );
- cffehfebfc( $ch, CURLOPT_TIMEOUT, 20 );
- cffehfebfc( $ch, CURLOPT_RETURNTRANSFER, 1 );
- gehebdebb( $ch );
- $archive = ;
- bddeihbaib( $ch );
- $info = ;
- iegadhbjb( $ch );
- if (( $info['http_code'] == '404' || $info['size_download'] < '100000' )) {
- echo '<br>Возможно ваш инсталлятор устарел, <a href="http://www.tuberotator.com/">скачайте</a> более свежий';
- exit( );
- }
- else {
- caeceiehcj( 'install_tr.tar', $archive );
- if (!djggccfei( 'install_tr.tar' )) {
- echo 'не могу сделать запись в текущую диру, проверьте права';
- exit( );
- }
- }
- jeffbiibh( 'which tar' );
- $tar_path = ;
- if (empty( $tar_path )) {
- $tar_path = 'tar';
- }
- jeffbiibh( '' . $tar_path . ' -xpf install_tr.tar' );
- bdieicdhdc( 'install_tr.tar' );
- if (( !djggccfei( 'files' ) || !djggccfei( 'files/.htaccess' ) )) {
- echo 'ошибка в структуре, возможно не хватает прав или проблема с tar';
- exit( );
- }
- echo 'структура успешно создана<br>';
- @bdieicdhdc( 'files/update.inc' );
- echo '' . '
- <form action=\'install.php\' method=\'POST\'>
- <h4>Логин и пароль для админки</h4>
- <input type=\'text\' name=\'admin_user\' value=\'' . $admin_user . '\'>User<br>
- <input type=\'password\' name=\'admin_pass\' value=\'' . $admin_pass . '\'> Pass<br><br><br>
- <h4>Установки MYSQL</h4>
- <input type=\'text\' name=\'dbhost\' value=\'localhost\'>Mysql Host<br>
- <input type=\'text\' name=\'dbname\'>Mysql DB Name<br>
- <input type=\'text\' name=\'dbuser\'>Mysql User<br>
- <input type=\'password\' name=\'dbpass\'>Mysql Pass<br>
- <input type=\'checkbox\' name=\'db_cleaner\'> очистить базу<br>
- <input type=\'hidden\' name=\'proc\' value=\'mysql_setup\'>
- <input type=\'submit\' value=\'next\'>
- </form>
- ';
- exit( );
- }
- echo '<a href="install.php?proc=install">Установить Tube Rotator</a><br>';
- echo '
- </body>
- </html>
- ';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement