<?php $this->css($this->assetModule('admin/admin.css')); ?>
<div class="clearfix">
    <?php if (isset($message)) { ?>
        <div class="alert alert-danger">
            <button class="close" data-dismiss="alert" type="button">×</button>
            <?php echo $message; ?>
        </div>
    <?php } ?>
    <div class="alert alert-success clearfix" role="alert">
        <?php _e('You can use this page tools for check some database integrity'); ?>
        <a href="<?php echo $this->url('', ['action' => 'index']); ?>"
           class="btn btn-success btn-sm text-right float-right">
            <i class="fas fa-arrow-left" aria-hidden="true"></i>
            <?php echo _a('Back'); ?>
        </a>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="card bg-light mb-3">
                <div class="card-header">
                    <?php echo _a('Results for tables'); ?>
                </div>
                <div class="card-body">
                    <pre><?php print_r($tablesError) ?></pre>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="card bg-light mb-3">
                <div class="card-header">
                    <?php echo _a('Results for columns'); ?>
                </div>
                <div class="card-body">
                    <pre><?php print_r($columnsError) ?></pre>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="card bg-light mb-3">
                <div class="card-header">
                    <?php echo _a('Results for InnoDB check'); ?>
                </div>
                <div class="card-body">
                    <ul>
                        <?php foreach($innodbError as $tableName => $tableType) : ?>
                            <li><?php echo $tableName ?> (<?php echo $tableType ?>) => <a href="<?php echo $this->url('', ['action' => 'migrate']); ?>?table=<?php echo $tableName ?>">InnoDB</a></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>