komme mit dem Einbauen nicht klar - alles versucht :(

Hier werden Probleme rund um das Zahlen Captcha behandelt

Moderator: frameguard

komme mit dem Einbauen nicht klar - alles versucht :(

Beitragvon First » 23.01.2007, 02:07

Hab schon alles versucht aber entweder bekomme ich nur Fehlermeldungen oder der Code wird nicht abgefragt.

Kann mir da jemand helfen, mein Gästebuch wird total zugemüllt jeden Tag *grrrr*

Danke im vorraus, hier mal mein Original Code ohne Änderungen:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Gästebuch</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Copyright" CONTENT="First - Racing">
<META NAME="Description" CONTENT="Sie haben Probleme mit der Kompression Ihres Modellmotors? Wollen aber keine neue Laufgarnitur kaufen, da der Nutzen - Kosten Faktor nicht stimmt? Dann sind Sie hier genau richtig, wir bearbeiten Ihre Laufgarnituren so, das sie funktionieren wie am ersten Tag.">
<META NAME="Keywords" CONTENT="Modellmotor, Modellmotoren, Steuerzeiten, Vergaser, Modell, Laufgarnitur, Kolben, Pleul, Kurbelwelle, Kurbelwellentuning, Silikon, Wolfram, auswuchten, Porten, Frisieren, tunen, Tuning, Motortuning, Schwungscheibe, Kupplung, Vergasereinstellung, Venturi, Venturieinsatz, Restauration, Kurbelzapfen, Kurbelwange, Sprit, Nitro, Nitromethan, Modellmotorenöl, Aerosave, Aerosynth, Hartchrom, Messing, Bronze, Aluminium">
<META NAME="Language" CONTENT="Deutsch">
<link rel="stylesheet" type="text/css" href="../guestbook/gbstyle.css"/>
<SCRIPT>
<!--
function F_loadRollover(){} function F_roll(){}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="../assets/rollover.js"></SCRIPT>
<LINK REL=STYLESHEET TYPE="text/css" HREF="../html/style.css">
<LINK REL=STYLESHEET TYPE="text/css" HREF="../html/site.css">
<STYLE>
</STYLE><NOLAYER>
<STYLE ID="NOF_STYLE_SHEET">
<!--
DIV#LayoutLYR { position:absolute; top:0; left:0; z-index: 1; visibility:inherit; }
DIV#Navigationsleiste1LYR { position:absolute; visibility:inherit; top:100; left:40; width:108; height:32; z-index:1 }

DIV#NOFGästebuch3LYR { position:absolute; visibility:inherit; top:101; left:175; width:501; height:74; z-index:2 }
DIV#Navigationsleiste2LYR { position:absolute; visibility:inherit; top:700; left:40; width:108; height:32; z-index:3 }

-->
</STYLE>

</NOLAYER>
</HEAD>
<BODY NOF="(MB=(ZeroMargins, 0, 0, 0, 0), L=(GstebuchLayout, 1239, 768))">
<DIV ID="LayoutLYR"><LAYER ID="LayoutLYR" TOP=0 LEFT=0 VISIBILITY=INHERIT WIDTH=1239 HEIGHT=768 Z-INDEX=1><DIV ID="Navigationsleiste1LYR"><LAYER ID="Navigationsleiste1LYR" VISIBILITY=INHERIT TOP=100 LEFT=40 WIDTH=108 HEIGHT=32 Z-INDEX=1>
<TABLE ID="Navigationsleiste1" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=NB_UYHPNY120 WIDTH=108>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=108 HEIGHT=32><A HREF="http://www.first-racing.eu/index2.html" onMouseOver="F_loadRollover('Navigationsschaltfläche1','',0);F_roll('Navigationsschaltfläche1',1)" onMouseOut="F_roll('Navigationsschaltfläche1',0)"><IMG ID="Navigationsschaltfläche1" NAME="Navigationsschaltfläche1" HEIGHT=32 WIDTH=108 SRC="../assets/images/autogen/Home_Ns1.gif" onLoad="F_loadRollover(this,'Home_NRs2.gif',0)" BORDER=0 ALT="Home" TITLE="Home"></A></TD>
</TR>
</TABLE>
</LAYER></DIV><DIV ID="NOFGästebuch3LYR"><LAYER ID="NOFGästebuch3LYR" VISIBILITY=INHERIT TOP=101 LEFT=175 WIDTH=501 HEIGHT=74 Z-INDEX=2><?php $gbmpaths = array ("addguest.php", "mailer.inc.php" );
for($i = 0; $i<count($gbmpaths); $i++){
if(!file_exists($gbmpaths[$i])){
die("<p>Ein Fehler ist aufgetreten.Bitte wenden Sie sich an den Site-Administrator.</p><p>Fehlercode: 103</p>");
}}?><!--<IMG ID="NOFGästebuch3" HEIGHT=74 WIDTH=501 SRC="../assets/images/autogen/a_guestbook_icon.gif" BORDER=0 ALT="">-->

<?php
function gbThrowError($code) {
echo "<p>Ein Fehler ist aufgetreten. Bitte wenden Sie sich an den Site-Administrator.</p><p>Fehlercode: $code</p>";
die();
}

$gbpath = "../guestbook"."/" ;

$separateForm = false;
$topForm = true;
$notifyWebmaster = false;
$notifyEmail = "";
$showtime = true;
$emoticons = true;
$smtpip = "";

$separator = '|';
$gbfile = $gbpath.'entries.dat';

// predefine variable values
$myVars['pass'] = '';
$myVars['name'] = '';
$myVars['email'] = '';
$myVars['homepage'] = '';
$myVars['city'] = '';
$myVars['state'] = '';
$myVars['country'] = '';
$myVars['comment'] = '';
$myVars['op'] = '';

// working variables initialisation
function gbInitParameterVariables($array, &$target) {
if (!is_array($array)) {
return FALSE;
}
$is_magic_quotes = get_magic_quotes_gpc();
foreach ($array AS $key => $value) {
if (is_array($value)) {
unset($target[$key]);
gbInitParameterVariables($value, $target[$key]);
} else if ($is_magic_quotes) {
$target[$key] = stripslashes($value);
} else {
$target[$key] = $value;
}
}
return TRUE;
}

if(!empty($_GET))gbInitParameterVariables($_GET, $myVars);
if(!empty($_POST)) gbInitParameterVariables($_POST, $myVars);

$op = $myVars['op'];
if ($op == "add") {
//data curenta
$data = date("l F j Y g:i:s A");
$name = $myVars['name'];
$email = $myVars['email'];
$homepage = $myVars['homepage'];
$city = $myVars['city'];
$state = $myVars['state'];
$country = $myVars['country'];
$comment = $myVars['comment'];
$array = array("$name", "$email", "$homepage", "$city","$state", "$country", "$data", "$comment");
$full = implode($separator, $array);
//ptr a inlocui taguri, enter, ghilimele, spatiu
$tmp = $full;
$tmp = str_replace('<', "&lt;", $tmp);
$tmp = str_replace('>', "&gt;", $tmp);
$tmp = str_replace("\r\n", "<br>", $tmp);
$tmp = str_replace("\n", "<br>", $tmp);
$tmp = str_replace('"', '&quot;', $tmp);

//scriu in fisier tot sirul
$fp = @fopen($gbfile, 'a+') or gbThrowError(532);
flock($fp, LOCK_EX);
fwrite($fp, $tmp. "\r\n");
flock($fp, LOCK_UN);
fclose($fp);

if ($notifyWebmaster) {
$message = "Hallo, es wurde ein neuer Eintrag in Ihrem Gästebuch vorgenommen.\n";
$message .= "Name: ".$name."\n"."Kommentar: ".$comment;

if (!file_exists('mailer.inc.php')) {
gbThrowError(103);
}

include_once("mailer.inc.php");

$mail = new PHPMailer();
$mail->From = $notifyEmail;
$mail->FromName = "Gästebuch";
$mail->Host = $smtpip;
$mail->SMTPDebug = false;
$mail->Mailer = "smtp";
$mail->Subject = "Neuer Gästebucheintrag";
$mail->CharSet = "utf-8";
$mail->SMTPAuth = false;
$mail->IsHTML = true;
$mail->AddAddress($notifyEmail,$notifyEmail);
$mail->Body = $message;
// send e-mail
if (!$mail->Send()) {
$mail->Mailer = "mail";
if (!$mail->Send()) {
$mail->Mailer = "sendmail";
$mail->Send();
}
}

// done! clean up
$mail->ClearAddresses();
$mail->ClearAttachments();

}

$me = $_SERVER['PHP_SELF'];
echo "<META http-equiv='Refresh' content='0; url=$me'>";
}


?>


<h1 class="gb">Gästebuch</h1>

<?php
if ($separateForm) {
echo "<a class=\"gb\" href=\"addguest.php\">Kommentar hinzufügen</a>";
}

if (!$separateForm && $topForm) {
include_once("addguest.php");
}

if (!file_exists($gbfile)){
if(!$FILE = @fopen($gbfile, 'w')){
gbThrowError(530);
}
}

//citesc intregul fisier
//fiecare linie devine un element din tabloul $lines
$lines = file($gbfile);
$line_num = count($lines);
//construiesc un element din guestbook
for ($i = $line_num-1; $i >= 0; $i--) {
if (trim($lines[$i]) != "") {
$sir = explode($separator, $lines[$i]);
for ($k = 7; $k >= 0; $k--) $sir[$k] = trim($sir[$k]);
echo "<hr class=\"gb\">";
echo "<p class=\"gb\">";
echo "<b>Name: </b>".$sir[0]."<br>";
if ($sir[1] != "") {
echo "<b>E-Mail: </b>"."<a class=\"gb\" href=mailto:$sir[1]>$sir[1]</a>"."<br>";
}
if ($sir[2] != "") {
echo "<b>Homepage: </b>"."<a class=\"gb\" target=\"_blank\" href=\"http://$sir[2] \" >$sir[2]</a>"."<br>";
}
if ($sir[3] != "") {
echo "<b>Stadt: </b>"."$sir[3]"."<br>";
}
if ($sir[4] != "") {
echo "<b>Bundesland: </b>"."$sir[4]"."<br>";
}
if ($sir[5] != "") {
echo "<b>Land: </b>"."$sir[5]"."<br>";
}
if ($showtime) {
echo "<b>Gesendet: </b>".$sir[6]."<br>";
}
echo "</p>";
if ($emoticons) {
$sir[7] = str_replace(':)', "<img src=$gbpath/emoticons/smile.gif></img>", $sir[7]);
$sir[7] = str_replace(':D', "<img src=$gbpath/emoticons/happy.gif></img>", $sir[7]);
$sir[7] = str_replace('=))', "<img src=$gbpath/emoticons/laugh.gif></img>", $sir[7]);
$sir[7] = str_replace(':/', "<img src=$gbpath/emoticons/ohwell.gif></img>", $sir[7]);
$sir[7] = str_replace(':(', "<img src=$gbpath/emoticons/sad.gif></img>", $sir[7]);
$sir[7] = str_replace('X(', "<img src=$gbpath/emoticons/mad.gif></img>", $sir[7]);
$sir[7] = str_replace(':P', "<img src=$gbpath/emoticons/tongue.gif></img>", $sir[7]);
$sir[7] = str_replace(';)', "<img src=$gbpath/emoticons/wink.gif></img>", $sir[7]);
}
echo "<p class='gb' class=\"gb\">".$sir[7]."</p>";
}
};
echo "<hr class=\"gb\">";

if (!$separateForm && !$topForm) {
include_once("addguest.php");
}
?>




</LAYER></DIV><DIV ID="Navigationsleiste2LYR"><LAYER ID="Navigationsleiste2LYR" VISIBILITY=INHERIT TOP=700 LEFT=40 WIDTH=108 HEIGHT=32 Z-INDEX=3>
<TABLE ID="Navigationsleiste2" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=NB_UYHPNY120 WIDTH=108>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=108 HEIGHT=32><A HREF="../html/gastebuchadmin.php" style="cursor:hand; text-decoration:none;" onMouseOver="F_loadRollover('Navigationsschaltfläche2','',0);F_roll('Navigationsschaltfläche2',1)" onMouseOut="F_roll('Navigationsschaltfläche2',0)"><IMG ID="Navigationsschaltfläche2" NAME="Navigationsschaltfläche2" HEIGHT=32 WIDTH=108 SRC="../assets/images/autogen/Admin_Ns1_1.gif" onLoad="F_loadRollover(this,'Admin_NRs2.gif',0)" BORDER=0 ALT="Admin" TITLE="Admin"></A></TD>
</TR>
</TABLE>
</LAYER></DIV></LAYER></DIV>
</BODY>
</HTML>
First
 
Beiträge: 2
Registriert: 23.01.2007, 02:04

Beitragvon First » 24.01.2007, 15:11

hmm, hat da niemand eine Idee dazu ?

Wär echt dankbar, da ich jeden Tag 20 Spameinträge dort löschen muß

Danke
First
First
 
Beiträge: 2
Registriert: 23.01.2007, 02:04

Beitragvon Rob [Admin] » 03.02.2007, 11:27

Das Gästebuch ist sicherlich von einem anderen Anbieter, evt. hat dieser ein fertiges Captcha Plugin.
Rob [Admin]
Site Admin
 
Beiträge: 143
Registriert: 23.12.2006, 12:27


Zurück zu Zahlen Captcha

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste

cron