<?php !defined('P_W') && exit('Forbidden'); S::gp(array('alias', 'ifactive'), 'G'); header('Content-type: application/javascript;charset=' . $db_charset); header('Cache-Control: no-cache'); extract(L::style('', $skinco)); //* include_once pwCache::getPath(D_P.'data/bbscache/area_config.php'); pwCache::getData(D_P . 'data/bbscache/area_config.php'); $chanelService = L::loadClass('channelService', 'area'); $channelInfo = $chanelService->getChannelInfoByAlias($alias); if (empty($channelInfo)) { exit; } $areaLevelService = L::loadClass('arealevel', 'area'); $ifChannelEdit = $areaLevelService->getAreaLevel($winduid, $channelInfo['id']); list($_Navbar, $_LoginInfo) = pwNavBar(); list(, $showq) = explode("\t", $db_qcheck); require modeEot('m_header'); $output = str_replace(array('<!--<!---->', '<!---->'), '', ob_get_contents()); $output = addslashes(preg_replace("'([\r\n])+'", "", trim($output))); $output = str_replace('</script>', '<\\/script>', $output); echo ObContents("document.write('" . $output . "');");
function PrintEot($template, $EXT = 'htm') { //Copyright (c) 2003-09 PHPWind global $db_mode, $db_modes, $pwModeImg, $db_tplstyle, $appdir, $tplapps; $tplpath = L::style('tplpath'); !$template && ($template = 'N'); //apps template render if (!defined('PWERROR')) { if (defined('A_P') && $appdir && in_array($template, $tplapps) && file_exists(A_P . "{$appdir}/template/{$template}.{$EXT}")) { return A_P . "{$appdir}/template/{$template}.{$EXT}"; } if (defined('F_M')) { $temp = modeEot($template, $EXT); if ($temp) { return $temp; } } } //if (defined('A_P') && !in_array($template,array('header','footer'))/* || ($db_mode && $db_mode != 'bbs')*/) { // return A_P."$appdir/template/$template.$EXT"; //} if (file_exists(R_P . "template/{$tplpath}/{$template}.{$EXT}")) { return R_P . "template/{$tplpath}/{$template}.{$EXT}"; } elseif (file_exists(R_P . "template/wind/{$template}.{$EXT}")) { return R_P . "template/wind/{$template}.{$EXT}"; } else { exit("Can not find {$template}.{$EXT} file"); } }
$channelid = $channelInfo['id']; $areaLevelService = L::loadClass('arealevel', 'area'); $ifEditAdmin = $areaLevelService->getAreaLevel($winduid, $channelInfo['id']); //$ifEditAdmin= 1; //logic_file $logic_file_path = AREA_PATH . $alias . "/"; extract(L::style('', $skinco)); //* include_once pwCache::getPath(D_P.'data/bbscache/area_config.php'); pwCache::getData(D_P . 'data/bbscache/area_config.php'); include_once M_P . 'require/core.php'; $db_menuinit .= $db_menuinit ? ",'td_userinfomore' : 'menu_userinfomore'" : "'td_userinfomore' : 'menu_userinfomore'"; //头部统一为论坛头部添加 $db_menuinit .= ",'td_u' : 'menu_u'"; $db_menuinit .= ",'td_home' : 'menu_home'"; $db_menuinit .= ",'td_profile' : 'menu_profile'"; $db_menuinit .= ",'td_message' : 'menu_message'"; if ($db_menu) { $db_menuinit .= ",'td_sort' : 'menu_sort'"; } //头部统一为论坛头部结束 list($_Navbar, $_LoginInfo) = pwNavBar(); //数据调用初始化 $invokeService = L::loadClass('invokeservice', 'area'); $pageConfig = $invokeService->getEffectPageInvokePieces('channel', $alias); $tplGetData = L::loadClass('tplgetdata', 'area'); $tplGetData->init($pageConfig); require modeEot('main'); if (!defined('AREA_STATIC')) { areaFooter(); exit; }
function getpath($template, $EXT = 'htm') { if (!defined('PWERROR')) { global $appdir; if (defined('A_P') && $appdir && substr($template, 0, 2) == 'm_' && file_exists(A_P . "{$appdir}/template/{$template}.{$EXT}")) { return S::escapePath(A_P . "{$appdir}/template/{$template}.{$EXT}"); } if (defined('F_M')) { $temp = modeEot($template, $EXT); if ($temp) { return S::escapePath($temp); } } } $tplpath = L::style('tplpath'); if (file_exists($this->dir . "{$tplpath}/{$template}.{$EXT}")) { return $this->dir . "{$tplpath}/{$template}.{$EXT}"; } if (file_exists($this->dir . "wind/{$template}.{$EXT}")) { return $this->dir . "wind/{$template}.{$EXT}"; } return false; }