<style>
.thumb {
	object-fit: cover;
	border-radius: 4px;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	
}
input[type='checkbox'] {
	transform: scale(1.5);
}
.btn { 
	border-radius: 50px;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	font-size:15px;
	padding:10px 20px;
}
.btn-blue  {
	background: #000; 
}
</style>

<div class="form form-profile aif" style='width:auto; font-family:Montserrat-Light, Open-sans, sans-serif;'>
    <h2 style="margin-top:0px;">
        Edit + Manage Items/Products/Services
    </h2>
	<a href="/admin/items" title="Real-Time Inventory Updating">Update Inventory Real-Time &raquo;</a>
    <br />
    
    <table class="admintable" style="margin:10px; width:97% !important; min-width:97% !important;">
        <tr>
            
			<th style="display:none"><img src="/static/client/closed_eye_icon.png" 
			alt="Hide" style="width:30px;" /></th>
			<th width="50" style="text-align:center !important; padding-left:7px;">IMG</th>
			<th width="100" style="text-align:left !important; padding-left:10px;">CAT</th>
            <th width="200" style="text-align:left !important; padding-left:7px;">&nbsp;NAME</th>
            <th width="70">EDIT</th> 
            <th width="60">ID</th>       
            
        </tr>
        <?php
		foreach ($squarexproducts as $xproduct) {
			$imgfix = "onerror=\"this.src='/static/client/placeholder.jpg'\"";
			echo "<tr data-id=''>
			<td style='display:none; width:16px; max-width:16px; background:none; text-align:center;'>
				<input type='checkbox' name='update[]' value='{$xproduct['square_id']}'>
			</td>
			<td style='padding:5px; max-width:50px; width:50px; text-align:center'>
				<div class='thumb' style='margin:0 auto; height:50px; width:50px; overflow:hidden;'><img
				src='{$xproduct['images']}' {$imgfix} style='height:50px' /></div>
			</td>
			<td style='padding:10px;'>{$xproduct['category_name']}</td>
			<td style='padding:10px;'>{$xproduct['product_name']}<br />
                <span style='color:#bbb;'>{$xproduct['square_id']}</span>
                </td>
                <td style='padding:10px; text-align:center;'>
				<a href='?square_xp&edit={$xproduct['product_id']}' target='_blank'>edit</a> | <a href='?square_xp&delete={$xproduct['product_id']}' class='confirm'>delete</a>
                </td>         
				<td style='padding:10px; text-align:center;'>{$xproduct['product_id']}</td>
                
            </tr>";
        }
        ?>
    </table>
	<div class="clear"></div>
	<div style="margin:15px 10px 10px; font-size:17px;">
        <a href='?square_xp&add' class='btn btn-blue'>Add New</a>
    </div>
                            
</div>