Navi wird verschoben..

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Tomasch, 5. Februar 2006 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 5. Februar 2006
    Also, ich hab ne Problem mit meiner HP.
    Ich hab die Seiten per inculde eingebunden und das funst auch perfekt, bis auf die Startseite (home.php) auf der hab ich ne Script das aussem wbb Forum die News holt, doch irgendein Fehler is wohl in dem Script und deswegen verschiebt sich die rechte navi nach unten...

    Das is das Script:

    PHP:
    <? php

    Der ganze Copyright Kram und Daten zu meiner DB usw
    . ( natürlich entfernt )

    //************ Verbindung zur Datanbank herstellen und selektieren ************\\
    $i = 1 ;
    $wichtig = '' ;
    $ausgabe = '' ;

    function 
    truncate_string ( $string $maxlength $extension ) {
       
    $cutmarker  "**cut_here**" ;
       if (
    strlen ( $string ) >  $maxlength ) {
           
    $string  wordwrap ( $string $maxlength $cutmarker );
           
    $string  explode ( $cutmarker $string );
           
    $string  $string [ 0 ] .  $extension ;
       }
       return 
    $string ;
    }

    echo(
    '<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center">' );

    mysql_connect ( $db_server $db_user $db_pass );
    mysql_select_db ( $db_name );
    $result = mysql_query  ( "SELECT * FROM bb" . $db_nr . "_threads WHERE boardid='" . $db_include . "' AND important!='2' ORDER BY lastposttime DESC LIMIT " . $threads . " " );
    while (
    $row  mysql_fetch_array ( $result ))
        {
        
    $inhalt  mysql_fetch_array ( mysql_query ( "SELECT * FROM bb" . $db_nr . "_posts WHERE threadid =   $row [ threadid ]  ORDER BY `postid` ASC LIMIT 1" ));
        
    $sinhalt  str_replace ( '[b]' '<b>' $inhalt [ message ]);
        
    $sinhalt  str_replace ( '[/b]' '</b>' $sinhalt );
        
    $sinhalt  str_replace ( '[i]' '<i>' $sinhalt );
        
    $sinhalt  str_replace ( '[/i]' '</i>' $sinhalt );
        
    $sinhalt  str_replace ( '[u]' '<u>' $sinhalt );
        
    $sinhalt  str_replace ( '[/u]' '</u>' $sinhalt );
        
    $sinhalt  str_replace ( '[B]' '<b>' $inhalt [ message ]);
        
    $sinhalt  str_replace ( '[/B]' '</b>' $sinhalt );
        
    $sinhalt  str_replace ( '[I]' '<i>' $sinhalt );
        
    $sinhalt  str_replace ( '[/I]' '</i>' $sinhalt );
        
    $sinhalt  str_replace ( '[U]' '<u>' $sinhalt );
        
    $sinhalt  str_replace ( '[/U]' '</u>' $sinhalt );
        
    $m  date ( "m" $row [ starttime ]);
        
    $d  date ( "d" $row [ starttime ]);
        
    $y  date ( "y" $row [ starttime ]);
        
    $datum  " $d . $m . $y " ;
        if(
    $row [ 'important' ]== '1' ) {
            
    $wichtig .= "<table width=\"80%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" style=\"border: 1px solid #990000\">
            <tr><td><font color=red><b>Wichtig: </b></font>
    $row [ topic ] </td></tr>
            <tr><td colspan=\"2\">
    $sinhalt  [<a href=\" $path /thread.php?threadid= $row [ threadid ] \" target=\"_blank\">weiter lesen</a>]</td></tr>
            </table>"
    ;
            
    $i ++;
        } else {
            
    $ausgabe .= "<table width=\"95%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">
            <tr><td style=\"padding-left: 7px; padding-right: 7px; border-bottom: 1px solid #000000\" background=\"cellpic.gif\"><b><font size=\"2\" face=\"Tahoma\" color=\"#FFFFFF\">&nbsp;
    $row [ topic ] </font></b></td></tr>
            <tr><td colspan=\"2\" style=\"padding-left: 7px; padding-right: 7px; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000\"><font style=\"font-size: 9pt\" face=\"Tahoma\" color=\"#5F5F5F\"><br>
    $sinhalt </font></td></tr></table>" ;
            
    $i ++;
        }
        }

     echo 
    nl2br ( $wichtig . $ausgabe . "</table>" );

    ?>
    Bemerkung: Das nl2br hab ich davor getan, weil sonst wären die News ohne Zeilenumbrüche gewesen...und ich hab einiges an der Anzeige geändert.

    SChonmal vielen Dank für Hilfe!

    mfg Tomasch
     
  2. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.