<% if (allrecs.length > 0) {%>
    <table border="1">
        <tr>
            <th>Customer ID</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Email</th>
            <th>Phone</th>
            <th>Address</th>
            <th>City</th>
            <th>State</th>
            <th>Zip</th>
            <th>Username</th>
            <th>Admin?</th>
        </tr>
        <% allrecs.forEach((recref, index) => { %>
            <tr>
                <td><%= recref.customer_id %></td>
                <td><%= recref.firstname %></td>
                <td><%= recref.lastname %></td>
                <td><%= recref.email %></td>
                <td><%= recref.phone %></td>
                <td><%= recref.address %></td>
                <td><%= recref.city %></td>
                <td><%= recref.state %></td>
                <td><%= recref.zip %></td>
                <td><%= recref.username %></td>
                <td><%= recref.isadmin %></td>
                <td><a href='/customer/<%= recref.customer_id %>/show'>Details</a></td>
                <td><a href='/customer/<%= recref.customer_id%>/edit'>Edit</a></td>
                <td><a href='/customer/<%= recref.customer_id %>/delete' onclick="return confirm('Are you sure you want to delete this record?');">Delete</a></td>
            </tr>
        <% }); %>
    </table>
<% } else { %>
    <p>No Records Available</p>
<% } %>
<p> <a href='/customer/addrecord'>Add New</a> </p>
    