<div class="form form-profile aif" style='width:auto'>
    <h2 style="margin-top:0px;">
        Locations for Mobile Apps
    </h2>
    Locations with real-time GPS from the Locations Map page of your Pre-Order Mobile App (if applicable)
    
    <table class="admintable" style="width:100%; overflow:hidden; margin-top:10px;">

        <th width="150">ID</th>
        <th width="300">Name</th>
        <th width="300">Lat</th>
        <th width="300">Lng</th>
        <th width="300">Address</th>
        <th width="300">Work Time</th>
        <th>Actions</th></tr>
        <?php
        foreach ($locations as $location) {
            echo "<tr>
           
            <td style='padding:10px;'>{$location['id']}</td>
            <td style='padding:10px;'>{$location['name']}</td>
            
            <td style='padding:10px;'>{$location['latitude']}</td>          
            <td style='padding:10px;'>{$location['longitude']}</td>
            <td style='padding:10px;'>{$location['address']}</td>
            <td style='padding:10px;'>{$location['work_time']}</td>
            
            <td style='padding:10px;'><a href='?location&edit={$location['id']}'>edit</a> | <a href='?location&delete={$location['id']}' class='confirm'>delete</a></td></tr>";
        }
        ?>
    </table>
    
    <div style="margin:10px;">
        <a href='?location&add' class='btn btn-blue'>Add New</a>
    </div>
</div>