habe irgend was übersehen nur weis nicht was es ist
er postet es in beide boxes rein
contents\djshoutbox.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Shoutbox '.$lang['archiv'];
$hmenu = 'Shoutbox '.$lang['archiv'];
$design = new design ( $title , $hmenu );
$design->header();
if (is_siteadmin()) {
# delete
if ($menu->getA(1) == 'd' AND is_numeric($menu->getE(1))) {
db_query("DELETE FROM prefix_dj_shoutbox WHERE id = ".$menu->getE(1));
}
# delete all
if ($menu->get(1) == 'delall') {
if (is_numeric($menu->get(2))) {
$anz = db_result(db_query("SELECT COUNT(*) FROM `prefix_dj_shoutbox`"),0) - $menu->get(2);
if ($anz > 0) {
db_query("DELETE FROM `prefix_dj_shoutbox` LIMIT $anz");
}
}
else { db_query("DELETE FROM `prefix_dj_shoutbox`"); }
}
}
echo '<script type="text/javascript">
function del() {
if (anz = prompt("Wieviele Einträge sollen erhalten bleiben?\n(Es werden die zuletzt geschriebenen erhalten)", "0")) {
if (anz >= 0) { window.location.href = "index.php?djshoutbox-delall-"+anz; }
else alert("Du musst eine Zahl größer gleich 0 eingeben");
}
}
</script>';
$class = 'Cnorm';
echo '<table width="100%" align="center" class="border" cellpadding="2" cellspacing="1" border="0"><tr class="Chead"><td><b>Shoutbox '.$lang['archiv'].'</b></td></tr>';
$erg = db_query('SELECT * FROM `prefix_dj_shoutbox` ORDER BY id DESC');
while ($row = db_fetch_assoc($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '<tr class="'.$class.'"><td>';
if ( is_siteadmin() ) {
echo '<a href="index.php?djshoutbox-d'.$row['id'].'"><img src="include/images/icons/del.gif" alt="'.$lang['delete'].'" title="'.$lang['delete'].'"></a> ';
}
echo '<b>'.$row['nickname'].':</b> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row['textarea']).'</td></tr>';
}
echo '</table>';
if (is_siteadmin()) {
echo '<a href="javascript:del();">'.$lang['clearshoutbox'].'</a>';
}
$design->footer();
?>
boxes\djshoutbox.php
<?php
# Copyright by Manuel
# Support www.ilch.de
# modifiziert von: Painstorm
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']) ) {
$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_dj_shoutbox` VALUES ( "" , "'.$zeit.''.$shoutbox_nickname.'" , "'.$shoutbox_textarea.'" ) ' );
}
}
echo '<form action="index.php" method="POST">';
echo "<center><br> $datum $zeit <br>IP:<b> $shoutbox_VALUE_name2</b><br>";
echo '<input type="text" size="15" 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 /><textarea cols="15" rows="2" 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">';
$erg = db_query('SELECT * FROM `prefix_dj_shoutbox` ORDER BY id DESC LIMIT 10');
$class = 'Cnorm';
while ($row = db_fetch_object($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.preg_replace( '/([^\s]{10})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>';
}
echo '</table><a class="box" href="index.php?djshoutbox">'.$lang['archiv'].'</a>';
?>