Advertisement
Guest User

Untitled

a guest
Sep 9th, 2011
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.68 KB | None | 0 0
  1. <?php
  2. $username="root";
  3. $password="";
  4. $database="amx";
  5.  
  6. mysql_connect("localhost",$username,$password);
  7. @mysql_select_db($database) or die( "Unable to select database");
  8. $query="SELECT * FROM rank WHERE skill > 1 ORDER BY skill DESC";
  9. $result=mysql_query($query);
  10.  
  11. $num=mysql_numrows($result);
  12.  
  13. mysql_close();
  14. ?>
  15.  
  16. <?php
  17. $i=0;
  18. while ($i < $num) {
  19. $auth=mysql_result($result,$i,"auth");
  20. $ip=mysql_result($result,$i,"ip");
  21. $f1=mysql_result($result,$i,"name");
  22. $f2=mysql_result($result,$i,"kills");
  23. $f3=mysql_result($result,$i,"deaths");
  24. $f4=mysql_result($result,$i,"headshots");
  25. $f5=mysql_result($result,$i,"skill");
  26. $f6=mysql_result($result,$i,"points");
  27. /*$steam=mysql_result($result,$i,"steam");*/
  28. $country=mysql_result($result,$i,"country");
  29. if($i+1==1) $class="red";
  30. if($i+1==2) $class="blue";
  31. if($i+1==3) $class="green";
  32. if($i+1>3) $class="default";
  33.  
  34.  
  35. $salis = strtolower($country);
  36.  
  37. ?>
  38.  
  39. <!--<?php
  40. if($steam==1)
  41. echo "<img src=\"img/SLOT.png\" alt=\"Slot\" title=\"Slot\" width=\"15\" height=\"15\" />";
  42. elseif($steam==2)
  43. echo "<img src=\"img/ADMIN.png\" alt=\"Administrator\" title=\"Administrator\" width=\"15\" height=\"15\" />";
  44. else
  45. echo "<img src=\"img/blank.png\" alt=\"Player\" title=\"Player\" width=\"15\" height=\"15\" />"; ?></td>-->
  46. <td class="default" width="200">
  47. <img src="<?php echo "flags/$salis.png"?>" alt="<?php echo "$country flag"?>"/> <span title="<?php echo $ip ." | ". $auth; ?>"><?php echo $f1; ?></span></td>
  48. <td class="sth2"><?php echo $f2; ?></td>
  49. <td class="sth2"><?php echo $f3; ?></td>
  50. <td class="sth2"><?php echo $f4; ?></td>
  51. <td class="sth2"><?php echo $f5; ?></td>
  52. <td class="sth2"><?php echo $f6; ?></td>
  53. </tr>
  54. <?php
  55. $i++;
  56. }
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement