<body> <section> <?php const PREVIEW_LENGTH = 50; echo "<h3 class='document-title'>" . "<a target='_parent' href='show_document.php?id=" . $docId . "'>" . $meta["title"] . "</a>" . "<span class='right-time'>" . $meta["time"] . "</span></h3><br><br>"; require_once "../JBBCode/Parser.php"; require_once "../JBBCode/KhinenwCodeDefinitionSet.php"; require_once "../JBBCode/BBToolkit.php"; use JBBCode\Parser; use JBBCode\KhinenwCodeDefinitionSet; use JBBCode\BBToolkit; $parser = new Parser(); $parser->addCodeDefinitionSet(new KhinenwCodeDefinitionSet()); $parser->parse(BBToolkit::bracketToTag(file_get_contents(Config::$docsFolder . $docId . ".txt"))); $text = str_replace("<br>", "[br]", BBToolkit::tagToBracket(BBToolkit::useNewLine($parser->getAsHTML()))); $text = str_replace("[br]", "<br>", preg_replace("/<.*>/", "", preg_replace("/<\\/.*>/", "", $text))); if (mb_strlen($text) < PREVIEW_LENGTH) { echo $text; } else { echo mb_substr($text, 0, PREVIEW_LENGTH) . "..."; } echo "<br><br><a class='right-more' target='_parent' href='show_document.php?id=" . $docId . "'>Read More ></a>"; echo "<span class='view'>View : " . $count . "</span>"; echo "<br><a class='tag' target='_parent' href='show_tags.php'>#</a>"; foreach ($meta["tag"] as $tag) { echo "<a class='tag-contents' target='_parent' href='show_category.php?tag=" . $tag . "'>" . $tag . "</a> | "; } echo "<hr>"; ?> </section>
<section> <div class="section-wrapper"> <div class="section-inside-wrapper"> <?php echo "<h2 class='document-title'>" . $meta["title"] . "<span class='right-time'>" . $meta["time"] . "</span></h2><br><br>"; require_once "../JBBCode/Parser.php"; require_once "../JBBCode/KhinenwCodeDefinitionSet.php"; require_once "../JBBCode/BBToolkit.php"; use JBBCode\Parser; use JBBCode\KhinenwCodeDefinitionSet; use JBBCode\BBToolkit; $parser = new Parser(); $parser->addCodeDefinitionSet(new KhinenwCodeDefinitionSet()); $parser->parse(BBToolkit::bracketToTag(file_get_contents(Config::$docsFolder . $docId . ".txt"))); echo BBToolkit::tagToBracket(BBToolkit::useNewLine($parser->getAsHTML())); echo "<br><br><span class='view'>View : " . $count . "</span>"; echo "<br><span class='tag'>#</span>"; foreach ($meta["tag"] as $tag) { echo "<a class='tag-contents' href='show_category.php?tag=" . $tag . "'>" . $tag . "</a> | "; } echo "<hr>"; ?> <br><br> <!-- Disqus import --> <div id="disqus_thread"></div> <script> var id = <?php echo $docId;