<div id="tablestatistics">
    <?php $odd_row = false; ?>
    <fieldset>
        <legend><?php echo __('Information'); ?></legend>
        <a id="showusage"></a>

        <?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
            <table id="tablespaceusage" class="data">
                <caption class="tblHeaders"><?php echo __('Space usage'); ?></caption>
                <tbody>
                    <tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
                        <th class="name"><?php echo __('Data'); ?></th>
                        <td class="value"><?php echo $data_size; ?></td>
                        <td class="unit"><?php echo $data_unit; ?></td>
                    </tr>

                <?php if (isset($index_size)): ?>
                    <tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
                        <th class="name"><?php echo __('Index'); ?></th>
                        <td class="value"><?php echo $index_size; ?></td>
                        <td class="unit"><?php echo $index_unit; ?></td>
                    </tr>
                <?php endif; ?>

                <?php if (isset($free_size)): ?>
                    <tr class="<?php echo ((!$odd_row) ? 'odd' : 'even'); ?>">
                        <th class="name"><?php echo __('Overhead'); ?></th>
                        <td class="value"><?php echo $free_size; ?></td>
                        <td class="unit"><?php echo $free_unit; ?></td>
                    </tr>
                    <tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
                        <th class="name"><?php echo __('Effective'); ?></th>
                        <td class="value"><?php echo $effect_size; ?></td>
                        <td class="unit"><?php echo $effect_unit; ?></td>
                    </tr>
                <?php endif; ?>

                <?php if (isset($tot_size) && $mergetable == false): ?>
                    <tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
                        <th class="name"><?php echo __('Total'); ?></th>
                        <td class="value"><?php echo $tot_size; ?></td>
                        <td class="unit"><?php echo $tot_unit; ?></td>
                    </tr>
                <?php endif; ?>

                <!-- Optimize link if overhead -->
                <?php if (isset($free_size) && !PMA_DRIZZLE
                            && ($tbl_storage_engine == 'MYISAM'
                            || $tbl_storage_engine == 'ARIA'
                            || $tbl_storage_engine == 'MARIA'
                            || $tbl_storage_engine == 'BDB')): ?>
                    <tr class="tblFooters">
                        <td colspan="3" class="center">
                            <a href="sql.php<?php echo $url_query; ?>&pos=0&amp;sql_query=<?php echo urlencode(
                                    'OPTIMIZE TABLE ' . PMA_Util::backquote($GLOBALS['table'])); ?>">
                                <?php echo PMA_Util::getIcon('b_tbloptimize.png', __('Optimize table')); ?>
                            </a>
                        </td>
                    </tr>
                <?php endif; ?>
                </tbody>
            </table>
        <?php endif; ?>
        <?php
            echo PMA\Template::get('table/structure/row_stats_table')->render(
              array(
                  'showtable' => $showtable,
                  'tbl_collation' => $tbl_collation,
                  'is_innodb' => $is_innodb,
                  'mergetable' => $mergetable,
                  'avg_size' => (isset ($avg_size) ? $avg_size : ''),
                  'avg_unit' => (isset ($avg_unit) ? $avg_unit : '')
              )
            );
        ?>
    </fieldset>
</div>
