<thead>
    <tr>
        <?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
            <th></th>
        <?php endif; ?>
        <th>
            <a href="server_databases.php<?= \PMA\libraries\URL::getCommon($_url_params); ?>">
                <?= __('Database'); ?>
                <?= ($sort_by == 'SCHEMA_NAME' ?  \PMA\libraries\Util::getImage('s_' . $sort_order . '.png', $sort_order_text) : ''); ?>
            </a>
        </th>
        <?php foreach ($column_order as $stat_name => $stat):
            if (! array_key_exists($stat_name, $first_database)) {
                continue;
            }
            $_url_params['sort_by'] = $stat_name;
            $_url_params['sort_order'] = ($sort_by == $stat_name && $sort_order == 'desc') ? 'asc' : 'desc'; ?>

            <th <?php if ($stat['format'] === 'byte'): ?>colspan="2"<?php endif; ?>>
                <a href="server_databases.php<?= \PMA\libraries\URL::getCommon($_url_params); ?>">
                    <?= $stat['disp_name']; ?>
                    <?= ($sort_by == $stat_name ?  \PMA\libraries\Util::getImage('s_' . $sort_order . '.png', $sort_order_text) : ''); ?>
                </a>
            </th>
        <?php endforeach; ?>
        <?php if ($master_replication): ?>
            <th>
                <?= __('Master replication'); ?>
            </th>
        <?php endif; ?>
        <?php if ($slave_replication): ?>
            <th>
                <?= __('Slave replication'); ?>
            </th>
        <?php endif; ?>
        <th>
            <?= __('Action'); ?>
        </th>
    </tr>
</thead>
