Вход Регистрация
Файл: adultscript-2.0.3-pro/files/install/upgrade-1.2.2-to-2.0.0.php
Строк: 1360
<?php
define
('_VALID'true);
define('_INSTALL'true);
require 
'../libraries/bootstrap.php';
require 
'functions.php';

set_time_limit(0);

error_reporting(E_ALL);
ini_set('display_errors'1);

if (
ini_get('date.timezone') == '') {
    
date_default_timezone_set('Europe/Helsinki');
}

$uri get_uri();
define('INSTALL_URL'BASE_URL.'/install');

$errors            = array();
$finished        false;

$test              VF::factory('test');
$required         $test->get_required_results();
$optional        $test->get_optional_results();
$recommended    $test->get_recommended_results();

if (isset(
$_POST['submit-upgrade'])) {
    
$db    VF::factory('database');
    
    
$slugs    = array(
        
'categories-bottom',
        
'categories-left',
        
'channel-left',
        
'photo-album-category-bottom',
        
'photo-album-category-left',
        
'photo-album-slideshow-bottom',
        
'photo-album-slideshow-right',
        
'photo-albums-tag-bottom',
        
'photo-albums-tag-left',
        
'pornstar-browse-left',
        
'user-confirm',
        
'user-left',
        
'video-category-bottom',
        
'video-category-left',
        
'video-category-square',
        
'video-tag-bottom',
        
'video-tag-left',
        
'video-tag-square'
    
);

    
$ids    = array();

    foreach (
$slugs as $slug) {
        
$db->query("SELECT adv_group_id
                      FROM #__adv_groups
                      WHERE adv_group_slug  = '"
.$db->escape($slug)."'
                      LIMIT 1"
);
        if (
$db->affected_rows()) {
              
$ids[]    = (int) $db->fetch_field('adv_group_id');
        }
    }
    
    if (
$ids) {
        
$db->query("UPDATE #__adv
                      SET status = '0'
                      WHERE adv_group_id IN ("
.implode(','$ids).")");
        
$db->query("DELETE FROM #__adv_groups
                      WHERE adv_group_id IN ("
.implode(','$ids).")");
    }

    
$groups    = array(
//        array('name' => 'Community Left', 'slug' => 'community-left', 'desc' => 'Vertical Advertising (160x600, 200x600)'),
        
array('name' => 'Footer 4''desc' => 'Square Advertising (300x250)''slug' => 'footer-4'),
        array(
'name' => 'Frontpage Featured''desc' => 'Square Advertising (300x250)''slug' => 'frontpage-featured'),
        array(
'name' => 'Playlist Bottom''desc' => 'Horizontal Advertising (728x90, 728x160, responsive)''slug' => 'playlist-bottom'),
        array(
'name' => 'Playlist Right''desc' => 'Square Advertising (300x250)''slug' => 'playlist-right')
    );
    
    foreach (
$groups as $group) {
        
$db->query("INSERT INTO #__adv_groups
                      SET adv_group_name = '"
.$db->escape($group['name'])."',
                          adv_group_desc = '"
.$db->escape($group['desc'])."',
                          adv_group_slug = '"
.$db->escape($group['slug'])."'");
    }

    
$groups = array(
        
=> array ( 'slug' => 'channel-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
=> array ( 'slug' => 'channel-right''desc' => 'Square Advertising (300x250)', ),
        
=> array ( 'slug' => 'community-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
=> array ( 'slug' => 'footer''desc' => 'Horizontal Advertising (728x160, 900x160, 940x200, responsive)', ),
        
=> array ( 'slug' => 'footer-1''desc' => 'Square Advertising (300x250)', ),
        
=> array ( 'slug' => 'footer-2''desc' => 'Square Advertising (300x250)', ),
        
=> array ( 'slug' => 'footer-3''desc' => 'Square Advertising (300x250)', ),
        
=> array ( 'slug' => 'footer-4''desc' => 'Square Advertising (300x250)', ),
        
=> array ( 'slug' => 'frontpage-featured''desc' => 'Square Advertising (300x250)', ),
        
=> array ( 'slug' => 'frontpage-left''desc' => 'Vertical Advertising (160x728, 200x728)', ),
        
10 => array ( 'slug' => 'frontpage-recent''desc' => 'Square Advertising (300x250)', ),
        
11 => array ( 'slug' => 'frontpage-watched''desc' => 'Square Advertising (300x250)', ),
        
12 => array ( 'slug' => 'global-top''desc' => 'Horizontal Advertising (728x160, 900x160, 940x200, responsive)', ),
        
13 => array ( 'slug' => 'mobile-footer''desc' => 'Square Advertising (300x250, 300x100)', ),
        
14 => array ( 'slug' => 'mobile-header''desc' => 'Square Advertising (300x250, 300x100)', ),
        
15 => array ( 'slug' => 'mobile-inter''desc' => 'Square Advertising (300x250)', ),
        
16 => array ( 'slug' => 'mobile-photo-view''desc' => 'Square Advertising (300x250, 300x100)', ),
        
17 => array ( 'slug' => 'mobile-pornstar-view''desc' => 'Square Advertising (300x250, 300x100)', ),
        
18 => array ( 'slug' => 'mobile-video-view''desc' => 'Square Advertising (300x250, 300x100)', ),
        
19 => array ( 'slug' => 'photo-album-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
20 => array ( 'slug' => 'photo-album-right''desc' => 'Square Advertising (300x250)', ),
        
21 => array ( 'slug' => 'photo-albums-browse-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
22 => array ( 'slug' => 'photo-albums-browse-left''desc' => 'Vertical Advertising (160x728, 200x728)', ),
        
23 => array ( 'slug' => 'photo-right''desc' => 'Square Advertising (300x250) x 2', ),
        
24 => array ( 'slug' => 'player-embed''desc' => 'Square Advertising (300x250)', ),
        
25 => array ( 'slug' => 'player-embed-category''desc' => 'Square Advertising (300x250)', ),
        
26 => array ( 'slug' => 'player-overlay''desc' => 'Square Advertising (300x250)', ),
        
27 => array ( 'slug' => 'playlist-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
28 => array ( 'slug' => 'playlist-right''desc' => 'Square Advertising (300x250)', ),
        
29 => array ( 'slug' => 'pornstar-browse-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
30 => array ( 'slug' => 'pornstar-view''desc' => 'Square Advertising (300x250)', ),
        
31 => array ( 'slug' => 'pornstar-view-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
32 => array ( 'slug' => 'profile-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
33 => array ( 'slug' => 'profile-left''desc' => 'Vertical Advertising (160x728, 200x728)', ),
        
34 => array ( 'slug' => 'user-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
35 => array ( 'slug' => 'user-player''desc' => 'Square Advertising (300x250)', ),
        
36 => array ( 'slug' => 'video-browse-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
37 => array ( 'slug' => 'video-browse-left''desc' => 'Video Browse Left Advertising - Vertical', ),
        
38 => array ( 'slug' => 'video-browse-square''desc' => 'Video Browse Square - Square', ),
        
39 => array ( 'slug' => 'video-category-top''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
40 => array ( 'slug' => 'video-player''desc' => 'Horizontal Advertising (468x60, 600x150, 728x90, responsive)', ),
        
41 => array ( 'slug' => 'video-player-default''desc' => 'Horizontal Advertising (468x60, 600x150, 728x90, responsive)', ),
        
42 => array ( 'slug' => 'video-search-bottom''desc' => 'Horizontal Advertising (728x60, 728x160, responsive)', ),
        
43 => array ( 'slug' => 'video-search-square''desc' => 'Square Advertising (300x250)', ),
        
44 => array ( 'slug' => 'video-view-right''desc' => 'Square Advertising (300x250) x 2', ),
        
45 => array ( 'slug' => 'video-view-right-1''desc' => 'Square Advertising (300x250)', ),
        
46 => array ( 'slug' => 'video-view-right-2''desc' => 'Square Advertising (300x250)', ),
        
47 => array ( 'slug' => 'video-view-right-3''desc' => 'Square Advertising (300x250)', )
    );
    
    foreach (
$groups as $group) {
        
$db->query("UPDATE #__adv_groups
                    SET adv_group_desc = '"
.$db->escape($group['desc'])."'
                    WHERE adv_group_slug = '"
.$db->escape($group['slug'])."'
                    LIMIT 1"
);
    }
    
    
$db->query("ALTER TABLE #__channel ADD `logo` varchar(4) not null default '' after `thumb`");
    
$db->query("ALTER TABLE #__channel DROP COLUMN `adv_top_id`");
    
$db->query("ALTER TABLE #__channel DROP COLUMN `adv_left_id`");
    
$db->query("ALTER TABLE #__channel ADD `adv_right_id` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__channel ADD `adv_bottom_id` int(11) unsigned not null default '0'");
    
    
$cron    = array(
        array(
'module' => 'video''name' => 'Convert all FVL to MP4''slug' => 'video_convert''period' => 5'status' => 0),
        array(
'module' => 'video''name' => 'Extract All Player Thumbs''slug' => 'video_thumb_player''period' => 5'status' => 0),
        array(
'module' => 'video''name' => 'Extract All Thumbs''slug' => 'video_thumb''period' => 5'status' => ),
//        array('module' => 'photo', 'name' => 'Photo Views', 'slug' => 'photo_views', 'period' => 1440, 'status' => 1),
        
array('module' => 'core''name' => 'Sitemap''slug' => 'core_sitemap''period' => 1440'status' => 1),
        array(
'module' => 'video''name' => 'Video Sitemap''slug' => 'video_sitemap''period' => 1440'status' => 1)
    );
    
    foreach (
$cron as $script) {
        
$db->query("INSERT INTO #__cron
                    SET module = '"
.$db->escape($script['module'])."',
                        name = '"
.$db->escape($script['name'])."',
                        slug = '"
.$db->escape($script['slug'])."',
                        period = "
.$script['period'].",
                        status = "
.$script['status']);                        
    }    
    
    
$db->query("ALTER TABLE #__kb ADD `likes` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__kb ADD `dislikes` int(11) unsigned not null default '0'");

    
$db->query("ALTER TABLE #__message CHANGE `send_date` `send_time` int(11) unsigned not null default '0'");
    
    
$db->query("ALTER TABLE #__model ADD `likes` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__model ADD `total_subscribers` int(11) not null default '0'");
    
$db->query("ALTER TABLE #__model ADD `bg_ext` varchar(4) not null default ''");
    
$db->query("ALTER TABLE #__model_comments ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");    
    
$db->query("ALTER TABLE #__model_comments ADD `rated_by` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__model_comments CHANGE `add_date` `add_time` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("CREATE TABLE `#__model_comments_votes` (
    `comment_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `vote_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`comment_id`,`user_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"
);
    
$db->query("ALTER TABLE #__model_favorites ADD `add_time` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__model_rating DROP KEY `status`");
    
$db->query("ALTER TABLE #__model_rating CHANGE `add_date` `add_time` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__model_rating DROP COLUMN `status`");
    
$db->query("CREATE TABLE #__model_subscribers (
                `model_id` int(11) unsigned NOT NULL DEFAULT '0',
                `user_id` int(11) unsigned NOT NULL DEFAULT '0',
                PRIMARY KEY (`model_id`,`user_id`)
                ) ENGINE=MyISAM"
);
    
$db->query("ALTER TABLE #__model_views DROP KEY `view_date`");
    
$db->query("ALTER TABLE #__model_views CHANGE `view_date` `view_time` int(11) unsigned not null default '0'");
    
    
$db->query("INSERT INTO #__module
                SET name = 'profile',
                    description = 'User Profile Module',
                    slugs = 'users',
                    type = 'extension',
                    version = '2.0.0',
                    provider = 'adultforge',
                    add_date = '"
.date('Y-m-d H:i:s')."',
                    status = '1'"
);

    
$db->query("CREATE TABLE nuevo__invideo (
        `ID` int(11) NOT NULL AUTO_INCREMENT,
        `channel` int(11) NOT NULL DEFAULT '0',
        `invideo` text COLLATE utf8_unicode_ci NOT NULL,
        `active` tinyint(1) NOT NULL DEFAULT '0',
        PRIMARY KEY (`ID`)
        ) ENGINE=MyISAM"
);
    
$db->query("INSERT INTO `nuevo__invideo` VALUES (1,0,'',0);");    
    
$db->query("CREATE TABLE `nuevo__midroll` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `owner` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `channel` int(11) NOT NULL DEFAULT '0',
    `video_id` int(11) NOT NULL DEFAULT '0',
    `duration` int(11) NOT NULL DEFAULT '8',
    `title` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
    `description` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
    `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `link` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `target` varchar(6) COLLATE utf8_unicode_ci NOT NULL DEFAULT '_self',
    `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `added` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
    `expire` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
    `active` int(11) NOT NULL DEFAULT '0',
    `views` int(11) NOT NULL DEFAULT '0',
    `hits` int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM"
);

    
$db->query("CREATE TABLE `nuevo__midroll_settings` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `background` varchar(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '000000',
    `opacity` int(11) NOT NULL DEFAULT '50',
    `outline` tinyint(1) NOT NULL DEFAULT '1',
    `titlecolor` varchar(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'FFFFFF',
    `desccolor` varchar(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'BBBBBB',
    `linkcolor` varchar(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '7D9BBF',
    `hovercolor` varchar(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'FF0000',
    `aboutcolor` varchar(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '7D9BBF',
    `abouttext` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `abouturl` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `canclose` tinyint(1) NOT NULL DEFAULT '1',
    `defstart` int(11) NOT NULL DEFAULT '5',
    `defruntime` int(11) NOT NULL DEFAULT '10',
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("INSERT INTO `nuevo__midroll_settings` VALUES (1,'000000',50,1,'FFFFFF','BBBBBB','7D9BBF','FF0000','7D9BBF','','',1,5,10);");
    
    
$db->query("CREATE TABLE `nuevo__overlay` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `title` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `media` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `url` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `target` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '_blank',
    `start` int(11) NOT NULL DEFAULT '10',
    `pause` int(11) NOT NULL DEFAULT '0',
    `delay` int(11) NOT NULL DEFAULT '3',
    `runtime` int(11) NOT NULL DEFAULT '5',
    `active` tinyint(1) NOT NULL DEFAULT '0',
    `addtime` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `expire` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `owner` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `email` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `channel` int(11) NOT NULL DEFAULT '0',
    `views` int(11) NOT NULL DEFAULT '0',
    `hits` int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("CREATE TABLE `nuevo__player` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `regkey` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    `language` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en_US',
    `skin` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `playback_method` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'flash',
    `autostart` tinyint(1) NOT NULL DEFAULT '1',
    `stretching` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'aspect',
    `volume` int(11) NOT NULL DEFAULT '60',
    `usetooltips` tinyint(1) NOT NULL DEFAULT '1',
    `playbar` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'over',
    `related_show` tinyint(1) NOT NULL DEFAULT '1',
    `embed_show` tinyint(1) NOT NULL DEFAULT '1',
    `email_show` tinyint(1) NOT NULL DEFAULT '1',
    `share_show` tinyint(1) NOT NULL DEFAULT '1',
    `screen_show` tinyint(1) NOT NULL DEFAULT '1',
    `viral_menu` tinyint(1) NOT NULL DEFAULT '1',
    `viral_share` tinyint(1) NOT NULL DEFAULT '1',
    `viral_slomo` tinyint(1) NOT NULL DEFAULT '1',
    `viral_lights` tinyint(1) NOT NULL DEFAULT '0',
    `viral_offset` int(11) NOT NULL DEFAULT '10',
    `viral_align` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'right',
    `show_logo` tinyint(1) NOT NULL DEFAULT '1',
    `barlogo` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `logourl` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `logoalign` varchar(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'RT',
    `logooffsetx` int(11) NOT NULL DEFAULT '10',
    `logooffsety` int(11) NOT NULL DEFAULT '10',
    `menuitem` tinyint(1) NOT NULL DEFAULT '1',
    `menutext` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `menulink` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `replay_button` tinyint(1) NOT NULL DEFAULT '1',
    `zoom_button` tinyint(1) NOT NULL DEFAULT '1',
    `fullscreen_button` tinyint(1) NOT NULL DEFAULT '1',
    `volume_button` tinyint(1) NOT NULL DEFAULT '1',
    `size_button` tinyint(1) NOT NULL DEFAULT '1',
    `onclick` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'play',
    `linktarget` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '_self',
    `statscript` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `rss_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `mailsubject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Cool video!',
    `mailbody` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Check this video:',
    `player_width` int(11) NOT NULL DEFAULT '650',
    `player_width_method` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'px',
    `player_height` int(11) NOT NULL DEFAULT '370',
    `player_height_method` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'px',
    `playback_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'flash',
    `related` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `slidebackcolor` varchar(6) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'e5e5e5',
    `slidetextcolor` varchar(6) COLLATE utf8_unicode_ci NOT NULL DEFAULT '000000',
    `slideversion` tinyint(1) NOT NULL DEFAULT '1',
    `plugin_preroll` tinyint(1) NOT NULL DEFAULT '0',
    `plugin_midroll` tinyint(1) NOT NULL DEFAULT '0',
    `plugin_overlay` tinyint(1) NOT NULL DEFAULT '0',
    `plugin_ticker` tinyint(1) NOT NULL DEFAULT '0',
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("INSERT INTO `nuevo__player` VALUES (1,'OG1icEJYWnd4V1oyVkdaMEJYYXlOMmM','en_US','','flash',0,'aspect',60,1,'over',1,1,1,1,1,1,1,1,0,10,'right',1,'','','','RT',10,10,1,'localhost/asp20','http://localhost/asp20',1,1,1,1,1,'play','_self','http://localhost/asp20/moduleas/video/player/nuevo/nuevo/stat.php','','Cool video!','Check this video:',100,'%',500,'px','flash','','e5e5e5','000000',1,0,0,0,0),(2,'OG1icEJYWnd4V1oyVkdaMEJYYXlOMmM','en_US','','flash',0,'aspect',60,1,'over',1,1,1,1,1,1,1,1,0,10,'right',1,'','','http://localhost/asp20','RT',10,10,1,'localhost/asp20','http://localhost/asp20',1,1,1,1,1,'link','_self','http://localhost/asp20/moduleas/video/player/nuevo/nuevo/stat.php','','Cool video!','Check this video:',540,'px',380,'px','flash','','e5e5e5','000000',1,0,0,0,0),(3,'OG1icEJYWnd4V1oyVkdaMEJYYXlOMmM','en_US','','flash',0,'aspect',60,1,'over',1,1,1,1,1,1,1,1,0,10,'right',1,'','','http://localhost/asp20','RT',10,10,1,'localhost/asp20','http://localhost/asp20',1,1,1,1,1,'play','_self','http://localhost/asp20/moduleas/video/player/nuevo/nuevo/stat.php','','Cool video!','Check this video:',650,'px',370,'px','flash','','e5e5e5','000000',1,0,0,0,0),(4,'OG1icEJYWnd4V1oyVkdaMEJYYXlOMmM','en_US','','flash',0,'aspect',60,1,'over',1,1,1,1,1,1,1,1,0,10,'right',1,'','','http://localhost/asp20','RT',10,10,1,'localhost/asp20','http://localhost/asp20',1,1,1,1,1,'play','_self','http://localhost/asp20/moduleas/video/player/nuevo/nuevo/stat.php','','Cool video!','Check this video:',650,'px',370,'px','flash','','e5e5e5','000000',1,0,0,0,0);");

    
$db->query("CREATE TABLE `nuevo__preroll` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'preroll',
    `channel` int(11) NOT NULL DEFAULT '0',
    `video_id` int(11) NOT NULL DEFAULT '0',
    `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `html5` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `link` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `target` varchar(6) COLLATE utf8_unicode_ci NOT NULL DEFAULT '_self',
    `runtime` int(11) NOT NULL DEFAULT '10',
    `skip` int(11) NOT NULL DEFAULT '0',
    `owner` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `added` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
    `expire` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
    `active` int(11) NOT NULL,
    `hits` int(11) NOT NULL DEFAULT '0',
    `views` int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("CREATE TABLE `nuevo__ticker` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `content` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `start` int(11) NOT NULL DEFAULT '3',
    `runtime` int(11) NOT NULL DEFAULT '10',
    `url` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `target` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '_blank',
    `position` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'top',
    `addtime` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `active` tinyint(11) NOT NULL DEFAULT '0',
    `opacity` int(11) NOT NULL DEFAULT '50',
    `scrollspeed` int(11) NOT NULL DEFAULT '5',
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("ALTER TABLE #__photo ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__photo ADD `add_time` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__photo_albums ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");    
    
$db->query("ALTER TABLE #__photo_categories ADD `auto_term` varchar(255) NOT NULL DEFAULT ''");
    
$db->query("ALTER TABLE #__photo_comments ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");    
    
$db->query("ALTER TABLE #__photo_comments ADD `rated_by` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__photo_comments CHANGE `add_date` `add_time` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("CREATE TABLE `#__photo_comments_votes` (
    `comment_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `vote_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`comment_id`,`user_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"
);
    
$db->query("ALTER TABLE #__photo_rating DROP KEY `status`");
    
$db->query("ALTER TABLE #__photo_rating DROP COLUMN `add_date`");
    
$db->query("ALTER TABLE #__photo_rating DROP COLUMN `status`");
    
$db->query("ALTER TABLE #__photo_rating ADD `add_time` int(11) unsigned not null default '0'");
    
$db->query("CREATE TABLE `#__photo_search` (
    `keyword` varchar(30) NOT NULL DEFAULT '',
    `hits` bigint(20) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`keyword`,`hits`)
    ) ENGINE=MyISAM"
);
    
    
$config = array(
        
'autoplay'    => 1,
        
'url'        => '',
        
'position'    => 'bottom-right'
    
);
    
    
$config serialize($config);
    
    
$db->query("ALTER TABLE #__player ADD `type` tinyint(1) not null default '0' AFTER `description`");
    
$db->query("INSERT INTO #__player
                SET name = 'flowplayer5',
                    description = 'Flow Player HTML5',
                    type = 1,
                    config = '"
.$db->escape($config)."',
                    config_cache = '"
.$db->escape($config)."',
                    status = '1'"
);
    
$db->query("INSERT INTO #__player
                SET name = 'videojs',
                    description = 'Video JS Player',
                    type = 1,
                    config = '"
.$db->escape($config)."',
                    config_cache = '"
.$db->escape($config)."',
                    status = '1'"
);
    
    
    
$db->query("ALTER TABLE #__playlist ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__playlist ADD `rated_by` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__playlist ADD `total_favorites` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__playlist ADD `total_comments` int(11) NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__playlist ADD KEY `add_time` (`add_time`)");
    
$db->query("ALTER TABLE #__playlist ADD KEY `likes` (`likes`)");
    
$db->query("ALTER TABLE #__playlist ADD KEY `total_views` (`total_views`)");
    
$db->query("ALTER TABLE #__playlist ADD KEY `total_favorites` (`total_favorites`)");
    
$db->query("CREATE TABLE `#__playlist_comments` (
    `comment_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `parent_id` int(11) unsigned NOT NULL DEFAULT '0',
    `playlist_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `nickname` varchar(100) NOT NULL DEFAULT '',
    `ip` int(11) unsigned NOT NULL DEFAULT '0',
    `comment` text NOT NULL,
    `likes` int(11) unsigned NOT NULL DEFAULT '0',
    `rated_by` int(11) unsigned NOT NULL DEFAULT '0',
    `add_time` int(11) unsigned NOT NULL DEFAULT '0',
    `spam` int(11) unsigned NOT NULL DEFAULT '0',
    `status` enum('0','1') NOT NULL DEFAULT '1',
    PRIMARY KEY (`comment_id`),
    KEY `parent_id` (`parent_id`),
    KEY `playlist_id` (`playlist_id`),
    KEY `user_id` (`user_id`),
    KEY `status` (`status`)
    ) ENGINE=MyISAM"
);
    
$db->query("CREATE TABLE `#__playlist_comments_votes` (
    `comment_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `vote_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`comment_id`,`user_id`)
    ) ENGINE=MyISAM"
);
    
$db->query("CREATE TABLE `#__playlist_favorites` (
    `playlist_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`playlist_id`,`user_id`)
    ) ENGINE=MyISAM"
);
    
$db->query("CREATE TABLE `#__playlist_rating` (
    `rating_id` bigint(10) NOT NULL AUTO_INCREMENT,
    `playlist_id` int(11) unsigned NOT NULL DEFAULT '0',
    `voter_id` int(11) unsigned NOT NULL DEFAULT '0',
    `voter_ip` int(11) unsigned NOT NULL DEFAULT '0',
    `rating` float NOT NULL DEFAULT '0',
    `add_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`rating_id`),
    KEY `playlist_id` (`playlist_id`),
    KEY `voter_id` (`playlist_id`,`voter_id`),
    KEY `voter_ip` (`playlist_id`,`voter_ip`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("CREATE TABLE `#__words` (
    `word_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `word` varchar(100) NOT NULL DEFAULT '',
    PRIMARY KEY (`word_id`),
    UNIQUE KEY `word` (`word`)
    ) ENGINE=InnoDB"
);

    
$db->query("CREATE TABLE `#__synonyms` (
    `word_id` int(11) unsigned NOT NULL DEFAULT '0',
    `synonym_id` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`word_id`,`synonym_id`),
    KEY `synonym_id` (`synonym_id`),
    CONSTRAINT `synonyms_ibfk_1` FOREIGN KEY (`word_id`) REFERENCES `#__words` (`word_id`) ON DELETE CASCADE,
    CONSTRAINT `synonyms_ibfk_2` FOREIGN KEY (`synonym_id`) REFERENCES `#__words` (`word_id`) ON DELETE CASCADE
    ) ENGINE=InnoDB"
);

    
$config = array(
        
'categories_left'       => 1,
        
'categories_popular'    => 0,
        
'channels_popular'      => 0,
        
'pornstars_popular'     => 0,
        
'tags_popular'          => 0,
        
'albums_recent'         => 0,
        
'albums_popular'        => 0,
        
'video_categories_left' => 1,
        
'photo_categories_left' => 1,
        
'javascript_code'       => '',
        
'colors'                => 'light',
        
'logo_url'              => BASE_URL.'/templates/defboot/images/logo.png',
        
'links'                 => '',
        
'sharing_links'         => '',
        
'sharing_code'          => '',
        
'facebook'              => '',
        
'twitter'               => '',
        
'google_plus'           => '',
        
'thumblr'               => '',
        
'pinterest'             => '',
        
'instagram'             => ''
    
);
    
    
$config serialize($config);

    
$db->query("INSERT INTO #__template
                SET name = 'defboot',
                    description = 'Default Bootstrap Template',
                    version = '1.0.0',
                    provider = 'adultforge',
                    type = 'frontend',
                    config = '"
.$db->escape($config)."',
                    config_cache = '"
.$db->escape($config)."',
                    add_date = '"
.date('Y-m-d H:i:s')."',
                    status = '1'"
);

    
$db->query("ALTER TABLE #__user_activity ADD total_profile_comments int(11) not null default '0'");
    
$db->query("ALTER TABLE #__user_activity ADD total_photo_comments int(11) not null default '0'");
    
$db->query("ALTER TABLE #__user_activity ADD total_playlists int(11) not null default '0'");
    
$db->query("ALTER TABLE #__user_activity ADD total_playlist_comments int(11) not null default '0'");
    
$db->query("ALTER TABLE #__user_comments ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");    
    
$db->query("ALTER TABLE #__user_comments ADD `rated_by` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__user_comments CHANGE `add_date` `add_time` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("CREATE TABLE `#__user_comments_votes` (
    `comment_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `vote_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`comment_id`,`user_id`)
    ) ENGINE=MyISAM"
);
    
    
$db->query("ALTER TABLE #__video ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__video ADD `slideversion` int(11) NOT NULL DEFAULT '2'");
    
$db->query("ALTER TABLE #__video ADD `slidenum` int(11) NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__video ADD `slideoffset` int(11) NOT NULL DEFAULT '5'");
    
$db->query("ALTER TABLE #__video_comments CHANGE `ip` `ip` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__video_comments ADD `likes` int(11) unsigned NOT NULL DEFAULT '0'");    
    
$db->query("ALTER TABLE #__video_comments ADD `rated_by` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("ALTER TABLE #__video_comments CHANGE `add_date` `add_time` int(11) unsigned NOT NULL DEFAULT '0'");
    
$db->query("CREATE TABLE `#__video_comments_votes` (
    `comment_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `vote_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`comment_id`,`user_id`)
    ) ENGINE=MyISAM"
);
    
$db->query("CREATE TABLE `#__video_cron` (
    `video_id` int(11) unsigned NOT NULL DEFAULT '0',
    `thumb` tinyint(1) unsigned NOT NULL DEFAULT '0',
    `player` tinyint(1) unsigned NOT NULL DEFAULT '0',
    `flv` tinyint(1) unsigned NOT NULL DEFAULT '0',
    `slide` tinyint(1) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`video_id`)
    ) ENGINE=MyISAM"
);
    
$db->query("DROP TABLE #__video_history");
    
$db->query("CREATE TABLE `#__video_history` (
    `video_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `view_time` int(11) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`video_id`,`user_id`,`view_time`)
    ) ENGINE=InnoDB"
);    
    
$db->query("ALTER TABLE #__video_rating DROP KEY `status`");
    
$db->query("ALTER TABLE #__video_rating CHANGE `add_date` `add_time` int(11) unsigned not null default '0'");
    
$db->query("ALTER TABLE #__video_rating DROP COLUMN `status`");
    
$db->query("CREATE TABLE `#__video_search` (
    `keyword` varchar(30) NOT NULL DEFAULT '',
    `hits` bigint(20) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`keyword`,`hits`)
    ) ENGINE=MyISAM"
);
    
$db->query("CREATE TABLE `#__video_views` (
    `video_id` int(11) unsigned NOT NULL DEFAULT '0',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0',
    `ip` int(10) unsigned NOT NULL DEFAULT '0',
    `view_time` int(11) unsigned NOT NULL DEFAULT '0'
    ) ENGINE=InnoDB"
);
    
    
    
$db->query("
        UPDATE #__language_files
        SET type = 'frontend'
        WHERE type = 'profile'"
    
);

    
$db->query("SELECT code FROM #__language");
    
$rows $db->fetch_rows();
    foreach (
$rows as $row) {
        
$code $row['code'];
        
        
language_add($code'frontend''categories', array(
              
'categories-meta-desc-videos' => 'Categories With The Most Videos. %s!',
              
'categories-meta-title-videos' => 'Categories With The Most Videos at %s',
              
'categories-title-videos' => 'Categories With The Most Videos',
              
'categories-title-popular' => 'Popular Video Categories'
        
), null);

        
language_add($code'frontend''channel', array(
              
'with-letter' => 'Starting With Letter %s',
              
'unsubscribe-help' => 'Unsubscribe from this channel!',
              
'subscribe-help' => 'Subscribe to this channel!',
              
'dislike-help' => 'I dislike this channel!',
              
'like-help' => 'I like this channel!'
        
), null);

        
language_add($code'frontend''community', array(
              
'interested-invalid' => 'Invalid interest!',
              
'invalid-country' => 'Invalid country!',
              
'invalid-relation' => 'Invalid relation!',
              
'invalid-gender' => 'Invalid gender!',
              
'has-avatar' => 'Has avatar?',
              
'is-online' => 'Is online?'
        
), null);

        
language_add($code'frontend''feedback', array(
              
'what-is' => 'What is %s?',
              
'click-here' => 'Click Here',
              
'check-faq-txt' => 'Before sending feedback, you might want to check out our FAQ page. This may answer questions you have about the site, without having to type us a full email.To visit the FAQ page, please %s.',
              
'check-faq-title' => 'Have you checked out our FAQ yet?',
              
'verification' => 'Verification'
        
), null);

        
language_add($code'frontend''frontpage', array(
               
'popular-models' => 'Popular Models',
               
'popular-channels' => 'Popular Channels',
               
'popular-categories' => 'Popular Categories',
               
'no-featured' => 'No featured videos!'
        
), null);

        
language_add($code'frontend''global', array(
            
'visit' => 'Visit',
            
'contact-us' => 'Contact Us',
            
'content-partners' => 'Content Partners',
            
'webmasters' => 'Webmasters',
            
'advertise' => 'Advertise',
            
'mobile' => 'Mobile',
            
'reset' => 'Reset',
            
'letter' => 'Letter',
            
'comment' => 'Comment',
            
'unsubscribe' => 'Unsubscribe',
            
'subscribe' => 'Subscribe',
            
'hd' => 'HD',
            
'related-searches' => 'Related Searches',
            
'relevant' => 'Relevant',
            
'duration' => 'Duration',
            
'long' => 'Long',
            
'medium' => 'Medium',
            
'short' => 'Short',
            
'this-year' => 'This Year',
            
'this-month' => 'This Month',
            
'this-week' => 'This Week',
            
'post-comment' => 'Post Comment',
            
'vote-thanks' => 'Thanks for voting!',
            
'vote-already' => 'Already voted!',
            
'vote-down' => 'Vote Down!',
            
'vote-up' => 'Vote Up!',
            
'show-more' => 'Show More',
            
'more-comments' => 'More Comments',
            
'characters-left' => 'characters left.',
            
'guys' => 'Guys',
            
'both' => 'Both',
            
'upload-photos' => 'Upload Photos',
            
'upload-videos' => 'Upload Videos',
            
'logout' => 'Logout',
            
'close' => 'Close',
            
'login-failed' => 'Invalid username and/or password!',
            
'login-success' => 'Login successful!',
            
'login-empty' => 'Please enter your username and password!',
            
'download' => 'Download',
            
'thumbs' => 'Thumbs',
            
'comments' => 'Comments',
            
'sign-up' => 'Sign Up',
            
'create-playlists' => 'Create Playlists',
            
'add-favorites' => 'Add Videos To Your Favorites',
            
'post-comments' => 'Post Comments',
            
'create-your-profile' => 'HomCreate Your Profile',
            
'upload-videos-photos' => 'Upload Videos & Photos',
            
'not-a-member' => 'Not a member yet?',
            
'my-favorite-photos' => 'My Favorite Photos',
            
'my-albums' => 'My Albums',
            
'my-favorite-videos' => 'My Favorite Videos',
            
'my-playlists' => 'My Playlists',
            
'edit-picture' => 'Edit Profile Picture',
            
'messages' => 'Messages',
            
'my-comments' => 'My Comments',
            
'my-subscribers' => 'My Subscribers',
            
'my-subscriptions' => 'My Subscriptions',
            
'my-friends' => 'My Friends',
            
'my-view-history' => 'My View History',
            
'my-videos' => 'My Videos',
            
'edit-advertising' => 'Edit Advertising',
            
'edit-notifications' => 'Edit Notifications',
            
'edit-preferences' => 'Edit Preferences',
            
'edit-profile' => 'Edit Profile',
            
'edit-account' => 'Edit Account',
            
'downloaded' => 'Downloaded',
            
'relevance' => 'Relevance',
            
'favorited' => 'Favorited',
            
'all-time' => 'All Time',
            
'yesterday' => 'Yesterday',
            
'today' => 'Today',
            
'remember' => 'Remember me on this computer?',
            
'confirm-question' => 'Did not receive confirmation email?',
            
'lost-question' => 'Lost your username and/or password?',
            
'login-title' => 'Member Login'        
        
), null);

        
language_add($code'frontend''link', array(
               
'rule-5' => 'Text for rule 5!',
               
'rule-4' => 'Text for rule 4!',
               
'rule-3' => 'Text for rule 3!',
               
'rule-2' => 'Text for rule 2!',
               
'rule-1' => 'Text for rule 1!'
        
), null);

        
language_add($code'frontend''mobile', array(
              
'playlist-meta-desc' => 'Watch %s Video Playlist at %s.',
              
'playlist-meta-title' => '%s - Video Playlist - %s',
              
'playlist-play' => 'Play Playlist',
              
'playlists-meta-keys' => 'playlists',
              
'playlists-meta-desc' => 'Playlists%s. %s',
              
'playlists-meta-title' => 'Playlists%s - %s',
              
'playlists-title' => 'Playlists%s',
              
'playlist-create-success' => 'Playlist created and video added!',
              
'playlist-create' => 'Create Playlist',
              
'playlist-invalid' => 'Invalid playlist type!',
              
'playlist-empty' => 'Please add a name for your playlist!',
              
'playlist-select-success' => 'Video added to selected playlist!',
              
'playlist-none' => 'You have not created any playlists! Create your first playlist below!',
              
'playlist-select' => 'Select Playlist',
              
'playlist-add' => 'Add video to playlist',
              
'playlist-login' => 'Please login to add videos to playlists!',
              
'inter-counter' => 'Continue to watch video',
              
'no-results' => 'No content was found while searching for %s!',
              
'video-deleted' => 'This video was deleted! Please chose another video from below!'        
        
), null);
        
        
language_add($code'frontend''photo', array(
           
'photo-bbcode' => 'BB Code for forums',
           
'photo-link' => 'Link to this photo',
           
'edit-cover-help' => 'Click on a thumb to use it as a cover for this album!',
           
'album-edit-password' => 'Enter a password to require users to enter a password before viewing this album!',
           
'album-edit-passworded' => 'This albums is password protected!',
           
'edit-album' => 'Edit Photo Album',
           
'photo-results' => 'Photo Results',
           
'no-albums-found' => 'No photo albums found for: %s.',
           
'report-photo' => 'Report Photo',
           
'report-help' => 'Flag this photo!',
           
'share-help' => 'Share this photo!',
           
'dislike-help' => 'I dislike this photo!',
           
'like-help' => 'I like this photo!',
           
'album-friends' => 'This album is private! You must be friends with %s to view this album!',
           
'photo-friends' => 'This photo is privated! You must be friends with %s to view this photo!',
           
'select-files' => 'Select File(s)'        
        
), null);

        
language_add($code'frontend''pornstar', array(
              
'no-query' => 'Please enter your search keyword!',
              
'model-results' => 'Model Results',
              
'no-models-found' => 'No videos found for: %s.',
              
'unsubscribe-help' => 'Unsubscribe from this model!',
              
'subscribe-help' => 'Subscribe to this model!',
              
'subscribe-already' => 'You are already subscribed to this model!',
              
'favorite-already' => 'Model already in your favorites list!',
              
'about' => 'About',
              
'bio' => 'Bio',
              
'nationality' => 'Nationality',
              
'favorite-help' => 'Add this model to your favorites list!',
              
'dislike-help' => 'I dislike this model!',
              
'like-help' => 'I like this model!'
        
), null);

        
language_add($code'frontend''profile', array(
            
'show-less' => 'Show Less',
            
'alt-avatar' => '%s's Avatar',
            '
profile-title' => '%s's Profile'
        
), null);

        
language_add($code'frontend''user', array(
            
'reply-to' => 'Reply to %s:',
            
'messages-from' => 'Messages from %s:',
            
'spam-messages-confirm' => 'Are you sure you want to make this user as spam?',
            
'delete-messages-confirm' => 'Are you sure you want to delete all messages from this user?',
            
'read' => 'Read',
            
'profile-comments' => 'Profile Comments',
            
're' => 'Re',
            
'comment-approve-login' => 'Please login to approve comments!',
            
'comment-approve-success' => 'Comment approved!',
            
'crop' => 'Crop',
            
'zoom-out' => 'Zoom Out',
            
'zoom-in' => 'Zoom In',
            
'fit' => 'Fit',
            
'avatar-new' => 'New Avatar',
            
'avatar-success-crop' => 'Avatar uploaded! Please crop your avatar below!',
            
'history-delete-login' => 'Please login to delete videos from your watched videos list!',
            
'invalid-video' => 'Invalid video!',
            
'history-delete-success' => 'Video removed from your watched videos list!',
            
'signup-meta-title' => 'Create Account - %s',
            
'existing-login' => 'Existing users can login here!',
            
'video-views' => 'Video Views',
            
'uploaded-photos' => 'Uploaded Photos',
            
'uploaded-albums' => 'Uploaded Albums',
            
'subscriptions' => 'Subscriptions',
            
'subscribers' => 'Subscribers',
            
'profile-viewed' => 'Profile Viewed',
            
'video-comments' => 'Video Comments',
            
'watched-videos' => 'Watched Videos',
            
'uploaded-videos' => 'Uploaded Videos',
            
'upgrade-to-premium' => 'Upgrade To Premium',
            
'manage' => 'Manage',
            
'account' => 'Account'
        
), null);

        
language_add($code'frontend''video', array(
            
'upload-limit' => 'You are only allowed to upload %s videos per day!',
            
'playlist-name-used' => 'You already have a playlist with the same name!',
            
'playlist-create-new' => 'Create New Playlist',
            
'playlist-add' => 'Add to Playlist',
            
'favorite-login' => 'Please %s Login%s to add videos to your favorites list!',
            
'playlist-login' => 'Please %s Login%s to add videos to playlists!',
            
'no-playlists' => 'No playlists yet!',
            
'playlists-title' => '%s Playlists%s',
            
'playlists-meta-title' => '%s Playlists%s - %s',
            
'playlist-favorite-login' => 'Please login to favorite playlists!',
            
'playlist-favorite-own' => 'You cannot favorite your own playlist!',
            
'playlist-favorite-already' => 'You already favorited this playlist!',
            
'playlist-updated' => 'Playlist updated!',
            
'playlist-type-invalid' => 'Invalid playlist type!',
            
'playlist-name-length' => 'Playlist name cannot contain more than 99 characters!',
            
'playlist-name-empty' => 'Playlist name cannot be empty!',
            
'playlist-edit' => 'Edit Playlist',
            
'playlist-deleted' => 'Playlist deleted!',
            
'playlist-play' => 'Play Playlist',
            
'playlist-view' => 'View Playlist',
            
'playlist-meta-desc' => 'Watch %s Video Playlist at %s.',
            
'playlist-meta-title' => '%s - Video Playlist - %s',
            
'playlist-link' => 'Link to this playlist',
            
'playlist-videos' => 'Playlist Videos',
            
'dislike-help' => 'I dislike this video!',
            
'like-help' => 'I like this video!',
            
'playlist-dislike-help' => 'I dislike this playlist!',
            
'playlist-like-help' => 'I like this playlist!',
            
'playlist-share-help' => 'Share this playlist!',
            
'playlist-favorite-help' => 'Add this playlist to your favorites list!',
            
'playlist-shuffle' => 'Shuffle',
            
'playlist-prev' => 'Prev Video',
            
'playlist-next' => 'Next Video',
            
'playlist-help' => 'Add this video to a playlist!',
            
'playlist-none' => 'You didnt create any playlists yet! Create your first playlist!',
            
'video-results' => 'Video Results',
            
'no-query' => 'Please enter your search keyword!',
            
'no-videos-found' => 'No videos found for: %s.',
            
'select-file' => 'Select File',
            
'more-comments' => 'More Comments',
            
'more-related' => 'More Related Videos',
            
'download-help' => 'Download this video!',
            
'report-help' => 'Report this video!',
            
'share-help' => 'Share or embed this video!',
            
'favorite-already' => 'Video already in your favorites list!',
            
'view-access' => 'Please login as a %s user to watch videos!',
            
'download-access' => 'Please login as a %s user to download videos!',
            
'Views' => 'Views',
            
'report-video' => 'Report Video',
            
'related-videos' => 'Related Videos',
            
'long-desc' => 'Long (>= 20 mins)',
            
'medium-desc' => 'Medium (5-20 mins)',
            
'short-desc' => 'Short (<= 5 mins)',
            
'all-durations' => 'All Durations',
            
'tags-length' => 'Tags must contain at least %s and no more than %s characters!',
            
'browse-title' => '%s Videos%s',
            
'browse-meta-title' => '%s Videos%s - %s'
        
), null);
    }
    
    
$files    VFolder::files(TMP_DIR.'/cache/language');
    foreach (
$files as $file) {
        if (
$file != 'index.php' && $file != 'index.html') {
            
VFile::delete($file);
        }
    }
    
    
update_config(array(
        
'template'             => 'defboot',
        
'multi_language'     => 1
    
));
    
    
$config    VCfg::group('module.video');
    
$config['thumb_slide']                = 1;
    
$config['playlists']                = 1;
    
$config['playlists_per_page']        = 20;
    
$config['playlist_rating']            = 1;
    
$config['playlist_rating_count']    = 'ip';
    
$config['playlist_comments']        = 1;
    
$config['playlist_allow_comment']    = 1;
    
$config['playlist_comments_per_page']    = 10;
    
$config['thumb_width']                = 240;
    
$config['thumb_height']                = 180;
    
    
$db->query("UPDATE #__module
                SET config = '"
.$db->escape(serialize($config))."',
                    config_cache = '"
.$db->escape(serialize($config))."'
                WHERE name = 'video'
                LIMIT 1"
);
                
    
VCfg::cache_del('video''module');
    
VF::cache_del('video''module');

    
$config VCfg::group('module.photo');
    
$config['cover_width']    = 200;
    
$config['cover_height']    = 250;
    
$config['thumb_width']    = 200;
    
$config['thumb_height']    = 250;

    
$db->query("UPDATE #__module
                SET config = '"
.$db->escape(serialize($config))."',
                    config_cache = '"
.$db->escape(serialize($config))."'
                WHERE name = 'photo'
                LIMIT 1"
);

    
VCfg::cache_del('photo''module');
    
VF::cache_del('photo''module');

    
$config VCfg::group('module.pornstar');
    
$config['track_views']    = 0;

    
$db->query("UPDATE #__module
                SET config = '"
.$db->escape(serialize($config))."',
                    config_cache = '"
.$db->escape(serialize($config))."'
                WHERE name = 'pornstar'
                LIMIT 1"
);

    
VCfg::cache_del('pornstar''module');
    
VF::cache_del('pornstar''module');

    
$config VCfg::group('module.mobile');
    
$config['player']    = 1;

    
$db->query("UPDATE #__module
                SET config = '"
.$db->escape(serialize($config))."',
                    config_cache = '"
.$db->escape(serialize($config))."'
                WHERE name = 'mobile'
                LIMIT 1"
);

    
VCfg::cache_del('mobile''module');
    
VF::cache_del('mobile''module');

    
$finished TRUE;    
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
    <title>Adult Script Pro Installation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="<?php echo INSTALL_URL ?>/css/style.css?v1" type="text/css" media="all" />
    <script type="text/javascript">
    var base_url = "<?php echo BASE_URL?>";
    </script>
</head>
<script type="text/javascript" src="<?php echo INSTALL_URL?>/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $("img[id^='help_']").click(function() {
        var id = $(this).attr('id').match(/help_(.*)/)[1];
        if ($("p[id='test_" + id + "']").is(':visible')) {
            $("p[id='test_" + id + "']").slideUp();
        } else {
            $("p[id='test_" + id + "']").slideDown();
        }
    });
});
</script>
<body>
<div id="container">
    <?php if (!$finished): ?>
    <?php if ($errors): ?>
    <div class="errors">
    <?php foreach ($errors as $error): ?>
    <span><?php echo htmlspecialchars($error),'<br />'?></span>
    <?php endforeach; ?>
    </div>
    <?php endif; ?>
    <div class="left width-475">
        <h2>Testing Requirements</h2>
        <div class="box-content">
            <h3>Required Items</h3>
            <?php foreach ($required as $id => $values): if (!isset($values['system'])): ?>
            <span class="key"><?php if ($values['status'] !== true): echo '<strong>'; endif; ?><?php echo htmlspecialchars($values['message']); ?><?php if ($values['status'] !== true): echo '</strong>'; endif; ?></span>
            <span class="value">
                  <?php if ($values['status'] === true): ?>
                <img src="<?php echo INSTALL_URL?>/images/accept.png" alt="accept.png" />
                <?php else: ?>
                <img src="<?php echo INSTALL_URL?>/images/help.png" id="help_<?php echo $id?>" class="help" alt="help.png" />
                <?php if (isset($values['warning']) && $values['warning'] == '1'): ?>
                <img src="<?php echo INSTALL_URL?>/images/error.png" alt="error.png" />
                <?php else: ?>
                <img src="<?php echo INSTALL_URL?>/images/delete.png" alt="delete.png" />
                <?php endif; endif; ?>
            </span>
            <div class="clear"></div>
            <p id="test_<?php echo $id?>" style="display: none;"><?php echo htmlspecialchars($values['error']); ?></p>
            <?php endif; endforeach; ?>
            <h3>Required PHP Settings</h3>
            <?php foreach ($recommended as $id => $values): if (!isset($values['system'])): ?>
            <span class="key"><?php if ($values['status'] !== true): echo '<strong>'; endif; ?><?php echo htmlspecialchars($values['message']); ?><?php if ($values['status'] !== true): echo '</strong>'; endif; ?></span>
            <span class="value">
                  <?php if ($values['status'] === true): ?>
                <img src="<?php echo INSTALL_URL?>/images/accept.png" alt="accept.png" />
                <?php else: ?>
                <img src="<?php echo INSTALL_URL?>/images/help.png" id="help_<?php echo $id?>" class="help" alt="help.png" />
                <?php if ($values['warning'] == '1'): ?>
                <img src="<?php echo INSTALL_URL?>/images/error.png" alt="error.png" />                
                <?php else: ?>
                <img src="<?php echo INSTALL_URL?>/images/delete.png" alt="delete.png" />
                <?php endif; endif; ?>
            </span>
            <div class="clear"></div>
            <p id="test_<?php echo $id?>" style="display: none;"><?php echo htmlspecialchars($values['error']); ?></p>            
            <?php endif; endforeach; ?>
            <h3>Optional Items</h3>
            <?php foreach ($optional as $id => $values): if (!isset($values['system'])): ?>
            <span class="key"><?php if ($values['status'] !== true): echo '<strong>'; endif; ?><?php echo htmlspecialchars($values['message']); ?><?php if ($values['status'] !== true): echo '</strong>'; endif; ?></span>
            <span class="value">
                  <?php if ($values['status'] === true): ?>
                <img src="<?php echo INSTALL_URL?>/images/accept.png" alt="accept.png" />
                <?php else: ?>
                <img src="<?php echo INSTALL_URL?>/images/help.png" id="help_<?php echo $id?>" class="help" alt="help.png" />
                <img src="<?php echo INSTALL_URL?>/images/error.png" alt="error.png" />
                <?php endif; ?>
            </span>
            <div class="clear"></div>
            <p id="test_<?php echo $id?>" style="display: none;"><?php echo htmlspecialchars($values['error']); ?></p>
            <?php endif; endforeach; ?>
            <form name="test-form" method="post" action="<?php echo BASE_URL?>/install/upgrade-1.2.2-to-2.0.0.php?a=test">
            <div class="submit">
                  <input name="submit-test" type="submit" id="submit-test" class="submit" value="Run Tests Again" />
            </div>
            </form>
        </div>
    </div>
    <div class="right width-475">
        <h2>Upgrade Options</h2>
        <div class="box-content">
            <form id="upgrade-form" method="post" action="<?php echo BASE_URL?>/install/upgrade-1.2.2-to-2.0.0.php?a=upgrade">
            <div class="submit">
                  <input name="submit-upgrade" type="submit" id="submit-upgrade" class="submit" value="Upgrade >"<?php if ($test->is_error() === true): echo ' disabled="1"'; endif; ?> />
            </div>            
            </form>
        </div>
    </div>
    <div class="clear"></div>
    <?php else: ?>
    <div class="box">
        <h1>Congratulations! Adult Script Pro has been upgraded!</h1>
        Adult Script Pro 2.0.0 requires your to login to the Administration Panel and run the following actions:<br />
        Admin -> Config<br />
        Admin -> Video -> Config<br />
        Admin -> Photo -> Config<br />        
        <br />Click on the 'Site' button to view your site or 'Administrator' button to configure installed upgrades!
        <div class="links">
            <a href="<?php echo BASE_URL?>">Site</a>
            <a href="<?php echo ADMIN_URL?>/index.php">Administrator Panel</a>
        </div>
        <div class="install">
            Please completly remove the installation directory (/install). This is a security feature!
        </div>
    </div>
    <?php endif; ?>
</div>
</body>
</html>
Онлайн: 0
Реклама