Example #1
0
function guestfooter()
{
    global $db_footertime, $db_obstart, $db_union, $P_S_T, $timestamp, $db;
    Update_ol();
    $wind_spend = '';
    if ($db_footertime == 1) {
        $t_array = explode(' ', microtime());
        $totaltime = number_format($t_array[0] + $t_array[1] - $P_S_T, 6);
        $qn = $db ? $db->query_num : 0;
        $wind_spend = "Total {$totaltime}(s) query {$qn},";
    }
    $ft_time = get_date($timestamp, 'm-d H:i');
    $ft_gzip = ($db_obstart ? 'Gzip enabled' : 'Gzip disabled') . $db_union[3];
    $output = preg_replace("/<span id=\"windspend\"\\>(.+?)<\\/span>/is", "<span id=\"windspend\">{$wind_spend} Time now is:{$ft_time}, {$ft_gzip}</span>", ob_get_contents());
    echo ObContents($output);
    unset($output);
    N_flush();
    exit;
}
Example #2
0
function wap_footer()
{
    global $wind_version, $db_obstart, $windid, $db_charset, $db_wapcharset, $chs, $timestamp, $db_online, $db, $db_wapregist, $rg_allowregister, $online_info, $db_bbsurl;
    Update_ol();
    $userinbbs = $guestinbbs = 0;
    if (empty($db_online)) {
        extract(pwCache::getData(D_P . 'data/bbscache/olcache.php', false));
    } else {
        if (count($online_info = explode("\t", GetCookie('online_info'))) == 3 && $timestamp - $online_info[0] < 60) {
            list(, $userinbbs, $guestinbbs) = $online_info;
        } else {
            $onlineService = L::loadClass('OnlineService', 'user');
            $userinbbs = $onlineService->countOnlineUser();
            $guestinbbs = $onlineService->countOnlineGuest();
            Cookie('online_info', $timestamp . "\t" . $userinbbs . "\t" . $guestinbbs);
        }
    }
    $usertotal = $guestinbbs + $userinbbs;
    $ft_time = get_date($timestamp);
    require_once PrintWAP('footer');
    $output = ob_get_contents();
    ob_end_clean();
    $db_obstart && function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
    if ($db_charset != 'utf8') {
        L::loadClass('Chinese', 'utility/lang', false);
        $chs = new Chinese();
        $output = $chs->Convert($output, $db_charset, $db_wapcharset ? 'UTF8' : 'UNICODE');
    }
    $output = str_replace(array('<!--<!---->', '<!---->-->', '<!---->', "\r\n\r\n"), '', $output);
    $wap_view = S::getGP('wap_view');
    if ($wap_view) {
        $output = preg_replace('/<a[^>]*>([^<]+|.*?)?<\\/a>/i', "\\1", $output);
    }
    echo $output;
    ob_flush();
    exit;
}
Example #3
0
} else {
	$link_ref_canonical = ($_GET['fpage'] || $_GET['uid'] || $_GET['skinco']) ? "read.php?tid=$tid".($page>1 ? "&page=$page" : '') : '';
}
*/
/*SEO*/
$_summary = strip_tags(stripWindCode($read['content']));
$_summary = str_replace(array('"', "\n", "\r", '&nbsp;', '&amp;', '&lt;', '', '&#160;'), '', $_summary);
$_summary = substrs($_summary, 255);
if ($ifConvert) {
    $wordsfb = L::loadClass('FilterUtil', 'filter');
    $_summary = $wordsfb->convert($_summary);
}
bbsSeoSettings('read', '', $foruminfo['name'], $foruminfo['topictype'][$read['type']], $read['subject'], $read['tags'], $_summary);
/*SEO*/
require_once R_P . 'require/showimg.php';
Update_ol();
$readdb = $authorids = array();
//主题印戳
if ($forumset['overprint']) {
    $overPrintService = L::loadclass("overprint", 'forum');
    $overprint = $overPrintService->getOverPrintIcon($read['overprint']);
}
if ($forumset['viewpic'] && !$winduid) {
    $viewpic = 1;
}
if ($read['modelid'] || $foruminfo['modelid']) {
    L::loadClass('posttopic', 'forum', false);
    $postTopic = new postTopic($read);
}
if ($read['special'] > 20 || $foruminfo['pcid']) {
    L::loadClass('postcate', 'forum', false);
Example #4
0
function footer()
{
    global $db, $db_obstart, $db_footertime, $db_htmifopen, $P_S_T, $mtablewidth, $db_ceoconnect, $wind_version, $imgpath, $stylepath, $footer_ad, $db_union, $timestamp, $db_icp, $db_icpurl, $db_advertdb, $groupid, $SCR, $db_ystats_ifopen, $db_ystats_unit_id, $db_ystats_style, $db_redundancy, $pwServer, $db_ifcredit, $credit_pop, $db_foot, $db_mode, $db_modes, $shortcutforum, $_G, $winddb, $db_toolbar, $winduid, $db_menuinit, $db_appifopen, $db_job_ispop, $db_job_isopen, $db_siteappkey;
    defined('AJAX') && ajax_footer();
    Update_ol();
    $wind_spend = '';
    $ft_gzip = ($db_obstart ? 'Gzip enabled' : 'Gzip disabled') . $db_union[3];
    if ($db_footertime == 1) {
        $t_array = explode(' ', microtime());
        $totaltime = number_format($t_array[0] + $t_array[1] - $P_S_T, 6);
        $qn = $db ? $db->query_num : 0;
        $wind_spend = "Total {$totaltime}(s) query {$qn},";
    }
    $ft_time = get_date($timestamp, 'm-d H:i');
    $db_icp && ($db_icp = "<a href=\"http://www.miibeian.gov.cn\" target=\"_blank\">{$db_icp}</a>");
    if ($db_toolbar) {
        if ($_COOKIE['toolbarhide']) {
            $toolbarstyle = 'style="display:none"';
            $openbarstyle = '';
            $closebarstyle = 'style="display:none"';
        } else {
            $toolbarstyle = '';
            $openbarstyle = 'style="display:none"';
            $closebarstyle = '';
            if ($db_appifopen) {
                $appshortcut = trim($winddb['appshortcut'], ',');
                if (!empty($appshortcut) && $db_siteappkey) {
                    $appclient = L::loadClass('appclient');
                    $bottom_appshortcut = $appclient->userApplist($winduid, $appshortcut, 1);
                }
            }
        }
    }
    $db_menuinit = trim($db_menuinit, ',');
    runJob();
    require PrintEot('footer');
    if ($db_advertdb['Site.PopupNotice'] || $db_advertdb['Site.FloatLeft'] || $db_advertdb['Site.FloatRight'] || $db_advertdb['Site.FloatRand']) {
        require PrintEot('advert');
    }
    $output = ob_get_contents();
    if ($db_htmifopen) {
        $output = preg_replace("/\\<a(\\s*[^\\>]+\\s*)href\\=([\"|\\']?)((index|cate|thread|read|faq|rss)\\.php\\?[^\"\\'>\\s]+\\s?)[\"|\\']?/ies", "Htm_cv('\\3','<a\\1href=\"')", $output);
    }
    if ($db_redundancy && $SCR != 'post') {
        /*
        $output = str_replace(
        	array("\r","\n\n","\n\t","\n ",">\n","\n<","}\n","{\n",";\n","/\n","\t ",">\t","\t<","}\t","{\t",";\t","/\t",'  ','<!--<!---->','<!---->'),
        	array('',"\n",' ',' ','>','<','}','{',';','/',' ','>','<','}','{',';','/',' ','',''),
        	$output
        );
        */
        $output = str_replace(array("\r", '<!---->-->', '<!--<!---->', "<!---->\n", '<!---->', '<!-- -->', "<!--\n-->", "\t\t", '        ', "\n\t", "\n\n"), array('', '', '', '', '', '', '', "\n", "\n"), $output);
    } else {
        $output = str_replace(array('<!---->-->', '<!--<!---->', "<!---->\r\n", '<!---->', '<!-- -->', "\t\t\t"), '', $output);
    }
    if ($SCR != 'post') {
        $ceversion = defined('CE') ? 1 : 0;
        $output .= "<script language=\"JavaScript\" src=\"http://init.phpwind.net/init.php?sitehash={$GLOBALS[db_sitehash]}&v={$wind_version}&c={$ceversion}\"></script>";
    }
    if ($groupid == 'guest' && !defined('MSG') && GetGcache()) {
        require_once R_P . 'require/guestfunc.php';
        creatguestcache($output);
    }
    updateCacheData();
    echo ObContents($output);
    unset($output);
    N_flush();
    exit;
}
Example #5
0
function pwOutPut()
{
    global $db_htmifopen, $db_redundancy, $SCR, $groupid;
    $masterDb = $GLOBALS['db']->getMastdb();
    if ($masterDb->arr_query) {
        writeover(D_P . "data/sqllist.txt", $masterDb->arr_query, 'wb');
    }
    Update_ol();
    $output = parseHtmlUrlRewrite(ob_get_contents(), $db_htmifopen);
    if ($db_redundancy && $SCR != 'post') {
        $output = str_replace(array("\r", '<!--<!---->-->', '<!---->-->', '<!--<!---->', "<!---->\n", '<!---->', '<!-- -->', "<!--\n-->", "\t\t", '    ', "\n\t", "\n\n"), array('', '', '', '', '', '', '', '', '', '', "\n", "\n"), $output);
    } else {
        $output = str_replace(array('<!--<!---->-->', '<!---->-->', '<!--<!---->', "<!---->\r\n", '<!---->', '<!-- -->', "\t\t\t"), '', $output);
    }
    if (!defined('AJAX')) {
        require_once R_P . 'aCloud/aCloud.php';
        $output .= ACloud_App_Guiding::getApp();
    }
    if ($SCR != 'post' && !defined('AJAX')) {
        $ceversion = defined('CE') ? 1 : 0;
        $output .= "<script type=\"text/javascript\">(function(d,t){\r\nvar url=\"http://init.phpwind.net/init.php?sitehash={$GLOBALS[db_sitehash]}&v={$GLOBALS[wind_version]}&c={$ceversion}\";\r\nvar g=d.createElement(t);g.async=1;g.src=url;d.body.insertBefore(g,d.body.firstChild);}(document,\"script\"));</script>";
    }
    if ($groupid == 'guest' && !defined('MSG') && GetGcache()) {
        require_once R_P . 'require/guestfunc.php';
        creatguestcache($output);
    }
    if (defined('SHOWLOG')) {
        Error::writeLog();
    }
    if (defined('PW_PACK_FILES')) {
        pwPack::files();
    }
    echo ObContents($output);
    unset($output);
    N_flush();
    exit;
}