frage zu vbulletin

Dieses Thema im Forum "Webentwicklung" wurde erstellt von alexgold, 11. März 2009 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. Diese Seite verwendet Cookies. Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies. Weitere Informationen
  1. #1 11. März 2009
    hallo,
    in welcher datei vom vb 3.8.1 wird folgender befehl ausgeführt:

    PHP:
    SELECT COUNT (*) AS ` total FROM 1 ` userteam WHERE  ` userteamid ` !=  1 ;
    komplette error lautet
    PHP:
    Database error in vBulletin 3.8.1 :

    Invalid SQL :
    SELECT COUNT (*) AS ` total FROM 1 ` userteam WHERE  ` userteamid ` !=  1 ;

    MySQL Error    You have an error in your SQL syntax check the manual that corresponds to your MySQL server version  for  the right syntax to  use  near  '1`userteam` WHERE `userteamid` != 1'  at line 1
    Error Number  
    1064
    Request Date  
    Wednesday March 11th 2009  07 : 51 : 03 PM
    Error Date    
    Wednesday March 11th 2009  07 : 51 : 07 PM
    Script        

    Referrer       : / login . php ?do= login
    IP Address    
    91.67.118.133
    Username      
    admin
    Classname     
    vB_Database
    MySQL Version 
    5.0.51a - 23
    der kommt nach fxppack einbau und einloggen und dann aufrufen der index.php
    -.- wobei fxppack und vb korrekt installiert worden sind :(
     

  2. Anzeige
    Dealz: stark reduzierte Angebote finden.
  3. #2 11. März 2009
    AW: frage zu vbulletin

    steht doch da:
    Code:
    --------------------------------v
    SELECT COUNT(*) AS `total` FROM 1`userteam` WHERE `userteamid` != 1; 
     
  4. #3 11. März 2009
    AW: frage zu vbulletin

    ja da steht nen sql command supi ich will aber wissen in welcher php datei der vorkommt oder wie ich den error fixen kann
     
  5. #4 11. März 2009
    AW: frage zu vbulletin

    okay, dann gehts ans debuggen ^^

    wo tritt der fehler auf:
    auf jeder seite:
    du suchst eine globale datei, also eine datei die in jedes skript eingebunden wird

    nur auf einer speziellen seite:
    du hast die fehlerhafte datei offen​

    in dieser datei (oder in den datein) suchst du jetzt nach "COUNT(*)" und irgendwann hast du den fehlerhaften query vor dir.
     
  6. #5 11. März 2009
    AW: frage zu vbulletin

    muss ich das verstehen O.O?weil ich weiß ja nichtmal welche datei es ist

    ich will einfach nur die datei in dem der befehl drinne ist mehr nicht o_O
     
  7. #6 11. März 2009
    AW: frage zu vbulletin

    ... Er willl wissen, bei welcher Aktion der Fehler auftritt?
    Beim öffnen eines Posts, Threads, des Boards oder auf jeder siete?!
     
  8. #7 11. März 2009
    AW: frage zu vbulletin

    Er will auf dir den Weg aufzeigen, da du den Fehler ja offensichtlich fixen willst, sollten deine Kenntnisse in PHp ausreichen ihn zu finden.
    Ich formuliere seine Anweisungen mal um:

    Versuche die Anzahl der zu untersuchenden Dateien einzuschränken, in dem du herausfindest in welchen Bereichen der Seite es zu diesem Fehler kommt.

    Wenn er nur an einer bestimmten Stelle auftritt, Suche in den Sourcen nach Count(*) (zb. mit grep).

    Sollte es an allen Stellen auftreten schau dir die Bibliotheken an, die global eingebunden werden und durchsuche diese nach Count(*).

    Zur Not installierst du es auf deinem Rechner und nutzst XDebug zum debuggen, das funktioniert wunderbar mit Eclipse PDT.
     
  9. #8 12. März 2009
    AW: frage zu vbulletin


    lol is klar ich schreib eben nen php script das alle dateien nach dem befehl durchsucht und schwupps hab ich sie =)
    also der fehler kommt nur wenn man eingeloggt ist und dann die index.php aufruft jedoch ist weder in der index.php noch in der login.php dieser code enthalten:rolleyes:
     
  10. #9 12. März 2009
    AW: frage zu vbulletin

    http://www.pilif.ch/stuff/pershchg/index.php

    Programm runterladen -> öffnen -> Häkchen bei ".php" setzen. -> PC Neustarten.

    Danach in das Verzeichnis gehen in dem die (aktuellen) PHP files liegen. Danach F3 drücken -> Dateien und Ordner -> Ein Wort oder Begriff innerhalb der Datei -> "1`userteam`"
     
  11. #10 13. März 2009
    AW: frage zu vbulletin

    die suche ist abgeschlossen es liegen keine dateien vor. leider aber trozdem danke
    hier sind alle daten kannst es ja selbst mal probieren
    //edit
     
  12. #11 13. März 2009
    AW: frage zu vbulletin

    Moin zusammen,

    wenn man nach dem debug prinzip vor geht kommt man auch zum ziel

    siehe 11.03.2009 21:07 Murdoc


    unter includes/Class_core.php hast die datei in der die mysql funktionen hinterlegt sind
    hier haust in der zeile 997 folgendes rein "print_r(get_included_files());"

    nun hast du alle dateien die bis dahin includiert wurden und kannst in diesen dann schritt für schritt nachschauen bis du die stelle hast in der dieser mysql aufruf statt findet

    diese abfrage ist so in der Form mit suchen nicht zu finden da diese zum teil generiert werden

    es ist auch dran zu denken das in den vb abfragen überall TABLE_PREFIX enthalten was auch die suchanfrage einschränkt bzw zu leeren ergebnissen führt
     
  13. #12 13. März 2009
    AW: frage zu vbulletin

    Hmm du hast recht. Ich finde ja nichtmal den Begriff "userteam". Aber wie kann ein query auf die Tabelle 'userteam' ausgeführt werden wenn es nirgentwo definiert ist?!

    Kann nur noch daran liegen dass es in einer Datei ohne *.php Endung liegt, aber da habe ich auch keine gefunden.

    Sehr seltsam.
     
  14. #13 13. März 2009
    AW: frage zu vbulletin

    vielleicht wird der query selber aus ner datenbank geladen.

    am besten du postest mal die daten des fxphacks.
     
  15. #14 13. März 2009
    AW: frage zu vbulletin

    Ja dann können wir dir auch nicht weiter helfen, ohne den Source zu kennen ^^
    Und wie oben schon gesagt, es bringt nichts, wenn du nach dem kompletten SQL-Query suchst. Das wird ja erst in der PHP-Datei zusammengebaut.

    Am besten suchst du nur mal nach "userteamid" oder so. Der Fehler dürfte übrigens an der 1 vor dem ` sein.
     
  16. #15 13. März 2009
    AW: frage zu vbulletin

    naja gut scheiss drauf hier mal die restlichen daten :)
    wieso schnipp -.-
     
  17. #16 13. März 2009
    AW: frage zu vbulletin

    Datei fxppack_forumhome.php in Zeile 666 ist die SQL abfrage Fehlerhaft

    PHP:
    $vbulletin -> userinfo [ 'teams' ]= $db -> query_first ( "SELECT COUNT(*) AS `total` FROM " . TABLE_PREFIX . "`userteam` WHERE `userteamid` != 1" );

    Mehr Übereinstimmungen konnte der Such Script nicht finden.
     
  18. #17 13. März 2009
    AW: frage zu vbulletin

    gut danke :D
    habs mal per ftp geändert jedoch kommt der error immernoch :(
     
  19. #18 13. März 2009
    AW: frage zu vbulletin

    hat sich am fehler selbst etwas geändert?

    SELECT COUNT (*) AS ` total ` FROM 1 ` userteam ` WHERE ` userteamid ` != 1 ;

    zu

    SELECT COUNT (*) AS ` total ` FROM ` 1 userteam ` WHERE ` userteamid ` != 1 ;

    wenn ja ist der präfix fehlerhaft und enthält eine 1 die dort nichts zu suchen hat
     
  20. #19 13. März 2009
    AW: frage zu vbulletin

    error
    PHP:
    Database error in vBulletin 3.8.1 :

    Invalid SQL :
    SELECT COUNT (*) AS ` total FROM  ` 1userteam `
    */ 
    WHERE  ` userteamid ` !=  1 ;

    MySQL Error    You have an error in your SQL syntax check the manual that corresponds to your MySQL server version  for  the right syntax to  use  near  '*/ WHERE `userteamid` != 1'  at line 2
    Error Number  
    1064
    Request Date  
    Friday March 13th 2009  11 : 52 : 14 PM
    Error Date    
    Friday March 13th 2009  11 : 52 : 14 PM
    Script        

    Referrer      
    IP Address    
    Username       admin
    Classname     
    vB_Database
    MySQL Version 
    5.0.51a - 23
    php file:
    PHP:
    <?


    include_once ( './fxppack/functions_fxppack.php' );
        
        
        
    // ###########################################################
        #   Latest Pre 
        
        
    if ( $vbulletin -> options [ 'show_lastpre' ])
        {
            eval(
    '$lastpre .= "'  fetch_template ( 'fxppack_lastpre' ) .  '";' );
            
    $vbulletin -> templatecache [ 'FORUMHOME' ] =  str_replace ( '$navbar' , '$navbar '  '$lastpre' , $vbulletin -> templatecache [ 'FORUMHOME' ]);
        }

        
    // ############################################################
        #  Latest Races
        
        
    if ( $vbulletin -> options [ 'show_racetable' ])
        {
            unset(
    $lastraces , $racebits );
            
    $releases  $vbulletin -> db -> query_read ( "SELECT `fxppack_ftp`.*, `user`.`username` ,
                                        `teamtitle` , `userteamid`  
                                        FROM `" 
    TABLE_PREFIX  "fxppack_ftp`, `user`
                                        WHERE `rls` = `fxppack_ftp`.`rls` 
                                        AND `user`.`userid` = `uid` 
                                        AND `fxppack_ftp`.`nuke` != '1' 
                                        AND `fxppack_ftp`.`race` != '0'  
                                        GROUP BY `rls`
                                        ORDER BY `threadid` 
                                        DESC  LIMIT 0 , 10
                                        "
    );
            while (
    $row  $vbulletin -> db -> fetch_array ( $releases )) 
            {
                
    $row [ cntry ] =  strtolower ( $row [ cntry ]);
                if (
    $row [ cntry ] ==  ''
                {
                    
    $row [ cntry ] =  "null" ;
                    
    $row [ cntryLONG ] =  "Unknown Country" ;
                }
                
    $winner  $row [ username ];
                
    $userid  $row [ uid ];
                
    $mirs  $vbulletin -> db -> query_first ( "SELECT COUNT(*) AS total FROM `"  TABLE_PREFIX  "fxppack_ftp` WHERE `rls` = ' $row [ rls ] ' AND threadid !=  $row [ threadid ] " );
                
    $mtotal  $mirs [ 'total' ];
        
                
    $f = $vbulletin -> db -> query_first ( "SELECT * FROM `"  TABLE_PREFIX  "forum` WHERE `forumid`=' $row [ forumid ] '" );
        
                unset(
    $is );
                
    $info_img  '' ;
                
    $is [ 'other' ] =  '' ;
                if (
    $row [ 'info_title' ]) 
                {
                    if (
    $f [ 'imdbon' ])
                    {
                        if (
    $row [ 'info_img' ]) 
                        {
                            
    $info_img  "<img src=\"fxppack_image.php? $session [ sessionurl ] type=movie_pic&id= $row [ rls ] \" width=\"95\" height=\"140\">" ;
                        } 
                        
    $is [ 'movie' ] =  true ;
                    } else {
                        
    $is [ 'movie' ] =  false ;
                    }
                    if (
    $f [ 'gspoton' ])
                    {
                        if (
    $row [ 'info_img' ]) 
                        {
                            
    $info_img  "<img src=\"fxppack_image.php? $session [ sessionurl ] type=game_pic&id= $row [ rls ] \" width=\"95\" height=\"140\">" ;
                        } 
                        
    $is [ 'game' ] =  true ;
                    } else {
                        
    $is [ 'game' ] =  false ;
                    }
                    if (
    $f [ 'tvon' ])
                    {
                        if (
    $row [ 'info_img' ]) 
                        {
                            
    $info_img  "<img src=\"fxppack_image.php? $session [ sessionurl ] type=tv_pic&id= $row [ rls ] \" width=\"250\" height=\"187\">" ;
                        } 
                        
    $is [ 'tv' ] =  true ;
                    } else {
                        
    $is [ 'tv' ] =  false ;
                    }
                    if (
    $f [ 'xxxon' ])
                    {
                        if (
    $row [ 'info_img' ]) 
                        {
                            
    $info_img  "<img src=\"fxppack_image.php? $session [ sessionurl ] type=xxx_pic&id= $row [ rls ] \" width=\"95\" height=\"140\">" ;
                        } 
                        
    $is [ 'xxx' ] =  true ;
                    } else {
                        
    $is [ 'xxx' ] =  false ;
                    }
                } else {
                    
    $is [ 'other' ] =  true ;
                }
                if (
    $row [ 'status' ]== '1'
                {
                    
    $row [ status ] =  "<smallfont><font color=\"#009900\">Online</font></smallfont>" ;
                } else {
                    
    $row [ status ] =  "<smallfont><font color=\"#CC0000\">Offline</font></smallfont>" ;
                }
                
    $winnerteam = "<a href=\"fxppack_teams.php?do=showteam&t= $row [ userteamid ] \"/> $row [ teamtitle ] </a>" ;
                
    $mirrors  $vbulletin -> db -> query_read ( "
                    SELECT `cntryLONG`,`cntry` 
                    FROM `" 
    TABLE_PREFIX  "fxppack_ftp` 
                    WHERE '"
    . $db -> escape_string ( $row [ 'rls' ]). "' = `rls`
                    AND `threadid` != '"
    . $row [ 'threadid' ]. "'
                    GROUP BY `cntryLONG`
                    ORDER BY `threadid` DESC
                "
    );

                
    $mirs  '' ;
                while (
    $row2  $vbulletin -> db -> fetch_array ( $mirrors ))
                {
                    
    $row2 [ cntry ] =  strtolower ( $row2 [ cntry ]);
                    if (
    $row2 [ cntry ] ==  ''
                    {
                        
    $row2 [ cntry ] =  "null" ;
                        
    $row2 [ cntryLONG ] =  "Unknown Country" ;
                    }
                    
    $mirs  $mirs . "<a href=\"fxppack_mirrors.php?rls=" . $row [ 'rls' ]. "\"><img src=\"fxppack/flags/"  $row2 [ 'cntry' ] . ".gif\" border=\"0\" alt=\"" $row2 [ 'cntryLONG' ] .  "\" /></a>&nbsp;" ;
                }
                eval(
    '$bits = "'  fetch_template ( 'fxppack_racebits' ) .  '";' );
                
    $racebits  .=  $bits ;
            }
            eval(
    '$lastraces = "'  fetch_template ( 'fxppack_races' ) .  '";' ); 
            
    $vbulletin -> templatecache [ 'FORUMHOME' ] =  str_replace ( '$navbar' , '$navbar '  '$lastraces' , $vbulletin -> templatecache [ 'FORUMHOME' ]);
        }

    // ########################################################################
    #  LAST NUKES 
    # a completely pointless and stupid hack but some seem to like it just more clutter for forumhome imho 
    # Taken almost directly from Tuk4's fxppack extended and pasted here so thanks to Tuk4

        
    if ( $vbulletin -> options [ 'show_nuke_forumhome' ])
        {
            
    $nuke  $vbulletin -> db -> query ( "
                  SELECT `threadid` , `nukereason` , `nukewho` , `rls`
                  FROM " 
    TABLE_PREFIX  "fxppack_ftp
                  WHERE nuke = '1'
                  ORDER BY threadid
                  DESC LIMIT 5
            "
    );
            while (
    $row3  $vbulletin -> db -> fetch_array ( $nuke ))
            {  
                
    $release  $row3 [ 'rls' ];
                
    $nuker  $row3 [ 'nukewho' ];
                
    $reason  $row3 [ 'nukereason' ];
                
    $getforumid  $db -> query_first ( "SELECT forumid FROM "  TABLE_PREFIX  "thread WHERE threadid = ' $row3 [ threadid ] '" );
                
    $forumname  =   $db -> query_first ( "SELECT title FROM "  TABLE_PREFIX  "forum WHERE forumid = ' $getforumid [ forumid ] '" );
                
    $section  $forumname [ 'title' ];
                eval(
    '$nbits = "'  fetch_template ( 'fxppack_nukebits' ) .  '";' );
                
    $nukebits  .=  $nbits ;
            }        
            eval(
    '$lastnukes = "'  fetch_template ( 'fxppack_nukes' ) .  '";' ); 
            
    $vbulletin -> templatecache [ 'FORUMHOME' ] =  str_replace ( '$navbar' , '$navbar '  '$lastnukes' , $vbulletin -> templatecache [ 'FORUMHOME' ]);
        }

    // ########################################################################
    #  LAST POSTED

        
    if ( $vbulletin -> options [ 'show_lastposted' ])
        {    
            if(
    $vbulletin -> userinfo [ 'userid' ])
            {
                
    // Get posted by user pubs and hacks so that use can set status if they choose to 
                // To be split into seperate option
                
    $pubstotal  $vbulletin -> db -> query_first ( "
                                                    SELECT COUNT(*) as total
                                                    FROM "
    . TABLE_PREFIX . "fxppack_ftp
                                                    WHERE uid = '"
    . $vbulletin -> userinfo [ 'userid' ]. "'  
                                                "
    );
                
    $pubs_posted  $vbulletin -> db -> query_read ( "
                                                    SELECT * 
                                                    FROM "
    . TABLE_PREFIX . "fxppack_ftp
                                                    WHERE uid = '"
    . $vbulletin -> userinfo [ 'userid' ]. "'  
                                                    AND poster_status != 0 
                                                    ORDER BY threadid DESC
                                                    LIMIT 5
                                                "
    );
                
                
    $pubstotal  vb_number_format ( $pubstotal [ 'total' ]);
                
                
    $pubs_online  0 ;
                
    $pubs_offline  0 ;            
                while (
    $row3  $vbulletin -> db -> fetch_array ( $pubs_posted ))
                {
                    if (
    $row3 [ 'status' ]) 
                    { 
                        
    $pubs_online ++; 
                        
    $stat  '<font color="#009900">Online</font>' ;
                    } else { 
                        
    $pubs_offline ++; 
                        
    $stat  '<font color="#CC0000">Offline</font>' ;
                    }
                    
    $ptit  $vbulletin -> db -> query_first ( "
                                                    SELECT title 
                                                    FROM "
    . TABLE_PREFIX . "thread
                                                    WHERE threadid = '"
    . $row3 [ 'threadid' ]. "'  
                                                "
    );
                    
    $getbgrow  getrowcolor ();
                    eval(
    '$pubies = "'  fetch_template ( 'fxppack_yourposted_pubbits' ) .  '";' );
                    
    $pubbits  .=  $pubies ;
                }
                
    $db -> free_result ( $pubs_posted );
                
    $hacks_posted  $vbulletin -> db -> query_read ( "
                                                    SELECT * 
                                                    FROM "
    . TABLE_PREFIX . "fxppack_hack
                                                    WHERE uid = '"
    . $vbulletin -> userinfo [ 'userid' ]. "' 
                                                    AND hacker_status != 0
                                                    ORDER BY threadid DESC
                                                    LIMIT 5
                                                "
    );
                
    $hackstotal  $vbulletin -> db -> query_first ( "
                                                    SELECT COUNT(*) as total
                                                    FROM "
    . TABLE_PREFIX . "fxppack_hack
                                                    WHERE uid = '"
    . $vbulletin -> userinfo [ 'userid' ]. "'  
                                                "
    );
                                                
                
    $hackstotal  vb_number_format ( $hackstotal [ 'total' ]);
                
                
    $hack_online  0 ;
                
    $hack_offline  0 ;
                while (
    $row4  $vbulletin -> db -> fetch_array ( $hacks_posted ))
                {
                    if (
    $row4 [ 'status' ]) 
                    { 
                        
    $hack_online ++; 
                        
    $stat  '<font color="#009900">Online</font>' ;
                    } else { 
                        
    $hack_offline ++; 
                        
    $stat  '<font color="#CC0000">Offline</font>' ;
                    }
                    
    $htit  $vbulletin -> db -> query_first ( "
                                        SELECT title 
                                        FROM "
    . TABLE_PREFIX . "thread
                                        WHERE threadid = '"
    . $row4 [ 'threadid' ]. "'  
                                        "
    );
                    
    $getbgrow  getrowcolor ();
                    eval(
    '$hacks = "'  fetch_template ( 'fxppack_yourposted_hackbits' ) .  '";' );
                    
    $hackbits  .=  $hacks ;
                }
                
                eval(
    '$Posted = "'  fetch_template ( 'fxppack_lastposted' ) .  '";' );
                
    $db -> free_result ( $hacks_posted ); 
                
    // Add to forumhome
                
    $vbulletin -> templatecache [ 'FORUMHOME' ] =  str_replace ( '$navbar' , '$navbar '  '$Posted' , $vbulletin -> templatecache [ 'FORUMHOME' ]);
            } 
        }

        
    // ############################### TOP 5 STATS ##############################
        
    if ( $vbulletin -> options [ 'show_topstats' ])
        {    
            if(
    $vbulletin -> userinfo [ 'userid' ])
            {    
                
    $statposts  $vbulletin -> db -> query ( "
                    SELECT posts,username,userid 
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE posts != 0 
                    GROUP BY userid 
                    ORDER BY posts DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $statposts ))
                {
                    if (
    $post_users ) {
                        
    $post_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'posts' ]. ")<br />" ;
                    } else {
                        
    $post_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'posts' ]. ")<br />" ;
                    }
                    
    $num ++;
                }
                
    $db -> free_result ( $objRs );
                
    $statraces  $vbulletin -> db -> query ( "
                    SELECT races,username,userid
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE races != 0 
                    GROUP BY userid 
                    ORDER BY races DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $statraces ))
                {
                    if (
    $race_users ) {
                        
    $race_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'races' ]. ")<br />" ;
                    } else {
                        
    $race_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'races' ]. ")<br />" ;
                    }
                    
    $num ++;
                }
                
    $db -> free_result ( $objRs );
                
    $statpubs  $vbulletin -> db -> query ( "
                    SELECT pubs,username,userid 
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE pubs != 0 
                    GROUP BY userid 
                    ORDER BY pubs DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $statpubs ))
                {
                    if (
    $pubs_users ) {
                        
    $pubs_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'pubs' ]. ")<br />" ;
                    } else {
                        
    $pubs_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'pubs' ]. ")<br />" ;
                    }
                    
    $num ++;
                }
                
    $db -> free_result ( $objRs );
                
    $stathacks  $vbulletin -> db -> query ( "
                    SELECT hacks,username,userid
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE hacks != 0 
                    GROUP BY userid 
                    ORDER BY hacks DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $stathacks ))
                {
                    if (
    $hacks_users ) {
                        
    $hacks_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'hacks' ]. ")<br />" ;
                    } else {
                        
    $hacks_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'hacks' ]. ")<br />" ;
                    }
                    
    $num ++;
                    
    $d164l ;
                }
                
    $db -> free_result ( $objRs );
                
    $statscans  $vbulletin -> db -> query ( "
                    SELECT scans,username,userid 
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE scans != 0 
                    GROUP BY userid 
                    ORDER BY scans DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $statscans ))
                {
                    if (
    $post_users ) {
                        
    $scans_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'scans' ]. ")<br />" ;
                    } else {
                        
    $scans_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'scans' ]. ")<br />" ;
                    }
                    
    $num ++; 
                }
                
    $db -> free_result ( $objRs );
                
    $statleech  $vbulletin -> db -> query ( "
                    SELECT leechs,username,userid 
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE leechs != 0 
                    GROUP BY userid 
                    ORDER BY leechs DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $statleech ))
                {
                    if (
    $leech_users ) {
                        
    $leech_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'leechs' ]. ")<br />" ;
                    } else {
                        
    $leech_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'leechs' ]. ")<br />" ;
                    }
                    
    $num ++;
                }
                
    $db -> free_result ( $objRs );
                
    $statnukes  $vbulletin -> db -> query ( "
                    SELECT nukes,username,userid 
                    FROM " 
    TABLE_PREFIX  "user 
                    WHERE nukes != 0 
                    GROUP BY userid 
                    ORDER BY nukes DESC 
                    LIMIT 5
                "
    );
                
    $num  1 ;
                while (
    $objRs  $vbulletin -> db -> fetch_array ( $statnukes ))
                {
                    if (
    $nuke_users ) {
                        
    $nuke_users  .=  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'nukes' ]. ")<br />" ;
                    } else {
                        
    $nuke_users  $num . ". " . $objRs [ 'username' ]. "(" . $objRs [ 'nukes' ]. ")<br />" ;
                    }
                    
    $num ++;; 
                }
                
                
    // NOW GET USERS OWN RANK UNLESS IN TOP FIVE IF NO STATS AVAIL USER WILL NOT BE RANKED
                
    if ( $user = $vbulletin -> db -> query_first ( "SELECT * FROM "  TABLE_PREFIX  "user WHERE userid='" . $vbulletin -> userinfo [ 'userid' ]. "'" )) {;
                    if (
    $user [ posts ]) 
                    {            
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT posts,username,userid 
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE posts != 0 
                            GROUP BY userid 
                            ORDER BY posts DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'posts_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ posts ] = ( $user [ posts ] !=  "" ) ?  "Your Posts: " . $user [ 'posts' ]. " Rank: " . $rank [ 'posts_user' ] :  '' ;
        
                    if (
    $user [ 'pubs' ]) 
                    {            
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT pubs,username,userid 
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE pubs != 0 
                            GROUP BY userid 
                            ORDER BY pubs DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'pubber_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ pubs ] = ( $user [ pubs ] !=  "0" ) ?  "Your Pubs: " . $user [ 'pubs' ]. " Rank: " . $rank [ 'pubber_user' ] :  '' ;
                    
                    if (
    $user [ 'races' ]) 
                    {
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT races,username,userid
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE races != 0 
                            GROUP BY userid 
                            ORDER BY races DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'racer_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ races ] = ( $user [ races ] !=  "0" ) ?  "Your Races Won: " . $user [ 'races' ]. " Rank: " . $rank [ 'racer_user' ] :  '' ;
                    
                    if (
    $user [ 'hacks' ]) 
                    {
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT hacks,username,userid
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE hacks != 0 
                            GROUP BY userid 
                            ORDER BY hacks DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'hacker_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ hacks ] = ( $user [ hacks ] !=  "0" ) ?  "Your Hacks: " . $user [ 'hacks' ]. " Rank : " . $rank [ 'hacker_user' ] :  '' ;
                    
                    
    #!stristr($scans_users, $user['username'])
                    
    if ( $user [ 'scans' ]) 
                    {
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT scans,username,userid 
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE scans != 0 
                            GROUP BY userid 
                            ORDER BY scans DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'scanner_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ scans ] = ( $user [ scans ] !=  "0" ) ?  "Your Scans: " . $user [ 'scans' ]. " Rank: " . $rank [ 'scanner_user' ] :  '' ;
                
                    if (
    $user [ 'nukes' ]) 
                    {
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT nukes,username,userid 
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE nukes != 0 
                            GROUP BY userid 
                            ORDER BY nukes DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'nuked_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ nukes ] = ( $user [ nukes ] !=  "0" ) ?  "Your Nukes: " . $user [ 'nukes' ]. " Rank:" . $rank [ 'nuked_user' ] :  '' ;
                    if (
    $user [ 'leechs' ]) 
                    {
                        
    $objRs  $vbulletin -> db -> query ( "
                            SELECT leechs,username,userid 
                            FROM " 
    TABLE_PREFIX  "user 
                            WHERE leechs != 0 
                            GROUP BY userid 
                            ORDER BY leechs DESC 
                        "
    );
                        
    $num  1 ;
                        while (
    $objRow  $vbulletin -> db -> fetch_array ( $objRs ))
                        {
                            if (
    $objRow [ 'username' ] ==  $user [ 'username' ])
                            {
                                
    $rank [ 'leeched_user' ] =  $num ;
                                break;
                            }
                            
    $num ++;
                        }
                        unset(
    $objRs );
                    }
                    
    $user [ leechs ] = ( $user [ leechs ] !=  "0" ) ?  "You Leeched: " . $user [ 'leechs' ]. " Rank:" . $rank [ 'leeched_user' ] :  '' ;
                }
                eval(
    '$TopFive = "'  fetch_template ( 'fxppack_topfive' ) .  '";' ); 
                
    // Add to forumhome
                
    $vbulletin -> templatecache [ 'FORUMHOME' ] =  str_replace ( '$navbar' , '$navbar '  '$TopFive' , $vbulletin -> templatecache [ 'FORUMHOME' ]);
            } 
        }


        
    // ############################### WELCOME PANEL ##############################
        
    if ( $vbulletin -> options [ 'show_welcome' ])
        {    
            if(
    $vbulletin -> userinfo [ 'userid' ])
            {
            
                
    ## FOOK ME WHAT A LOT OF QUERIES ;P
                
    $welcome_back = "Welcome back " . $vbulletin -> userinfo [ 'username' ]. "!" ;
                        
                require_once(
    DIR  '/includes/functions_user.php' );
                
    $vbulletin -> userinfo [ 'avatar_build' ] =  fetch_avatar_url ( $vbulletin -> userinfo [ 'userid' ]);
            
                if (empty(
    $vbulletin -> userinfo [ 'avatar_build' ]) || ! is_array ( $vbulletin -> userinfo [ 'avatar_build' ]))
                {
                    
    $vbulletin -> userinfo [ 'avatar_build' ] = array( './fxppack/images/noavatar.gif' );
                }

                
    $vbulletin -> userinfo [ 'avatar_build' ] =  '<img src="'  $vbulletin -> userinfo [ 'avatar_build' ][ 0 ] .  '"' . iif ( $vbulletin -> userinfo [ 'avatar_build' ][ 1 ], $vbulletin -> userinfo [ 'avatar_build' ][ 1 ], '' ). 'border="0" alt="Edit Your Avatar" />' ;

                
    $vbulletin -> userinfo [ 'newposts' ] =  $db -> query_first ( "SELECT COUNT(*) AS newposts 
                                                                        FROM "
    . TABLE_PREFIX . "post WHERE dateline >= '" . $vbulletin -> userinfo [ 'lastvisit' ]. "' 
                                                                        AND visible = 1
                                                                        "
    );
                
    $vbulletin -> userinfo [ 'newposts' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newposts' ][ 'newposts' ]);
            
                
    $vbulletin -> userinfo [ 'newthreads' ] =  $db -> query_first ( "SELECT COUNT(*) AS newthreads 
                                                                        FROM "
    . TABLE_PREFIX . "thread 
                                                                        WHERE dateline >= '"
    . $vbulletin -> userinfo [ 'lastvisit' ]. "' 
                                                                        AND visible = 1 
                                                                        AND sticky in(0,1)
                                                                        "
    );
                
    $vbulletin -> userinfo [ 'newthreads' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newthreads' ][ 'newthreads' ]);
                
                            
    $vbulletin -> userinfo [ 'newpubs' ] =  $vbulletin -> db -> query_first ( "
                                                    SELECT COUNT(*) AS total 
                                                    FROM `"
    . TABLE_PREFIX . "fxppack_ftp` 
                                                    WHERE datel >= '"
    . $vbulletin -> userinfo [ 'lastvisit' ]. "'
                                                    AND race != '1'
                                                "
    );
                
    $vbulletin -> userinfo [ 'newpubs' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newpubs' ][ 'total' ]);
                
                
    $vbulletin -> userinfo [ 'newraces' ] =  $vbulletin -> db -> query_first ( "
                                                    SELECT COUNT(*) AS total 
                                                    FROM `"
    . TABLE_PREFIX . "fxppack_ftp` 
                                                    WHERE datel >= '"
    . $vbulletin -> userinfo [ 'lastvisit' ]. "' 
                                                    AND race = '1' AND nuke != '1'
                                                "
    );
                
    $vbulletin -> userinfo [ 'newraces' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newraces' ][ 'total' ]);
                
                
    $vbulletin -> userinfo [ 'newscans' ] =  $vbulletin -> db -> query_first ( "
                                                    SELECT COUNT(*) AS total 
                                                    FROM `"
    . TABLE_PREFIX . "fxppack_scan` 
                                                    WHERE `datel` >= '"
    . $vbulletin -> userinfo [ 'lastvisit' ]. "'
                                                "
    );
                
    $vbulletin -> userinfo [ 'newscans' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newscans' ][ 'total' ]);
                
                
    $vbulletin -> userinfo [ 'newhacks' ] =  $vbulletin -> db -> query_first ( "
                                                    SELECT COUNT(*) AS total 
                                                    FROM `"
    . TABLE_PREFIX . "fxppack_hack` 
                                                    WHERE datel >= '"
    . $vbulletin -> userinfo [ 'lastvisit' ]. "'
                                                "
    );
                
    $vbulletin -> userinfo [ 'newhacks' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newhacks' ][ 'total' ]);
            
                
    $vbulletin -> userinfo [ 'lastvisit' ] =  vbdate ( $vbulletin -> options [ 'timeformat' ],  $vbulletin -> userinfo [ 'lastvisit' ]) .  ', '  vbdate ( $vbulletin -> options [ 'dateformat' ],  $vbulletin -> userinfo [ 'lastvisit' ]);
            
                
    $exec_lastposts  $db -> query_first ( "SELECT COUNT(*) AS lastposts FROM " . TABLE_PREFIX . "post WHERE visible = 1 AND dateline >= " .( TIMENOW  86400 ));
                
    $exec_lastposts  vb_number_format ( $exec_lastposts [ 'lastposts' ]);
            
            
                
    $vbulletin -> userinfo [ 'newthreads' ] =  vb_number_format ( $vbulletin -> userinfo [ 'newthreads' ][ 'newthreads' ]);
                
    $vbulletin -> userinfo [ 'members' ]= $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "user WHERE usergroupid IN (2,10)" );
                
    $vbulletin -> userinfo [ 'mods' ]= $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "user WHERE usergroupid IN (5,7)" );
                
    $vbulletin -> userinfo [ 'admins' ]= $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "user WHERE usergroupid = 6" );
                
                
    $vbulletin -> userinfo [ 'posts' ]= $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "post" );
                
    $vbulletin -> userinfo [ 'threads' ]= $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "thread" );
                
    $vbulletin -> userinfo [ 'yourposts' ] =  $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "post WHERE userid = '" . $vbulletin -> userinfo [ 'userid' ]. "'" );
                
    $vbulletin -> userinfo [ 'yourposts' ] =  vb_number_format ( $vbulletin -> userinfo [ 'yourposts' ][ 'total' ]);
                
    #$vbulletin->userinfo['postpercent'] = vb_number_format(((str_replace(',', '', $vbulletin->userinfo['yourposts']['total']) / $vbulletin->userinfo['posts']['total'] ) * 100),2);
                
    $vbulletin -> userinfo [ 'teammembers' ]= $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "user WHERE `userteamid` = '" . $vbulletin -> userinfo [ 'userteamid' ]. "'" );
                
    $vbulletin -> userinfo [ 'teaminfo' ]= $db -> query_first ( "SELECT * FROM " . TABLE_PREFIX . "userteam WHERE `userteamid` = '" . $vbulletin -> userinfo [ 'userteamid' ]. "'" );
                
                
    $vbulletin -> userinfo [ 'lastpost' ] =  vbdate ( $vbulletin -> options [ 'timeformat' ],  $vbulletin -> userinfo [ 'lastpost' ]) .  ', '  vbdate ( $vbulletin -> options [ 'dateformat' ],  $vbulletin -> userinfo [ 'lastpost' ]);
                
    $vbulletin -> userinfo [ 'teams' ]= $db -> query_first ( "SELECT COUNT(*) AS `total` FROM `" . TABLE_PREFIX . "userteam`
    */ WHERE `userteamid` != 1"
    );
                
    $nummembers = $vbulletin -> userinfo [ 'members' ][ 'total' ];
                
    $nummods = $vbulletin -> userinfo [ 'mods' ][ 'total' ];
                
    $numadmins = $vbulletin -> userinfo [ 'admins' ][ 'total' ];
                
                
    $numthreads = $vbulletin -> userinfo [ 'threads' ][ 'total' ];
                
    $numposts = $vbulletin -> userinfo [ 'posts' ][ 'total' ];
                
    $numteams = $vbulletin -> userinfo [ 'teams' ][ 'total' ];
                
    $userposts = $vbulletin -> userinfo [ 'yourposts' ];
                
    $newuser  $vbulletin -> userstats [ 'newusername' ];
                
    $newuserid  $vbulletin -> userstats [ 'newuserid' ];
                
    // SET UP USERS TEAM INFO
                
    $numteammembers = vb_number_format ( $vbulletin -> userinfo [ 'teammembers' ][ 'total' ]);
                
    $teamposts = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teamposts' ]);
                
    $teamraces = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teamraces' ]);
                
    $teampubs = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teampubs' ]);
                
    $teamscans = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teamscans' ]);
                
    $teamhacks = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teamhacks' ]);
                
    $teamnukes = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teamnukes' ]);
                
    $teamleech = vb_number_format ( $vbulletin -> userinfo [ 'teaminfo' ][ 'teamreplies' ]);

                
                
                
    $numraces  $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "`fxppack_ftp` WHERE race ='1' AND nuke != '1'" );
                
    $totalraces  $numraces [ 'total' ];
                
                
    $numpubs  $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "`fxppack_ftp` WHERE race !='1'" );
                
    $totalpubs  $numpubs [ 'total' ];
                
                
    $numscans  $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "`fxppack_scan`" );
                
    $totalscans  $numscans [ 'total' ];
                
                
    $numhacks  $db -> query_first ( "SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "`fxppack_hack`" );
                
    $totalhacks  $numhacks [ 'total' ];

                
    $new_team  $vbulletin -> db -> query_read ( "
                                                SELECT title, userteamid 
                                                FROM "
    . TABLE_PREFIX . "userteam 
                                                ORDER BY userteamid 
                                                DESC LIMIT 1
                                            "
    );
                
                
    $new_team  $vbulletin -> db -> fetch_array ( $new_team );
                
                eval(
    '$Welcome = "'  fetch_template ( 'fxppack_welcome' ) .  '";' ); 
                
    // Add to forumhome
                
    $vbulletin -> templatecache [ 'FORUMHOME' ] =  str_replace ( '$navbar' , '$navbar '  '$Welcome' , $vbulletin -> templatecache [ 'FORUMHOME' ]);
            }
        }
        
        function 
    getrowcolor  ()
        {
            global 
    $bgcounter ;
            if (
    $bgcounter ++% ==  0 )
            {
                return 
    'alt2' ;
            } else {
                return 
    'alt1' ;
            }
        }
        
        
    /*======================================================================*\

    ?>
     
  21. #20 14. März 2009
    AW: frage zu vbulletin

    */ muss weg

    meta - jetzt is ende
     

  22. Videos zum Thema
Die Seite wird geladen...
Similar Threads - frage vbulletin
  1. Antworten:
    1
    Aufrufe:
    445
  2. Antworten:
    5
    Aufrufe:
    359
  3. Frage zu vbulletin 3.7

    harharhar , 12. Januar 2008 , im Forum: Webentwicklung
    Antworten:
    1
    Aufrufe:
    298
  4. Vbulletin Frage.

    $h@dow , 18. Oktober 2007 , im Forum: Webentwicklung
    Antworten:
    2
    Aufrufe:
    301
  5. vBulletin frage?

    Nikemare , 29. März 2007 , im Forum: Webentwicklung
    Antworten:
    8
    Aufrufe:
    279
  • Annonce

  • Annonce