Пример #1
0
        <?php 
hq_admin_css('install', true);
hq_admin_css('ie', true);
?>
</head>
<body class="hq-core-ui">
<h1 id="logo"><a href="<?php 
echo esc_url(__('https://github.com/gcorral/hivequeen'));
?>
" tabindex="-1"><?php 
_e('HiveQueen');
?>
</a></h1>

<?php 
if (get_option('db_version') == $hq_db_version || !is_hq_installed()) {
    ?>

<h2><?php 
    _e('No Update Required');
    ?>
</h2>
<p><?php 
    _e('Your HiveQueen database is already up-to-date!');
    ?>
</p>
<p class="step"><a class="button button-large" href="<?php 
    echo get_option('home');
    ?>
/"><?php 
    _e('Continue');
Пример #2
0
                </tr>
        </table>
        <p class="step"><?php 
    submit_button(__('Install HiveQueen'), 'large', 'Submit', false, array('id' => 'submit'));
    ?>
</p>
        <input type="hidden" name="language" value="<?php 
    echo isset($_REQUEST['language']) ? esc_attr($_REQUEST['language']) : '';
    ?>
" />
</form>
<?php 
}
// end display_setup_form()
// Let's check to make sure HQ isn't already installed.
if (is_hq_installed()) {
    display_header();
    die('<h1>' . __('Already Installed') . '</h1><p>' . __('You appear to have already installed HiveQueen. To reinstall please clear your old database tables first.') . '</p><p class="step"><a href="../hq-login.php" class="button button-large">' . __('Log In') . '</a></p></body></html>');
}
/**
 * @global string $hq_version
 * @global string $required_php_version
 * @global string $required_mysql_version
 * @global hqdb   $hqdb
 */
global $hq_version, $required_php_version, $required_mysql_version;
$php_version = phpversion();
$mysql_version = $hqdb->db_version();
$php_compat = version_compare($php_version, $required_php_version, '>=');
$mysql_compat = version_compare($mysql_version, $required_mysql_version, '>=') || file_exists(HQ_CONTENT_DIR . '/db.php');
if (!$mysql_compat && !$php_compat) {
Пример #3
0
/**
 * Redirect to the installer if HiveQueen is not installed.
 *
 * @since 0.0.1
 * @access private
 */
function hq_not_installed()
{
    //if ( ! is_blog_installed() && ! defined( 'HQ_INSTALLING' ) ) {
    //TODO: Debug
    if (!is_hq_installed() && !defined('HQ_INSTALLING')) {
        //if(true){
        nocache_headers();
        require ABSPATH . HQINC . '/kses.php';
        require ABSPATH . HQINC . '/pluggable.php';
        require ABSPATH . HQINC . '/formatting.php';
        //TODO: hq_guess_url loop Error
        //$link = hq_guess_url() . '/hq-admin/install.php';
        //
        //hq_redirect( $link );
        die;
    }
}