/** * &_debug() * * @access private * @param string &$sBuff * @return string */ function &_debug(&$sBuff) { if (BLOCKEN_DEBUG_MODE && (BLOCKEN_ALWAYS_DEBUG || BlockenCommon::isMember())) { $this->_fEnd = BlockenCommon::getMicroTime(); $fTakeTime = $this->_fEnd - $this->_fStart; if ($this->_bIsDebug) { $sDebug = sprintf("\n<br />take time %01.03f sec.<br />\n", $fTakeTime); $sDebug .= sprintf("<pre>\n\$aryParam = %s\n</pre>\n", var_export($this->_aryParam, true)); if (BLOCKEN_TIME_OVER < $fTakeTime) { $sDebug .= sprintf("<script language=\"JavaScript\"><!--\nalert(\"take time %01.03f sec.\");\n// --></script>\n", $fiTakeTime); } $sBuff = preg_replace('/<\\/body>/i', "{$sDebug}\n</body>", $sBuff); if ($this->_bCacheHit) { $sBuff = preg_replace('/<body(.*)>/i', "<body\\1>\n(Cache Hit)<br />", $sBuff); } } else { $sDebug = sprintf("<!--\ntake time %01.03f sec.\n\n\$aryParam = %s\n-->\n", $fTakeTime, var_export($this->_aryParam, true)); $sBuff .= $sDebug; } } return $sBuff; }
if (BLOCKEN_SESSION_IDLE) { $aryPear['session']->setIdle(BLOCKEN_SESSION_IDLE); if ($aryPear['session']->isIdle()) { $aryPear['session']->destroy(); } $aryPear['session']->updateIdle(); } } if (BLOCKEN_AUTH_USE && BLOCKEN_WEB == BLOCKEN_MODE) { $aryPear['auth'] = BlockenAuth::factory(BLOCKEN_AUTH_MODE, BLOCKEN_AUTH_DRIVER, unserialize(BLOCKEN_AUTH_OPTION)); } else { $aryPear['auth'] =& new BlockenAuth(); } $aryPear['curl'] =& new BlockenCurl(null, BLOCKEN_CURL_USERAGENT); $aryPear['curl']->setOptions(unserialize(BLOCKEN_CURL_OPTION)); if (BLOCKEN_CMD_USE && BLOCKEN_WEB == BLOCKEN_MODE && (!BLOCKEN_CMD_MEMBER_ONLY || BLOCKEN_CMD_MEMBER_ONLY && BlockenCommon::isMember())) { $objCmdAuth = BlockenAuth::factory('http', BLOCKEN_CMD_DRIVER, unserialize(BLOCKEN_CMD_OPTION)); if (isset($aryParam['_bin'])) { $objCmdAuth->start(); include_once 'BlockenCommand.php'; cmdWeb($aryParam); } if (ereg(BLOCKEN_DOC_PATH, $_SERVER['SCRIPT_NAME'])) { $objCmdAuth->start(); return; } } else { if (ereg(BLOCKEN_DOC_PATH, $_SERVER['SCRIPT_NAME'])) { header('HTTP/1.0 403 Forbidden'); echo '403 Forbidden'; exit;