<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">  
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="/js/form.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/mainform.css">
    <title>Tiny Cakes</title>
</head>
<body>
  <header><img src="/images/logo.png">
  <h1></h1>
  </header>
  <nav class="menu">
    <ul>
      <li><a href="/">Home</a></li>
      <li><a href="/login">Login In</a></li>
      <li><a href="/allorders">All Order</a></li>
      <li><a href="/logout">Logout</a></li>
    </ul>
  </nav>
  <section>
      <table>
          <thead>
            <th>Name</th>
            <th>Address</th>
            <th>City</th>
            <th>Province</th>
            <th>Contact Number</th>
            <th>Email Id </th>
            <th>Flavour </th>
            <th>Description</th>
            <th>Image Name</th>
            <th>Delete</th>
            <th>Edit</th>
          </thead>
          <tbody>
              <% 
                    for (var order of orders)
                    {
               %>
               <tr>
                    <td><%= order.cname %></td>
                    <td><%= order.address %></td>
                    <td><%= order.city %></td>
                    <td><%= order.province %></td>
                    <td><%= order.number %></td>
                    <td><%= order.email %></td>
                    <td><%= order.flavour %></td>
                    <td><%= order.description %></td>
                    <td><%= order.myImagename %></td>
                  
                    <td><a href="/delete/<%= order._id %>">Delete</a></td>
                    <td><a href="/edit/<%= order._id %>">Edit</a></td>
                </tr>
               <%
                    }
                %> 
              
          </tbody>
      </table>
  </section>
  <footer>
    &copy; Mansi Desai - mdesai4946@conestogac.on.ca 8774946
</footer>
  </body>
  </html>
