':happy:#@#-_-_-#@#smile.gif', ':(' => ':sad:#@#-_-_-#@#sad.gif', ':-O' => ':eek:#@#-_-_-#@#eek.gif', ':D' => ':biggrin:#@#-_-_-#@#biggrin.gif', ':/' => ':evil:#@#-_-_-#@#evil.gif', ':\'(' => ':frown:#@#-_-_-#@#frown.gif', ':P' => ':*g*:#@#-_-_-#@#lol.gif', ':X' => ':face:#@#-_-_-#@#x-face.gif' );
foreach ($smileys as $icon => $info) {
list($emo, $url) = explode('#@#-_-_-#@#', $info);
$string = str_replace($icon,'',$string);
}
return $string;
}
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, 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.'" , "'.$shoutbox_textarea.'" ) ' );
}
}
if (has_right($allgAr['sb_recht'])){
echo '
| '.$row->nickname.': '.shoutboxsmileys(preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row->textarea)).' |