function korrektur_http ($matches) { return "".str_replace("http://", "", $matches[0]).""; } function korrektur_mailto ($matches) { // zu lange Emailadressen mit Leerzeichen hinter @ versehen /* $arrMatches = explode('-', $matches[0]); foreach ($arrMatches as $match) { if (strlen( $match ) > 37 ) { $newMaillink = str_replace('@', '@ ', str_replace("mailto:", "", $matches[0] ) ); break; } else $newMaillink = str_replace("mailto:", "", $matches[0] ) ; }*/ return "".str_replace("mailto:", "", $matches[0]).""; #return "".$newMaillink.""; } function fliesstext($text) { $text = '

' . $text . '

'; $text = str_replace("[fett]", "", $text); $text = str_replace("[/fett]", "", $text); $text = str_replace("[g]", "", $text); $text = str_replace("[/g]", "", $text); $text = str_replace("[tab]", "  ", $text); $text = str_replace("[h1]", "

", $text); $text = str_replace("[/h1]", "

", $text); $text = str_replace("[h2]", "

", $text); $text = str_replace("[/h2]", "

", $text); $text = str_replace("[liste]", "

", $text); $text = nl2br($text); $text = str_replace("[listenpunkt]", "

  • ", $text); $text = str_replace("[/listenpunkt]", "
  • ", $text); $text = str_replace("
    ", "", $text); $text = str_replace("
    ", "", $text); $text = str_replace("

    ", "", $text); $text = str_replace("


    ", "

    ", $text); #$muster = '/http:\/\/(\d|\w|\.|-|\/|_)+\b/'; #$text = preg_replace_callback($muster, 'korrektur_http', $text); $muster = '/mailto:(\d|\w|\.|-|_|@)+\b/'; $text = preg_replace_callback($muster, 'korrektur_mailto', $text); preg_match_all("|\^http.+\^.+\^|Us",$text,$externlink); for($i=0; $i".$linkteile[2]."",$text); } preg_match_all("|\^intern.+\^.+\^|U",$text,$internlink); for($i=0; $i"; $text=str_replace($internlink[0][$i],$newinternstring,$text); } $text = str_replace("@", "@", $text); $text = stripslashes($text); # return nl2br($text); return $text; } function navigation() { $navi = ""; // Hauptnavi generieren: $sql = 'SELECT ID, nav1_'.$_SESSION['sprache']. ' as nav1, anzeige, rang '. 'FROM nav1 WHERE anzeige = \'true\' ORDER BY rang'; $res = mysql_query($sql) OR die('Fehler bei der Datenbankabfrage, Fehlermeldung: '.mysql_error()); $navi .= '

    \n"; return $navi; } /* * Funktion für Liste und neuen Eintrag * Downloads und Links -> $link == file (Download) oder url (Link) * unter Meldungen, Kalender, Presse * und Projekte * */ function show_links($nav1, $ID_content, $typ) { $t = ($typ == 'file') ? 'Download' : 'Link'; $content = ''; $typ = ($typ == 'file') ? $typ : 'url'; $res = mysql_query('SELECT ID, name, link FROM links WHERE ID_content = '.(int)$ID_content .' AND typ = \''.$typ.'\' ORDER BY rang'); if (mysql_num_rows($res) > 0) { if ($nav1 == 7) $content .= '

    '.$t.'s

    '; $content .= ''; } return $content; } 'angebote', 2 => 'aktuelles', 3 => 'ueberuns', 4 => 'archiv', 5 => 'partner', 7 => 'kontakt', 8 => 'zeiten', 9 => 'impressum' ); #Kalender! */ $arrTage = array(1 => 'Montag', 2 => 'Dienstag', 3 => 'Mittwoch', 4 => 'Donnerstag', 5 => 'Freitag', 6 => 'Samstag', 7 => 'Sonntag'); $arrMonate = array("01" => "Januar", "02" => "Februar", "03" => "März", "04" => "April", "05" => "Mai", "06" => "Juni", "07" => "Juli", "08" => "August", "09" => "September", "10" => "Oktober", "11" => "November", "12" => "Dezember"); function formatierungen ($textareaName, $arrCodes) { if (in_array(0, $arrCodes)) $formate = '[Interner Link]  '; if (in_array(1, $arrCodes)) $formate .= '[Externer Link]  '; if (in_array(2, $arrCodes)) $formate .= '[PDF]  '; if (in_array(3, $arrCodes)) $formate .= '[Email]  '; #$formate .= '[f] '; #$formate .= '[g]Golddruck[/g] Code einfügen
    '; #$formate .= '[h1]Überschrift 1. Grad[/h1] Code einfügen
    '; if (in_array(4, $arrCodes)) $formate .= ' [fett]  '; if (in_array(5, $arrCodes)) $formate .= ' [h1]  '; if (in_array(6, $arrCodes)) $formate .= ' [h2]  '; if (in_array(7, $arrCodes)) $formate .= ' [liste]  '; if (in_array(8, $arrCodes)) $formate .= ' [listenpunkt]  '; #$formate .= '[tab]'; return $formate; } ?>