Esempio n. 1
0
    $output->steps = array($lang->upgrade);
    if ($mybb->user['uid'] == 0) {
        $output->print_header("Wymagane zalogowanie", "errormsg", 0, 1);
        $output->print_contents('<p>Podaj swój login i hasło, aby rozpocząć proces aktualizacji. Musisz mieć uprawnienia administratora, aby uruchomić ten proces.</p>
<form action="upgrade.php" method="post">
	<div class="border_wrapper">
		<table class="general" cellspacing="0">
		<thead>
			<tr>
				<th colspan="2" class="first last">Logowanie</th>
			</tr>
		</thead>
		<tbody>
			<tr class="first">
				<td class="first">Login:</td>
				<td class="last alt_col"><input type="text" class="textbox" name="username" size="25" maxlength="' . $mybb->settings['maxnamelength'] . '" style="width: 200px;" /></td>
			</tr>
			<tr class="alt_row last">
				<td class="first">Hasło:<br /><small>Upewnij się, że hasło jest poprawne. Wielkość liter w haśle ma znaczenie.</small></td>
				<td class="last alt_col"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" /></td>
			</tr>
		</tbody>
		</table>
	</div>
	<div id="next_button">
		<input type="submit" class="submit_button" name="submit" value="Zaloguj" />
		<input type="hidden" name="action" value="do_login" />
	</div>
</form>');
        $output->print_footer("");
        exit;
    } else {
Esempio n. 2
0
     foreach ($key_order as $k => $key) {
         $file = $upgradescripts[$key];
         $upgradescript = file_get_contents(INSTALL_ROOT . "resources/{$file}");
         preg_match("#Upgrade Script:(.*)#i", $upgradescript, $verinfo);
         preg_match("#upgrade([0-9]+).php\$#i", $file, $keynum);
         if (trim($verinfo[1])) {
             if ($keynum[1] == $next_update_version) {
                 $vers .= "<option value=\"{$keynum['1']}\" selected=\"selected\">{$verinfo['1']}</option>\n";
             } else {
                 $vers .= "<option value=\"{$keynum['1']}\">{$verinfo['1']}</option>\n";
             }
         }
     }
     unset($upgradescripts);
     unset($upgradescript);
     $output->print_contents($lang->sprintf($lang->upgrade_welcome, $mybb->version) . "<p><select name=\"from\">{$vers}</select>" . $lang->upgrade_send_stats);
     $output->print_footer("doupgrade");
 } elseif ($mybb->input['action'] == "doupgrade") {
     add_upgrade_store("allow_anonymous_info", $mybb->get_input('allow_anonymous_info', 1));
     require_once INSTALL_ROOT . "resources/upgrade" . $mybb->get_input('from', 1) . ".php";
     if ($db->table_exists("datacache") && $upgrade_detail['requires_deactivated_plugins'] == 1 && $mybb->get_input('donewarning') != "true") {
         $plugins = $cache->read('plugins', true);
         if (!empty($plugins['active'])) {
             $output->print_header();
             $lang->plugin_warning = "<input type=\"hidden\" name=\"from\" value=\"" . $mybb->get_input('from', 1) . "\" />\n<input type=\"hidden\" name=\"donewarning\" value=\"true\" />\n<div class=\"error\"><strong><span style=\"color: red\">Warning:</span></strong> <p>There are still " . count($plugins['active']) . " plugin(s) active. Active plugins can sometimes cause problems during an upgrade procedure or may break your forum afterward. It is <strong>strongly</strong> reccommended that you deactivate your plugins before continuing.</p></div> <br />";
             $output->print_contents($lang->sprintf($lang->plugin_warning, $mybb->version));
             $output->print_footer("doupgrade");
         } else {
             add_upgrade_store("startscript", $mybb->get_input('from', 1));
             $runfunction = next_function($mybb->get_input('from', 1));
         }
Esempio n. 3
0
    $output->steps = array($lang->upgrade);
    if ($mybb->user['uid'] == 0) {
        $output->print_header($lang->please_login, "errormsg", 0, 1);
        $output->print_contents('<p>' . $lang->login_desc . '</p>
<form action="upgrade.php" method="post">
	<div class="border_wrapper">
		<table class="general" cellspacing="0">
		<thead>
			<tr>
				<th colspan="2" class="first last">' . $lang->login . '</th>
			</tr>
		</thead>
		<tbody>
			<tr class="first">
				<td class="first">' . $lang->login_username . ':</td>
				<td class="last alt_col"><input type="text" class="textbox" name="username" size="25" maxlength="' . $mybb->settings['maxnamelength'] . '" style="width: 200px;" /></td>
			</tr>
			<tr class="alt_row last">
				<td class="first">' . $lang->login_password . ':<br /><small>' . $lang->login_password_desc . '</small></td>
				<td class="last alt_col"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" /></td>
			</tr>
		</tbody>
		</table>
	</div>
	<div id="next_button">
		<input type="submit" class="submit_button" name="submit" value="' . $lang->login . '" />
		<input type="hidden" name="action" value="do_login" />
	</div>
</form>');
        $output->print_footer("");
        exit;
    } else {
    $output->steps = array($lang->upgrade);
    if ($mybb->user['uid'] == 0) {
        $output->print_header("Please Login", "errormsg", 0, 1);
        $output->print_contents('<p>Please enter your username and password to begin the upgrade process. You must be a valid forum administrator to perform the upgrade.</p>
<form action="upgrade.php" method="post">
	<div class="border_wrapper">
		<table class="general" cellspacing="0">
		<thead>
			<tr>
				<th colspan="2" class="first last">Login</th>
			</tr>
		</thead>
		<tbody>
			<tr class="first">
				<td class="first">Username:</td>
				<td class="last alt_col"><input type="text" class="textbox" name="username" size="25" maxlength="' . $mybb->settings['maxnamelength'] . '" style="width: 200px;" /></td>
			</tr>
			<tr class="alt_row last">
				<td class="first">Password:<br /><small>Please note that passwords are case sensitive.</small></td>
				<td class="last alt_col"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" /></td>
			</tr>
		</tbody>
		</table>
	</div>
	<div id="next_button">
		<input type="submit" class="submit_button" name="submit" value="Login" />
		<input type="hidden" name="action" value="do_login" />
	</div>
</form>');
        $output->print_footer("");
        exit;
    } else {