示例#1
0
function print_next_step()
{
    global $vbulletin, $numsteps, $upgradecore_phrases, $vbphrase;
    // do nothing if print_next_page() or nextStep has already been called
    if (defined('NONEXTSTEP')) {
        return;
    }
    define('NONEXTSTEP', true);
    // reset $perpage to tell the upgrade log that any multi-page steps are complete
    $vbulletin->GPC['perpage'] = 0;
    log_upgrade_step();
    $nextstep = $vbulletin->GPC['step'] + 1;
    if (defined('SCRIPTCOMPLETE')) {
        $formaction = 'upgrade.php';
        $buttonvalue = ' ' . $vbphrase['proceed'] . ' ';
        $buttontitle = '';
        if ($vbulletin->config['Misc']['upgrade_autoproceed'] == 'full' and $vbulletin->debug) {
            print_cp_redirect('upgrade.php', 0.5);
        }
    } else {
        if ($vbulletin->GPC['step'] >= $numsteps) {
            $formaction = 'upgrade.php';
            $buttonvalue = ' ' . $vbphrase['proceed'] . ' ';
            $buttontitle = '';
            if ($vbulletin->config['Misc']['upgrade_autoproceed'] == 'full' and $vbulletin->debug) {
                print_cp_redirect('upgrade.php', 0.5);
            }
        } else {
            $formaction = THIS_SCRIPT;
            $buttonvalue = sprintf($upgradecore_phrases['next_step'], $nextstep, $numsteps);
            $buttontitle = fetch_step_title($nextstep);
            // automatic advance - enable if you want to get through upgrades quickly without reading the text
            if ($vbulletin->config['Misc']['upgrade_autoproceed'] and $vbulletin->debug and ($vbulletin->GPC['step'] != 'welcome' or $vbulletin->config['Misc']['upgrade_autoproceed'] == 'full')) {
                print_cp_redirect(THIS_SCRIPT . "?step={$nextstep}", 0.5);
            }
        }
    }
    global $upgrade;
    if ($vbulletin->debug and is_object($upgrade) and !empty($upgrade->modifications)) {
        /* Looks like execute wasn't called, this doesn't need phrased because its a dev error! */
        echo "<p style=\"color: red;\"><b>Some queries were not executed, did you forget to call execute() on the upgrade queries?</b></p>\n";
    }
    echo '</div> <!-- end #all -->';
    ?>
	<form action="<?php 
    echo $formaction;
    ?>
" method="get" name="nextStep">
	<?php 
    if (!defined('SCRIPTCOMPLETE')) {
        echo '<input type="hidden" name="step" value="' . $nextstep . '" />';
    }
    ?>
	<table cellpadding="4" cellspacing="0" border="0" width="100%" class="navbody" style="padding:4px; border:outset 2px;">
	<tr align="center">
		<td><b><?php 
    echo $upgradecore_phrases['click_button_to_proceed'];
    ?>
</b><br />vBulletin &copy;2000 - <?php 
    echo date('Y');
    ?>
, vBulletin Solutions, Inc.</td>
		<td><input type="submit" class="button" accesskey="s" value="<?php 
    echo $buttonvalue;
    ?>
" title="<?php 
    echo $buttontitle;
    ?>
" /></td>
	</tr>
	</table>
	</form>
	<?php 
}
示例#2
0
function print_next_step()
{
    global $vbulletin, $numsteps, $installcore_phrases, $vbphrase, $hiddenfields;
    // do nothing if print_next_page() or nextStep has already been called
    if (defined('NONEXTSTEP')) {
        return;
    }
    define('NONEXTSTEP', true);
    // reset $perpage to tell the upgrade log that any multi-page steps are complete
    $vbulletin->GPC['perpage'] = 0;
    $nextstep = $vbulletin->GPC['step'] + 1;
    if ($step >= $numsteps) {
        $formaction = THIS_SCRIPT;
        $buttonvalue = ' ' . $vbphrase['proceed'] . ' ';
        $buttontitle = '';
    } else {
        $formaction = THIS_SCRIPT;
        $buttonvalue = sprintf($installcore_phrases['next_step'], $nextstep, $numsteps);
        $buttontitle = fetch_step_title($nextstep);
        // automatic advance - enable if you want to get through upgrades quickly without reading the text
        if (!defined('HIDEPROCEED') and $vbulletin->GPC['step'] >= 3 and $vbulletin->config['Misc']['upgrade_autoproceed'] and $vbulletin->debug and ($vbulletin->GPC['step'] != 'welcome' or $vbulletin->config['Misc']['upgrade_autoproceed'] == 'full')) {
            print_cp_redirect(THIS_SCRIPT . "?step={$nextstep}", 0.5);
        }
    }
    echo '</div> <!-- end #all -->';
    ?>
	<!-- </div> -->
	<form action="<?php 
    echo $formaction;
    ?>
" method="get" name="nextStep">
	<input type="hidden" name="step" value="<?php 
    echo $nextstep;
    ?>
" />
	<?php 
    foreach ($hiddenfields as $varname => $value) {
        echo "<input type=\"hidden\" name=\"" . htmlspecialchars_uni($varname) . "\" value=\"" . htmlspecialchars_uni($value) . "\" />\r\n";
    }
    ?>
	<table cellpadding="4" cellspacing="0" border="0" width="100%" class="navbody" style="padding:4px; border:outset 2px;">
	<tr align="center">
		<td><?php 
    if (!defined('HIDEPROCEED')) {
        ?>
<b><?php 
        echo $installcore_phrases['click_button_to_proceed'];
        ?>
</b><br /><?php 
    }
    ?>
vBulletin &copy;2000 - <?php 
    echo date('Y');
    ?>
 Jelsoft Enterprises Ltd.</td>
		<td><?php 
    if (!defined('HIDEPROCEED')) {
        ?>
<input type="submit" class="button" accesskey="s" value="<?php 
        echo $buttonvalue;
        ?>
" title="<?php 
        echo $buttontitle;
        ?>
" /><?php 
    }
    ?>
</td>
	</tr>
	</table>
	</form>
	<?php 
}