0 ) { $query = "select hinweisid from user where id = " . $userid . " and active = 1"; $res2 = queryDB( $query ); $row2 = fetchDBRow($res2); $user_hinweisid = $row2[ "hinweisid" ]; $query = "select hinweismaxid from system"; $res2 = queryDB( $query ); $row2 = fetchDBRow($res2); $hinweismaxid = $row2[ "hinweismaxid" ]; if( $hinweismaxid > $user_hinweisid ) { $link = "hinweisview.php?n=" . $hinweismaxid; $link .= "&msgid=" . $msg; if( isset( $_REQUEST[ "merken" ] ) ) $link .= "&merken"; header ( "Location: $link\n\n"); } } /**********************************************************************************************************/ include ("header.php"); // xxx if( $userid == 9 ) echo "

" . count( $gelesen ) . "

"; $time[] = mtime(); $mark[] = "nach header"; echo banner(); echo "
"; $userid = $_SESSION[ "userid" ]; if( isset( $_REQUEST[ "merken" ] ) ) { $_SESSION[ stack ] = $msg; } $z1 = time(); //echo ""; //echo "
" . besucherzahl() . " User im Forum
"; //echo "
"; $query = "SELECT * FROM msg where active = 1 and id = " . $m; $time[] = mtime(); $mark[] = "vor " . $query; $res = queryDB( $query ); $row = fetchDBRow($res); $threadid = $row[ "thread" ]; $masterid = $row[ "m" ]; $time[] = mtime(); $mark[] = "nach " . $query; if( $row[ "gesperrt" ] == 0 ) { // Beitrag gesperrt ? if( numDBRows( $res ) > 0 ) { $time[] = mtime(); $mark[] = "vor gelesenzaehler"; $cols = array( "gelesen" => $row[ gelesen ] + 1 ); // Gelesenzähler um eins erhöhen updateDBRow ( "msg", "id", $m, $cols ); $time[] = mtime(); $mark[] = "nach gelesenzähler"; $query = "SELECT thread.schreibsperre, thread.id, thread.nr, thread.letzterbeitrag, thread.anzahl, thread.thema, thread.baum, rubrik.text FROM thread INNER JOIN rubrik ON thread.rubrik = rubrik.id where thread.id =" . $row[ thread ]; $time[] = mtime(); $mark[] = "vor " . $query; $ures = queryDB( $query ); $urow = fetchDBRow($ures); $threadid = $urow[ "id" ]; $thread_ersterBeitrag = $urow[ "nr" ]; $thread_letzterBeitrag = $urow[ "letzterbeitrag" ]; $time[] = mtime(); $mark[] = "nach " . $query; if( $urow[ anzahl ] > 1 ) $txtanzahlbeitraege = $urow[ anzahl ] . " Beiträge"; else $txtanzahlbeitraege = $urow[ anzahl ] . " Beitrag"; if( $row[ "m" ] > 0 ) $button_zurueck = "<< [Master]"; else $button_zurueck = " "; $query = "SELECT id FROM msg where m = " . $row[ "id" ]; // xxx hier könnte eine Abfrage eingespart werden -> Tabelle erweitern: Feld "ich bin Master von" $time[] = mtime(); $mark[] = "vor " . $query; $xres = queryDB( $query ); $xrow = fetchDBRow($xres); $time[] = mtime(); $mark[] = "nach " . $query; if( $xrow[ id ] > 0 ) $button_vor = ">>"; else $button_vor = " "; ?>
500 ) { echo ""; } echo ""; echo ""; if( $row[ userid ] == 0 ) $string = zeige_email( $row[ email ], $row[ name ] ); else { if( $row[ "moderator" ] ) $string = ""; else $string = ""; ?> " . $row[ name ] . ""; } echo ""; } else echo ""; echo ""; $query = "SELECT * FROM threadcontainer where threadid =" . $threadid; $tcres = queryDB( $query ); if( numDBRows( $tcres ) > 0 ) { echo ""; } echo ""; echo ""; if( $row[ schreibsperre ] > 0 or $urow[ schreibsperre ] > 0 ) { if( $urow[ schreibsperre ] > 0 ) echo ""; if( $row[ schreibsperre ] > 0 ) echo ""; } else echo ""; echo ""; echo ""; ?>
"; /* echo "Beitrag ändern"; echo " - "; */ echo "Schreibsperre"; echo " - "; echo "Beitrag sperren"; echo " - "; echo "Rubrik ändern"; echo " - "; echo "Webmaster informieren"; echo "
Rubrik" . $urow[ text ] . ""; ?> zurück
Thema" . stripslashes( $row[ thema ] ) . "" . $txtanzahlbeitraege . "
Autor" . $string . ", " . $row[ ort ] . " / " . $row[ land ]; if( $userid > 0 ) { echo "   "; echo ""; if( $userid > 0 ) echo "Threadcontainer"; echo "
" . $row[ id ] . "
Datum" . datum( $row[ datum ] ) . "      MSG-Nr: [ " . $row[ id ] . " ]" . $row[ gelesen ] . " x gelesen
Infos:"; while ($tcrow = fetchDBRow($tcres)) { echo "
  • " . stripslashes( $tcrow[ "text" ] ) . ""; echo "
    "; } echo "

  • " . replace_uri( stripslashes( nl2br( $row[ text ] ) ) ) . "
    " . $button_zurueck . "Thread gesperrt - Antwort nicht möglichBeitrag gesperrt - Antwort nicht möglichantworten". $button_vor . "
    flache AnsichtBeitrag merkenalle Beiträge als gelesen markieren
    0 ) { $query = "SELECT msgid from gelesen where msgid = " . $msg . " and userid = " . $userid; $res = queryDB( $query ); if( numDBRows( $res ) == 0 ) { $dcols[ "msgid" ] = $msg; // merken was gelesen wurde $dcols[ "userid" ] = $userid; insertDBRow( "gelesen", "id", $dcols ); $gelesen[] = $msg; } } } else { echo "Beitrag nicht gefunden"; } } else { echo "Beitrag gesperrt"; if( $userrechte > 500 ) { echo "

    "; echo "von: " . username($row[ "gesperrtvon" ] ); echo "

    "; echo date_mysql2german( $row[ "gesperrtdatum" ], 1 ) . " Uhr"; echo "

    "; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
    MSG-ID:" . $row[ "id" ] . "
    Name:" . $row[ "vorname" ] . " " . $row[ "name" ] . "
    Thema:" . $row[ "thema" ] . "
    Text:" . nl2br( $row[ "text" ] ). "
    "; echo "

    "; } } $time[] = mtime(); $mark[] = "vor gelesen holen I"; if( $userid > 0 ) { $time[] = mtime(); $mark[] = "vor gelesen holen II"; /* mal rausgenommen und MSG-BAumanzeige auf gelesen[] umgestellt. $agelesen=array(); $query = "SELECT msgid FROM `gelesen` where msgid >= " . $thread_ersterBeitrag . " and msgid <= " . $thread_letzterBeitrag . " and userid = " . $userid; $res = queryDB( $query ); $agelesen = array(); while ($row = fetchDBRow($res)) { $agelesen[] = $row[ "msgid" ]; } */ /* echo "

    ";
    print_r( $gelesen );
    echo "
    ";
    */
    
    
    $time[] = mtime();
    $mark[] = "nach gelesen holen - " . $query;
    $time[] = mtime();
    $mark[] = "vor MSG-Baum anzeigen";
    
    
    
    		msgbaum_anzeigen( $threadid, $msg, $masterid, $gelesen );
    	}
    	else
    		msgbaum_anzeigen( $threadid, $msg, $row[ "m" ] );
    
    
    
    
    
    
    $time[] = mtime();
    $mark[] = "nach MSG-Baum anzeigen";
    
    
    $time[] = mtime();
    $mark[] = "ende";
    
    $startzeit = $time[ 0 ];
    $zeit1 = $time[ 0 ];
    
    if( $userid == 9 ) {
    	echo "

    "; for( $i = 0; $i < count( $time ) ;$i++ ) { echo ""; } echo "
    "; echo $i . "" . $time[ $i ] . "" . number_format( ($time[ $i ] - $zeit1), 2 ) . "" ; $zeit1 = $time[ $i ]; echo ""; echo $mark[ $i ]; echo "
    "; echo "gesamt: " . ($zeit1 - $time[ 0 ]) . ""; echo "

    "; } include ("footer.php"); ?>