1.Kann ich die Shoutbox so einstellen, das nur Registrierte sich darin verewigen können??
2.Kann ich IP's bannen sodass bestimmte Personen darin nichts schreiben können??
3.Wenn ja wie geht das??
Schonmal Danke
gr33tz
dabaua
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' ); $shoutbox_VALUE_name = getenv("REMOTE_ADDR"); $datum=date("j.n.y"); $zeit=date("@H:i"); if ( loggedin() ) { $shoutbox_VALUE_name2 = $_SESSION['authname']; } if ( !empty($_POST['shoutbox_submit']) ) { $shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string'); $shoutbox_nickname = substr($shoutbox_nickname, 0, 15); $shoutbox_textarea = escape($_POST['shoutbox_textarea'],'textarea'); $shoutbox_textarea = preg_replace("/\[.?(url|b|i|u|img|code|quote)[^\]]*?\]/i","",$shoutbox_textarea); $shoutbox_textarea = strip_tags($shoutbox_textarea); if ( !empty($shoutbox_nickname) AND !empty($shoutbox_textarea) ) { db_query('INSERT INTO `prefix_shoutbox` VALUES ( "" , "'.$shoutbox_nickname.' '.$datum.' '.$zeit.'" , "'.$shoutbox_textarea.'" ) ' ); } } if ( loggedin() ) { //angemeldeter user echo '<form action="index.php" method="POST">'; echo '<input readonly type="text" size="20" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name2.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="15">'; echo '<br /><textarea cols="27" rows="3" name="shoutbox_textarea"></textarea><br />'; echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">'; echo '</form><table width="100%" class="border" cellpadding="2" cellspacing="1" border="0">'; } else { //Gaeste echo "<font color=#ffffff><b><p></p>Zum Posten<p></p>Bitte Einloggen!<p></p></b></font>"; echo '</form><table width="100%" class="border" cellpadding="2" cellspacing="1" border="0">'; } $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT 5'); $class = 'Cnorm'; while ($row = db_fetch_object($erg) ) { $class = ( $class == 'Cnorm' ? 'Cnorm' : 'Cnorm' ); echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.preg_replace( '/([^\s]{20})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>'; } echo '</table><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>'; ?>
Geschlossen | ||
Zurück zu Module und Modifikationen |