<?php echo $header; ?>
<div id="content">
    <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb): ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php endforeach; ?>
    </div>
    <div class="box">
        <div class="heading">
            <h1>Logs</h1>
            <div class="buttons">
                <a href="<?php echo $back; ?>" class="button"> <?php echo $button_back;  ?> </a>
            </div>
        </div>
        <table class="list">
            <thead>
                <tr>
                    <td class="center" width="50"><?php echo $txt_id_log; ?></td>
                    <td class="center"><?php echo $txt_id_order; ?></td>
                    <td class="center"><?php echo $txt_date; ?></td>
                    <td class="center"><?php echo $txt_status; ?></td>
                    <td class="center"><?php echo $txt_message; ?></td>
                    <td class="center"><?php echo $txt_action; ?></td>
                </tr>
            </thead>
            <tbody>
                <?php 
                    $cont = 0;
                    foreach ($logs as $log) 
                    {
                ?>
                    <tr>
                        <td class="center"><?php echo $log['id_rede_orders_log']; ?></td>
                        <td class="center"><?php echo $log['order_id']; ?></td>
                        <td class="center"><?php echo $log['processed_at']; ?></td>
                        <td class="center"><?php echo $status[$cont]; ?></td>
                        <td class="center"><?php echo $message[$cont]; ?></td>
                        <td class="center"><a href="?route=erede/logs_view&id_log=<?php echo $log['id_rede_orders_log']; ?>&token=<?php echo $token; ?>"><?php echo $txt_view; ?></a></td>
                    </tr>
                    <?php 
                    ++$cont;
                    } 
                ?>
            </tbody>
        </table>
    </div>
</div>
<?php echo $footer; ?>