DOCUMENTA KASSEL 16/06-23/09 2007

$iMaxLength) { $sString = wordwrap($sText, ($iMaxLength-strlen($sMessage)), '[cut]', 1); $asExplodedString = explode('[cut]', $sString); $sCutText = $asExplodedString[0]; $sReturn = $sCutText.$sMessage; } else { $sReturn = $sText; } return $sReturn; } $link = @mysql_connect ($database_server, $database_user, $database_pass) or "Fehler keine Verbindung zur Datenbank, später noch mal probieren"; mysql_select_db ($database_name); $fehler=0; ///**** wenn ID uerbmittelt // pruefen ob datensatz schon vorhanden $query ="SELECT title,uid, alias FROM pages WHERE pid='995' and deleted=0 and hidden=0 order by sorting"; $result = mysql_query ($query); $fehler=1; while ($i = mysql_fetch_row($result)){ //echo("

$i[0]
"); if($i[2]!=""){$link_url="$i[2].html";}else{$link_url="index.php?id=$i[1]";} $query2 ="SELECT header,bodytext,uid FROM tt_content WHERE pid='$i[1]' and colPos=0 and deleted=0 and hidden=0 and (CType='text' or CType='textpic' ) and l18n_parent=0 order by sorting"; // $text_tmp=""; $result2 = mysql_query ($query2); while ($i2 = mysql_fetch_row($result2)){ if($i2[0]!="" and $i2[0]!=" " ){ $text_tmp.="".strip_tags($i2[0])."
";} $text_tmp2= strip_tags(str_replace("

", " ", $i2[1]))." "; $text_tmp.= strip_tags($text_tmp2)."
"; } $sMessage2="
... mehr
____

"; $text_tmp= str_replace("

", "
",$text_tmp); $text_tmp2=wordCut($text_tmp, 275, $sMessage); echo("$text_tmp2 $sMessage2"); } $fehler=0; ///**** wenn ID uerbmittelt // pruefen ob datensatz schon vorhanden $query ="SELECT title,uid, alias FROM pages WHERE pid='330' and deleted=0 and hidden=0 order by sorting"; $result = mysql_query ($query); $fehler=1; while ($i = mysql_fetch_row($result)){ //echo("

$i[0]
"); if($i[2]!=""){$link_url="$i[2].html";}else{$link_url="index.php?id=$i[1]";} $query2 ="SELECT header,bodytext,uid FROM tt_content WHERE pid='$i[1]' and colPos=0 and deleted=0 and hidden=0 and (CType='text' or CType='textpic' ) and l18n_parent=0 order by sorting"; // $text_tmp=""; $result2 = mysql_query ($query2); while ($i2 = mysql_fetch_row($result2)){ if($i2[0]!="" and $i2[0]!=" " ){ $text_tmp.="".strip_tags($i2[0])."
";} $text_tmp2= strip_tags(str_replace("

", " ", $i2[1]))." "; $text_tmp.= strip_tags($text_tmp2)."
"; } $sMessage2="
... mehr
____

"; $text_tmp= str_replace("

", "
",$text_tmp); $text_tmp2=wordCut($text_tmp, 275, $sMessage); echo("$text_tmp2 $sMessage2"); } mysql_close($link); ?>