Advertisement
Kimeraweb

Pepixicho Ranking

Dec 2nd, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.40 KB | None | 0 0
  1. <?php
  2. mysql_connect("127.0.0.1","root","") or DIE ("No se pudo establecer conexion con el servidor.");
  3. mysql_select_db("pepixiko") or DIE ("No se pudo conectar a la base de datos.");
  4.  
  5. $query = mysql_query("SELECT * FROM ranks  ORDER by points DESC LIMIT 20");
  6.  
  7. echo "<font face='Comic Sans MS'>";
  8. echo "<table align='center' id='borde' background='../iconos/negro.jpg'>";
  9. echo "<tr><td width='150' align='center'></td><td width='150' align='center'></td><td width='150' align='center'></td><td width='150' align='center'></td></tr>";
  10. echo "<tr><td align='center'><font color='#FFCC00' size='3'>lastDisplayName</font></td><td align='center'><font color='#FFCC00' size='3'>Puntos</font></td><td align='center'><font color='#FFCC00' size='3'>steamId</font></td><td align='center'><font color='#FFCC00' size='3'>balance</font></td></tr>";
  11. echo "<tr><td colspan='5'><hr align='center' /></td></tr>";
  12. while ($a=mysql_fetch_array($query))
  13. {
  14.     $balance = mysql_fetch_array(mysql_query("Select balance from uconomy where steamId='".$a['steamId']."' limit 1"));
  15.     echo "
  16.     <tr>
  17.         <td align='center'><font color='#FFFF00'>".$a['lastDisplayName']."</font></td>
  18.         <td align='center'><font color='#FFFF00'>".$a['points']."</font></td>
  19.         <td align='center'><font color='#FFFF00'>".$a['steamId']."</font></td>
  20.         <td align='center'><font color='#FFFF00'>".$balance['balance']."</font></td>
  21.     </tr>";
  22.    
  23. }
  24.  
  25. echo "</table>";
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement