chris_61

Untitled

Dec 28th, 2014
148
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!doctype html>
  2.  
  3. <html lang="en">
  4. <head>
  5.   <meta charset="utf-8">
  6.  
  7.   <title>Top 5 Voters</title>
  8.   <meta name="description" content="">
  9.   <meta name="author" content="">
  10.  
  11.   <link rel="stylesheet" href="style.css">
  12.  
  13.   <!--[if lt IE 9]>
  14.   <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  15.   <![endif]-->
  16. </head>
  17.  
  18. <body>
  19. <?php
  20.  
  21.    $server = "localhost";
  22.    $dbuser = "xxx";
  23.    $dbpass = "xxxx";
  24.    $dbname = "xxxx";
  25.    
  26. mysql_connect($server, $dbuser, $dbpass);
  27. mysql_select_db($dbname);
  28.  
  29. $result = mysql_query("SELECT * FROM votes_hub_galtotals ORDER BY votes DESC LIMIT 5");
  30.  
  31. while($row = mysql_fetch_assoc($result)){
  32.  
  33.     echo '<ul class="serverList">';
  34.         echo '<li class="server"><a href=""><span class="serverIcon" style="background-image: url("http://i.fishbans.com/helm/'.$row['IGN'].'/48");"></span>'.$row['IGN'].' ('.$row['votes'].')</a></li>';
  35.     echo "</ul>";
  36.    
  37.     ; }
  38. ?>
  39.  
  40. </body>
  41. </html>
RAW Paste Data