示例#1
0
    function page_header($title, $flag = "", $otherheaders = false)
    {
        /*
         * $flag: FALSE  - no header
         *        string - parent
         */
        global $cachemode;
        global $currentuser;
        global $headershown;
        if ($headershown) {
            return;
        }
        $headershown = true;
        if ($cachemode == "") {
            cache_header("nocache");
        }
        ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title><?php 
        echo $title;
        ?>
</title>
<?php 
        if (defined("www2dev")) {
            echo "<script>var gwww2dev=true;</script>";
        }
        if (defined("ENABLE_JSMATH")) {
            echo "<script> var gjsmath=true;</script>";
        }
        ?>
 
<script src="static/www2-main.js" type="text/javascript"></script>
<script>writeCss();</script>
<?php 
        if ($otherheaders) {
            echo $otherheaders;
        }
        ?>
</head>
<?php 
        if ($flag === FALSE) {
            return;
        }
        if (isset($currentuser["userid"]) && $currentuser["userid"] != "guest" && bbs_checkwebmsg()) {
            ?>
<script type="text/javascript">alertmsg();</script>
<?php 
        }
        ?>
<body>
<div class="nav smaller"><a href="<?php 
        echo MAINPAGE_FILE;
        ?>
"><?php 
        echo BBS_FULL_NAME;
        ?>
</a><span id="idExp"></span><?php 
        if ($flag) {
            echo " → " . $flag;
        }
        ?>
 → <?php 
        echo $title;
        ?>
</div>
<?php 
    }
示例#2
0
文件: funcs.php 项目: bianle/www2
    function html_init($charset, $title = "", $otherheader = "", $new_style = 0)
    {
        global $cachemode;
        global $currentuser;
        if ($cachemode == "") {
            cache_header("nocache");
        }
        echo '<?xml version="1.0" encoding="' . $charset . '"?>' . "\n";
        ?>
<!DOCTYPE html
	 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
        echo $charset;
        ?>
"/>
<script src="bbs.js"></script>
<?php 
        if (func_num_args() > 1) {
            ?>
<title><?php 
            echo $title;
            ?>
</title>
<?php 
        }
        if ($new_style == 9) {
            ?>
<link rel="stylesheet" type="text/css" href="bbsleft.css"/>
<?php 
        } else {
            ?>
<link rel="stylesheet" type="text/css" href="default.css"/>
<?php 
        }
        echo $otherheader;
        ?>
</head>
<?php 
        if ($_SERVER["PHP_SELF"] != "/bbsgetmsg.php" && isset($currentuser["userid"]) && $currentuser["userid"] != "guest" && bbs_checkwebmsg()) {
            ?>
<script type="text/javascript">
if (top.fmsg && !top.fmsg.form0)
	top.fmsg.location.reload();
</script>
<?php 
        }
    }
示例#3
0
文件: bbsfoot.php 项目: bianle/www2
?>
;
	var serverTime = <?php 
echo time() + intval(date("Z"));
?>
;
	var hasMail = <?php 
echo $unread ? "1" : "0";
?>
;
	var MailFull = <?php 
echo $full ? "1" : "0";
?>
;
<?php 
if (isset($currentuser["userid"]) && $currentuser["userid"] != "guest" && bbs_checkwebmsg()) {
    ?>
alertmsg();
<?php 
}
?>
	function newmailnotice() {
		var thespan = document.getElementById('mailnotice');
		if(thespan.style.display == '')
			thespan.style.display = 'none';
		else
			thespan.style.display = '';
		if(hasMail || MailFull)
			setTimeout('newmailnotice();', 800);
		else
			thespan.style.display = 'none';