コード例 #1
0
function bb_die($message, $title = '', $header = 0)
{
    global $bb_locale;
    if ($header && !headers_sent()) {
        status_header($header);
    }
    if (function_exists('is_nxt_error') && is_nxt_error($message)) {
        if (empty($title)) {
            $error_data = $message->get_error_data();
            if (is_array($error_data) && isset($error_data['title'])) {
                $title = $error_data['title'];
            }
        }
        $errors = $message->get_error_messages();
        switch (count($errors)) {
            case 0:
                $message = '';
                break;
            case 1:
                $message = "<p>{$errors[0]}</p>";
                break;
            default:
                $message = "<ul>\n\t\t<li>" . join("</li>\n\t\t<li>", $errors) . "</li>\n\t</ul>";
                break;
        }
    } elseif (is_string($message)) {
        $message = bb_autop($message);
    }
    if (empty($title)) {
        $title = __('bbPress &rsaquo; Error');
    }
    bb_install_header($title);
    ?>
	<?php 
    echo $message;
    if ($uri = bb_get_uri()) {
        ?>
	<p class="last"><?php 
        printf(__('Back to <a href="%s">%s</a>.'), $uri, bb_get_option('name'));
        ?>
</p>
<?php 
    }
    bb_install_footer();
    die;
}
コード例 #2
0
ファイル: upgrade.php プロジェクト: nxtclass/NXTClass-Plugin
        echo join("\n", $upgrade_log);
        ?>
</textarea>
							</label>
						</fieldset>
					</div>
					<fieldset class="buttons">
						<label for="upgrade_next" class="back">
							<input class="button" id="upgrade_back" type="button" value="<?php 
        _e('&laquo; Go back to forums');
        ?>
" onclick="location.href='<?php 
        echo esc_js(bb_get_uri());
        ?>
'; return false;" />
						</label>
						<label for="upgrade_next" class="forward">
							<input class="button" id="upgrade_next" type="submit" value="<?php 
        _e('Try again');
        ?>
" />
						</label>
					</fieldset>
				</form>
			</div>
		</div>
<?php 
        break;
}
bb_install_footer();
コード例 #3
0
 /**
  * Prints the page footer.
  *
  * @return void
  **/
 function footer()
 {
     bb_install_footer();
 }