ich wollte die Shoutboxen zusammen fügen:
No Fake
+
Adminschoutbox
Habe des schon weit gemacht, sieht so aus:
<center> <?php # Copyright by: Manuel # Support www.ilch.de # Edited by Emo-CLan.net.tc defined ('main') or die ( 'no direct access' ); $shoutbox_VALUE_name = getenv("REMOTE_ADDR"); $datum=date(" j.n.Y"); $zeit=date(" H:i"); if ( $_SESSION['authright'] <= -1 ) { // registrierte User if ( loggedin() ) { $shoutbox_VALUE_name = $_SESSION['authname']; } else { $shoutbox_VALUE_name = 'Nickname'; } #Admins if ( user_has_admin_right($menu,false) ) { if (has_right($allgAr['sb_recht'])){ if ( !empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) { $shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string'); $shoutbox_nickname = substr($shoutbox_nickname, 0, 1000); $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` (`nickname`,`textarea`) VALUES ( "" , "'.$datum.'<br>'.$zeit.'<br>'. $ ( "<font color=#FFFF00>'.$shoutbox_VALUE_nickname.'</font>" , "</font>'.$shoutbox_textarea.'" ) ' ); } } echo '<form action="index.php?'.$menu->get_complete().'" method="POST">'; 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="1000">'; echo '<br /><textarea style="width: 80%" cols="15" rows="2" name="shoutbox_textarea"></textarea><br />'; echo get_antispam ('shoutbox', 0); echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">'; echo '</form>'; } echo '<table width="90%" class="border" cellpadding="2" cellspacing="1" border="0">'; $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 '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>'; } echo '</table><a class="box" href="index.php?shoutbox"><center><img src = http://em0clan.em.ohost.de/include/images/neu/Archiv.png alt="Archiv" border="0" /></a></center></a>'; }else { #USer if (has_right($allgAr['sb_recht'])){ if ( !empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) { $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` (`nickname`,`textarea`) VALUES ( "'.$shoutbox_nickname.'" , "'.$shoutbox_textarea.'" ) ' ); } } echo '<form action="index.php?'.$menu->get_complete().'" method="POST">'; 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 style="width: 80%" cols="15" rows="2" name="shoutbox_textarea"></textarea><br />'; echo get_antispam ('shoutbox', 0); echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">'; echo '</form>'; } else { //Gaeste echo "<font color=#FFFFFF><b><br>Zum Posten<br>Bitte Einloggen!<p></p></b></font>"; echo '</form><table width="100" align="center" class="border" cellpadding="2" cellspacing="1" border="0">'; } echo '<table width="90%" class="border" cellpadding="2" cellspacing="1" border="0">'; $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 '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>'; } echo '</table><center><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>'; echo "<br>Heute ist der<br><b> $datum</b><br>Es ist<br><b> $zeit Uhr</b><br>Und Deine IP (Name)ist:<br><b> $shoutbox_VALUE_name</b><br>"; ?> </center> img src = http://em0clan.em.ohost.de/include/images/neu/Archiv.png alt="Archiv" border="0" <br /></center></a>'; } ?> </center>
wenn ich nun die Seite öffne, zeigt er diese Zeile an, mehr nicht:
Parse error: syntax error, unexpected '(', expecting T_VARIABLE or '$' in /usr/export/www/vhosts/funnetwork/hosting/thewanteddeath/include/boxes/shoutbox.php on line 33
Die Zeile 33 ist bei mir diese:
$shoutbox_textarea = preg_replace("/\[.?(url|b|i|u|img|code|quote)[^\]]*?\]/i","",$shoutbox_textarea);
Kann mir jemand helfen???
betroffene Homepage: thewanteddeath.de/
Zuletzt modifiziert von VolleHose am 29.03.2009 - 17:20:27