Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.23 KB | None | 0 0
  1. <?php
  2.  include("conn.php");
  3. ?>
  4. <html>
  5. <head>
  6.  
  7. <title>Lista Bannati CruserMt2</title>
  8.  
  9. </head>
  10. <body bgcolor="black" text="white">
  11.  
  12.     <table border="5" width="30%" align="center">
  13.      <tr><th>Posizione</th><th>ID ACCOUNT</th><th>STATUS</th></tr>
  14.     <?php
  15.         $query = mysql_query("SELECT * FROM account WHERE status NOT LIKE 'OK' ORDER BY login DESC LIMIT 100");
  16.          
  17.         $i=1;
  18.         $num=mysql_num_rows($query);
  19.      
  20.         while($i < $num){
  21.          
  22.             $row=mysql_fetch_array($query);
  23.             $name=$row["login"];
  24.             $level=$row["status"];
  25.              
  26.             if ($i>=4){
  27.              
  28.                 $pos=$i."<sup>th</sup>";
  29.              
  30.             }elseif ($i==1){
  31.              
  32.                 $pos=$i."<sup>st</sup>";
  33.              
  34.             }elseif ($i==2){
  35.              
  36.                 $pos=$i."<sup>nd</sup>";
  37.              
  38.             }elseif ($i==3){
  39.              
  40.                 $pos=$i."<sup>rd</sup>";
  41.              
  42.             }
  43.             ?>
  44.             <tr><td><?php echo $pos; ?></td><td><?php echo $name; ?></td><td><?php echo $level; ?></td></tr>
  45.      <?php
  46.             $i++;
  47.         }    
  48.     ?>
  49.     </table>
  50.  
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement