Nun denn der Quellcode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Feuerwehrverein Falken - Internes</title>
<link rel="stylesheet" href="../Hintergrundstyle-01.css" type="text/css">
<!-- <script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script> -->
<style> A {text-decoration: none;} A:Hover {text-decoration: underline;} </style>
<meta name="robots" content="noindex">
<meta name="robots" content="nofollow">
<meta name="robots" content="noindex, nofollow">
<script type="text/javascript">
function FensterOeffnen (Adresse) {
MeinFenster = window.open(Adresse, "Zweitfenster", "height=200,width=470,left=100,top=200,scrollbars=yes");
MeinFenster.focus();
}
</script>
</head>
<body link="#800000" vlink="#800000" alink="#800000">
<a name="Seitenanfang"> </a>
<div id="gesamt_kurz" align="left">
<div id="ueberschrift\_members\_area">
Unser Gästebuch
</div>
<div id="content\_members\_area">
<div id="members_form" align="left">
<form action="eintrag-einfuegen.php" method="post">
<table border="0">
<tr>
<td><input name="Name" maxlength="50" type="text" value="Name:"></td>
</tr>
<tr>
<td><input maxlength="40" name="Titel" type="text" value="Titel:"></td>
</tr>
<tr>
<td><textarea id="textarea_members" cols="70" name="Eintrag" rows="5">Beitrag</textarea></td>
</tr>
<tr>
<td align="center" colspan="2">
<input name="Send" type="submit" value="Eintragen">
<input name="Reset" type="reset" value="Löschen">
</td>
</tr>
</table>
</form>
</div>
<?php
$DatabasePointer = mysql_connect("localhost", "", "");
mysql_select_db("", $DatabasePointer);
$ResultPointer = mysql_query("SELECT * FROM gaestebuch ORDER BY Erstellt DESC", $DatabasePointer);
function linker($link)
{
$link = htmlspecialchars($link, ENT_QUOTES, "UTF-8");
$link = str_replace("http://www.","www.",$link);
$link = str_replace("http://www.","www.",$link);
$link = str_replace("http//www.","www.",$link);
$link = str_replace("www.","http://www.",$link);
$link = preg_replace(
"/([\w]+://[\w-?&;#~=./@]+[\w/])/i","<a href='http://$1' target='_blank'>$1</a>", $link);
$link = preg_replace(
"/([\w-?&;#~=./]+@([?)[a-zA-Z0-9-.]+.
([a-zA-Z]{2,3}|[0-9]{1,3})(]?))/i","<a href='mailto:$1'>$1</a>",$link);
$link = str_replace(" target='_blank'>http://www."," target='_blank'>www.",$link);
$link = str_replace("http://http://www.","http://www.",$link);
$link = nl2br($link);
$linkx = $link;
return $linkx;
}
?>
<?php
for($i = 0; $i < mysql_num_rows($ResultPointer); $i++)
{
$Gaestebuch = mysql_fetch_object($ResultPointer);
?>
<tr>
<td>
<font color="#800000"><b><hr id="strich">
<?php echo$Gaestebuch->Name; ?></b>
</font> am <b><?php echo substr($Gaestebuch->Erstellt, 8, 2); ?>.
<?php echo substr($Gaestebuch->Erstellt, 5, 2); ?>.
<?php echo substr($Gaestebuch->Erstellt, 0, 4); ?>
<?php echo substr($Gaestebuch->Erstellt, 10); ?></b>
</td>
</tr>
<tr>
<td>
<br>
<b>
<?php echo$Gaestebuch->Titel; ?>
</b>
</td>
</tr>
<tr>
<div id="gb_background_eintrag">
<td>
<?php
echo linker($Gaestebuch->Eintrag);
?>
</td>
<div id="gb_delete_link">
<a href ="gaestebuch-administration.php" onclick="FensterOeffnen(this.href);
return false">Eintrag löschen</a>
</div>
</div>
</tr>
<tr>
<td></td>
</tr>
<?php
}
?>
</div title="schließt content_members_area">
</div title="schließt gesamt_kurz">
<div id="mitte_gb_area">
</div>
<div id="fusszeile">
<div id="link" align="center">
<a href="#Seitenanfang"> <b> zum Seitenanfang -> </b> </a>
</div>
</div>
</body>
</html>
----------------------------------------------------------------------
Ok dann werd ich mich jetzt mal über htmlspecialchars() belesen. Danke für den Zeig in die richtigere Richtung.
Gruß Marcel