PHP-Code:
echo"
<p style=\"margin:0px;padding-left:10px;padding-right:10px;padding-bottom:10px;padding-top:0px\">
<font color=\"#$config_inhalt[29]\">";
$eintrags_array=explode("<br>",$zeile[10]);
$zaehler=0;
foreach($eintrags_array as $wort_sequenz)
{
$woerter=explode(" ",$wort_sequenz);
foreach($woerter as $wort)
{
$wort=trim($wort);
if(strlen($wort)>$laenge)
{
$pos_zeichen_pfeil=strpos($wort,"<");
if($pos_zeichen_pfeil===false)
{
if(preg_match("/(^|\s)([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+)*(@)([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+)*(\.)([a-zA-Z]{2,6})(\s|$)/im",$wort))
{
$adresse=substr($wort,0,25)."...";
$wort="<a href=\"mailto:$wort\" target=\"_blank\" class=\"links_eintrag\">$adresse</a>";
}
elseif(substr($wort,0,4)=="www." and strlen($wort)>7 or substr($wort,0,5)=="[URL=" and strlen($wort)>7 or substr($wort,0,6)=="ftp://" and strlen($wort)>7 or substr($wort,0,7)=="http://")
{
if(substr($wort,0,4)=="www.")
{
$adresse=substr($wort,0,25)."...";
$wort="http://".$wort;
$wort="<a href=\"$wort\" target=\"_blank\" class=\"links_eintrag\">$adresse</a>";
}
elseif(substr($wort,0,5)=="[URL=")
{
$wort=str_replace("[URL=","<a href=\"",$wort);
$wort=str_replace("[/URL]","</a>",$wort);
$wort=str_replace("]","\" target=\"_blank\" class=\"links_eintrag\">",$wort);
}
else
{
$adresse=substr($wort,0,25)."...";
$wort="<a href=\"$wort\" target=\"_blank\" class=\"links_eintrag\">$adresse</a>";
}
}
else
{
if(substr($wort,0,1)!="<")
{
$wort=wordwrap($wort,$laenge,"\n",1);
}
}
echo $wort." ";
}
else
{
$zulangeswort=$wort;
if(substr($zulangeswort,0,1)!="<")
{
while(strlen($zulangeswort)>$laenge)
{
echo substr($zulangeswort,0,$laenge+1)." ";
$zulangeswort=substr($zulangeswort,$laenge+1);
$pos_zeichen_pfeil=$pos_zeichen_pfeil-$laenge;
}
echo substr($zulangeswort,0,$laenge-$pos_zeichen_pfeil);
}
else
{
echo $wort." ";
}
}
}
else
{
if(preg_match("/(^|\s)([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+)*(@)([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+)*(\.)([a-zA-Z]{2,6})(\s|$)/im",$wort))
{
$wort="<a href=\"mailto:$wort\" target=\"_blank\" class=\"links_eintrag\">$wort</a>";
}
elseif(substr($wort,0,4)=="www." and strlen($wort)>7 or substr($wort,0,5)=="[URL=" and strlen($wort)>7 or substr($wort,0,6)=="ftp://" and strlen($wort)>7 or substr($wort,0,7)=="http://")
{
if(substr($wort,0,4)=="www.")
{
$adresse=substr($wort,0,25)."...";
$wort="http://".$wort;
$wort="<a href=\"$wort\" target=\"_blank\" class=\"links_eintrag\">$adresse</a>";
}
elseif(substr($wort,0,5)=="[URL=")
{
$wort=str_replace("[URL=","<a href=\"",$wort);
$wort=str_replace("[/URL]","</a>",$wort);
$wort=str_replace("]","\" target=\"_blank\" class=\"links_eintrag\">",$wort);
}
else
{
$adresse=substr($wort,0,25)."...";
$wort="<a href=\"$wort\" target=\"_blank\" class=\"links_eintrag\">$adresse</a>";
}
}
echo $wort." ";
}
}
$zaehler++;
if($zaehler<count($eintrags_array))
{
echo "<br>";
}
}
echo"</font><br>
";
if($zeile[11]!="" and $zeile[11]!="-")
{
$config_inhalt[30]=str_replace("\\","",$config_inhalt[30]);
echo"
<br>
<i>
$config_inhalt[30]:
<br>
$zeile[11]
<br>
</i>";
}
echo"</p></div>
<div id=\"layer3\" style=\"clear:both;width".$breite2."px;margin-left:30px\">
<a href=\"#top\"><img src=\"".$pfad."Images/top.gif\" alt=\"Nach oben\" Title=\"Nach oben\" border=\"0\"></a>
<a href=\"$_SERVER[PHP_SELF]?action=showedit&id=$zeile[0]&start=$start&ende=$ende&akt_page=$akt_page&form=$form\"><img src=\"".$pfad."Images/edit.gif\" border=\"0\" alt=\"Eintrag editieren\" Title=\"Eintrag editieren\"></a>";
if($config_inhalt[57]=="ja")
{
echo" <a href=\"javascript:popup2('".$pfad."ips.php?id=$zeile[0]')\"><img src=\"".$pfad."Images/ip.gif\" border=\"0\" Title=\"IP wurde gespeichert\" Alt=\"IP wurde gespeichert\"></A>";
}
echo"   ";
if($zeile[4]!="")
{
$zeile[14]=trim($zeile[14]);
if($zeile[14]=="1")
{
echo" <a href=\"javascript:popup2('".$pfad."mail_anzeigen.php?id=$zeile[0]')\"><img src=\"".$pfad."Images/mail_versteckt.gif\" alt=\"Email\" border=\"0\"></a> ";
}
else
{
echo" <a href=\"mailto:$zeile[4]\"><img src=\"".$pfad."Images/mail.gif\" alt=\"Email\" border=\"0\"></a> ";
}
}
$zeile[19]=trim($zeile[19]);
if($zeile[19]!="-" and $zeile[19]!="")
{
switch($zeile[19])
{
case "1":
$bewertung_seite="1 - Sehr gut";
break;
case "2":
$bewertung_seite="2 - Gut";
break;
case "3":
$bewertung_seite="3 - Ok";
break;
case "4":
$bewertung_seite="4 - Geht so";
break;
case "5":
$bewertung_seite="5 - Schlecht";
break;
case "6":
$bewertung_seite="6 - Sehr schlecht";
break;
}
if($zeile[19]!="7")
{
echo"<img src=\"".$pfad."Images/Bewertungen/$zeile[19].gif\" border=\"0\" title=\"Bewertung der Internetseite: $bewertung_seite\" Alt=\"Bewertung der Internetseite\">";
}
}
if($zeile[5]!="")
{
echo" <a href=\"$zeile[5]\" target=\"_blank\"><img src=\"".$pfad."Images/home.gif\" alt=\"Homepage\" title=\"Homepage\" border=\"0\"></A>";
}
if($zeile[6]!="")
{
echo" <a href=\"http://wwp.icq.com/scripts/search.dll?to=$zeile[6]\" target=\"_blank\"><img src=\"".$pfad."Images/icq.gif\" alt=\"ICQ\" Title=\"ICQ\" border=\"0\"></A>";
}
if($zeile[7]!="")
{
echo" <a href=\"javascript:popup2('messenger.php?messenger=AIM&username=$zeile[7]')\"><img src=\"".$pfad."Images/aim.gif\" alt=\"AIM\" Title=\"AIM\" border=\"0\"></A>";
}
if($zeile[8]!="")
{
echo" <a href=\"javascript:popup2('messenger.php?messenger=MSN&username=$zeile[8]')\"><img src=\"".$pfad."Images/msn.gif\" alt=\"MSN - Username: $zeile[8]\" Title=\"MSN - Username: $zeile[8]\" border=\"0\"></A>";
}
if($zeile[9]!="")
{
echo" <a href=\"javascript:popup2('messenger.php?messenger=Yahoo&username=$zeile[9]')\"><img src=\"".$pfad."Images/yahoo.gif\" alt=\"Yahoo Messenger - Username: $zeile[9]\" Title=\"Yahoo Messenger - Username: $zeile[9]\" border=\"0\"></A>";
}
echo"
</div>
</div>
";
}
else
{
echo"
<div id=\"eintrag\" style=\"clear:both;width:$config_inhalt[4]px;margin-top:20px\">
<div id=\"nr\" align=\"center\" style=\"float:left;width:".$breite1."px\">
<p style=\"margin-left:5px;margin-top:5px\">
<b>$nr</b>
</p>
</div>
<div id=\"beitrag\" style=\"float:right;width:".$breite2."px;margin-bottom:10px;background-color:#$config_inhalt[26];border:$config_inhalt[27]px solid #$config_inhalt[28]\">
<p style=\"padding:10px;margin:0px\">
Beitrag wurde durch den Administrator noch nicht freigeschaltet! <br><br>Bitte warten Sie, bis der Administrator den Beitrag freischaltet, damit dieser hier erscheint.
</p>
</div>
</div>
";
}
$nr--;
}
echo"</div>";
// Blätterfunktion
echo"<div id=\"layer20\" align=\"center\" style=\"clear:both;margin-bottom:0px;margin-top:10px;padding:0px\">";
if($eintrag_schreiben=="ja")
{
echo"
[<a href=\"$_SERVER[PHP_SELF]?action=choosepage&start=0&ende=0&akt_page=1&form=3\" class=\"links\"><b>Neuer Eintrag</b></A>] ";
}
if($anzahl>$propage and $form!="3")
{
$pages=ceil($anzahl/$propage);
$startid=0;
$endid=$propage;
if($akt_page==1)
{
$zahl="<b>1</b>";
}
else
{
$zahl="1";
}
echo"
[ <a href=\"$_SERVER[PHP_SELF]?action=choosepage&start=$startid&ende=$endid&akt_page=1&form=$form\" class=\"links\">$zahl</a>";
}
for($b=2;$b<$pages+1;$b++)
{
if($endid<$anzahl)
{
$startid+=$propage;
$endid+=$propage;
}
if($endid>$anzahl)
{
$endid=$anzahl;
}
if($akt_page==$b)
{
$zahl="<b>$b</b>";
}
else
{
$zahl=$b;
}
echo" | <a href=\"$_SERVER[PHP_SELF]?action=choosepage&start=$startid&ende=$endid&akt_page=$b&form=$form\" class=\"links\">$zahl</a> ";
}
if($anzahl>$propage and $form!="3")
{
echo" ]";
}
echo"
</div>";
}
if($config_inhalt[32]=="nurform" and $form=="" or $form=="3" and $config_inhalt[32]=="nureintraege" or $form=="3" and $config_inhalt[32]=="nurform")
{
if($form==3 or $form=="")
{
echo"<br>";
}
echo"
<center><a href=\"$_SERVER[PHP_SELF]?form=2\" target=\"_self\" class=\"links\"><b>Beiträge im Gästebuch anschauen</b></A></center>";
}
}
// Editierfunktion --------------
if($action=="showedit")
{
$fp=fopen("$datei","r");
while(!feof($fp))
{
$inhalt=fgets($fp,3000);
$zeile=explode("|||",$inhalt);
$id=$_GET['id'];
if($zeile[0]==$id)
{
$zeile[10]=str_replace("<br>","\n",$zeile[10]);
$zeile[10]=str_replace("\\","",$zeile[10]);
$zeile[1]=str_replace("\\","",$zeile[1]);
$zeile[4]=str_replace("\\","",$zeile[4]);
$zeile[5]=str_replace("\\","",$zeile[5]);
$zeile[11]=str_replace("\\","",$zeile[11]);
$breite=$config_inhalt[4]-124;
$zeile[14]=trim($zeile[14]);
if($zeile[14]=="1")
{
$email="versteckt";
}
else
{
$email=$zeile[4];
}
$abstand="3.5px";
echo"
<form name=\"form\" action=\"$_SERVER[PHP_SELF]?action=edit&id=$id&start=$start&ende=$ende&akt_page=$akt_page&form=$form\" method=\"post\">
<p style=\"margin-bottom:10px\">
<div id=\"layer17\" style=\"height:60px;margin-left:3px\">
<b><font size=\"2\">Beitrag editieren</font></b>
<hr size=\"1px\" width=\"100%\">
</div>
<div id=\"layer22\" style=\"clear:both;margin:0px\">
<div id=\"layer3\" style=\"float:left;width:124px\">
<p style=\"margin:4px\">
Name:
</p>
</div>
<div id=\"layer3\" style=\"float:left\">
<input value='".$zeile[1]."' style=\"color:#$config_inhalt[56];font-family: $config_inhalt[0]; font-size: $config_inhalt[1]px; border: 1px solid #$config_inhalt[6]; background-color: #$config_inhalt[5]; border-style: $config_inhalt[24];padding:2px\" type=\"text\" name=\"nick\" size=\"$size\">
</div>
</div>