Beispiel #1
0
function display_articles($brdarr, $articles, $start, $ftype, $managemode, $page, $total, $showHot, $isnormalboard)
{
    global $brdnum, $usernum, $dir_modes, $show_none, $isclub;
    $board = $brdarr["NAME"];
    $ann_path = bbs_getannpath($board);
    if ($ann_path != FALSE) {
        if (!strncmp($ann_path, "0Announce/", 10)) {
            $ann_path = substr($ann_path, 9);
        }
    }
    if ($ftype == $dir_modes["DELETED"]) {
        $mancode = "2";
    } else {
        $mancode = $managemode ? "1" : "0";
    }
    ?>
<script type="text/javascript"><!--
var c = new docWriter('<?php 
    echo addslashes($board);
    ?>
',<?php 
    echo $brdarr["BID"];
    ?>
,<?php 
    echo $start;
    ?>
,<?php 
    echo $mancode;
    ?>
,<?php 
    echo $ftype;
    ?>
,<?php 
    echo $page;
    ?>
,<?php 
    echo $total;
    ?>
,'<?php 
    echo addslashes($ann_path);
    ?>
',<?php 
    echo $showHot ? "1" : "0";
    ?>
,<?php 
    echo $isnormalboard ? "1" : "0";
    ?>
);
<?php 
    if ($show_none) {
        ?>
document.write('<tr><td align="center" colspan="<?php 
        echo $managemode ? 6 : 5;
        ?>
">本区没有文章。</td></tr>');
<?php 
    } else {
        foreach ($articles as $article) {
            ?>
c.o(<?php 
            echo $article["ID"];
            ?>
,<?php 
            echo $article["GROUPID"];
            ?>
,'<?php 
            echo $article["OWNER"];
            ?>
',<?php 
            $flags = $article["FLAGS"];
            echo "'" . $flags[0] . $flags[3] . "'";
            ?>
,<?php 
            echo $article["POSTTIME"];
            ?>
,'<?php 
            echo addslashes(htmlspecialchars($article["TITLE"], ENT_QUOTES));
            ?>
 ',<?php 
            echo $article["EFFSIZE"];
            ?>
,<?php 
            echo $flags[1] == "y" ? "1" : "0";
            ?>
,<?php 
            echo $article["IS_TEX"] ? "1" : "0";
            ?>
);
<?php 
        }
    }
    ?>
c.t();c.f('<?php 
    echo $isnormalboard ? bbs_rss_link(urlencode($board), $ftype) : "";
    ?>
',<?php 
    $s = TRUE;
    if (defined("SITE_SMTH")) {
        $relatefile = $_SERVER["DOCUMENT_ROOT"] . "/brelated/" . $brdarr["NAME"] . ".js";
        if (file_exists($relatefile)) {
            if (@readfile($relatefile)) {
                $s = FALSE;
            }
        }
    }
    if ($s) {
        echo "0";
    }
    ?>
,<?php 
    echo $isclub;
    ?>
);
//-->
</script>
<?php 
}
Beispiel #2
0
    function bbs_board_header($brdarr, $ftype, $managemode, $isnormalboard = FALSE)
    {
        global $dir_modes, $dir_name;
        $brd_encode = urlencode($brdarr["NAME"]);
        $adds = $isnormalboard ? bbs_rss_link($brd_encode, $ftype) : "";
        if ($adds) {
            $adds = '<link title="版面 RSS' . $dir_name[$ftype] . '" type="application/rss+xml" rel="alternate" href="' . $adds . '"/>';
        }
        if (!$adds) {
            $adds = false;
        }
        page_header($brdarr["NAME"] . " 版" . $dir_name[$ftype], FALSE, $adds);
        ?>
<body><div class="nav smaller">
<div class="fleft">
<a href="<?php 
        echo MAINPAGE_FILE;
        ?>
"><?php 
        echo BBS_FULL_NAME;
        ?>
</a><span id="idExp"></span> → 
<?php 
        $sec_index = get_secname_index($brdarr["SECNUM"]);
        if ($sec_index >= 0) {
            ?>
<a href="bbsboa.php?group=<?php 
            echo $sec_index;
            ?>
"><?php 
            echo constant("BBS_SECNAME" . $sec_index . "_0");
            ?>
</a> → 
<?php 
        }
        ?>
<a href="bbsdoc.php?board=<?php 
        echo $brdarr["NAME"];
        ?>
"><?php 
        echo htmlspecialchars($brdarr["DESC"]);
        ?>
</a>
(<a href="bbsfav.php?bname=<?php 
        echo $brdarr["NAME"];
        ?>
&select=0">收藏</a>)</div>
<div class="fright">
<?php 
        if (isset($brdarr['MAXONLINE'])) {
            $maxonline = ", <span title='发生于 " . strftime("%Y-%m-%d %H:%M:%S", $brdarr['MAXTIME']) . "'>最高 " . $brdarr["MAXONLINE"] . " 人</span>";
        } else {
            $maxonline = '';
        }
        ?>
版主: <script>writeBMs('<?php 
        echo $brdarr["BM"];
        /* No addslashes! */
        ?>
');</script>, 在线 <?php 
        echo $brdarr["CURRENTUSERS"];
        ?>
 人<?php 
        echo $maxonline;
        ?>
</div>
</div>
<h1 class="bt"><?php 
        echo $brdarr["NAME"] . "(" . htmlspecialchars($brdarr["DESC"]) . ")";
        ?>
 版</h1>
<?php 
    }