コード例 #1
0
ファイル: login.php プロジェクト: harrylongworth/tv-bb
    }
    if ($id === false) {
        echo "<span class=\"error\">Unable to create session.</span>";
        exit;
    }
    SetCookieFixDomain("bbl", $id, $bb_accounts["sessions"][$id]["expire"], ROOT_URL . "/", "", USE_HTTPS, true);
    SetCookieFixDomain("bbq", "1", $bb_accounts["sessions"][$id]["expire"], ROOT_URL . "/", "");
    ?>
<span class="success">Successfully logged in.</span><br />
<a href="<?php 
    echo htmlspecialchars(BB_GetFullRootURLBase("http"));
    ?>
/">Click here to continue</a>
<script type="text/javascript">
window.location = '<?php 
    echo BB_JSSafe(BB_GetFullRootURLBase("http"));
    ?>
/';
</script>
<?php 
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="<?php 
    echo htmlspecialchars(ROOT_URL);
    ?>
/<?php 
コード例 #2
0
ファイル: bb_functions.php プロジェクト: harrylongworth/tv-bb
function BB_PreMainJS()
{
    global $bb_pref_lang, $bb_revision_num, $bb_paths;
    ?>
<script type="text/javascript">
var Gx__RootURL = '<?php 
    echo BB_JSSafe(isset($bb_paths) ? $bb_paths["ROOT_URL"] : ROOT_URL);
    ?>
';
var Gx__SupportDebug = <?php 
    echo defined("DEBUG_JS") ? "true" : "false";
    ?>
;
var Gx__SupportPath = '<?php 
    echo BB_JSSafe(isset($bb_paths) ? $bb_paths["SUPPORT_PATH"] : SUPPORT_PATH);
    ?>
';
var Gx__URLBase = '<?php 
    echo BB_JSSafe(BB_GetRequestURLBase());
    ?>
';
var Gx__PrefLang = '<?php 
    echo BB_JSSafe($bb_pref_lang);
    ?>
';
var Gx__FullRootURL = '<?php 
    echo BB_JSSafe(BB_GetFullRootURLBase());
    ?>
';
var Gx__FullRootURLHTTP = '<?php 
    echo BB_JSSafe(BB_GetFullRootURLBase("http"));
    ?>
';
var Gx__FullRootURLHTTPS = '<?php 
    echo BB_JSSafe(BB_GetFullRootURLBase("https"));
    ?>
';
var Gx__FullURLBase = '<?php 
    echo BB_JSSafe(BB_GetFullRequestURLBase());
    ?>
';
var Gx__FullURLBaseHTTP = '<?php 
    echo BB_JSSafe(BB_GetFullRequestURLBase("http"));
    ?>
';
var Gx__FullURLBaseHTTPS = '<?php 
    echo BB_JSSafe(BB_GetFullRequestURLBase("https"));
    ?>
';
<?php 
    if (isset($bb_revision_num)) {
        echo "var Gx__RevisionNum = " . $bb_revision_num . ";\n";
    }
    ?>
var Gx__MaxSendSize = <?php 
    echo min(BB_PHPShorthandToBytes(ini_get("post_max_size")), BB_PHPShorthandToBytes(ini_get("upload_max_filesize")));
    ?>
;
<?php 
    BB_RunPluginAction("bb_premainjs");
    ?>
</script>
<?php 
}