WebsiteBaker 2.13.9 R24 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
alexander.franksmann<!-- @werbemailparadis.de --><script type="text/javascript">document.write('@nifbe.de');</script><noscript><span style="visibility:hidden;">x</span>@<span style="visibility:hidden;">x</span>nifbe.de</noscript></span>
<?php// $Id: view.php 399 2006-12-24 07:50:44Z Ruebenwurzel $/* WebsiteBaker Project <http://www.WebsiteBaker.org/> Copyright (C) 2004-2007, Ryan Djurovich WebsiteBaker is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. WebsiteBaker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with WebsiteBaker; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/// How many wysiwyg sections existsif(!isset($count_sections)){ // do it once $query = "SELECT COUNT(".TABLE_PREFIX."mod_wysiwyg.section_id) as count_sections FROM ".TABLE_PREFIX."mod_wysiwyg LEFT JOIN sections ON ".TABLE_PREFIX."mod_wysiwyg.section_id = ".TABLE_PREFIX."sections.section_id WHERE ".TABLE_PREFIX."mod_wysiwyg.page_id = ".PAGE_ID." AND block = 1"; $get_content = $database->query($query); $fetch_content = $get_content->fetchRow(); $count_sections = $fetch_content['count_sections'];}// Get content$get_content = $database->query("SELECT content, position FROM ".TABLE_PREFIX."mod_wysiwyg LEFT JOIN sections ON ".TABLE_PREFIX."mod_wysiwyg.section_id = ".TABLE_PREFIX."sections.section_id WHERE ".TABLE_PREFIX."mod_wysiwyg.section_id = '$section_id'");$fetch_content = $get_content->fetchRow();$content = ($fetch_content['content']);$position = $fetch_content['position'];$nextposition = $position+1;$query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg LEFT JOIN sections ON ".TABLE_PREFIX."mod_wysiwyg.section_id = ".TABLE_PREFIX."sections.section_id WHERE 1 AND ".TABLE_PREFIX."sections.block = 2 AND ".TABLE_PREFIX."sections.position = ".$nextposition." AND ".TABLE_PREFIX."sections.page_id = ".PAGE_ID;$get_content = $database->query($query);$fetch_content = $get_content->fetchRow();$content2 = ($fetch_content['content']);$wb->preprocess($content);if($content2){ if($_GET["content"] == 2 && $_GET["s"] == $section_id){ echo $content; // return the content echo '<a name="s'.$section_id.'"></a>'; $wb->preprocess($content2); echo $content2; // return the detailed Version }else{ $read_more_link = ' <a href="'.$_SERVER['PHP_SELF'].'?content=2&s='.$section_id.'#s'.$section_id.'"> mehr...</a>'; $content = trim($content); if(substr($content,-4) == "</p>" || substr($content,-4) == "</P>"){ $content = substr($content,0,-4); // cut of the last </p> $content .= $read_more_link.'</p>'; // add the read more link and the end of the paragraph }else{ $content = $content.$read_more_link; // add only the read more link. } if(($_GET["print"] == 1 && $_GET["s"] == $section_id) || !isset($_GET["print"])){ echo $content; // return the content } }}else{ if(($_GET["print"] == 1 && $_GET["s"] == $section_id) || !isset($_GET["print"])){ echo $content; // return the content }}if(!isset($_GET["print"])){ echo '<div class="printerlink"><a href="'.$_SERVER['PHP_SELF'].'?content=2&s='.$section_id.'&print=1" target="_blank" title="Diesen Artikel drucken"><img src="'.TEMPLATE_DIR.'/images/NIFBE_Drucker.jpg" alt="Druckersymbol" align="right" /> Druckversion </a></div>';}if($section_index < $count_sections){echo "<hr />";}?>