Gunz ranking page

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1

    Gunz ranking page

    This is my first ranking page feel free to use it but leave the credits thnx.
    Its coded 99% by ME and 1% to Wizkid for the Rank Column.
    Edit the password and the host to yours. And Credits to Sneakers for a small help on the users online.

    Screenshot:


    Here it is:
    PHP Code:
    <html>
    <style type="text/css">
    <!--
    body,td,th {
        color: #FFF;
    }
    body {
        background-color: #252627;
    }



    -->


    </html>
    </style>

    <body text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"><center>


    <hr>
    <html>
    <head>
    <title>Gunz Ranking Page</title>
    </head>
    <body>
    <center>



    <?php
    //MSSQL Connection
    $con mssql_connect("pclol\SQLEXPRESS","sa","pass");
    if (!
    $con)
        {
        die(
    'Couldnt not connect: ' mssql_error());
        }
        
    mssql_select_db("GunzDB");

    //Users Online
    $getcurp mssql_query("SELECT CurrPlayer,MaxPlayer FROM ServerStatus");
    $getcur mssql_fetch_array($getcurp);
    Echo 
    "<span style=\"color:#f27800\">Users online on Gunz: </span>";
    echo 
    $getcur['CurrPlayer'];
    echo 
    "/";
    echo 
    $getcur['MaxPlayer'];

    //Navbar- Below change google.com to your links
    ?>
    <center>
    <table border="0">
    <tr>
    <td>
    <a href="http://www.google.com">- Gunz Register-</a>
    </td>
    <td>
    <a href="http://www.miraclegamerz.net/home">-Homepage-</a>
    </td>
    <td>
    <a href="http://www.miraclegamerz.net/forum">-Forums-</a>
    </td>
    </tr>
    </table>
    </center>
    <hr>

    <?php
    //Player Ranking- It will display top 100 players if you want lower or higher look 1 line down and change 100 to your number.
    $result mssql_query("SELECT TOP 100* FROM Character ORDER BY Level DESC");

    echo 
    "<center><table border='1'>
    <tr>
    <th>Rank</th>
    <th>Character Name</th>
    <th>Level</th>
    <th>Experience</th>
    <th>Kills</th>
    <th>Deaths</th>
    <th>Play Time</th>
    </tr>"
    ;

     
    $x 1;
    while(
    $row mssql_fetch_array($result))
      {
      echo 
    "<tr>";
      echo 
    "<td>#" $x "</td>";
      echo 
    "<td>" $row['Name'] . "</td>";
      echo 
    "<td>" $row['Level'] . "</td>";
      echo 
    "<td>" $row['XP'] . "</td>";
      echo 
    "<td>" $row['KillCount'] . "</td>";
      echo 
    "<td>" $row['DeathCount'] . "</td>";
      echo 
    "<td>" $row['PlayTime'] . "</td>";
      echo 
    "</tr>";
      
    $x++;
      }

    echo 
    "</center></table>";
    mssql_close($con);
    ?> 
    <!-- OMG WTFBBQ HAX Copyright no waiii Dont fucking remove that.-->
    <font size="2">Copyright 2009 by:Antimony: and Credits to Wizkid for Rank Column.</font>
    </center>
    </body>
    </html>
    Last edited by death4u2; 11-10-09 at 03:36 PM.


  2. #2
    Account Upgraded | Title Enabled! Abstrakt is offline
    MemberRank
    Mar 2008 Join Date
    Vancouver B.C.Location
    645Posts

    Re: Gunz ranking page

    Thanks.

  3. #3
    Account Upgraded | Title Enabled! PenguinGuys is offline
    MemberRank
    Sep 2009 Join Date
    AlabamaLocation
    261Posts

    Re: Gunz ranking page

    hey... that's only 99% :(
    good job, looks pretty good.

  4. #4

    Re: Gunz ranking page

    Quote Originally Posted by Abstrakt View Post
    Thanks.
    Np
    Quote Originally Posted by PenguinGuy View Post
    hey... that's only 99% :(
    good job, looks pretty good.
    Eh i was learning php and i didnt know how to make the # go up so ppl know what rank they are but wizkid helped me so he deserves credits also.

  5. #5
    Account Upgraded | Title Enabled! Torsen is offline
    MemberRank
    Jan 2009 Join Date
    294Posts

    Re: Gunz ranking page

    Advice: SELECT CurrPlayer,MaxPlayer FROM ServerStatus

    Useless easier to use

    SELECT * FROM ServerStatus WHERE ServerID ='1'(Forgot exact collumn name)

    $row1 = mssql_assoc_array($queryabove);
    echo($row1[ServerName]." has ");
    echo ($row1[CurrPlayer]."/".$row1[MaxPlayer]);


    A bit proer huh?
    With the * you choose EVERYTHING from the row, and can then utilizie it in one code. Smaller query bigger results.

  6. #6

    Re: Gunz ranking page

    Quote Originally Posted by TidusXIII View Post
    Advice: SELECT CurrPlayer,MaxPlayer FROM ServerStatus

    Useless easier to use

    SELECT * FROM ServerStatus WHERE ServerID ='1'(Forgot exact collumn name)

    $row1 = mssql_assoc_array($queryabove);
    echo($row1[ServerName]." has ");
    echo ($row1[CurrPlayer]."/".$row1[MaxPlayer]);


    A bit proer huh?
    With the * you choose EVERYTHING from the row, and can then utilizie it in one code. Smaller query bigger results.
    If you were nice enough and read what i said you would know that is my first Gunz ranking page i just learned php.
    But i guess thnx..

  7. #7
    Account Upgraded | Title Enabled! Torsen is offline
    MemberRank
    Jan 2009 Join Date
    294Posts

    Re: Gunz ranking page

    Nono, thats the point, my code is the SIMPLEST. Easier to write and use.My usggestion always use SELECT * becuase then you can specify what EXACTLY you want selected in php instead of fucking around with a query.

  8. #8

    Re: Gunz ranking page

    Quote Originally Posted by TidusXIII View Post
    Nono, thats the point, my code is the SIMPLEST. Easier to write and use.My usggestion always use SELECT * becuase then you can specify what EXACTLY you want selected in php instead of fucking around with a query.
    Oki i understand sure its easier to use but i did use your way here
    $result = mssql_query("SELECT TOP 100* FROM Character ORDER BY Level DESC");
    am i right?

  9. #9
    Account Upgraded | Title Enabled! Torsen is offline
    MemberRank
    Jan 2009 Join Date
    294Posts

    Re: Gunz ranking page

    Iw as about to edit my post with this xD


    Code:
    re read your cod and you DID use it for ranking. Im guessing you kinda copied that from someone xD

  10. #10

    Re: Gunz ranking page

    Quote Originally Posted by TidusXIII View Post
    Iw as about to edit my post with this xD


    Code:
    re read your cod and you DID use it for ranking. Im guessing you kinda copied that from someone xD
    for the users online i got help from Sneakers.. but for the SELECT * etc was mine.

  11. #11
    Account Upgraded | Title Enabled! Torsen is offline
    MemberRank
    Jan 2009 Join Date
    294Posts

    Re: Gunz ranking page

    Quote Originally Posted by death4u2 View Post
    for the users online i got help from Sneakers.. but for the SELECT * etc was mine.
    Oh and last LITTTTTLE advice: $con = mssql_connect("VIC-PC\SQLEXPRESS","sa","hopeyouwillremoveit");

    Don't leave your password lying around. If I manage to upload any of my scripts and have your sq password, I can pretty much wipe out the whole db. Or RemoteSQL?

  12. #12

    Re: Gunz ranking page

    Quote Originally Posted by TidusXIII View Post
    Oh and last LITTTTTLE advice: $con = mssql_connect("VIC-PC\SQLEXPRESS","sa","hopeyouwillremoveit");

    Don't leave your password lying around. If I manage to upload any of my scripts and have your sq password, I can pretty much wipe out the whole db. Or RemoteSQL?
    oki but this is just like a test DB dont got any characters.

  13. #13
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: Gunz ranking page

    Eh Pretty nice :3

  14. #14
    Apprentice Kyzaru is offline
    MemberRank
    Apr 2009 Join Date
    5Posts

    Re: Gunz ranking page

    nice post

  15. #15
    Account Upgraded | Title Enabled! Kyuma is offline
    MemberRank
    Aug 2008 Join Date
    At HomeLocation
    350Posts

    Re: Gunz ranking page

    And add credits to me? I Fixed those shitty codes.



Page 1 of 3 123 LastLast

Advertisement