<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname    = "form_permission_list";
$inputname   = "input_id";
?>
    <ul class="toolbar_menu">
        <?= button("new", $translation->get("new"), $formname, "loadCard('new', true)"); ?>
    </ul>

<div id="mainContent">

    <?php echo current_website_language($site, $language); ?>
    <h1><?php echo get_translation('top_permission'); ?></h1>

    <form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
        <input type="hidden" class="selected_linklist_row" name="input_id" value="" />

        <div class="requestLoader"></div>
        <?
        $query  = "SELECT id, description AS '" . $translation->get("name") . "', code AS '" . $translation->get("code") . "' FROM main_permission";
        $format = array("option", "text", "text");
        if ($result = mysqli_query($GLOBALS['mysql_con'], $query)) {
            linklist($result, "form_permission_list", $format);
        }
        ?>

    </form>
</div>