Вход Регистрация
Файл: adultscript-2.0.3-pro/files/install/upgrade-1.0rc3-to-1.0rc4.php
Строк: 209
<?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');
    
    
$fcfg file_get_contents(dirname(__FILE__).'/cfgs/frontpage.cfg.php');
    
$db->query("UPDATE #__module
                SET config = '"
.$db->escape($fcfg)."',
                    config_cache = '"
.$db->escape($fcfg)."'
                WHERE name = 'frontpage'
                LIMIT 1"
);
                
    
VConfig::add('video''tag_max_length'50);
    
VConfig::add('video''tag_max_words'3);
    
    
$db->query("ALTER TABLE `#__photo_albums` ADD FULLTEXT KEY `title` (`title`)");
    
$db->query("ALTER TABLE `#__video` ADD KEY `status_addtime` (`status`, `add_time`)");
    
$db->query("ALTER TABLE `#__adv` ADD `blank` enum('0', '1') NOT NULL default '0'");

    
$db->query("CREATE TABLE `#__video_shedule` (
                `video_id` int(11) unsigned NOT NULL default '0',
                `shedule_date` date not null default '0000-00-00',
                KEY `video_id` (`video_id`),
                KEY `shedule_date` (`shedule_date`)
                ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"
);
    
    
$db->query("CREATE TABLE `#__video_featured` (
                `video_id` int(11) unsigned NOT NULL default '0',
                `feature_time` int(11) unsigned NOT NULL default '0',
                KEY `video_id` (`video_id`),
                KEY `feature_time` (`feature_time`)
                ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"
);

    
$db->query("CREATE TABLE `#__video_csv_imported` (
                  `unique_id` varchar(32) NOT NULL default '',
                  `video_id` int(11) unsigned NOT NULL default '0',
                  UNIQUE KEY `unique_id` (`unique_id`),
                  KEY `video_id` (`video_id`)
                ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"
);
    
    
$db->query("ALTER TABLE `#__video_feeds_imported` ADD `video_id` int(11) unsigned NOT NULL default '0'");
    
$db->query("ALTER TABLE `#__video_feeds_imported` ADD KEY `video_id` (`video_id`)");
        
    
// add our new featured title for the frontpage
    
$db->query("SELECT code FROM #__language");
    
$rows $db->fetch_rows();
    foreach (
$rows as $row) {
        
$code $row['code'];
        
language_add($code'frontend''frontpage', array(
            
'read-more' => 'Read More',
            
'featured-title' => 'FEATURED PORN VIDEOS',
            
'popular-tags' => 'POPULAR TAGS'
        
), NULL);
        
        
language_add($code'frontend''video', array(
            
'tag-words' => 'Tag %s contains more than %s words!',
            
'tag-length' => 'Tag %s contains more than %s characters!'
        
), NULL);
        
        
VF::cache_del($code.'.frontend.frontpage''language');
        
VF::cache_del($code.'.frontend.video''language');
    }

    
$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.0rc2-to-1.0rc3.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.0rc3-to-1.0rc4.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>
        <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
Реклама