mfg Pilzwb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | <table class = "news_autor2" width= "99%" cellpadding= "3" cellspacing= "1" border= "0" > <tr class = "Chead" > <th height= "20" > <a class = "news_autor0" ><b><center>Shoutbox</center><b></a> <td class = "Cnorm" > </tr> <td width= "100%" valign= "top" ></div> <?php date_default_timezone_set( 'Europe/Berlin' ); defined ( 'main' ) or die ( 'no direct access' ); $ILCH_HEADER_ADDITIONS .= '<script type= "text/javascript" > function insert_sb_smiley(sbTag) { var input = document.forms[\'shoutbox\'].elements[\'shoutbox_textarea\']; input.focus(); if (typeof document.selection != \'undefined\') { var range = document.selection.createRange(); var insText = range.text; range.text = sbTag; range = document.selection.createRange(); range.moveStart(\'character\', 0); range.select(); } else if (typeof input.selectionStart != \'undefined\') { var start = input.selectionStart; var end = input.selectionEnd; var insText = input.value.substring(start, end ); input.value = input.value. substr (0, start) + sbTag + input.value. substr ( end ); var pos; pos = start + sbTag.length; input.selectionStart = pos; input.selectionEnd = pos; } else { var pos = input.value.length; input.value = input.value. substr (0, pos) + sbTag + input.value. substr (pos); } } </script>'; function sb_smilies () { global $lang ; $b = '<script language="JavaScript" type="text/javascript">function more_sb_Smilies () { var x = window.open("about:blank", "more_sb_Smilies", "width=800,height=350,status=no,scrollbars=yes,resizable=yes"); ' ; $erg = db_query( 'SELECT emo, ent, url FROM `prefix_smilies`' ); while ( $row = db_fetch_object( $erg ) ) { $b .= 'x.document.write ("<a href=\"javascript:opener.insert_sb_smiley(\'' . addslashes ( addslashes ( $row ->ent)). '\')\">");' ; $b .= 'x.document.write ("<img style=\"border: 0px; padding: 5px;\" src=\"include/images/smiles/' . $row ->url. '\" title=\"' . $row ->emo. '\"></a>");' ; } $b .= ' x.document.write("<br /><br /><center><a href=\"javascript:window.close();\">' . $lang [ 'close' ]. '</a></center>"); x.document.close(); }</script>' ; return ( $b ); } 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' ], 'string' ); $shoutbox_textarea = preg_replace( "/\[.?(url|b|code|quote)[^\]]*?\]/i" , "" , $shoutbox_textarea ); $shoutbox_textarea = strip_tags ( $shoutbox_textarea ); if (! empty ( $shoutbox_nickname ) AND ! empty ( $shoutbox_textarea )) { db_query( 'DELETE FROM `prefix_shoutbox` WHERE nickname = "' . $shoutbox_VALUE_name . '" AND textarea = "' . $shoutbox_textarea . '"' ); db_query( 'INSERT INTO `prefix_shoutbox` (`nickname`,`textarea`,`time`) VALUES ("' . $shoutbox_VALUE_name . '", "' . $shoutbox_textarea . '", "' . date ( 'Y-m-d H:i:s' ) . '" ) ' ); } } echo '<center><div style="width:101%; height:325px; overflow:auto; border:0px solid #B1BBBD; margin:0px;"><table width="100%" cellpadding="2" cellspacing="1" border="0"></center>' ; echo sb_smilies(); $erg = db_query( 'SELECT * FROM `prefix_shoutbox` ORDER BY id DESC' ); while ( $row = db_fetch_object( $erg ) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); ## Avatar $width = "70" ; // Breite $height = "70" ; // Höhe $ava = db_fetch_assoc(db_query( 'SELECT `avatar`, `geschlecht` FROM `prefix_user` WHERE `name` = "' . $row ->nickname . '"' )); if (! empty ( $ava [ 'avatar' ]) AND file_exists ( $ava [ 'avatar' ])) { $avatar = '<img src="' . $ava [ 'avatar' ] . '" width="' . $width . '" height="' . $height . '" alt="Avatar" border="0" />' ; } else { $ar = array ( 0 => $lang [ 'itdoesntmatter' ], 1 => $lang [ 'male' ], 2 => $lang [ 'female' ] ); $avatar = '<img src="include/images/avatars/' . $ar [ $ava [ 'geschlecht' ]] . '.jpg" width="' . $width . '" height="' . $height . '" alt="' . $ar [ $ava [ 'geschlecht' ]] . '" border="0" />' ; } echo ' <tr class = "'.$class.'" > <td style= "font-size:9px;width: 70px" > ' . $avatar . ' <br /><b> '.$row->nickname.' </b>:</td><td style= "font-size:12px;" > '.preg_replace( ' /([^\s]{ '.$allgAr[' sb_maxwordlength '].' })(?=[^\s])/ ', "$1\n", BBcode($row->textarea)).' </td> </tr>'; } echo '</table></div>' ; if (has_right( $allgAr [ 'sb_recht' ])) { echo ' <form method= "post" action= "index.php" name= "shoutbox" > <input type= "text" style= "width:72%" name= "shoutbox_textarea" >'; echo get_antispam ( 'shoutbox' , 0); echo ' <input type= "submit" value= "'.$lang['formsub'].'" name= "shoutbox_submit" > <input type= "text" size= "1" style= "visibility:hidden;" name= "shoutbox_nickname" value= "'.$shoutbox_VALUE_name.'" > <a class = "box" href= "javascript:more_sb_Smilies();" >Smilies</a> <a class = "box" href= "index.php?shoutbox" > '.$lang[' archiv '].' </a> </form>'; } ?> </td> </tr> </table> </td> </tr> </table> <br> |
verwendete ilch Version: 1.1 P
betroffene Homepage: externer Link