Файл: adultscript-2.0.3-pro/files/install/migrate.php
Строк: 151
<?php
define('_VALID', true);
define('_INSTALL', true);
require '../libraries/defines.php';
require '../libraries/framework.php';
require '../libraries/framework/functions.php';
require 'functions.php';
error_reporting(E_ALL);
ini_set('display_errors', 1);
if (ini_get('date.timezone') == '') {
date_default_timezone_set('Europe/Helsinki');
}
VF::load('framework.compat.enviroment.magic_quotes_gpc_off');
VF::load('framework.compat.enviroment.register_globals_off');
spl_autoload_register(array('VF', 'auto_load'));
$uri = get_uri();
define('BASE_URL', $uri['base_url']);
define('CURRENT_URL', $uri['current_url']);
define('RELATIVE_URL', $uri['relative_url']);
define('ADMIN_URL', $uri['admin_url']);
define('INSTALL_URL', BASE_URL.'/install');
$errors = array();
$finished = false;
$cfg = true;
$test = VF::factory('test');
$required = $test->get_required_results();
$optional = $test->get_optional_results();
$recommended = $test->get_recommended_results();
$config = array(
'db_host' => '',
'db_username' => '',
'db_password' => '',
'db_name' => '',
'db_prefix' => '',
'admin_user' => '',
'admin_pass' => '',
'admin_email' => '',
'base_url' => BASE_URL,
'relative_url' => RELATIVE_URL,
);
$secret = VText::random();
if (isset($_POST['submit-migrate'])) {
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>Adult Script Pro Migration</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 ($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/migrate.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>Migration Options</h2>
<div class="box-content">
<h3>Migration Selection</h3>
<div>
<label for="migrate">Select Script</label>
<div style="float: right; text-align: left; font-weight: bold; width: 300px;">
<a href="<?php echo INSTALL_URL; ?>/migrate-mediaxxxscript.php">Media XXX Script</a><br />
<a href="<?php echo INSTALL_URL; ?>/migrate-adultvideoscript.php">Adult Video Script</a><br />
<a href="<?php echo INSTALL_URL; ?>/migrate-clipshare.php">Clip Share</a>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>