Zeile 47
echo '<b>'.$row['nickname'].':</b> '.bbcode(preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row['textarea'])).'</td></tr>';
Sicherheitsprobleme sollte es eigentlich nicht geben.
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
echo '<b>'.$row['nickname'].':</b> '.bbcode(preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row['textarea'])).'</td></tr>';
<script type='text/javascript' src='include/includes/js/bbcode.js'></script> <script type="text/javascript" src='include/includes/js/shoutbox.js'></script>
function simple_insertbox(aTag,eTag) { var input = document.forms['shoutbox'].elements['shoutbox_textarea']; input.focus(); /* für Internet Explorer */ if(typeof document.selection != 'undefined') { /* Einfügen des Formatierungscodes */ var range = document.selection.createRange(); var insText = range.text; range.text = aTag + insText + eTag; /* Anpassen der Cursorposition */ range = document.selection.createRange(); if (insText.length == 0) { range.move('character', -eTag.length); } else { range.moveStart('character', aTag.length + insText.length + eTag.length); } range.select(); } /* für neuere auf Gecko basierende Browser */ else if(typeof input.selectionStart != 'undefined') { /* Einfügen des Formatierungscodes */ var start = input.selectionStart; var end = input.selectionEnd; var insText = input.value.substring(start, end); input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end); /* Anpassen der Cursorposition */ var pos; if (insText.length == 0) { pos = start + aTag.length; } else { pos = start + aTag.length + insText.length + eTag.length; } input.selectionStart = pos; input.selectionEnd = pos; } /* für die übrigen Browser */ else { /* Abfrage der Einfügeposition */ var pos = input.value.length; /* Einfügen des Formatierungscodes */ var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:"); input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos); } }
function putbox ( towrite ) { shoutbox.shoutbox_textarea.value += towrite; shoutbox.shoutbox_textarea.focus(); }
## ### #### ##### gibt die smiley lilste für die Shoubox zurueck function getsmiliesbox () { global $lang; $zeilen = 5; $i = 0; $b = '<script language="JavaScript" type="text/javascript">function moreSmilies () { var x = window.open("about:blank", "moreSmilies", "width=250,height=200,status=no,scrollbars=yes,resizable=yes"); '; $a = ''; $erg = db_query('SELECT emo, ent, url FROM `prefix_smilies`'); while ($row = db_fetch_object($erg) ) { $b .= 'x.document.write ("<a href=\"javascript:opener.putbox(\''.addslashes(addslashes($row->ent)).'\')\">");'; $b .= 'x.document.write ("<img style=\"border: 0px; padding: 5px;\" src=\"include/images/smiles/'.$row->url.'\" title=\"'.$row->emo.'\"></a>");'; if ($i<12) { # float einbauen if($i%$zeilen == 0 AND $i <> 0) { $a .= '<br /><br />'; } $a .= '<a href="javascript:putbox(\''.addslashes($row->ent).'\')">'; $a .= '<img style="margin: 2px;" src="include/images/smiles/'.$row->url.'" border="0" title="'.$row->emo.'"></a>'; } $i++; } $b .= ' x.document.write("<br /><br /><center><a href=\"javascript:window.close();\">'.$lang['close'].'</a></center>"); x.document.close(); }</script>'; if ($i>12) { $a .= '<br /><br /><center><a href="javascript:moreSmilies();">'.$lang['more'].'</a></center>'; } $a = $b.$a; return ($a); }
echo '<form action="index.php" method="POST">';
echo '<form name="shoutbox" action="index.php" method="POST">';
echo get_antispam ('shoutbox', 0);
echo get_antispam ('shoutbox', 0); echo getsmiliesbox ('shoutbox', 0); echo "<br><br>";
<script type="text/javascript" src="include/includes/js/bbcode.js"></script>
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); if ( loggedin() ) { $shoutbox_VALUE_name = $_SESSION['authname']; } else { $shoutbox_VALUE_name = 'Nickname'; } 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 '<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]{10})(?=[^\s])/', "$1\n", BBcode($row->textarea)).'</td></tr>'; } echo '</table><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>'; 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 getsmilies ('shoutbox', 0); ?>
echo '<form name="form" action="index.php?'.$menu->get_complete().'" method="POST">';
Beispiel: ?> <form name="form" action="index.php?<?php $menu->get_complete() ?>" method="POST"> u.s.w....
Geschlossen | ||
Zurück zu Module und Modifikationen |