Hi,
möchte gerne dieses Gästebuch vor Spam schützen:
http://www.savage-live.de/html/gaestebuch/index.php
Leider habe ich keine Ahnung von php und weiß somit auch nicht, wo ich das Script anpassen muss.
Gehe davon aus, dass die Anpassung in der "neuantrag.php" erfolgen muss, hier der dazugehörige Quellcode:
###################################
<!-- Uhrzeit vom Server holen -->
<?php
$Javascriptzeit = date("D M d H:i:s ");
$Javascriptzeit .= "UTC";
$Javascriptzeit .= date("O Y");
?>
<?php
#################################################
# #
# EASY-PHP G?STEBUCH 2006 #
# #
# http://easy-php.info-universe.de #
# #
# --------------------------------------------- #
# #
# COPYRIGHT EASY PHP 2006 #
# #
# --------------------------------------------- #
# #
#################################################
?>
<!-- Einbinden der Konfigurationsdatei des G?stebuches -->
<?php
include "admin/config.inc.php";
?>
<!-- Einbinden der Konfigurationsdatei des WYSIWYG-Editors -->
<?php
mysql_connect($DatabaseHost, $DatabaseUser, $DatabasePassword);
mysql_select_db($Database);
$sql="SELECT * FROM ep_gaestebuch_admin WHERE id='1'";
$result=mysql_query($sql);
while ($row=mysql_fetch_assoc($result))
{
include("$row[pfadwysiwyg]fckeditor.php") ;
}
mysql_close();
?>
<!-- Eigentlicher Beginn der Seite -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SAVAGE - LIVE ::..: Gästebucheintrag hinzufügen ..:</title>
<script language="JavaScript">
<!--
var Serverzeit = new Date("<?php echo$Javascriptzeit; ?>");
function UhrzeitAnzeigen()
{
if(!document.all && !document.getElementById)
{
return;
}
var Stunden = Serverzeit.getHours();
var Minuten = Serverzeit.getMinutes();
var Sekunden = Serverzeit.getSeconds();
Serverzeit.setSeconds(Sekunden+1);
if(Stunden<=9)
{
Stunden = "0" + Stunden;
}
if(Minuten<=9)
{
Minuten = "0" + Minuten;
}
if(Sekunden<=9)
{
Sekunden = "0" + Sekunden;
}
Uhrzeitanzeige = Stunden + ":" + Minuten + ":" + Sekunden;
if(document.getElementById)
{
document.getElementById("Uhrzeit").innerHTML = Uhrzeitanzeige
}
else if(document.all)
{
Uhrzeit.innerHTML = Uhrzeitanzeige;
}
setTimeout("UhrzeitAnzeigen()", 1000);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<!-- Javascript Code zum Ausgeben der Uhrzeit des Servers ENDE -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script src="../../js/page.js" type="text/javascript"></script>
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="../../favicon.ico" type="image/ico">
</head>
<body onload="MM_preloadImages('../../navi/termine_f2.gif','../../navi/setlis_f2.gif','../../navi/galerie_f2.gif','../../navi/gaestebuch_f2.gif','../../navi/kontakt_f2.gif','../../navi/links_f2.gif','../../navi/impressum_f2.gif','../../navi/login_f2.gif','../../gfx/audio_on_f1.gif','../../gfx/audio_off_f2.gif','../../gfx/downloads_f2.gif','../../navi/band_f2.gif')" onLoad="UhrzeitAnzeigen();">
<!-- Head --><body onLoad="MM_preloadImages('../../gfx/gaestebuch/gb_senden_f2.gif','../../gfx/flyer_f2.gif','../../navi/impressum_f2.gif','../../navi/login_f2.gif','../../subnavi/downloads_f2.gif')">
<table width="862" height="582" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="688" height="582" align="left" valign="top"><table width="688" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="241" height="85" valign="top"><a href="../home.php"><img src="../../gfx/logo_savage.gif" width="241" height="85" border="0" /></a></td>
<td width="276"><img src="../../gfx/licht.gif" width="276" height="99" /></td>
<td width="171" rowspan="2" align="right" valign="bottom"><div class="flyer"></div></td>
</tr>
<tr>
<td height="68"><img src="../../gfx/terminhinweis_1.gif" width="241" height="68" /></td>
<td><img src="../../gfx/terminhinweis_2.gif" width="276" height="68" /></td>
</tr>
</table>
<!-- Head end -->
<table width="688" height="362" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40"><img src="../../gfx/trans_pix.gif" width="38" height="38" /></td>
<td width="127" height="362">
<!-- Main-Navi-->
<table width="127" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="../../navi/trenner_mainnavi_1.gif" width="127" height="13" /></td>
</tr>
<tr>
<td><a href="../home.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','../../navi/home_f2.gif',1)"><img src="../../navi/home_f1.gif" name="Home" width="127" height="31" border="0" id="Home" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_2.gif" width="127" height="12" /></td>
</tr>
<tr>
<td width="127"><a href="../band.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Band','','../../navi/band_f2.gif',1)"><img src="../../navi/band_f1.gif" name="Band" width="127" height="31" border="0" id="Band" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_3.gif" width="127" height="14" /></td>
</tr>
<tr>
<td><a href="../termine.php#aktuell" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Termine','','../../navi/termine_f2.gif',1)"><img src="../../navi/termine_f1.gif" alt="Termine" name="Termine" width="127" height="31" border="0" id="Termine" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_4.gif" width="127" height="13" /></td>
</tr>
<tr>
<td><a href="../setlist.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Setlist','','../../navi/setlis_f2.gif',1)"><img src="../../navi/setlis_f1.gif" alt="Setlist" name="Setlist" width="127" height="31" border="0" id="Setlist" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_5.gif" width="127" height="12" /></td>
</tr>
<tr>
<td><a href="../galerie.php" onmouseover="MM_swapImage('galerie','','../../navi/galerie_f2.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../navi/galerie_f1.gif" name="galerie" width="127" height="31" border="0" id="galerie" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_6.gif" width="127" height="12" /></td>
</tr>
<tr>
<td width="127"><img src="../../navi/gaestebuch_f2.gif" width="127" height="31" /></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_7.gif" width="127" height="12" /></td>
</tr>
<tr>
<td><a href="../kontakt.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Kontakt','','../../navi/kontakt_f2.gif',1)"><img src="../../navi/kontakt_f1.gif" alt="Kontakt" name="Kontakt" width="127" height="31" border="0" id="Kontakt" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_8.gif" width="127" height="14" /></td>
</tr>
<tr>
<td><a href="../links.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Links','','../../navi/links_f2.gif',1)"><img src="../../navi/links_f1.gif" alt="Links" name="Links" width="127" height="31" border="0" id="Links" /></a></td>
</tr>
<tr>
<td><img src="../../navi/trenner_mainnavi_9.gif" width="127" height="10" /></td>
</tr>
</table></td>
<!-- Main Navi end -->
<td width="21"><img src="../../gfx/trenner_mainnavi_content.gif" width="21" height="362" /></td>
<td width="482" height="362">
<table width="482" height="350" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="55" background="../../gfx/gaestebuch/bg_head_gb.gif">
<div class="gb_header">
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="left" valign="bottom"><font class="gb_headline">Eintrag schreiben</font></td>
<td width="50%" align="right" valign="bottom"><a href="index.php" class="gb_headline"><<zurück</a></td>
</tr>
</table>
</div> </td>
</tr>
<tr>
<td height="238" align="left" valign="top" background="../../gfx/gaestebuch/bg_content_gb.gif">
<div class="gb_edit">
<form action="neuereintrag_enter.php?sub=eintragen" method="post" name="gaestebuch">
<table width="450" height="190" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="28%" valign="middle"><font class="gb_daten">Name*</font></td>
<td height="18" valign="middle">
<input name="name" type="text" class="Feldcontent" id="name" size="23" value="<? echo htmlspecialchars(stripslashes($_POST['name'])); ?>">
</td>
</tr>
<tr>
<td valign="middle"><font class="gb_daten">E-Mail</font></td>
<td height="18" valign="middle">
<input name="email" type="text" class="Feldcontent" id="email" size="23" value="<? echo htmlspecialchars(stripslashes($_POST['email'])); ?>">
</td>
</tr>
<tr>
<td valign="middle"><font class="gb_daten">http://</font></td>
<td height="18" valign="middle">
<input name="homepage" type="text" class="Feldcontent" id="homepage" value="<? echo htmlspecialchars(stripslashes($_POST['homepage'])); ?>">
</td>
</tr>
<tr>
<td valign="middle"><font class="gb_daten">ICQ-Nr.</font></td>
<td height="18" valign="middle">
<input name="icq" type="text" class="Feldcontent" id="icq" size="23" maxlength="9" value="<? echo htmlspecialchars(stripslashes($_POST['icq'])); ?>">
</td>
</tr>
<tr>
<td valign="middle"><font class="gb_daten">Text*</font></td>
<td height="20" valign="middle">
<span>
<!-- Einbinden des WYSIWYG-Editors -->
<?php
mysql_connect($DatabaseHost, $DatabaseUser, $DatabasePassword);
mysql_select_db($Database);
$sql="SELECT * FROM ep_gaestebuch_admin WHERE id='1'";
$result=mysql_query($sql);
while ($row=mysql_fetch_assoc($result)) {
$Text=str_replace("</p>", "<br>", $row->inhalt);
$Text=str_replace("<p>", " ", $News);
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = "$row[pfadwysiwyg]";
$oFCKeditor->Value = $News ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '120' ;
$oFCKeditor->Create() ;
$output = $oFCKeditor->CreateHtml() ;
}
mysql_close();
?>
</span>
</td>
</tr>
<!--<tr>
<td height="20" align="left" valign="top">
<input class="eintragen" id="Send" type="submit" value="Eintragen">
</td>
</tr>
<tr>
<td height="20" align="left" valign="top">
<input class="zuruecksetzen" type="reset" name="Submit" value="Zurücksetzen">
</td>
</tr>-->
</table>
</form>
</div> </td>
</tr>
<tr>
<td height="69" align="left" valign="top" background="../../gfx/gaestebuch/bg_gaestebuch.gif" class="last_changed">
<div class="gb_seitenzahlen_rot">
<div align="left">*= Pflichtfelder</div>
</div>
<div style="text-align:right;valign:top;">
<table border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><div align="right"><a href="javascript:document.gaestebuch.submit();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('senden','','../../gfx/gaestebuch/gb_senden_f2.gif',1)"><img src="../../gfx/gaestebuch/gb_senden_f1.gif" alt="Senden" title="Senden" name="senden" width="36" height="34" border="0"></a></div></td>
</tr>
</table></div> </td>
</tr>
</table>
</td>
<td width="28"><img src="../../gfx/trenner_content_subnavi.gif" width="20" height="362" /></td>
</tr>
</table>
<!-- Content end -->
<!-- Bottom -->
<table width="688" height="53" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="73" height="53" align="right" valign="bottom"><img src="../../gfx/trans_pix.gif" width="38" height="53" /></td>
<td width="38" height="53" align="right" valign="bottom"><img src="../../gfx/schweif_1.gif" width="38" height="34" /></td>
<td width="102" height="53" align="right" valign="bottom"><a href="../impressum.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Impressum','','../../navi/impressum_f2.gif',1)"><img src="../../navi/impressum_f1.gif" alt="Impressum" name="Impressum" width="102" height="34" border="0" id="Impressum" /></a></td>
<td width="14" height="53" align="right" valign="bottom"><img src="../../navi/trenner_impressum.gif" width="14" height="34" /></td>
<td width="61" height="53" align="right" valign="bottom"><a href="../admin/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Login','','../../navi/login_f2.gif',1)"><img src="../../navi/login_f1.gif" alt="Login" name="Login" width="61" height="34" border="0" id="Login" /></a></td>
<td width="109" height="53" align="right" valign="bottom"><img src="../../gfx/schweif_2.gif" width="109" height="34" /></td>
<td height="53" align="left" valign="top"><table width="271" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><img src="../../subnavi/downloads_oben.gif" width="271" height="14" /></td>
</tr>
<tr>
<td width="80"><img src="../../subnavi/downloads_links.gif" width="80" height="39" /></td>
<td width="191"><a href="../download_logo.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('downloads_medien','','../../subnavi/downloads_f2.gif',1)"><img src="../../subnavi/downloads_f1.gif" alt="Downloads/Medien" name="downloads_medien" width="191" height="39" border="0" id="downloads_medien" /></a></td>
</tr>
</table></td>
<td width="20" height="53" valign="top"><img src="../../gfx/trans_pix.gif" width="1" height="1" /></td>
</tr>
</table></td>
<td width="176" align="left" valign="top"><table width="128" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8" align="left" valign="top"><img src="../../gfx/vorhang_rechts_0.gif" width="176" height="8" /></td>
</tr>
<!-- <a href="downloads.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Dowload','','../gfx/downloads_f2.gif',1)">
<img src="../gfx/downloads_f1.gif" name="Dowload" width="176" height="29" border="0" id="Dowload" /></a> -->
<tr>
<td height="47" align="left" valign="top"><img src="../../gfx/stoerer.gif" width="176" height="47" /></td>
</tr>
<tr>
<td height="24" align="left" valign="top"><img src="../../gfx/vorhang_rechts_0.gif" width="176" height="24" /></td>
</tr>
</table>
<table width="176" height="450" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="53"><img src="../../gfx/rechts_linien_1.gif" width="53" height="450" /></td>
<td width="53"><img src="../../gfx/rechts_linien_2.gif" width="53" height="450" /></td>
<td width="70"><img src="../../gfx/rechts_linien_3.gif" width="22" height="450" /><img src="../../gfx/vorhang_rechts_vertikal.gif" width="48" height="450" /></td>
</tr>
<tr>
<td height="31" colspan="3"><img src="../../gfx/live.gif" width="176" height="50" /></td>
</tr>
</table> </td>
</tr>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1627492-1";
urchinTracker();
</script>
</body>
</html>
###################################
Dieswer Code muss also noch eingebaut werden:
<?php
session_start();
if(isset($_SESSION['captcha_spam']) AND $_POST["sicherheitscode"] == $_SESSION['captcha_spam']){
unset($_SESSION['captcha_spam']);
//
//
//Hier kommt das ursprüngliche Script hin. (s.o.)
//
//
}
?>
}else{
die ("Der Sicherheitscode ist falsch!");
}
Das Captcha-Bild werde ich neben dem Submit-Button positionieren.
Kann mir bitte jemand helfen?
Gruß
Ingo
