[RELEASE]Web Ranking Page with sortable collums.

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    The beer?? Its here !!! Rotana is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    1,733Posts

    [RELEASE]Web Ranking Page with sortable collums.

    Hi every one i made this simple ranking page awail ago.
    It has sortable collums.
    Like sort by EXP, DeathCount, KillCount, Name and Rank

    How to use it:
    1. Make an new php file.
    2. Copy past this copy in to it
    3. Insert the right thing for the odbc connection.
    Work for Jan and July 2007 Database.
    Code:
    <? 
    #This Page is made by Rotana for the Ragezone Community.
    #Feel free to edit this page if you want.
    #Credits to Rotana.
    $connect = odbc_connect("GunzDB", "game", "test");
    
    echo'<div align="center"><table width="500" border="1" cellspacing="1" cellpadding="1">
      <tr>
        <th scope="col"><a href="?s=rank">Rank</a></th>
        <th scope="col"><a href="?s=Name">Name</a></th>
        <th scope="col"><a href="?s=Level">Level</a></th>
        <th scope="col"><a href="?s=XP">Exp</a></th>
        <th scope="col"><a href="?s=DeathCount">Death Count</a></th>
        <th scope="col"><a href="?s=KillCount">Kill Count</a></th>
      </tr>
      <tr>';
    
    if($_GET['s'] == "" or $_GET['s'] == "rank") {
    
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY XP DESC";
    $num = '0';
    
    $result = odbc_exec($connect, $query);
    
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
    
     odbc_close($connect); 
    echo'
    </table></div>'; }
    
    else if($_GET['s'] == "Level") {
    
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY Level DESC";
    $num = '0';
    
    $result = odbc_exec($connect, $query);
    
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
    
     odbc_close($connect); 
    echo'
    </table></div>'; }
    else if($_GET['s'] == "XP") {
    
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY XP DESC";
    $num = '0';
    
    $result = odbc_exec($connect, $query);
    
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
    
     odbc_close($connect); 
    echo'
    </table></div>'; }
    
    else if($_GET['s'] == "DeathCount") {
    
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY DeathCount DESC";
    $num = '0';
    
    $result = odbc_exec($connect, $query);
    
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
    
     odbc_close($connect); 
    echo'
    </table></div>'; }
    else if($_GET['s'] == "KillCount") {
    
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY KillCount DESC";
    $num = '0';
    
    $result = odbc_exec($connect, $query);
    
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
    
     odbc_close($connect); 
    echo'
    </table></div>'; }
    else if($_GET['s'] == "Name") {
    
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY Name ASC";
    $num = '0';
    
    $result = odbc_exec($connect, $query);
    
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
    
     odbc_close($connect); 
    echo'
    </table></div>'; }
    
    
    ?>
    Have fun and feel free to edit or use it.


  2. #2
    Account Upgraded | Title Enabled! rodanio14 is offline
    MemberRank
    Jun 2007 Join Date
    Next to ur sister's houseLocation
    533Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    w00t f1rst p0st ? n1ce r3l3/]s3 r0t/]n/] g0/l//l//] try it n0w
    [mod]
    English Please[/mod]
    Last edited by Rotana; 29-04-08 at 10:07 PM.

  3. #3
    Account Upgraded | Title Enabled! Squares is offline
    MemberRank
    Mar 2008 Join Date
    260Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Nice Release Rotana.
    Was Looking For One.
    Thanks.

    Preview Of It.
    http://register.no-ip.biz/ranking.php

  4. #4
    Member DexlanM is offline
    MemberRank
    Aug 2006 Join Date
    99Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Freakn What I Needed Ty So Much Rotana

  5. #5
    Novice _loki_ is offline
    MemberRank
    Mar 2008 Join Date
    3Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    I've a little question, when i put this code on my php server, he return :
    [CODE]Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][Gestionnaire de pilotes ODBC] Source de donn

  6. #6
    Account Upgraded | Title Enabled! Squares is offline
    MemberRank
    Mar 2008 Join Date
    260Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Well One Thing.
    Post The Error In English.

  7. #7
    Member D@rK_AnGeL is offline
    MemberRank
    Aug 2007 Join Date
    56Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    try this:
    Code:
    <? 
    #This Page is made by Rotana for the Ragezone Community.
    #Feel free to edit this page if you want.
    #Credits to Rotana.
    $connect = odbc_connect("GunzDB", "your_login_user", "your_password");
     
    echo'<div align="center"><table width="500" border="1" cellspacing="1" cellpadding="1">
      <tr>
        <th scope="col"><a href="?s=rank">Rank</a></th>
        <th scope="col"><a href="?s=Name">Name</a></th>
        <th scope="col"><a href="?s=Level">Level</a></th>
        <th scope="col"><a href="?s=XP">Exp</a></th>
        <th scope="col"><a href="?s=DeathCount">Death Count</a></th>
        <th scope="col"><a href="?s=KillCount">Kill Count</a></th>
      </tr>
      <tr>';
     
    if($_GET['s'] == "" or $_GET['s'] == "rank") {
     
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY XP DESC";
    $num = '0';
     
    $result = odbc_exec($connect, $query);
     
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
     
     odbc_close($connect); 
    echo'
    </table></div>'; }
     
    else if($_GET['s'] == "Level") {
     
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY Level DESC";
    $num = '0';
     
    $result = odbc_exec($connect, $query);
     
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
     
     odbc_close($connect); 
    echo'
    </table></div>'; }
    else if($_GET['s'] == "XP") {
     
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY XP DESC";
    $num = '0';
     
    $result = odbc_exec($connect, $query);
     
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
     
     odbc_close($connect); 
    echo'
    </table></div>'; }
     
    else if($_GET['s'] == "DeathCount") {
     
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY DeathCount DESC";
    $num = '0';
     
    $result = odbc_exec($connect, $query);
     
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
     
     odbc_close($connect); 
    echo'
    </table></div>'; }
    else if($_GET['s'] == "KillCount") {
     
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY KillCount DESC";
    $num = '0';
     
    $result = odbc_exec($connect, $query);
     
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
     
     odbc_close($connect); 
    echo'
    </table></div>'; }
    else if($_GET['s'] == "Name") {
     
     $query = "SELECT Name, Level, XP, DeathCount, KillCount FROM Character ORDER BY Name ASC";
    $num = '0';
     
    $result = odbc_exec($connect, $query);
     
    while(odbc_fetch_row($result)){ 
    $num = $num + 1;
    $test1 = odbc_result($result, 1); 
    $test2 = odbc_result($result, 2); 
    $test3 = odbc_result($result, 3); 
    $test4 = odbc_result($result, 4);
    $test5 = odbc_result($result, 5); 
    echo("<tr><td>$num</td><td>$test1</td><td>$test2</td><td>$test3</td><td>$test4</td><td>$test5</td></tr>"); }
     
     odbc_close($connect); 
    echo'
    </table></div>'; }
     
     
    ?>
    and in line 5 :
    $connect = odbc_connect("GunzDB", "your_login_user", "your_password");
    write what its on your mssql

  8. #8
    Novice _loki_ is offline
    MemberRank
    Mar 2008 Join Date
    3Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Okay to begin ill try to translate my error message :

    Code:
    Warning: odbc_connect () [function.odbc-connect]: SQL error: [Microsoft] [ODBC Manager] Data source not found and name of drivers (pilots ?) unspecified, SQL state IM002 in SQLConnect in C: \ wamp \ www \ gunzweb \ reg.php on line 5
    And this message appear too when i write
    PHP Code:
    $connect odbc_connect("GunzDB""sa""mypwd"); 

  9. #9
    Account Upgraded | Title Enabled! Squares is offline
    MemberRank
    Mar 2008 Join Date
    260Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Go Too The Odb Donnection Thing.
    Click System Tab.
    And Register It On That Also.
    With Same Info.
    Should Work.

  10. #10
    Novice _loki_ is offline
    MemberRank
    Mar 2008 Join Date
    3Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    ah :D
    Thank you very much Squares :)
    Thx a lot again =)

  11. #11
    Account Upgraded | Title Enabled! Squares is offline
    MemberRank
    Mar 2008 Join Date
    260Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    No Problem.
    :]

  12. #12
    Member Z3ZO is offline
    MemberRank
    Jan 2008 Join Date
    IsraelLocation
    60Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    thank you gj

  13. #13
    Awaken the Devil inside! DeathniteR is offline
    MemberRank
    Mar 2008 Join Date
    The NetherlandsLocation
    380Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    nice one square never saw this post be4 :P anyways how come that every lvl 99 started GM's are the highest ranks? xD unfair :P im next to unfair GM's xD anyways Rotana nice rank page! :D

  14. #14
    Account Upgraded | Title Enabled! theodor2005 is offline
    MemberRank
    Aug 2007 Join Date
    203Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Thank you. Ill put it in good use ^^

  15. #15
    [Czt] Coder Team Member noobies is offline
    MemberRank
    Aug 2005 Join Date
    Behind you !!Location
    747Posts

    Re: [RELEASE]Web Ranking Page with sortable collums.

    Thanks dude, i'll test it out :D



Page 1 of 2 12 LastLast

Advertisement