[PHP] Top Ranked 3 Class..

Results 1 to 16 of 16
  1. #1
    A.K.A /v\aX /--/ PHP Guru ToXiC L33T is offline
    MemberRank
    Aug 2007 Join Date
    Prestwich, UnitLocation
    1,112Posts

    [PHP] Top Ranked 3 Class..

    I know most of ya know how its done.. so whatever xD.. This post is for the newbies or the people that dont know php.



    Code:
    <center>
    <?php
        echo "<table width='500' align='center' height='1' cellspacing='0' border='0'>";
        echo "<tr valign='top'>";
        echo "<td width='5%'><center><b>Top Knight</b></center></td><td width='5%'><center><b>Top Mage</b></center></td><td width='5%'><center><b>Top Archer</b></center></td><tr valign='top'>";
    
        $msconnect = mssql_connect("*****" ,"***" ,"******");
        $msdb = mssql_select_db("kal_db", $msconnect);
        
        $plist =  $plist = "SELECT TOP 1 * FROM [Player] WHERE [Class] = '0' ORDER BY 
        [Admin], [Level] Desc, [Exp] Desc";
        $pplist = mssql_query($plist);
    
    
        
        while($list = mssql_fetch_array($pplist)){
    
    
        if($list['Class'] == "0"){
        echo "<td><center>";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/knight.jpg\"><br>";
        }
        elseif($list['Class'] == "1"){
        echo "<td><center>";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/mage.jpg\"><br>";
        }
        elseif($list['Class'] == "2"){
        echo "<td><center>";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/archer.jpg\"><br>";
        }
    
        echo "$cha";
        echo "$list[Name]";
        echo ":";
        echo "&nbsp;";
        echo "&nbsp;";
        echo "$list[Level]";
        echo "</center></td>";    
        }
    //    echo "<br><br>";
    //    echo "</tr></table>";
    
        
        
    
    
        
    ;/////////////new field\\\\\\\\\\\\\\\\
    
        $msconnect = mssql_connect("*****" ,"****" ,"******");
        $msdb = mssql_select_db("kal_db", $msconnect);
        
        $plist =  $plist = "SELECT TOP 1 * FROM [Player] WHERE [Class] = '1' ORDER BY 
        [Admin], [Level] Desc, [Exp] Desc";
        $pplist = mssql_query($plist);
        
        while($list = mssql_fetch_array($pplist)){
    
        if($list['Class'] == "0"){
        echo "<td><center>";
    //    $char = "Knight";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/knight.jpg\"><br>";
        }
        elseif($list['Class'] == "1"){
        echo "<td><center>";
    //    $char = "Mage";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/mage.jpg\"><br>";
        }
        elseif($list['Class'] == "2"){
        echo "<td><center>";
    //    $char = "Archer";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/archer.jpg\"><br>";
        }
        
        echo "$cha";
        echo "$list[Name]";
        echo ":";
        echo "&nbsp;";
        echo "&nbsp;";
        echo "$list[Level]";
        echo "</center></td>";    
        }
    //    echo "<br><br>";
    //    echo "</tr></table>";
    
        
        
        
        
    ;///////////////////// new field \\\\\\\\\\\\\\\\\\\\\\\
    
        $msconnect = mssql_connect("*****" ,"****" ,"*****");
        $msdb = mssql_select_db("kal_db", $msconnect);
        
        $plist =  $plist = "SELECT TOP 1 * FROM [Player] WHERE [Class] = '2' ORDER BY 
        [Admin], [Level] Desc, [Exp] Desc";
        $pplist = mssql_query($plist);
        
        while($list = mssql_fetch_array($pplist)){
        if($list['Class'] == "0"){
        echo "<td><center>";
    //    $char = "Knight";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/knight.jpg\"><br>";
        }
        elseif($list['Class'] == "1"){
        echo "<td><center>";
    //    $char = "Mage";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/mage.jpg\"><br>";
        }
        elseif($list['Class'] == "2"){
        echo "<td><center>";
    //    $char = "Archer";
        echo "<img src=\"http://i3.photobucket.com/albums/y63/mattylongden/archer.jpg\"><br>";
        }
        
        echo "$cha";
        echo "$list[Name]";
        echo ":";
        echo "&nbsp;";
        echo "&nbsp;";
        echo "$list[Level]";
        echo "</center></td>";    
    
        }
    //    echo "<br><br>";
        echo "</table>";    
    ?>
    </center>
    SS: http://forum.ragezone.com/attachment...king-ranks.jpg

    Play around with it and it can look nice :)
    If you want to add it to your ranks page then open your ranks.php file with notepad or whatever and look for at the top:
    Code:
    <?php
    under it just add this line:
    Code:
    Include 'your_top_3_file_name.php';
    -------------
    This was something I found on my old website, so put it up here :) its not great nor the best php xD


  2. #2
    Member lotje is offline
    MemberRank
    Dec 2006 Join Date
    55Posts

    Re: [PHP] Top Ranked 3 Class..

    nice realease max, it would make ranking give a better look =)

  3. #3
    Arrogant Wizard DeathArt is offline
    MemberRank
    Mar 2007 Join Date
    StockholmLocation
    2,657Posts

    Re: [PHP] Top Ranked 3 Class..

    Here are some better quality images for a top3, if anyone wants.







    Screenshotted by ZenTiX.

  4. #4
    Alpha Member Stup is offline
    MemberRank
    Oct 2006 Join Date
    AustraliaLocation
    2,430Posts

    Re: [PHP] Top Ranked 3 Class..

    g60 golden would be better :D

    and zentix is a faggot, scammed eliot on hanin >_>

  5. #5
    Arrogant Wizard DeathArt is offline
    MemberRank
    Mar 2007 Join Date
    StockholmLocation
    2,657Posts

    Re: [PHP] Top Ranked 3 Class..

    and zentix is a faggot, scammed eliot on hanin >_>
    No...
    ZenTiX always been playing fair, and a good friend of mine. He never spend money on kalcash items either. He just know how to play the game :)
    And opposit to me , he never cheated/hacked either.

    Code:
    [11:14] <TheDeathArt> http://forum.ragezone.com/f315/php-top-ranked-3-class-314804/#post2729882
    [11:14] <TheDeathArt> ZenTiX scammed somebody :o
    [11:14] <ZenTiX> ?!
    [11:14] <ZenTiX> oh wow
    [11:14] <ZenTiX> I scammed Elliot? :D
    [11:15] <ZenTiX> dude wtf :D
    [11:15] <ZenTiX> we quit kal together
    [11:15] <ZenTiX> then moved on to lost soul thing
    [11:15] <ZenTiX> haven't seen him since
    [11:15] * ZenTiX giggles
    [11:15] <TheDeathArt> hehe
    [11:16] <ZenTiX> wonder how he got that idea
    [11:16] <TheDeathArt> so I figured

  6. #6
    A.K.A /v\aX /--/ PHP Guru ToXiC L33T is offline
    MemberRank
    Aug 2007 Join Date
    Prestwich, UnitLocation
    1,112Posts

    Re: [PHP] Top Ranked 3 Class..

    ty for the images DeathArt :-)

  7. #7
    Banned knast183 is offline
    BannedRank
    Jul 2007 Join Date
    28Posts

    Re: g60 would be nice

    I made g60 pics for the ranking, i hope someone likes it:)


  8. #8
    Member lotje is offline
    MemberRank
    Dec 2006 Join Date
    55Posts

    Re: [PHP] Top Ranked 3 Class..

    looking nice ;) much better then g55

  9. #9
    Account Upgraded | Title Enabled! 2Kxx is offline
    MemberRank
    Feb 2008 Join Date
    Sweden..Location
    1,194Posts

    Re: [PHP] Top Ranked 3 Class..

    Thx MaX! nice work :) now the ranking looks better.

  10. #10
    Member alin2008 is offline
    MemberRank
    Dec 2007 Join Date
    D:\KalServer\Location
    62Posts

    Re: [PHP] Top Ranked 3 Class..

    Any one can upload a full ranking please ??? because this dont work for me :| i'm changed all mssql ling password connection but dont work

  11. #11
    Account Upgraded | Title Enabled! 2Kxx is offline
    MemberRank
    Feb 2008 Join Date
    Sweden..Location
    1,194Posts

    Re: [PHP] Top Ranked 3 Class..

    then it isnt wrong with the ranking.php..
    maybe you make something wrong?

  12. #12
    Alpha Member Flohle is offline
    MemberRank
    Oct 2006 Join Date
    GermanyLocation
    1,942Posts

    Re: [PHP] Top Ranked 3 Class..

    if you just copy all an inser the SQL IP, User and PW it works fine ^.^

    I think he changed something and now he don'T know what

  13. #13
    QuaintKal developer ObuolYs is offline
    MemberRank
    May 2007 Join Date
    LithuaniaLocation
    322Posts

    Re: [PHP] Top Ranked 3 Class..

    Can you make ranking with online status player ? ^^

  14. #14
    Apprentice Raiz3n is offline
    MemberRank
    Jan 2009 Join Date
    17Posts

    Re: [PHP] Top Ranked 3 Class..

    I got error when i want use that:

    Warning: mssql_query() [function.mssql-query]: message: Invalid column name 'admin'. (severity 16) in C:\xampp\htdocs\fusion\files\rank3.php on line 12

    Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\fusion\files\rank3.php on line 12

    Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\fusion\files\rank3.php on line 16

    Warning: mssql_query() [function.mssql-query]: message: Invalid column name 'admin'. (severity 16) in C:\xampp\htdocs\fusion\files\rank3.php on line 55

    Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\fusion\files\rank3.php on line 55

    Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\fusion\files\rank3.php on line 57

    Warning: mssql_query() [function.mssql-query]: message: Invalid column name 'admin'. (severity 16) in C:\xampp\htdocs\fusion\files\rank3.php on line 97

    Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\fusion\files\rank3.php on line 97

    Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\fusion\files\rank3.php on line 99

    can someone help?

  15. #15
    Apprentice GT2143 is offline
    MemberRank
    Feb 2009 Join Date
    NordicLocation
    22Posts

    Re: [PHP] Top Ranked 3 Class..

    Quote Originally Posted by ObuolYs View Post
    Can you make ranking with online status player ? ^^
    yes please :P

  16. #16
    Account Upgraded | Title Enabled! 2Kxx is offline
    MemberRank
    Feb 2008 Join Date
    Sweden..Location
    1,194Posts

    Re: [PHP] Top Ranked 3 Class..

    Learn the basics of php the whole day and you'll manage to create on by yourself.



Advertisement