Beispiel #1
0
function output()
{
    if (defined('DISCUZ_OUTPUTED')) {
        return;
    }
    define('DISCUZ_OUTPUTED', 1);
    global $sid, $transsidstatus, $rewritestatus, $ftp, $advlist, $thread, $inajax, $forumdomains, $binddomains, $indexname;
    if ($advlist && !defined('IN_ADMINCP') && !$inajax) {
        include template('adv');
    }
    funcstat();
    stat_code();
    if (($transsidstatus = empty($GLOBALS['_DCOOKIE']['sid']) && $transsidstatus) || $rewritestatus || $binddomains && $forumdomains) {
        $content = ob_get_contents();
        if ($transsidstatus) {
            $searcharray = array("/\\<a(\\s*[^\\>]+\\s*)href\\=([\"|\\']?)([^\"\\'\\s]+)/ies", "/(\\<form.+?\\>)/is");
            $replacearray = array("transsid('\\3','<a\\1href=\\2')", "\\1\n<input type=\"hidden\" name=\"sid\" value=\"{$sid}\" />");
            $content = preg_replace($searcharray, $replacearray, $content);
        }
        if ($binddomains && $forumdomains) {
            $bindsearcharray = $bindreplacearray = array();
            $indexname = basename($indexname);
            foreach ($forumdomains as $fid => $domain) {
                $bindsearcharray[] = "href=\"forumdisplay.php?fid={$fid}&amp;";
                $bindreplacearray[] = 'href="http://' . $domain . '/' . $indexname . '?';
                $bindsearcharray[] = "href=\"forumdisplay.php?fid={$fid}";
                $bindreplacearray[] = 'href="http://' . $domain . '/' . $indexname;
            }
            $content = str_replace($bindsearcharray, $bindreplacearray, $content);
        }
        if ($rewritestatus) {
            $searcharray = $replacearray = array();
            if ($rewritestatus & 1) {
                $searcharray[] = "/\\<a href\\=\"forumdisplay\\.php\\?fid\\=(\\d+)(&amp;page\\=(\\d+))?\"([^\\>]*)\\>/e";
                $replacearray[] = "rewrite_forum('\\1', '\\3', '\\4')";
            }
            if ($rewritestatus & 2) {
                $searcharray[] = "/\\<a href\\=\"viewthread\\.php\\?tid\\=(\\d+)(&amp;extra\\=page\\%3D(\\d+))?(&amp;page\\=(\\d+))?\"([^\\>]*)\\>/e";
                $replacearray[] = "rewrite_thread('\\1', '\\5', '\\3', '\\6')";
            }
            if ($rewritestatus & 4) {
                $searcharray[] = "/\\<a href\\=\"space\\.php\\?(uid\\=(\\d+)|username\\=([^&]+?))\"([^\\>]*)\\>/e";
                $replacearray[] = "rewrite_space('\\2', '\\3', '\\4')";
            }
            if ($rewritestatus & 8) {
                $searcharray[] = "/\\<a href\\=\"tag\\.php\\?name\\=([^&]+?)\"([^\\>]*)\\>/e";
                $replacearray[] = "rewrite_tag('\\1', '\\2')";
            }
            $content = preg_replace($searcharray, $replacearray, $content);
        }
        ob_end_clean();
        $GLOBALS['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start();
        echo $content;
    }
    if ($ftp['connid']) {
        @ftp_close($ftp['connid']);
    }
    $ftp = array();
    if (defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN')) {
        global $cachethreaddir;
        if (diskfreespace(DISCUZ_ROOT . './' . $cachethreaddir) > 1000000) {
            if ($fp = @fopen(CACHE_FILE, 'w')) {
                flock($fp, LOCK_EX);
                fwrite($fp, empty($content) ? ob_get_contents() : $content);
            }
            @fclose($fp);
            chmod(CACHE_FILE, 0777);
        }
    }
}
<? if(!defined('IN_DISCUZ')) exit('Access Denied'); funcstat(); stat_code(); $s = ob_get_contents(); ob_end_clean(); $s = preg_replace("/([\x01-\x08\x0b-\x0c\x0e-\x1f])+/", ' ', $s); $s = str_replace(array(chr(0), ']]>'), array(' ', ']]&gt;'), $s); ?><?=$s?>
<? if($prompts['newbietask'] && $newbietasks) { include template('task_newbie_js', '0', ''); } ?>
]]></root><? exit; ?>
<? if(!defined('IN_DISCUZ')) exit('Access Denied'); 
0
|| checktplrefresh('D:\Website\newbbs\bbs\././templates/default/pm_checknew.htm', 'D:\Website\newbbs\bbs\././templates/default/header_ajax.htm', 1268371497, '1', './templates/default')
|| checktplrefresh('D:\Website\newbbs\bbs\././templates/default/pm_checknew.htm', 'D:\Website\newbbs\bbs\././templates/default/footer_ajax.htm', 1268371497, '1', './templates/default')
;?><? ob_end_clean(); ob_start(); @header("Expires: -1"); @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE); @header("Pragma: no-cache"); @header("Content-type: application/xml; charset=$charset"); echo '<?xml version="1.0" encoding="'.$charset.'"?>';; ?><root><![CDATA[<? if($s) { ?><script type="text/javascript" reload="1"><?=$s?>;$('myprompt').className='new';$('myprompt').onmouseover=function(){showMenu({'ctrlid':'myprompt'});}</script><? if($pmsound) { ?><div id="pmsound" style="position:absolute;top:-100000px"></div><script type="text/javascript" reload="1">$('pmsound').innerHTML = AC_FL_RunContent('id', 'pmsoundplayer', 'name', 'pmsoundplayer', 'width', '0', 'height', '0', 'src', '<?=$boardurl?>images/sound/player.swf', 'FlashVars', 'sFile=<?=$boardurl?>images/sound/pm_<?=$pmsound?>.mp3', 'menu', 'false',  'allowScriptAccess', 'sameDomain', 'swLiveConnect', 'true');</script><? } } define('STAT_DISABLED', 1); funcstat(); stat_code(); $s = ob_get_contents(); ob_end_clean(); $s = preg_replace("/([\x01-\x08\x0b-\x0c\x0e-\x1f])+/", ' ', $s); $s = str_replace(array(chr(0), ']]>'), array(' ', ']]&gt;'), $s); ?><?=$s?>
<? if($prompts['newbietask'] && $newbietasks) { include template('task_newbie_js', '0', ''); } ?>
]]></root><? exit; ?>