$g2_Config['path'] = dirname(__FILE__) . '/'; $g2_Config['embedPath'] = '/'; $g2_Config['relativeG2Path'] = '/photos/'; $g2_Config['embedUri'] = '/photos/index.html'; require_once( $g2_Config['path'] . 'embed.php'); $ret = GalleryEmbed::init(array( 'embedPath' => $g2_Config['embedPath'], 'relativeG2Path' => $g2_Config['relativeG2Path'], 'embedUri' => $g2_Config['embedUri'], 'fullInit' => 'false', 'gallerySessionId' => $_COOKIE['PHPSESSID'] )); GalleryCapabilities::set('login',false); GalleryCapabilities::set('showSidebarBlocks', false); // handle the G2 request $g2moddata = GalleryEmbed::handleRequest(); // show error message if isDone is not defined if (!isset($g2moddata['isDone'])) { print 'isDone is not defined, something very bad must have happened.'; exit; } // die if it was a binary data (image) request if ($g2moddata['isDone']) { exit; /* uploads module does this too */ } if ($ret->isError()) { print $ret->getAsHtml(); } $headHtml = $g2moddata['headHtml']; $headHtml = str_replace('', ' - ネパール.com', $headHtml); $bodyHtml = $g2moddata['bodyHtml']; $bodyHtml = preg_replace('@.*@si', 'aaaaa', $bodyHtml); ?>
echo $headHtml; ?>