<?php if (!isset($aryParam['_rtn'])) { $aryParam['_rtn'] = BLOCKEN_HTTP_URL . BLOCKEN_ROOT_PATH . '/'; } if (BLOCKEN_MOBI_OFFCIAL) { $sUrl = ''; switch ($aryParam['_mode']) { case 'regist': $sUrl = BlockenCommon::registUrl($aryParam['_rtn'], $aryPear); break; case 'expire': $sUrl = BlockenCommon::expireUrl($aryParam['_rtn'], $aryPear); break; default: $sUrl = BLOCKEN_HTTP_URL . BLOCKEN_ROOT_PATH . '/'; break; } header("Location: {$sUrl}"); exit; } $objTemplate = loadTemplate(); $objTemplate->hideBlock('regist'); $objTemplate->hideBlock('expire'); $objTemplate->hideBlock('error'); switch ($aryParam['_mode']) { case 'regist': $objTemplate->touchBlock('regist'); break; case 'expire': $objTemplate->touchBlock('expire');
/** * &_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; }
<?php /** * img.php * * PHP versions 4 and 5 * * @package Blocken * @author Kouhei Suzuki <*****@*****.**> * @copyright 2006-2009 SIGMA Project * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version $Id: img.php 27 2009-04-25 06:39:17Z sigmax $ */ BlockenCommon::outputImage($aryPear, $aryParam); exit;
/** * rmDir() * * @access public * @param string $sDir * @return void */ function rmDir($sDir) { if (is_dir($sDir)) { foreach (glob("{$sDir}/*") as $sRow) { if (is_dir($sRow) && !is_link($sRow)) { BlockenCommon::rmDir($sRow); } else { unlink($sRow); } } rmdir($sDir); } }
/** * cmdCleanTmp() * * @return string */ function cmdCleanTmp() { $aryBuff = array(); $sTmpDir = BLOCKEN_TMP_DIR . '/'; foreach (glob($sTmpDir . '*') as $sRow) { if (is_dir($sRow) && !is_link($sRow)) { BlockenCommon::rmDir($sRow); } else { unlink($sRow); } $sRow = str_replace($sTmpDir, '', $sRow); $aryBuff[] = "[{$sRow}]"; } sort($aryBuff); $sBuff = "一時ファイル消去一覧\n" . implode("\n", $aryBuff); 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;