<?php $body = ''; if (isset($_GET['id'])) { $id = $_GET['id']; $globalPostId = 'static' . $id; $markdown = 'data/static/' . $id . '.txt'; $fileName = $markdown; if (file_exists($fileName)) { $text = file_get_contents($fileName); $caption = getStaticTitle($id); $body = '<h2>' . $caption . '</h2>' . $globalMd->defaultTransform(remove_html_comments($text)); } else { $body = 'file not found'; } if (LOGIN_FLG && $body != 'file not found') { $body = '<button onclick="return staticEdit(' . $id . ');">編集</button> <button onclick="return subcontents(\'static' . $id . '\');">サブコンテンツ</button> <button onclick="return staticDel(' . $id . ');">削除</button>' . $body; } } else { $body = 'not found'; } $globalBody = $body;
$headerHeight = 64; $topBannerHeight = 290; $drupalAdminToolbar = 21; $headerTopPosition = in_array('authenticated user', $user->roles) ? $drupalAdminToolbar : 0; $topBannerTop = $headerTopPosition + $headerHeight; /* If top_page_banner has content, then push the page down, the top is fix positioned */ if ($page['top_page_banner']) { $pushContent = $headerHeight + $headerTopPosition + $topBannerHeight; } else { $pushContent = $headerHeight + $headerTopPosition; } //$pushContent = $headerHeight + $headerTopPosition; /* Get title image */ if (function_exists('getStaticTitle')) { $currentNid = arg(0) == 'node' ? arg(1) : null; $staticTitle = getStaticTitle($currentNid); } ?> <div id="header" class="page-section" style="top:<?php print $headerTopPosition; ?> px"> <div class="limit-width"> <div id="logo-slogan"> <?php if ($logo) { ?> <a href="<?php print $front_page; ?>