ich habe mal eine Frage zu der (erweiterten) Shoutbox:
Quelltext
<?php # Copyright by Manuel Staechele # Support www.ilch.de # modifieziert von: Burli und noch mal vielen Dank an Mairu für seine Hilfe ;) defined ('main') or die ( 'no direct access' ); $shoutbox_VALUE_name2 = getenv("REMOTE_ADDR"); $datum=date("j.n.Y"); $zeit=date(" H:i "); if ( loggedin() ) { $shoutbox_VALUE_name = $_SESSION['authname']; } else { $shoutbox_VALUE_name = 'Nickname'; } if ( !empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) { $shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string'); $shoutbox_nickname = substr($shoutbox_nickname, 0, 25); $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 ( "" , "'.$datum.'/ '.$zeit.''.$shoutbox_VALUE_name2.' <br>'.$shoutbox_nickname.'" , "'.$shoutbox_textarea.'" ) ' ); } } if (has_right($allgAr['sb_recht'])){ echo '<br><form action="index.php" method="POST"><center>'; echo '<input type="text" size="29" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="15">'; echo '<br /><center><textarea style="width: 80%" cols="15" rows="5" name="shoutbox_textarea"></textarea></center><br />'; echo get_antispam ('shoutbox', 0); echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">'; echo '</center></form>'; } echo '<div style="height:350px; align:center;">'; echo '<table width="100%" cellpadding="2" cellspacing="1" border="0" color="white">'; $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT '.(is_numeric($allgAr['sb_limit'])?$allgAr['sb_limit']:5)); $class = 'Cnorm'; while ($row = db_fetch_object($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); echo '<td><center><b>'.$row->nickname.': </b><font color="red">'.bbcode(preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row->textarea)).'</font></center></td></tr>'; } echo "</table></div><!-- <center><br>Es ist der: $datum um $zeit <br>Deine IP:<b> $shoutbox_VALUE_name2</b><br>wird gespeichert! -->"; //echo '<br><b><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a></b></center>'; ?>
Wenn ich in der Shoutbox etwas poste,
dann zeigt er mir doch folgendes an:
1.5.2009/ 14:24 127.0.0.1
JeromeM90: test
Er holt sich also aus der .$row->nickname. diesen kompletten Nick. Meine Frage dazu lautet, wie bekomme ich das Datum, Uhrzeit und IP weg ?
Gruß
JeromeM90
betroffene Homepage: habe.noch.keine.de