$subgallery = ' <ul class="sub">' . LF; foreach ($subgalleries as $sub) { $subgallery .= ' <li class="sub">' . LF; $subgallery .= ' <h3><a href="' . $gallery->url . '&subgallery=' . $sub['f_id'] . '">'; $subgallery .= html_specialchars($sub['f_name']) . '</a></h3>' . LF; if ($row['f_longinfo'] != '') { $subgallery .= ' ' . plaintext_htmlencode($sub['f_longinfo']) . LF; } $subgallery .= ' </li>' . LF; } $subgallery .= ' </ul>' . LF; } $galleries[$g] = ' <li class="root">' . LF; $galleries[$g] .= ' <h2>'; if ($subgallery != '') { $galleries[$g] .= html_specialchars($row['f_name']); } else { $galleries[$g] .= '<a href="' . $gallery->url . '&subgallery=' . $row['f_id'] . '">' . html_specialchars($row['f_name']) . '</a>'; } $galleries[$g] .= '</h2>' . LF; if ($row['f_longinfo'] != '') { $galleries[$g] .= ' ' . plaintext_htmlencode($row['f_longinfo']) . LF; } $galleries[$g] .= $subgallery; $galleries[$g] .= ' </li>'; $g++; } $gallery = count($galleries) ? '<ul class="gallery">' . LF . implode(LF, $galleries) . LF . '</ul>' : ''; } $content['all'] = str_replace('{GALLERY}', '<hr /><h1>Gallery</h1>' . LF . $gallery . LF . '<hr />', $content['all']); }
$article_description = preg_replace('/(.*?\\.).+?$/', '$1', $article_description); $article_author = $rssvalue->get_author(); if ($article_author) { $article_author = html_entity_decode($article_author->get_name(), ENT_COMPAT, PHPWCMS_CHARSET); } else { $article_author = $feedimport_result['cnt_object']['author_name']; } if ($article_summary && $article_content && $article_summary == $article_content) { $article_content = ''; } if ($article_content && !$article_summary) { $article_summary = $article_content; $article_content = ''; } if ($article_summary && $article_summary == strip_tags($article_summary)) { $article_summary = plaintext_htmlencode($article_summary); } elseif ($article_summary && strpos($article_summary, '<') !== false) { $article_summary = preg_replace(array('/<.+?[^>]*>\\s*<\\/.+?>/', '/<.+?[^>]*><\\/.+?>/', '/<.+?[^>]*>' . preg_quote($rssvalue->get_title(), '/') . '<\\/.+?>/', '/<.+?[^>]*>' . preg_quote(html_entities($article_title), '/') . '<\\/.+?>/'), '', $article_summary); } if ($article_content && strpos($article_content, '<') !== false) { $article_content = preg_replace(array('/<.+?[^>]*>\\s*<\\/.+?>/', '/<.+?[^>]*><\\/.+?>/', '/<.+?[^>]*>' . preg_quote($rssvalue->get_title(), '/') . '<\\/.+?>/', '/<.+?[^>]*>' . preg_quote(html_entities($article_title), '/') . '<\\/.+?>/'), '', $article_content); } $article_categories = $rssvalue->get_categories(); if (is_array($article_categories) && count($article_categories)) { foreach ($article_categories as $key => $cat) { if ($cat->term) { $article_categories[$key] = $cat->term; } else { unset($article_categories[$key]); } }
$form_error .= '<td class="form-label">' . " </td>\n"; } $form_error .= '<td' . (!empty($cnt_form["error_class"]) ? ' class="' . $cnt_form["error_class"] . '"' : '') . '>'; $form_error .= implode("<br />", $POST_ERR); $form_error .= "</td>\n</tr>\n"; } $form_cnt = $form_error . $form_cnt; unset($form_error); } } } else { // form was not send yet // display startup text if (!empty($cnt_form['startup'])) { if (empty($cnt_form['startup_html'])) { $CNT_TMP .= LF . '<div class="form-intro">' . LF . plaintext_htmlencode($cnt_form['startup']) . LF . '</div>' . LF; } else { $CNT_TMP .= LF . $cnt_form['startup'] . LF; } } } if ($form_cnt) { $form_cnt = str_replace('###RESET###', '', $form_cnt); $cnt_form["class_close"] = ''; if ($cnt_form["class"]) { $CNT_TMP .= '<div class="' . $cnt_form["class"] . '">'; $cnt_form["class_close"] = '</div>'; $cnt_form['class'] = ' class="form-' . $cnt_form["class"] . '"'; } else { $cnt_form['class'] = ''; }
$GLOBALS['_search_navi'] = implode($GLOBALS['_search_navi'][1][0], $_search_navi_x); } else { $GLOBALS['_search_navi'] = ''; } $crow['template']['pagination'] = render_cnt_template($crow['template']['pagination'], 'NAVI', $GLOBALS['_search_navi']); if ($crow['template']['paginate_custom']) { $crow['template']['pagination'] = '<div class="' . $template_default['classes']['search-nextprev'] . '">' . LF . ' ' . $crow['template']['pagination'] . LF . '</div>'; } } else { $crow['template']['text'] = $content['search']['text_html'] ? $content["search"]["text_noresult"] : plaintext_htmlencode($content['search']['text_noresult']); } } else { $crow['template']['text'] = $content['search']['text_html'] ? $content["search"]["text_noresult"] : plaintext_htmlencode($content['search']['text_noresult']); } } else { $crow['template']['text'] = $content['search']['text_html'] ? $content["search"]["text_intro"] : plaintext_htmlencode($content['search']['text_intro']); } $content["search_word"] = count($content['highlight']) ? html(implode(' ', $content['highlight'])) : ''; $crow['template']['result'] = $crow['template']['header']; $crow['template']['result'] .= $crow['template']['footer']; if (isset($content["search"]["result_per_page"])) { //build search form unset($GLOBALS['_getVar']['searchwords'], $GLOBALS['_getVar']['searchstart']); if (empty($content["search"]["label_button"])) { $content["search"]["label_button"] = '@@Search@@'; } $crow['template']['form'] = ' '; if (strpos($crow['template']['result'], '{FORM}') !== false) { $crow['template']['form'] = '<div class="search_form"'; if ($content["search"]["align"] === 1) { $crow['template']['form'] .= ' style="text-align:right;"';
function parse($item, $type = 'GALLERY_ITEM') { if ($type === 'GALLERY_ITEM') { $entry = $this->list_template; $name = html($item['f_name']); $link = $this->url . '&gallery=' . $item['f_id']; $title = $this->list_title_prefix . $name . $this->list_title_suffix; $descr = trim($item['f_longinfo']); if ($descr !== '') { $descr = $this->list_descr_prefix . plaintext_htmlencode($descr) . $this->list_descr_suffix; } $thumbs = array(); // get preview/thumbnail image(s) for this gallery if ($this->list_thumbnail > 0) { $temp_limit = $this->image_limit; $temp_sort = $this->image_sort; $this->image_limit = $this->list_thumbnail; $this->image_sort = 'DESC'; $this->getImages($item['f_id']); foreach ($this->images as $image) { $img = '<img src="'; $img .= $this->image_src . $this->list_thumbnail_width . 'x' . $this->list_thumbnail_height; if ($this->list_thumbnail_crop == 1) { $img .= 'x1'; } $img .= '/' . $image['f_hash'] . '.' . $image['f_ext']; $img .= '" alt="' . $name . '" border="0" />'; $thumbs[] = $this->list_thumbnail_prefix . $img . $this->list_thumbnail_suffix; } $this->image_limit = $temp_limit; $this->image_sort = $temp_sort; } $thumbs = implode(LF, $thumbs); $entry = str_replace('{TITLE}', $title, $entry); $entry = str_replace('{DESCRIPTION}', $descr, $entry); $entry = str_replace('{THUMBNAIL}', $thumbs, $entry); $entry = str_replace('[/LINK]', '</a>', $entry); $entry = str_replace('[LINK]', '<a href="' . $link . '" title="' . $name . '">', $entry); $entry = render_cnt_date($entry, $item['f_created']); return $this->parseGeneral($entry); } }
if (isset($_POST['tabtitle']) && is_array($_POST['tabtitle']) && count($_POST['tabtitle'])) { $x = 0; foreach ($_POST['tabtitle'] as $key => $value) { $content["tabs"][$x]['tabtitle'] = clean_slweg($value); if ($content["tabs"][$x]['tabtitle'] == '') { $content["tabs"][$x]['tabtitle'] = $BL['be_tab_name'] . ' #' . ($x + 1); } $content["tabs"][$x]['tabheadline'] = empty($_POST['tabheadline'][$key]) ? '' : clean_slweg($_POST['tabheadline'][$key]); $content["tabs"][$x]['tabtext'] = empty($_POST['tabtext'][$key]) ? '' : slweg($_POST['tabtext'][$key]); $content["tabs"][$x]['tablink'] = empty($_POST['tablink'][$key]) ? '' : clean_slweg($_POST['tablink'][$key]); $content['search'] .= strip_tags(trim($content["tabs"][$x]['tabtitle'] . ' ' . $content["tabs"][$x]['tabheadline'] . ' ' . $content["tabs"][$x]['tabtext'])) . ' '; $content['html'][] = ' <dt>' . html_specialchars($content["tabs"][$x]['tabtitle']) . '</dt>'; $content['html'][] = ' <dd>'; if ($content["tabs"][$x]['tabheadline']) { $content['html'][] = ' <h3>' . html_specialchars($content["tabs"][$x]['tabheadline']) . '</h3>'; } if (!$content['tabwysiwygoff'] && strpos($content["tabs"][$x]['tabtext'], '<') === false) { $content["tabs"][$x]['tabtext'] = plaintext_htmlencode($content["tabs"][$x]['tabtext']); $content['html'][] = ' ' . $content["tabs"][$x]['tabtext']; } $content['html'][] = ' </dd>'; $x++; } } $content['search'] = trim($content['search']); if (count($content['html'])) { $content['html'] = '<dl>' . LF . implode(LF, $content['html']) . LF . '</dl>'; } else { $content['html'] = ''; } $content['tabs']['tabwysiwygoff'] = $content['tabwysiwygoff'];
$news['entries'][$key] .= $news['tmpl_entry']; } else { if (empty($news['tmpl_gallery_item'])) { $news['tmpl_gallery_item'] = get_tmpl_section('GALLERY_ITEM', $news['tmpl_entry']); } $news['entries'][$key] .= replace_tmpl_section('GALLERY_ITEM', $news['tmpl_entry']); } if ($value['cnt_teasertext']) { $value['cnt_opengraph_teasertext'] = $value['cnt_teasertext']; if ($news['config']['news_teaser_limit_chars']) { $value['cnt_teasertext'] = getCleanSubString($value['cnt_teasertext'], $news['config']['news_teaser_limit_chars'], $news['config']['news_teaser_limit_ellipse'], 'char'); } elseif ($news['config']['news_teaser_limit_words']) { $value['cnt_teasertext'] = getCleanSubString($value['cnt_teasertext'], $news['config']['news_teaser_limit_words'], $news['config']['news_teaser_limit_ellipse'], 'word'); } if (empty($value['cnt_object']['cnt_textformat']) || $value['cnt_object']['cnt_textformat'] == 'plain') { $value['cnt_teasertext'] = plaintext_htmlencode($value['cnt_teasertext']); } elseif ($value['cnt_object']['cnt_textformat'] == 'br') { $value['cnt_teasertext'] = br_htmlencode($value['cnt_teasertext']); } elseif ($value['cnt_object']['cnt_textformat'] == 'markdown') { if (!isset($phpwcms['parsedown_class'])) { require_once PHPWCMS_ROOT . '/include/inc_ext/parsedown/Parsedown.php'; require_once PHPWCMS_ROOT . '/include/inc_ext/parsedown-extra/ParsedownExtra.php'; $phpwcms['parsedown_class'] = new ParsedownExtra(); } $value['cnt_teasertext'] = $phpwcms['parsedown_class']->text($value['cnt_teasertext']); } elseif ($value['cnt_object']['cnt_textformat'] == 'textile') { if (!isset($phpwcms['textile_class'])) { require_once PHPWCMS_ROOT . '/include/inc_ext/classTextile.php'; $phpwcms['textile_class'] = new Textile(); } $value['cnt_teasertext'] = $phpwcms['textile_class']->TextileThis($value['cnt_teasertext']);
} else { $crow["acontent_template"] = '[TITLE]<h4>{TITLE}</h4>' . LF . '[/TITLE][SUBTITLE]<h5>{SUBTITLE}</h5>' . LF . '[/SUBTITLE][TEXT]<p>{TEXT}</p>[/TEXT]'; } $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'TITLE', html_specialchars($crow['acontent_title'])); $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'SUBTITLE', html_specialchars($crow['acontent_subtitle'])); $crow["acontent_form"] = @unserialize($crow["acontent_form"]); $crow["acontent_form"] = isset($crow["acontent_form"]['ctext_format']) ? $crow["acontent_form"]['ctext_format'] : 'plain'; switch ($crow["acontent_form"]) { case 'markdown': // Load ParseDown class if (!isset($phpwcms['parsedown_class'])) { require_once PHPWCMS_ROOT . '/include/inc_ext/parsedown/Parsedown.php'; require_once PHPWCMS_ROOT . '/include/inc_ext/parsedown-extra/ParsedownExtra.php'; $phpwcms['parsedown_class'] = new ParsedownExtra(); } $crow['acontent_text'] = $phpwcms['parsedown_class']->text($crow['acontent_text']); break; case 'textile': // Load Textile function and class if (!isset($phpwcms['textile_class'])) { require_once PHPWCMS_ROOT . '/include/inc_ext/classTextile.php'; $phpwcms['textile_class'] = new Textile(); } $crow['acontent_text'] = $phpwcms['textile_class']->TextileThis($crow['acontent_text']); break; case 'plain': $crow['acontent_text'] = plaintext_htmlencode($crow['acontent_text']); break; } $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'TEXT', $crow['acontent_text']); $CNT_TMP .= LF . trim($crow["acontent_template"]) . LF;
$img_a = render_cnt_template($img_a, 'COPYRIGHT', $caption[4]); $img_a = render_cnt_template($img_a, 'FIRST', $col > 1 ? '' : $col); $img_a = render_cnt_template($img_a, 'ROW', $x + 1); // new freetext value $value['freetext'] = empty($value['freetext']) ? '' : trim($value['freetext']); switch ($image['text_render']) { case 'markdown': $value['freetext'] = $phpwcms['parsedown_class']->text($value['freetext']); break; case 'textile': $value['freetext'] = $phpwcms['textile_class']->TextileThis($value['freetext']); break; case 'html': break; default: $value['freetext'] = plaintext_htmlencode($value['freetext'], 'html_entities'); break; } if (empty($value['url'])) { $value['url'] = ''; $value['url_target'] = ''; } else { $value['url'] = explode(' ', $value['url']); $value['url_target'] = empty($value['url'][1]) ? '' : trim($value['url'][1]); $value['url'] = trim($value['url'][0]); } $img_a = render_cnt_template($img_a, 'INFOTEXT', $value['freetext']); $img_a = render_cnt_template($img_a, 'URL', $value['url']); $img_a = render_cnt_template($img_a, 'URL_TARGET', $value['url_target']); if ($image['nocaption']) { $img_a = render_cnt_template($img_a, 'CAPTION_ELSE', '');
if (isset($media["result"][0])) { $media["mime"] = $media["result"][0]["f_type"]; $media["source"] = PHPWCMS_FILES . $media["result"][0]["f_hash"]; if ($media["result"][0]["f_ext"]) { $media["source"] .= '.' . $media["result"][0]["f_ext"]; } } } if (!empty($media["image_id"])) { $media["alt"] .= '<div class="alt-image">'; $media["alt"] .= '<img src="img/cmsimage.php/' . $media["media_width"] . 'x' . $media["media_height"] . 'x1/' . $media["image_id"] . '" '; $media["alt"] .= 'alt="' . html_specialchars($media["image_name"]) . '" />'; $media["alt"] .= '</div>'; } if (!empty($media["image_caption"])) { $media["alt"] .= plaintext_htmlencode($media["image_caption"]); } if ($media["alt"]) { $media["alt"] = ' ' . $media["alt"] . LF; } //Aufbauen der Plugin-Codeteile if ($media["source"]) { $randomID = 'mediaID' . $crow['acontent_id']; switch ($media["media_player"]) { case 0: //Quicktime Player/Plugin $block['custom_htmlhead']['AC_QuickTime.js'] = ' <script src="' . TEMPLATE_PATH . 'inc_js/AC_QuickTime.js"' . SCRIPT_ATTRIBUTE_TYPE . '></script>'; $media["media_height"] = $media["media_height"] + ($media["media_control"] == "true" ? 16 : 0); $media["width"] = $media["media_width"] ? 'width="' . $media["media_width"] . '" ' : ''; $media["height"] = $media["media_height"] ? 'height="' . $media["media_height"] . '" ' : ''; $media["code"] = LF . '<script' . SCRIPT_ATTRIBUTE_TYPE . '>' . LF . SCRIPT_CDATA_START . LF;
function render() { $items = array('top' => array(), 'default' => array(), 'bottom' => array(), 'hide' => array()); $now = now(); foreach ($this->dates as $key => $date) { $url = ''; $target = ''; $href = $this->href ? $this->href . '&show_date=' . date('Y-m-d', $date['calendar_start_date']) . '_' . $date['calendar_id'] : ''; $itemgroup = 'default'; if ($date['calendar_range']) { $date['calendar_range_start_date'] = strtotime($date['calendar_range_start'] . ' ' . date('H:i', $date['calendar_start_date'])); $date['calendar_range_end_date'] = strtotime($date['calendar_range_end']); $expired_date = $this->expired === 'START' ? 'calendar_range_start_date' : 'calendar_range_end_date'; } else { $expired_date = $this->expired === 'START' ? 'calendar_start_date' : 'calendar_end_date'; } if ($this->expired !== '' && $date[$expired_date] < $now) { if ($this->expired === 'bottom' || $this->expired === 'top') { $itemgroup = $this->expired; } elseif ($this->expired === 'hide') { unset($this->dates[$key]); continue; } } if (!empty($date['calendar_refid'])) { $date['calendar_refid'] = get_redirect_link($date['calendar_refid'], ' ', ''); $date['calendar_refid']['link'] = trim($date['calendar_refid']['link']); $date['calendar_refid']['link'] = trim($date['calendar_refid']['link'], '#'); $target = $date['calendar_refid']['target']; if (is_intval($date['calendar_refid']['link'])) { $url = rel_url(array(), array(), 'aid=' . $date['calendar_refid']['link']); //'index.php?aid='.$date['calendar_refid']['link']; } elseif (strpos($date['calendar_refid']['link'], '://') || strpos($date['calendar_refid']['link'], '?') || strpos($date['calendar_refid']['link'], '.')) { $url = $date['calendar_refid']['link']; } elseif (!empty($date['calendar_refid']['link'])) { $url = rel_url(array(), array(), $date['calendar_refid']['link']); } } // Split title/type if ($this->gettype !== '') { $date['calendar_title'] = explode($this->gettype, $date['calendar_title'], 2); $date['calendar_type'] = empty($date['calendar_title'][1]) ? '' : trim($date['calendar_title'][1]); $date['calendar_title'] = trim($date['calendar_title'][0]); } else { $date['calendar_type'] = ''; } if ($date['calendar_teaser']) { if ($this->teaserwords) { $date['calendar_teaser'] = getCleanSubString($date['calendar_teaser'], $this->teaserwords, $GLOBALS['template_default']['ellipse_sign'], 'word'); } $date['calendar_teaser'] = plaintext_htmlencode($date['calendar_teaser']); } $items[$itemgroup][$key] = $this->template; $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'HREF', $href); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'URL', $url); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TARGET', $target); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TITLE', html_specialchars($date['calendar_title'])); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TYPE', $date['calendar_type'] ? html_specialchars($date['calendar_type']) : ''); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TEASER', $date['calendar_teaser']); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TEXT', $date['calendar_text']); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'PLACE', html_specialchars($date['calendar_where'])); $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'ALLDAY', $date['calendar_allday'] ? ' ' : ''); // Detect if range date if ($date['calendar_range']) { $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'RANGEDATE', ' '); $items[$itemgroup][$key] = render_cnt_date($items[$itemgroup][$key], $date['calendar_range_start_date'], $date['calendar_range_start_date'], $date['calendar_range_end_date']); } else { $items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'RANGEDATE', ''); } $items[$itemgroup][$key] = render_cnt_date($items[$itemgroup][$key], $date['calendar_start_date'], $date['calendar_start_date'], $date['calendar_end_date']); } if (!count($items['default']) && !count($items['top']) && !count($items['bottom'])) { $items['default'][] = str_replace('{CALENDAR_RESET}', $this->resetCalendarLink(), $this->no_calendar_item_found); } elseif ($this->expired && count($items[$this->expired])) { array_unshift($items[$this->expired], $this->expired_prefix); $items[$this->expired][] = $this->expired_suffix; if ($this->expired === 'top') { $items = implode(LF, $items['top']) . LF . implode(LF, $items['default']); } else { $items = implode(LF, $items['default']) . LF . implode(LF, $items['bottom']); } } else { $items = implode(LF, $items['default']); } return $items; }
if ($content['files_result'][$_files_x]['f_created'] <= 0) { $content['files_result'][$_files_x]['f_created'] = filectime($_file_current); } $_files_entries[$fkey] = str_replace('{FILE_DATE}', strftime($_files_settings['date_format'], $content['files_result'][$_files_x]['f_created']), $_files_entries[$fkey]); if ($content['files_direct'] && $content['files_result'][$_files_x]['f_ext']) { $_files_entries[$fkey] = str_replace('{FILE_LINK}', 'download.php?f=' . $content['files_result'][$_files_x]['f_hash'] . '&countonly=1', $_files_entries[$fkey]); } else { $_files_entries[$fkey] = str_replace('{FILE_LINK}', 'download.php?f=' . $content['files_result'][$_files_x]['f_hash'], $_files_entries[$fkey]); } if ($_file_info[1]) { $_files_entries[$fkey] = str_replace('{FILE_NAME}', html_specialchars($_file_info[1]), $_files_entries[$fkey]); } else { $_files_entries[$fkey] = str_replace('{FILE_NAME}', html_specialchars($content['files_result'][$_files_x]['f_name']), $_files_entries[$fkey]); } $_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_TITLE', html_specialchars($_file_info[2])); $_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_LONGINFO', empty($content['files_result'][$_files_x]['f_longinfo']) ? '' : plaintext_htmlencode($content['files_result'][$_files_x]['f_longinfo'])); $_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_DESCRIPTION', html_specialchars($_file_info[0])); $_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_COPYRIGHT', html_specialchars($_file_info[5])); // now check file for possible thumbnail image $_files_image = false; if ($_file_info[4] && strpos($_files_entries[$fkey], 'FILE_IMAGE') !== false) { $target_ext = $content['files_result'][$_files_x]['f_ext']; // do it for jpg, png or gif only switch ($content['files_result'][$_files_x]['f_ext']) { case 'tif': case 'tiff': case 'pdf': case 'psd': case 'eps': if ($GLOBALS['phpwcms']['image_library'] == 'gd2' || $GLOBALS['phpwcms']['image_library'] == 'gd') { break;
} if ($clist_diff_next == 0) { //entry close tag $crow["acontent_text"] .= '</' . $clist_listentry . '>' . LF; } else { if ($clist_diff_next > 0) { //entry close tag and list close tag $crow["acontent_text"] .= '</' . $clist_listentry . '>' . LF . '</' . $clist_listmain . '>' . LF; if ($clist_diff_next >= 1) { for ($i = 0; $i < abs($clist_diff_next) - 1; $i++) { //entry close tag if (!$i) { $crow["acontent_text"] .= '</' . $clist_listentry . '>' . LF; } //list close tag $crow["acontent_text"] .= '</' . $clist_listmain . '>' . LF; } //entry close tag $crow["acontent_text"] .= '</' . $clist_listentry . '>' . LF; } } } } //list close tag $crow["acontent_text"] .= '</' . $clist_listmain . '>' . LF; } $CNT_TMP .= $crow["acontent_text"]; } else { // show text only and do nothing else $CNT_TMP .= div_class(plaintext_htmlencode($crow["acontent_text"]), $template_default["article"]["text_class"]); }