ich habe ein kleines Problem mit den antispam in gbook
und zwar geht das Antispam beim gbook nicht
ich habe die gbook.php& die gbook.htm modifiziert
soweit klappt auch alles
bis auf das Antispam es ist nicht sichtbar bis auf das Eingabefeld
im Adminbereich habe ich Antispam ab User eingestellt
die originale gbook.php & gbook.htm hatte ich mal neu hochbeladen und es bleibt leider der Fehler:(
weiß vielleicht jemand woran es liegen könnte ?
hier mal die
modifizierte gbook.htm
<style type="text/css"> <!-- .Stil2 {font-size: 16px} --> </style> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="middle"><p><table width="500" border="1" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="middle"><u><b>Gästebuch Regeln</b></u><br /> <br /> 1. Kein Spam.<br /> 2. Keine Beleidigungen.<br /> 3. Keine Werbung für Firmen oder Geschäfte. <br /> <br /> <b><u>Bei Regelmissachtung erfolgt eine Löschung des Eintrags.</u></b></p> <p></td> </tr> </table> </p></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="middle"> </td> <td width="150" height="30" align="center" valign="middle"><a href="index.php?gbook-1"><img src="include/images/gbook/gbook_button.png" width="150" height="30" border="0" /></a></td> <td align="center" valign="middle"> </td> </tr> </table> <br> {EXPLODE} <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left" class="Cmite"><p><b>Autor: {NAME}</b></p> </td> <td width="25%" align="left" class="Cmite"><b>Homepage: <b>{PAGE}</b></b></td> <td width="25%" align="left" class="Cmite">Email: <b>{MAIL}</td> <td width="25%" align="right" class="Cmite">{DATE}</td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="rand"> <tr class="Cnormgbook"> <td align="left" valign="top" bordercolor="1">{TEXT} <table width="100%" border="1" cellspacing="0" cellpadding="0"> </table></td> </tr> </table> {koms} <br /> <br /> {EXPLODE} <br /> <br /> <div align="center">{SITELINK}</div> {EXPLODE} <!-- G ä S T E B U C H E N T E R F O R M U L A R --> <script language="JavaScript" type="text/javascript"> <!-- var ErlaubteAnzahl={TXTL}; function checkg ( ) { if ( document.form.txt.value.length > ErlaubteAnzahl ) { alert('Du hast mehr als ' + ErlaubteAnzahl + ' Zeichen verwendet'); return false; } else { var fehler = ''; if ( document.form.txt.value.length == 0 ) { fehler += 'Bitte einen Text eingeben'; } if ( document.form.name.value.length == 0 ) { if ( fehler != '' ) { fehler += "\n"; } fehler += 'Bitte einen Namen eingeben'; } if ( fehler != '' ) { alert ( fehler ); return false; } else { return true; } } } function RestlicheZeichenErmitteln(d) { Laenge=document.form.txt.value.length; if(Laenge>ErlaubteAnzahl) { document.form.txt.value=document.form.txt.value.substring(0,ErlaubteAnzahl); RestlicheZeichen=0; } else { RestlicheZeichen=ErlaubteAnzahl-Laenge; } document.form.Laenge.value=RestlicheZeichen; } //--> </script> <script type="text/javascript" src="include/includes/js/bbcode.js"></script> <form action="index.php?gbook-2" onsubmit="return checkg()" method="POST" name="form"> <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="border"> <tr> <td colspan="2" align="left" class="Chead"><b>{_lang_insert}</b></td> </tr><tr> <td width="165" align="left" class="Cmite"><b>{_lang_name} * </b></td> <td width="898" align="left" class="Cnorm"><input type="text" value="{uname}" tabindex="1" name="name"></td> </tr><tr> <td align="left" class="Cmite"><b>{_lang_mail}</b> *</td> <td align="left" class="Cnorm"><input type="text" name="mail" tabindex="2"></td> </tr> <tr> <td align="left" class="Cmite"><b>{_lang_homepage}</b></td> <td align="left" class="Cnorm"><input type="text" name="page" tabindex="3" /></td> </tr> <tr> <td align="left" class="Cmite"><b>bbcode buttons </b></td> <td align="left" class="Cnorm">{__BBCodeButtons__}</td> </tr> <tr> <td align="left" class="Cmite"><strong>Smilies</strong></td> <td align="center" valign="middle" class="Cnorm"><span class="Cmite">{SMILIES}</span></td> </tr><tr> <td width="165" align="center" valign="top" class="Cmite"><p><span class="Stil2"><u>Info</u></span></p> <p>alle felder mit einen * sind pflicht felder und müssen ausgefüllt werden. </p> </td> <td class="Cnorm"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%"> <!-- BB Code START --><!-- BB Code START --> </td> </tr><tr class="Cnorm"> <td width="100%" align="left"><textarea style="width: 98%" onblur="RestlicheZeichenErmitteln(this);" onchange="RestlicheZeichenErmitteln(this);" onfocus="RestlicheZeichenErmitteln(this);" onkeydown="RestlicheZeichenErmitteln(this);" onkeyup="RestlicheZeichenErmitteln(this);" cols="50" rows="10" tabindex="4" name="txt"></textarea><br /> Du hast noch <input size="3" name="Laenge" value="{TXTL}"> {_lang_signs} übrig</td> </tr> </table></td> </tr>{ANTISPAM}<tr class="Cdark"> <td></td><td align="left"><input type="submit" value="{_lang_formsub}" tabindex="5" accesskey="s"></td> </tr></table> </form> {EXPLODE} <table width="100%" cellpadding="4" cellspacing="0" border="0" class="rand"> <tr class="Cmite"> <td width="40%"><b>{name}</b></td> <td width="20%">{mail}{page}</td> <td width="30%" align="right">{datum}</td> </tr> <tr class="Cnorm"> <td colspan="3">{text}</td> </tr> </table> <br /> <table width="100%" border="0" align="left" cellpadding="4" cellspacing="0" class="rand"> <tr class="Cnorm"> <td align="left" valign="middle"> <form action="index.php?gbook-show-{id}" method="POST"> <fieldset> <legend>{_lang_writecomment}</legend> <input type="text" name="name" value="{uname}" />{ANTISPAM}<input type="submit" value="{_lang_enter}"><br /> <textarea style="width: 98%" cols="50" rows="2" name="text"></textarea><br /> </fieldset> </form> <br /> {EXPLODE} <span class="Cmite"># <b>{zahl}</b> von {name}</span> <br /> {text}<br /><br /> {EXPLODE} </td> </tr> </table>
und hier die gbook.php
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Gästebuch'; $hmenu = 'Gästebuch'; $design = new design ( $title , $hmenu ); $design->header(); # time sperre in sekunden $timeSperre = $allgAr['Gsperre']; /* gbook id , name , mail , page , ip , time , txt */ switch($menu->get(1)) { case 1 : $tpl = new tpl ( 'gbook.htm' ); $ar = array ( 'uname' => $_SESSION['authname'], 'SMILIES' => getsmilies(), 'ANTISPAM' => get_antispam ('gbook', 1), 'TXTL' => $allgAr['Gtxtl'] ); $tpl->set_ar_out($ar,3); if (!isset($_SESSION['klicktime_gbook'])) { $_SESSION['klicktime_gbook'] = 0; } break; case 2 : $dppk_time = time(); if (($_SESSION['klicktime_gbook'] + $timeSperre) < $dppk_time AND isset($_POST['name']) AND isset($_POST['txt']) AND trim($_POST['name']) != "" AND trim($_POST['txt']) != "" AND chk_antispam ('gbook' ) AND strlen ($_POST['txt']) <= $allgAr['Gtxtl'] ) { $txt = escape($_POST['txt'], 'textarea'); $name = escape($_POST['name'], 'string'); $mail = escape($_POST['mail'], 'string'); $page = escape($_POST['page'], 'string'); db_query("INSERT INTO prefix_gbook (`name`,`mail`,`page`,`time`,`ip`,`txt`) VALUES ('".$name."', '".$mail."', '".$page."', '".time()."', '".getip()."', '".$txt."')"); $_SESSION['klicktime_gbook'] = $dppk_time; wd('index.php?gbook',$lang['insertsuccessful']); } else { echo '- '.$lang['donotpostsofast']; echo '<br />- '.sprintf($lang['gbooktexttolong'], $allgAr['Gtxtl']); echo '<br />- '.$lang['plsfilloutallfields']; } break; case 'show' : if ($allgAr['gbook_koms_for_inserts'] == 1) { $id = escape($menu->get(2), 'integer'); if (chk_antispam('gbookkom') AND isset($_POST['name']) AND isset($_POST['text'])) { $name = escape($_POST['name'], 'string'); $text = escape($_POST['text'], 'string'); db_query("INSERT INTO prefix_koms (name,text,uid,cat) VALUES ('".$name."', '".$text."', ".$id.", 'GBOOK')"); } if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND has_right(-7, 'gbook')) { $did = escape($menu->getE(3), 'integer'); db_query("DELETE FROM prefix_koms WHERE uid = ".$id." AND cat = 'GBOOK' AND id = ".$did); } $r = db_fetch_assoc(db_query("SELECT time, name, mail, page, txt as text, id FROM prefix_gbook WHERE id = ".$id)); $r['datum'] = date('d.m.Y', $r['time']); if ($r['page'] != '') { $r['page'] = get_homepage($r['page']); $r['page'] = ' <a href="'.$r['page'].'" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage '.$lang['from'].' '.$r['name'].'"></a>'; } if ($r['mail'] != '') { $r['mail'] = ' <a href="mailto:'.escape_email_to_show($r['mail']).'"><img src="include/images/icons/mail.gif" border="0" alt="E-Mail '.$lang['from'].' '.$r['name'].'"></a>'; } $tpl = new tpl ( 'gbook.htm' ); $r['ANTISPAM'] = get_antispam('gbookkom', 0); $r['uname'] = $_SESSION['authname']; $r['text'] = bbcode($r['text']); $tpl->set_ar_out($r, 4); $i = 1; $erg = db_query("SELECT id, name, text FROM prefix_koms WHERE uid = ".$id." AND cat = 'GBOOK' ORDER BY id DESC"); $anz = db_num_rows($erg)+1; while ($r1 = db_fetch_assoc($erg)) { $r1['zahl'] = $anz - $i; $r1['text'] = bbcode($r1['text']); if (has_right(-7, 'gbook')) { $r1['text'] .= '<a href="index.php?gbook-show-'.$id.'-d'.$r1['id'].'"><img src="include/images/icons/del.gif" alt="'.$lang['delete'].'" border="0" title="'.$lang['delete'].'" /></a>'; } $tpl->set_ar_out($r1, 5); $i++; } $tpl->out(6); } break; default : $limit = $allgAr['gbook_posts_per_site']; // Limit $page = ( $menu->getA(1) == 'p' ? escape($menu->getE(1), 'integer') : 1 ); $MPL = db_make_sites ($page , "" , $limit , "?gbook" , 'gbook' ); $anfang = ($page - 1) * $limit; $tpl = new tpl ( 'gbook.htm' ); $ei1 = @db_query("SELECT COUNT(ID) FROM prefix_gbook"); $ein = @db_result($ei1,0); $ar = array ('EINTRAGE' => $ein ); $tpl->set_ar_out($ar,0); $erg = db_query("SELECT * FROM prefix_gbook ORDER BY time DESC LIMIT ".$anfang.",".$limit) or die (db_error()); while ($row = db_fetch_object($erg)) { $page = ''; $mail = ''; if ($row->page) { $row->page = get_homepage($row->page); $page = ' <a href="'.$row->page.'" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage '.$lang['from'].' '.$row->name.'"></a>'; } if ($row->mail) { $mail = ' <a href="mailto:'.escape_email_to_show($row->mail).'"><img src="include/images/icons/mail.gif" border="0" alt="E-Mail '.$lang['from'].' '.$row->name.'"></a>'; } $koms = ''; if ($allgAr['gbook_koms_for_inserts'] == 1) { $koms = db_result(db_query("SELECT COUNT(*) FROM prefix_koms WHERE uid = ".$row->id." AND cat = 'GBOOK'"),0,0); $koms = '<a href="index.php?gbook-show-'.$row->id.'">'.$koms.' '.$lang['comments'].'</a>'; } $ar = array ( 'NAME' => $row->name.' ('.$row->ip.')', 'DATE' => date("d.m.Y - H:i",$row->time), 'koms' => $koms, 'MAIL' => $mail, 'ID' => $row->id, 'PAGE' => $page, 'TEXT' => BBCode($row->txt) ); $tpl->set_ar_out($ar,1); } $tpl->set_out('SITELINK', $MPL, 2 ); break; } //-----------------------------------------------------------| $design->footer(); ?>
bin echt ratlos
hoffe mir kann jemand helfen :'(
MFG
Blaubaer
EDIT
es war ein Fehler in der include/includes/func/allg.php
drauf gekommen bin ich durch den post hier
ilch.de/forum-showposts-41652.html#291202
Zuletzt modifiziert von Blaubaer am 20.09.2010 - 14:44:03