<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Web management</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<?php include 'codes.php';?>
</head>
<body text="#000000" style="margin:0"> 
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
    
<div><img src="img/frame-list.png" width="180" height="37" alt=""></div>
<div class="frame">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="text">
  <tr>
    <td align="center"><div class="titles">
      <?php
			$sql = "SELECT * FROM reservations";
			$result = mysql_query($sql);
			$nu_row = mysql_num_rows($result);
?>
      <?php echo $nu_row  ?></div></td>
  </tr>
  <tr>
    <td><?php require_once 'navibar.php'; ?>
      <?php  $nav = new navibar; ?>
      <?php
$sql = "SELECT * FROM reservations ORDER BY id desc";
$result = $nav->execute($sql, $db);
$rows = mysql_num_rows($result);
for ($y = 0; $y < $rows; $y++) {
 $count=0;
  while ($myrow=mysql_fetch_array($result)) {
 $count++;
		    $id=$myrow['id'];
			$email=$myrow['email'];
			$name=$myrow['name'];
			$country=$myrow['country'];
			$tel=$myrow['tel'];
			$fax=$myrow['fax'];
			$room_type=$myrow['room_type'];
			$arrival_date=$myrow['arrival_date'];
			$departure_date=$myrow['departure_date'];
			$adults=$myrow['adults'];
			$date=$myrow['date'];
			
			$totalprice = $totalprice+$departure_date;
	
 ?></td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="1" cellpadding="4" class="text">
        <tr valign="top" bgcolor="#F2F2F2"> 
          <td bgcolor="#F2F2F2"> <b> 
            <?php echo $name ?>
            </b>
            <hr> 
            <table width="100%" border="0" cellspacing="0" cellpadding="2" class="text">
              <tr> 
                <td valign="top" width="80">Χώρα</td>
                <td valign="top"> 
                  <?php echo $country ?>
                  </td>
              </tr>
              <tr> 
                <td valign="top">Tel.</td>
                <td valign="top"> 
                  <?php echo $tel ?>
                </td>
              </tr>
              <tr> 
                <td valign="top">Fax</td>
                <td valign="top"> 
                  <?php echo $fax ?>
                </td>
              </tr>
              <tr>
                <td valign="top">E-mail </td>
                <td valign="top"><a href="mailto:<?php echo $email ?>?subject=<?php echo $firma?> Newsletter" class="links"> <?php echo $email ?> </a></td>
              </tr>
              <tr> 
                <td valign="top">Ημερομηνίες</td>
                <td valign="top"> 
                  <?php echo $arrival_date ?> - <?php echo $departure_date ?>
                </td>
              </tr>
              <tr>
                <td valign="top">Δωμάτιο</td>
                <td valign="top"><?php echo $room_type ?></td>
              </tr>
              <tr>
                <td valign="top">Άτομα</td>
                <td valign="top"> <?php echo $adults ?></td>
              </tr>
            </table>
          </td>
          <td width="100">
          <?php $s_year = substr("$date", 0, 4);   ?>
                  <?php $s_month = substr("$date", 5, 2);   ?>
                  <?php $s_day = substr("$date", 8, 2);   ?>
                  <?php  echo $s_day ?>
                  .
                  <?php  echo $s_month ?>
                  .
                  <?php  echo $s_year ?>
                
          </td>
        </tr>
      </table>
      <hr></td>
  </tr>
  <tr>
    <td>
      <?php } ?>
      <?php } ?></td>
  </tr>
  <tr>
    <td align="center"><a href="mailto:<?php echo $sitemail1 ?>?Bcc=<?php 
			$sql20 = "SELECT * FROM reservations WHERE id>='$id' ORDER BY id LIMIT 20";
			$result20 = mysql_query($sql20);
			while ($myrow=mysql_fetch_array($result20)) {
			$id=$myrow['id'];
		   $email=$myrow['email'];?><?php echo $email ?>,<?php }?>&subject=<?php echo $firma1 ?>" class="links">&gt;&gt; 
      mail to all</a></td>
  </tr>
  <tr>
    <td align="center"><?php
$links = $nav->getlinks("all", "on");
for ($y = 0; $y < count($links); $y++) {
  echo $links[$y] . "&nbsp;&nbsp;";

}
?></td>
  </tr>
  </table>
</div>
</td>
  </tr>
</table>
<?php include 'menudown.php';?>
</body>
</html>
