Herzlich Willkommen

e; } $tpl->reset(); $htmlpath = $cfgClient[$client]['path']['htmlpath']; $frontendpath = $cfgClient[$client]['path']['frontend']; // selected category $selcat = "1579"; $template = "teaser-standard.html"; // anzahl der zeichen text $mxtext = 200; $limit = "21"; $cms_sort_direction = "desc"; if ($cms_sort_direction == '') { $cms_sort_direction = 'desc'; } if ("sortdate" == "sortdate") { $order = 'publisheddate'; } else { $order = 'sortsequence'; } if ("no" == 'yes') { $with_start = true; } else { $with_start = false; } $newsheadline = ""; $tpl->set('s', 'TITLE', $newsheadline); if (strlen($selcat) > 0 AND $selcat != '0') { $options = array ('idcat' => $selcat, "start" => $with_start, "order" => $order, "direction" => $cms_sort_direction); $list = new cArticleCollector($options); $count = $list->count(); if ($count > 0) { if (is_numeric($limit) AND strlen($limit) > 0) { if ($limit < $count) { $limit_art = $limit; } else { $limit_art = $count; } } else { $limit_art = $count; } for ($i = 0; $i < $limit_art; $i ++) { $article = $list->nextArticle(); $article_id = $article->getField('idart'); $teaser_img = ''; if ($noimg != 'true') { $text_html = $article->getContent('CMS_HTML', 1); $regEx = "/]*?>.*?/i"; $match = array (); preg_match($regEx, $text_html, $match); $regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i"; $img = array (); preg_match($regEx, $match[0], $img); $img_src = preg_split("/\//", $img[0]); $img_name = $img_src[count($img_src) - 1]; $img_name = preg_replace("/\"/", "", $img_name); $img_split = preg_split("/\./", $img_name); $img_type = $img_split[count($img_split) - 1]; $img_split2 = preg_split("/_/", $img_split[0]); $name = $img_name; if (count($img_split2) > 1) { $img_x = $img_split2[count($img_split2) - 1]; $img_y = $img_split2[count($img_split2) - 2]; if (is_numeric($img_x) AND is_numeric($img_y)) { $suffix = "_".$img_x."_".$img_y.".".$img_type; $name = preg_replace("/$suffix/", "", $img_name); $name = $name.".[a-zA-Z]{3}"; } } $img_teaser = ''; if (strlen($name) > 0) { $sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filename REGEXP '$name' "; //echo "
"; print_r($sql); echo "
"; $db->query($sql); if ($db->next_record()) { $filename = $db->f('filename'); $dirname = $db->f('dirname'); } $img_path = $cfgClient[$client]["upl"]["path"].$dirname.$filename; $img_size = "180"; $img_teaser = capiImgScale($img_path, $img_size, $img_size, $crop = false, $expand = false, $cacheTime = 1000, $wantHQ = false); } // end if strlen if (strlen($img_teaser) > 0) { // html eingefuegt um Bild weglassen zu koennen $teaser_img = '
'; } else { $teaser_img = ''; } } // end if noimg $headline = strip_tags($article->getContent('CMS_HTMLHEAD', 1)); $headline = str_replace($replace, " ", $headline); /* $subheadline = strip_tags($article->getContent('CMS_HTMLHEAD', 2)); $subheadline = str_replace($replace, " ", $subheadline);*/ $teaserheadline = /*$subheadline." - ".*/ $headline; $href = $sess->url("/"); $teasertext = stripslashes($article->getField('summary')); // hinzugefuegt: Datum der Veroeffentlichung $erstellt = $article->getField('published'); $day = date("w", strtotime($erstellt)); $days = array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"); $erstellt = $days[$day].", ".date("d.m.Y", strtotime($erstellt)); if (strlen(trim($teasertext)) == 0) { $teasertext = strip_tags($article->getContent('CMS_HTML', 1)); $teasertext2 = $teasertext; $teasertext = capiStrTrimAfterWord($teasertext, $mxtext); if ($teasertext!=$teasertext2) { $teasertext.= '...'; } } // end if $teasertext = $teasertext." "; $tpl->set('d', 'HEADLINE', $teaserheadline); $tpl->set('d', 'TEXT', $teasertext); $tpl->set('d', 'HREF', $href); $tpl->set('d', 'IMG', $teaser_img); $tpl->set('d', 'MORE', mi18n("mehr")); $tpl->set('d', 'ERSTELLT', $erstellt); $tpl->next(); } // end for $tpl->generate('templates/'.$template); } } ?>

RSS-Feed | Newsletter | Sitemap | Impressum | Datenschutz