<?php

/*** Freedom City | Check RPGBUNNY.COM for more Full RPG Sources | www.rpgbunny.com ***/include "antet.php"; include "func.php";
$usr=user($_SESSION["user"][0]);
if (5<$user[4]) header('Location: login.php');


?>
<html>
<head>
<?php echo $head_;echo "<link rel='stylesheet' type='text/css' href='".$imgs.$fimgs."default.css'>"; ?>


<title><?php echo $title; ?> - grotta</title>
</head>

<body class="q_body">

<div align="center">
<?php echo $top_ad; ?>
    <table class="q_table">
      <tr>
        <td class="td_logo">
        <?php logo($title); ?></td>
      </tr>
      <tr>
        <td class="td_top_menu"><?php menu_up(); ?></td>
      </tr>
      <tr>
        <td align="left">
        <p>

       <?php
       $query="SELECT * FROM calls order by data desc";
       $result=mysql_query($query, $db_id);
       $numcalls=mysql_num_rows($result);
       if($numcalls>0){
   ?>

       <table class="q_table" style="border-collapse: collapse" width="600" border="1">
            <tr>
              <td>Email </td>
              <td>Date</td>
              <td>Registered</td>
              <td>Dimension</td>
              <td>Option</td>
            </tr>
              <?php

              for ($i=0; $row=mysql_fetch_assoc($result); $i++) {
                 echo "<tr><td>";
                 echo $row['email'];
                 echo"</td><td>";
                 echo $row['data'];
                 echo"</td><td>";
                 $query="SELECT * FROM users where email='$row[email]'";
                 $result1=mysql_query($query, $db_id);
                 $numreg=mysql_num_rows($result1);
                 if($numreg==0)echo'NO';
                 if($numreg==1)echo'SI';
                 echo"</td><td>";
                 if($numreg==1){
                    $row1=mysql_fetch_assoc($result1);
                    $towns=towns($row1['id']);
                    echo $towns[0][3];
                 }
                 echo"</td><td>";
                 if($towns[0][3]>100){
                    echo"Convertibile";
                    unset($towns);
                 }
                 echo "</td></tr>";

              }
            ?>
           
           
            </table>
       <?php
       }
       ?>
       
  </p>
        </td>
      </tr>
      <tr>
        <td class="td_bottom_menu">
          <?php menu_down(); ?>
        </td>
      </tr>
    </table>
<?php echo $bottom_ad; ?>
<p><?php about();
?></div>

</body>

</html>