Ich hab ein Problem mit den backgroundfarben in meiner shbox. irgendwie wird das ganze seltsam dargestellt. Ich hab mal ein Bild angehangen das es vllt deutlich wird

Und zwar sitzt das border element irgendwie paar px zu tief oder die hintergrundfarben zu hoch

Ich hoffe is deutlich genug ausgedrückt was ich meine

Code shbox.php
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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | <?php /* Script => ShBox 3.2.2 =>V1 © by NF-Projekt FIXED (V1.0) Entwickler => WDS NachtWolf / B.Masmann Seite/Sup. => http://www.nf-projekt.de / Kontakt => Webmaster@nf-projekt.de */ defined ( 'main' ) or die ( 'no direct access' ); include ( 'include/includes/js/shbox/shboxfunc.php' ); $abf = db_query( 'SELECT * FROM `prefix_shbox_config` WHERE id="1"' ); $conf = db_fetch_assoc( $abf ); echo ' <table width= "'.$conf['tabellewidth'].'%" height= "" border= "0" gcolor= "" cellspacing= "0" cellpadding= "0" > <tr> <td> '; $postname = escape( $_POST [ 'xname' ], 'string' ); $postnamex = '*GAST*' ; $tags = array ( '[img]' , '[url]' , '[IMG]' , '[URL]' , '[/img]' , '[/url]' , '[/IMG]' , '[/URL]' , '[COLOR]' , '[/COLOR]' , '[color]' , '[/color]' , 'http' , 'www' , '://' ); $posttxt = escape( $_POST [ 'xtxt' ], 'textarea' ); $posttxt = str_replace ( $tags , '' , escape( $_POST [xtxt], 'string' )); $posttxt = strip_tags ( $posttxt ); if (isset( $_POST [ 'subshbox' ])) { //Check Submit if ( $posttxt == '' ){ //Check leeres Textfeld } //CLT else { //CLT if ( loggedin() ) { //1 if ( isset( $_POST [ 'xtxt' ]) AND ! empty ( $_POST [ 'xdate' ]) AND ! empty ( $_POST [ 'xname' ]) AND ! empty ( $_POST [ 'xip' ]) ) { //2 db_query("INSERT INTO prefix_shbox (`txt`,` date `,`name`,`ip`) VALUES ( '".$posttxt."' , '".escape($_POST[xdate],' string ')."' , '".$postname."' , '".escape($_POST[xip],' string ')."' )"); } //2 } //1 else { //3 $abfs = db_query( "SELECT id FROM prefix_user WHERE name = BINARY '" . $postname . "'" ); if (db_num_rows( $abfs ) > 0) { if ( $conf [ 'spam' ] == AN) { //4 if ( $_POST [ 'sz' ] == $_POST [ 'xspam' ]) { //5 if ( isset( $_POST [ 'xtxt' ]) AND ! empty ( $_POST [ 'xdate' ]) AND ! empty ( $_POST [ 'xname' ]) AND ! empty ( $_POST [ 'xip' ]) ) { //6 db_query("INSERT INTO prefix_shbox (`txt`,` date `,`name`,`ip`) VALUES ( '".$posttxt."' , '".escape($_POST[xdate],' string ')."' , '".$postnamex."' , '".escape($_POST[xip],' string ')."' )"); } //6 } //5 } //4 else { //7 if ( isset( $_POST [ 'xtxt' ]) AND ! empty ( $_POST [ 'xdate' ]) AND ! empty ( $_POST [ 'xname' ]) AND ! empty ( $_POST [ 'xip' ]) ) { //8 db_query("INSERT INTO prefix_shbox (`txt`,` date `,`name`,`ip`) VALUES ( '".$posttxt."' , '".escape($_POST[xdate],' string ')."' , '".$postnamex."' , '".escape($_POST[xip],' string ')."' )"); } //8 } //7 } else { if ( $conf [ 'spam' ] == AN) { //4 if (escape( $_POST [ 'sz' ], 'string' ) == escape( $_POST [ 'xspam' ], 'string' )) { //5 if ( isset( $_POST [ 'xtxt' ]) AND ! empty ( $_POST [ 'xdate' ]) AND ! empty ( $_POST [ 'xname' ]) AND ! empty ( $_POST [ 'xip' ]) ) { //6 db_query("INSERT INTO prefix_shbox (`txt`,` date `,`name`,`ip`) VALUES ( '".$posttxt."' , '".escape($_POST[xdate],' string ')."' , '".$postname."' , '".escape($_POST[xip],' string ')."' )"); } //6 } //5 } //4 else { //7 if ( isset( $_POST [ 'xtxt' ]) AND ! empty ( $_POST [ 'xdate' ]) AND ! empty ( $_POST [ 'xname' ]) AND ! empty ( $_POST [ 'xip' ]) ) { //8 db_query("INSERT INTO prefix_shbox (`txt`,` date `,`name`,`ip`) VALUES ( '".$posttxt."' , '".escape($_POST[xdate],' string ')."' , '".$postname."' , '".escape($_POST[xip],' strng ')."' )"); } //8 } //7 } //3 } } } $ILCH_HEADER_ADDITIONS .= ' <link rel= "stylesheet" type= "text/css" href= "include/includes/js/shbox/shbox.css" > <script type= "text/javascript" charset= "utf-8" src= "include/includes/js/shbox/shbox.js" ></script> <script language= "JavaScript" type= "text/javascript" > window.onload = "fetch()" ; interval = window.setInterval( "fetch();" , '.$conf[' setinterval '].' ); </script> '; $datum = date ( "$conf[datumformat]" ); $hr = '<hr style="height:0px;border:solid ' . $conf [ 'hrcolor' ]. ' 0px;border-top-width: 1px;" />' ; if ( $conf [ 'ip' ] == JA) { $ips = $_SERVER [ 'REMOTE_ADDR' ]; $ip = '<br />Deine IP : ' . $_SERVER [ 'REMOTE_ADDR' ]. '' ; } else { $ip = '' ; } srand ((double) microtime() * 1000000); $sz = rand(999,10000); if ( $conf [ 'spam' ] == AN) { $spam = ' <table border= "0" bgcolor= "'.$conf['tabellecolor'].'" cellpadding= "0" cellspacing= "0" > <tr> <td align= "center" > <input type= "hidden" name= "sz" value= "'.$sz.'" /> '.$sz.' <input name= "xspam" size= "4" maxlength= "4" value= "" /> </td> </tr> </table> '; } else { $spam = '' ; } if ( $conf [ 'smilies' ] == JA) { $smilies = shboxsmilies(); } else { $smilies = '' ; } if ( loggedin() ) { $abf = 'SELECT id, name, avatar FROM prefix_user WHERE name = "' .escape( $_SESSION [ 'authname' ], 'string' ). '"' ; $erg = db_query( $abf ); $row = db_fetch_object( $erg ); { $tabellew = $conf [ 'tabellewidth' ]; $tabelleh = $conf [ 'tabelleheight' ]; if ( $conf [ 'anzeige' ] == 0) { if ( file_exists ( $row ->avatar)) { $avatar = '<img src="' . $row ->avatar. '" border="0" height="' . $conf [ 'avatarx' ]. '" width="' . $conf [ 'avatary' ]. '">' ; } else { $avatar = $_SESSION [ 'authname' ]; } } else { $avatar = $_SESSION [ 'authname' ]; } } $tpl = new tpl ( 'shbox' ); $ar = array ( 'txt' => $text = escape( $_POST [ 'txt' ], 'textarea' ), 'CLASS' => $class , 'SMILIES' => $smilies , 'IP' => $ip , 'IPS' => $ips , 'USER' => $_SESSION [ 'authname' ], 'AVATAR' => $avatar , 'HR' => $hr , 'DATE' => $datum , 'TXTROWS' => $conf [ 'textrows' ], 'TXTCOLS' => $conf [ 'textcols' ], 'TXTCOLOR' => $conf [ 'textgroundcolor' ], 'TCOLOR' => $conf [ 'tabellecolor' ], 'TABELLEH' => $tabelleh , 'TABELLEW' => $tabellew ); $tpl ->set_ar_out( $ar , 0); } elseif ( $conf [ 'gastrecht' ] == AN) { $gast = '' . $conf [ 'nametext' ]. '<br /><input name="xname" size="' . $conf [ 'namesize' ]. '" maxlength="' . $conf [ 'namelänge' ]. '" style="background-color:' . $conf [ 'namegroundcolor' ]. '" value="GAST" />' ; $tpl = new tpl ( 'shbox' ); $ar = array ( 'txt' => $text = escape( $_POST [ 'txt' ], 'textarea' ), 'CLASS' => $class , 'SMILIES' => $smilies , 'IP' => $ip , 'IPS' => $ips , 'GAST' => $gast , 'HR' => $hr , 'DATE' => $datum , 'SPAM' => $spam , 'TXTROWS' => $conf [ 'textrows' ], 'TXTCOLS' => $conf [ 'textcols' ], 'TXTCOLOR' => $conf [ 'textgroundcolor' ], 'TCOLOR' => $conf [ 'tabellecolor' ], 'TABELLEH' => $tabelleh , 'TABELLEW' => $tabellew ); $tpl ->set_ar_out( $ar , 1); } else { echo '<center>' . $conf [ 'nametext' ]. '</center><br />' ; echo $hr ; } if ( $conf [ 'reload' ] == AN) { echo '<div id= "shoutbox" > <center><img src= "include/images/load.gif" alt= "Load" id= "shoutbox" border= "0" /></center> </div>'; } else { echo shbox(); } echo ' <table width= "'.$conf['tabellewidth'].'%" height= "'.$conf['tabelleheight'].'%" border= "0" bgcolor= "'.$conf['tabellecolor'].'" align= "center" cellpadding= "0" cellspacing= "0" > <tr> <td> <center><b><a href= "index.php?shbox-archiv" >ARCHIV</a></b></center> </td> </tr> </table> </td> </tr> </table>'; ?> |
Code shboxfunc.php
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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | <?php /* Script => ShBox 3.2.2 =>V1 © by NF-Projekt Entwickler => WDS NachtWolf / B.Masmann Seite/Sup. => http://www.nf-projekt.de / Kontakt => Webmaster@nf-projekt.de */ defined ( 'main' ) or die ( 'no direct access' ); # ## ### #### ShBox Text #### function shbox_text( $text , $name ) { $abf = db_query( 'SELECT * FROM `prefix_shbox_config` WHERE id="1"' ); $conf = db_fetch_assoc( $abf ); $abfU = 'SELECT * FROM prefix_user WHERE name = "' . $name . '"' ; $ergU = db_query( $abfU ); $rowU = db_fetch_assoc( $ergU ); if ( $conf [ 'admintext' ] == AUS) { //1 if ( $conf [ 'gasttext' ] == AUS) { //2 echo '<span style="color:' . $conf [ 'textcolor' ]. ';">' . $text . '</span>' ; } //2 else { //3 if ( $rowU [ 'recht' ] < -0) { //4 echo '<span style="color:' . $conf [ 'textcolor' ]. ';">' . $text . '</span>' ; } //4 else { //5 echo '<span style="color:' . $conf [ 'gasttextcolor' ]. ';">' . $text . '</span>' ; } //5 } //3 } //1 elseif ( $conf [ 'admintext' ] == AN) { //6 if ( $conf [ 'gasttext' ] == AN) { //7 if ( $rowU [ 'recht' ] == -9) { //8 echo '<span style="color:' . $conf [ 'admintextcolor' ]. ';">' . $text . '</span>' ; } //8 elseif ( $rowU [ 'recht' ] < -0) { //9 echo '<span style="color:' . $conf [ 'textcolor' ]. ';">' . $text . '</span>' ; } //9 else { //10 echo '<span style="color:' . $conf [ 'gasttextcolor' ]. ';">' . $text . '</span>' ; } //10 } //7 else { //11 if ( $rowU [ 'recht' ] == -9) { //12 echo '<span style="color:' . $conf [ 'admintextcolor' ]. ';">' . $text . '</span>' ; } //12 else { //13 echo '<span style="color:' . $conf [ 'textcolor' ]. ';">' . $text . '</span>' ; } //13 } //11 } //6 } # ## ### #### ShBox Name #### function shbox_name( $name , $datum ) { $abf = db_query( 'SELECT * FROM `prefix_shbox_config` WHERE id="1"' ); $conf = db_fetch_assoc( $abf ); $abfU = 'SELECT * FROM prefix_user WHERE name = "' . $name . '"' ; $ergU = db_query( $abfU ); $rowU = db_fetch_assoc( $ergU ); if ( $conf [ 'admincolor' ] == AUS) { //1 if ( $conf [ 'gastcolor' ] == AUS) { //2 echo '<span style="color:' . $conf [ 'namecolor' ]. ';"> ' . $datum . ' ' .utf8_encode( $name ). ' </span></a>' ; } //2 else { //3 if ( $rowU [ 'recht' ] < -0) { //4 echo '<span style="color:' . $conf [ 'namecolor' ]. ';"> ' . $datum . ' ' .utf8_encode( $name ). ' </span></a>' ; } //4 else { //5 echo '<span style="color:' . $conf [ 'gastnamecolor' ]. ';"> ' . $datum . ' ' .utf8_encode( $name ). ' </span></a>' ; } //5 } //3 } //1 elseif ( $conf [ 'admincolor' ] == AN) { //6 if ( $conf [ 'gastcolor' ] == AN) { //7 if ( $rowU [ 'recht' ] == -9) { //8 echo '<span style="color:' . $conf [ 'adminnamecolor' ]. ';"> ' .utf8_encode( $name ). ' <br> ' . $datum . ' </span></a>' ; } //8 elseif ( $rowU [ 'recht' ] < -0) { //9 echo '<span style="color:' . $conf [ 'namecolor' ]. ';"> ' .utf8_encode( $name ). ' <br> ' . $datum . ' </span></a>' ; } //9 else { //10 echo '<span style="color:' . $conf [ 'gastnamecolor' ]. ';"> ' .utf8_encode( $name ). ' <br> ' . $datum . ' </span></a>' ; } //10 } //7 else { //11 if ( $rowU [ 'recht' ] == -9) { //12 echo '<span style="color:' . $conf [ 'adminnamecolor' ]. ';"> ' .utf8_encode( $name ). ' <br> ' . $datum . ' </span></a>' ; } //12 else { //13 echo '<span style="color:' . $conf [ 'namecolor' ]. ';"> ' .utf8_encode( $name ). ' <br> ' . $datum . ' </span></a>' ; } //13 } //11 } //6 } # ## ### #### ShBox Ausgabe #### function shbox() { $abf = db_query( 'SELECT * FROM `prefix_shbox_config` WHERE id="1"' ); $conf = db_fetch_assoc( $abf ); $hr = '<hr style="height:0px;border:solid ' . $conf [ 'hrcolor' ]. ' 0px;border-top-width: 1px;" />' ; $wert = $conf [ 'ausgabe' ]; $erg = db_query( 'SELECT * FROM `prefix_shbox` ORDER BY id DESC LIMIT ' . $wert ); while ( $row = db_fetch_assoc( $erg ) ) { $class = ( $class == $conf [ 'hgcolor2' ] ? $conf [ 'hgcolor1' ] : $conf [ 'hgcolor2' ] ); $text = substr ( $row [ 'txt' ], 0, $conf [ 'textmax' ]); $text = BBcode( $text ); $text = preg_replace( '/([^\s]{' . $conf [ 'textzeile' ]. '})(?=[^\s])/' , "$1\n" , $text ); if ( $conf [ 'datumzeit' ] == JA) { $datum = $row [ 'date' ]; $name = $row [ 'name' ]; } else { $datum = '' ; $name = $row [ 'name' ]; } echo ' <table width= "'.$conf['tabellewidth'].'%" height= "'.$conf['tabelleheight'].'%" border= "0" bgcolor= "'.$conf['tabellecolor'].'" cellpadding= "0" cellspacing= "0" > <tr bgcolor= "'.$class.'" > <td> <b>'; $abfU = 'SELECT * FROM prefix_user WHERE name = "' .escape( $row [ 'name' ], 'string' ). '"' ; $ergU = db_query( $abfU ); while ( $rowU = db_fetch_assoc( $ergU )){ ?> <a href= "index.php?user-details-<?php echo $rowU['id']; ?>" onmouseout= "hideTooltip()" onmouseover= "showTooltip(event,' <?php echo $row['date'] ?> ') ;return false" > <?php } echo $hr ; shbox_name( $name , $datum ); echo '</b><br />' ; shbox_text( $text , $name ); echo ' </td> </tr> </table>'; } } # ## ### #### SMILIES angepasste Kopie vom Orginalen getsmilies() : Copyright by: Manuel Staechele #### function shboxsmilies () { $abf = db_query( 'SELECT * FROM `prefix_shbox_config` WHERE id="1"' ); $conf = db_fetch_assoc( $abf ); global $lang ; $zeilen = $conf [ 'smilieszeile' ]; $i = 0; $b = '<script language="JavaScript" type="text/javascript">function moreSmiliesshbox () { var x = window.open("about:blank", "moreSmiliesshbox", "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.putt(\'' . 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 < $conf [ 'smiliesspalte' ]) { if ( $i % $zeilen == 0 AND $i <> 0) { $a .= '<br /><br />' ; } $a .= '<a href="javascript:putt(\'' . addslashes ( $row ->ent). '\')" onmouseout="hideTooltip()" onmouseover="showTooltip(event,\'' . $row ->emo. '\');return false">' ; $a .= '<img style="margin: 2px;" src="include/images/smiles/' . $row ->url. '" border="0"></a>' ; } $i ++; } $b .= ' x.document.write("<br /><br /><center><a href=\"javascript:window.close();\">' . $lang [ 'close' ]. '</a></center>"); x.document.close(); }</script>' ; if ( $i > $conf [ 'smiliesspalte' ]) { $a .= '<br /><br /><center><a href="javascript:moreSmiliesshbox();">' . $lang [ 'more' ]. '</a></center>' ; } $a = $b . $a ; return ( $a ); } ?> |
Zuletzt modifiziert von Nightwarrior am 02.02.2012 - 20:18:49