Hi zusammen..
könnt ihr mir sagen, wie ich die Antispam Funktion auch für Gäste im Forum aktivieren bzw. einbauen kann?!
Helft mir bitte ^^
vieeelen lieben dank
verwendete ilchClan Version: 1.1
betroffene Homepage: fvsg2007.de
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
| Geschlossen | ||



<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
if ( $forum_rights['start'] == FALSE ) {
$forum_failure[] = $lang['nopermission'];
check_forum_failure($forum_failure);
}
$title = $allgAr['title'].' :: Strandbar :: '.$aktForumRow['kat'].' :: '.$aktForumRow['name'].' :: neues Thema';
$hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Strandbar</a><b> » </b><a class="smalfont" href="index.php?forum-showcat-'.$aktForumRow['cid'].'">'.$aktForumRow['kat'].'</a><b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a>'.$extented_forum_menu_sufix;
$dppk_time = time();
$time = time();
if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; }
$topic = '';
$txt = '';
$xnn = '';
if (isset($_POST['topic'])) {
$topic = trim(escape($_POST['topic'], 'string'));
}
if (isset($_POST['txt'])) {
$txt = trim(escape($_POST['txt'], 'textarea'));
}
if (isset($_POST['Gname'])) {
$xnn = trim(escape_nickname($_POST['Gname']));
}
if (($_SESSION['klicktime'] + 15) > $dppk_time OR empty($topic) OR empty($txt) OR !empty($_POST['priview']) OR (empty($_POST['Gname']) AND !loggedin())) {
$design = new design ( $title , $hmenu, 1, 'forum/index.htm' );
$design->header();
$tpl = new tpl ( 'forum/newtopic' );
$name = '';
if ( !loggedin() ) {
$name = '<tr><td class="Cmite"0><b>'.$lang['name'].'</b></td>';
$name .= '<td class="Cnorm"><input type="text" value="'.unescape($xnn).'" maxlength="15" name="Gname"></td></tr>';
$uquery = db_query("SELECT name FROM prefix_user");
while ($uds = db_fetch_object($uquery)) {
$username = $uds -> name;
if (!empty($users)) $users = $users.', ';
$users = $users.'"'.$username.'"';
}
$br = chr(13).chr(10);
$jscript = 'user = new Array('.$users.');'.$br.
'for (i=0;i<user.length;i++)'.$br.
'if (document.form.Gname.value == user[i] ) {'.$br.
'alert("Dies ist der Benutzername eines registrierten Users, benutzen sie einen anderen.");'.$br.
'return false;'.$br.
'}'.$br.
'if (document.form.Gname.value == "") {'.$br.
'alert ("Das Namensfeld ist leer.");'.$br.
'return false;'.$br.
'}'.$br;
}
if (isset($_POST['priview'])) {
$tpl->set_out('txt', bbcode($txt), 0);
}
$ar = array (
'name' => $name,
'txt' => escape_for_fields(unescape($txt)),
'topic' => escape_for_fields(unescape($topic)),
'fid' => $fid,
'SMILIES' => getsmilies(),
'ANTISPAM' => (loggedin()?'':get_antispam ('topic', 0)),
'JSCRIPT' => $jscript
);
$tpl->set_ar_out($ar,1);
} else {
if(chk_antispam ('topic' ) != false)
# save toipc
$_SESSION['klicktime'] = $dppk_time;
$design = new design ( $title , $hmenu, 0, 'forum/index.htm' );
$design->header();
if ( loggedin()) {
$uid = $_SESSION['authid'];
$erst = escape($_SESSION['authname'],'string');
db_query("UPDATE `prefix_user` set posts = posts+1 WHERE id = ".$uid);
} else {
$erst = $xnn;
$uid = 0;
}
db_query("INSERT INTO `prefix_topics` (fid, name, erst, stat) VALUES ( ".$fid.", '".$topic."', '".$erst."', 1 )");
$tid = db_last_id();
# topic alert
if (!empty($_POST['topic_alert']) AND $_POST['topic_alert'] == 'yes' AND loggedin()) {
if (0 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")");
}
}
db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."')");
$pid = db_last_id();
db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid." WHERE id = ".$tid);
db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid.", topics = topics + 1 WHERE id = ".$fid);
# toipc als gelesen markieren
$_SESSION['forumSEE'][$fid][$tid] = time();
wd('index.php?forum-showposts-'.$tid,$lang['createtopicsuccessful']);
}
$design->footer();
?>


<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
if ( $forum_rights['start'] == FALSE ) {
$forum_failure[] = $lang['nopermission'];
check_forum_failure($forum_failure);
}
$title = $allgAr['title'].' :: Strandbar :: '.$aktForumRow['kat'].' :: '.$aktForumRow['name'].' :: neues Thema';
$hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Strandbar</a><b> » </b><a class="smalfont" href="index.php?forum-showcat-'.$aktForumRow['cid'].'">'.$aktForumRow['kat'].'</a><b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a>'.$extented_forum_menu_sufix;
$dppk_time = time();
$time = time();
if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; }
$topic = '';
$txt = '';
$xnn = '';
if (isset($_POST['topic'])) {
$topic = trim(escape($_POST['topic'], 'string'));
}
if (isset($_POST['txt'])) {
$txt = trim(escape($_POST['txt'], 'textarea'));
}
if (isset($_POST['Gname'])) {
$xnn = trim(escape_nickname($_POST['Gname']));
}
if (($_SESSION['klicktime'] + 15) > $dppk_time OR empty($topic) OR empty($txt) OR !empty($_POST['priview']) OR (empty($_POST['Gname']) AND !loggedin())) {
$design = new design ( $title , $hmenu, 1, 'forum/index.htm' );
$design->header();
$tpl = new tpl ( 'forum/newtopic' );
$name = '';
if ( !loggedin() ) {
$name = '<tr><td class="Cmite"0><b>'.$lang['name'].'</b></td>';
$name .= '<td class="Cnorm"><input type="text" value="'.unescape($xnn).'" maxlength="15" name="Gname"></td></tr>';
$uquery = db_query("SELECT name FROM prefix_user");
while ($uds = db_fetch_object($uquery)) {
$username = $uds -> name;
if (!empty($users)) $users = $users.', ';
$users = $users.'"'.$username.'"';
}
$br = chr(13).chr(10);
$jscript = 'user = new Array('.$users.');'.$br.
'for (i=0;i<user.length;i++)'.$br.
'if (document.form.Gname.value == user[i] ) {'.$br.
'alert("Dies ist der Benutzername eines registrierten Users, benutzen sie einen anderen.");'.$br.
'return false;'.$br.
'}'.$br.
'if (document.form.Gname.value == "") {'.$br.
'alert ("Das Namensfeld ist leer.");'.$br.
'return false;'.$br.
'}'.$br;
}
if (isset($_POST['priview'])) {
$tpl->set_out('txt', bbcode($txt), 0);
}
$ar = array (
'name' => $name,
'txt' => escape_for_fields(unescape($txt)),
'topic' => escape_for_fields(unescape($topic)),
'fid' => $fid,
'SMILIES' => getsmilies(),
'ANTISPAM' => (loggedin()?'':get_antispam ('topic', 0)),
'JSCRIPT' => $jscript
);
$tpl->set_ar_out($ar,1);
} else {
if(chk_antispam ('topic' ) != false){
# save toipc
$_SESSION['klicktime'] = $dppk_time;
$design = new design ( $title , $hmenu, 0, 'forum/index.htm' );
$design->header();
if ( loggedin()) {
$uid = $_SESSION['authid'];
$erst = escape($_SESSION['authname'],'string');
db_query("UPDATE `prefix_user` set posts = posts+1 WHERE id = ".$uid);
} else {
$erst = $xnn;
$uid = 0;
}
db_query("INSERT INTO `prefix_topics` (fid, name, erst, stat) VALUES ( ".$fid.", '".$topic."', '".$erst."', 1 )");
$tid = db_last_id();
# topic alert
if (!empty($_POST['topic_alert']) AND $_POST['topic_alert'] == 'yes' AND loggedin()) {
if (0 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")");
}
}
db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."')");
$pid = db_last_id();
db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid." WHERE id = ".$tid);
db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid.", topics = topics + 1 WHERE id = ".$fid);
# toipc als gelesen markieren
$_SESSION['forumSEE'][$fid][$tid] = time();
wd('index.php?forum-showposts-'.$tid,$lang['createtopicsuccessful']);
}
else
{
echo "Falsches Rechenergebnis ;)";
}
}
$design->footer();
?>
Falsches Rechenergebnis Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/fvsg2007.de/httpdocs/Abikini/include/contents/forum/new_topic.php on line 127
else
{
echo "Falsches Rechenergebnis ;)";
}
$tpl->set_ar_out($ar,1);
} else { das $design->footer(); nochmal einfügen.

<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
if ( $forum_rights['start'] == FALSE ) {
$forum_failure[] = $lang['nopermission'];
check_forum_failure($forum_failure);
}
$title = $allgAr['title'].' :: Strandbar :: '.$aktForumRow['kat'].' :: '.$aktForumRow['name'].' :: neues Thema';
$hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Strandbar</a><b> » </b><a class="smalfont" href="index.php?forum-showcat-'.$aktForumRow['cid'].'">'.$aktForumRow['kat'].'</a><b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a>'.$extented_forum_menu_sufix;
$dppk_time = time();
$time = time();
if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; }
$topic = '';
$txt = '';
$xnn = '';
if (isset($_POST['topic'])) {
$topic = trim(escape($_POST['topic'], 'string'));
}
if (isset($_POST['txt'])) {
$txt = trim(escape($_POST['txt'], 'textarea'));
}
if (isset($_POST['Gname'])) {
$xnn = trim(escape_nickname($_POST['Gname']));
}
if (($_SESSION['klicktime'] + 15) > $dppk_time OR empty($topic) OR empty($txt) OR !empty($_POST['priview']) OR (empty($_POST['Gname']) AND !loggedin())) {
$design = new design ( $title , $hmenu, 1, 'forum/index.htm' );
$design->header();
$tpl = new tpl ( 'forum/newtopic' );
$name = '';
if ( !loggedin() ) {
$name = '<tr><td class="Cmite"0><b>'.$lang['name'].'</b></td>';
$name .= '<td class="Cnorm"><input type="text" value="'.unescape($xnn).'" maxlength="15" name="Gname"></td></tr>';
$uquery = db_query("SELECT name FROM prefix_user");
while ($uds = db_fetch_object($uquery)) {
$username = $uds -> name;
if (!empty($users)) $users = $users.', ';
$users = $users.'"'.$username.'"';
}
$br = chr(13).chr(10);
$jscript = 'user = new Array('.$users.');'.$br.
'for (i=0;i<user.length;i++)'.$br.
'if (document.form.Gname.value == user[i] ) {'.$br.
'alert("Dies ist der Benutzername eines registrierten Users, benutzen sie einen anderen.");'.$br.
'return false;'.$br.
'}'.$br.
'if (document.form.Gname.value == "") {'.$br.
'alert ("Das Namensfeld ist leer.");'.$br.
'return false;'.$br.
'}'.$br;
}
if (isset($_POST['priview'])) {
$tpl->set_out('txt', bbcode($txt), 0);
}
$ar = array (
'name' => $name,
'txt' => escape_for_fields(unescape($txt)),
'topic' => escape_for_fields(unescape($topic)),
'fid' => $fid,
'SMILIES' => getsmilies(),
'ANTISPAM' => (loggedin()?'':'<td class="Cmite">Antispam</td><td class="Cnorm">'.get_antispam ('topic', 0).'</td>'),
'JSCRIPT' => $jscript
);
$tpl->set_ar_out($ar,1);
$design->footer();
} else {
if(chk_antispam ('topic' ) != false){
# save toipc
$_SESSION['klicktime'] = $dppk_time;
$design = new design ( $title , $hmenu, 0, 'forum/index.htm' );
$design->header();
if ( loggedin()) {
$uid = $_SESSION['authid'];
$erst = escape($_SESSION['authname'],'string');
db_query("UPDATE `prefix_user` set posts = posts+1 WHERE id = ".$uid);
} else {
$erst = $xnn;
$uid = 0;
}
db_query("INSERT INTO `prefix_topics` (fid, name, erst, stat) VALUES ( ".$fid.", '".$topic."', '".$erst."', 1 )");
$tid = db_last_id();
# topic alert
if (!empty($_POST['topic_alert']) AND $_POST['topic_alert'] == 'yes' AND loggedin()) {
if (0 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")");
}
}
db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."')");
$pid = db_last_id();
db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid." WHERE id = ".$tid);
db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid.", topics = topics + 1 WHERE id = ".$fid);
# toipc als gelesen markieren
$_SESSION['forumSEE'][$fid][$tid] = time();
wd('index.php?forum-showposts-'.$tid,$lang['createtopicsuccessful']);
}
$design->footer();
}
?>




es klappt endlich ^^.. hast dich ja super bemüht
danke...

else {
$design = new design ( $title , $hmenu);
$design->header();
echo 'Falscher Antispam<br />
<a href="javascript:window.history.back();">Zurück</a>';
$design->footer();

else {
$design = new design ( $title , $hmenu);
$design->header();
echo '<meta http-equiv="refresh" content="0"; url=javascript:window.history.back()">';
}



| Geschlossen | ||
![]() |
Zurück zu Allgemein | |