<div class="form form-profile aif" style='width:auto'>
        <h2>
			Deals
            <!--DEALS API - Webservice: <a href="<?= get('siteroot') ?>api/mdeals/" 
            target="_blank"><?= get('siteroot') ?>api/mdeals/</a> (700 x 394 px) 
            <span style="float:right;"><a href="<?= get('siteroot') ?>mdeals/" target="_blank">View 
            <i class="fa fa-link"></i></a></span>   -->                   
        </h2>
            <table class="admintable" style="margin:10px;">
                <tr>
                    <th width="270">Image</th>
                    <th width="150">Title</th>
                    <th width="400">Date/Location</th>
                    <th width="150">Image</th>
                    <th width="130">Actions</th>
                </tr>
                <?php
                foreach ($mdeals as $mdeal) {
                    echo "<tr>
                    <td style='padding:10px; min-width:150px;'>
                        <img src='{$mdeal['image']}' alt='{$mdeal['title']}' style='width:250px; height:auto;' />
                    </td>
                    <td style='padding:10px;'>{$mdeal['title']}</td>
                    <td style='padding:10px;'>{$mdeal['artist']}
                        <br />
                        {$mdeal['venue']}
                    </td>
                    <td style='padding:10px; background:none; overflow:hidden; word-wrap: break-word; max-width:400px;'>{$mdeal['image']}</td>
                    <td style='padding:10px;'><a href='?mdeal&edit={$mdeal['id']}'>edit</a> | <a href='?mdeal&delete={$mdeal['id']}' class='confirm'>delete</a></td></tr>";
                }
                ?>
            </table>
            <div style="margin:10px;">
                <a href='?mdeal&add' class='btn btn-blue'>Add New</a>
            </div>    
</div>