$dados = $dados_query->fetch(PDO::FETCH_ASSOC);
    #===============
    #===== CRIA TABELA
    $query = "show full columns from {$sys_tabela} ";
    //echo $query;
    try {
        $query = $app->db->query($query);
    } catch (PDOException $e) {
        die($e->getMessage());
    }
    for ($i = 0; $i < count($array_ids); $i++) {
        if (in_array($i, $array_ids)) {
            if ($a == 'e') {
                echo cria_campo($array_comments[$i], $array_fields[$i], $array_types[$i], $extra, $dados[$array_fields[$i]], '');
            } else {
                echo cria_campo($array_comments[$i], $array_fields[$i], $array_types[$i], $extra, '', '');
            }
        }
    }
    #===== end CRIA TABELA
    echo "<br clear=\"all\">\n                    <div class=\"content\" style=\"padding-top:15px\">\n                    <div class=\"save\">\n                    <a title=\"Clique para salvar\" onclick=\"document.form.submit()\" href=\"javascript:void(0)\">\n                    <img hspace=\"1\" vspace=\"1\"  src=\"" . PAINEL_BASE_URL . "images/icon_save.png\">Salvar </a>        \n                    </div>\n                    </div>\n\n\n                    </form>\n                    <div class=\"content_round_bottom\"><img src=\"images/menu_background_b_l.jpg\"></div>";
} else {
    if (!empty($_SESSION['mysql_msg'])) {
        echo "<div class=\"mysql_msg_container\"><div class=\"mysql_msg\" >" . $_SESSION['mysql_msg'] . "</div></div>";
    }
    $query = "SELECT * FROM {$sys_tabela} ORDER by id asc";
    $query = $app->db->query($query);
    $total = $query->rowCount();
    $i = 0;
    if ($total < 1) {
        echo "<div class=\"noitem\">Nenhum item para listar.</div>";
    $dados = $dados_query->fetch(PDO::FETCH_ASSOC);
    #===============
    #===== CRIA TABELA
    $query = "show full columns from {$sys_tabela} ";
    //echo $query;
    try {
        $query = $app->db->query($query);
    } catch (PDOException $e) {
        die($e->getMessage());
    }
    for ($i = 0; $i < count($array_ids); $i++) {
        if (in_array($i, $array_ids)) {
            if ($a == 'e') {
                echo cria_campo($array_comments[$i], $array_fields[$i], $array_types[$i], $extra, $dados[$array_fields[$i]], array('parent' => 'tbl_sys_menu|parent:id'));
            } else {
                echo cria_campo($array_comments[$i], $array_fields[$i], $array_types[$i], $extra, '', array('parent' => 'tbl_sys_menu|parent:id'));
            }
        }
    }
    #===== end CRIA TABELA
    echo "\n                    <div class=\"content\" style=\"padding-top:15px\">\n                    <div class=\"save\">\n                    <a title=\"Clique para salvar\" onclick=\"document.form.submit()\" href=\"javascript:void(0)\">\n                    <img hspace=\"1\" vspace=\"1\"  src=\"" . PAINEL_BASE_URL . "images/icon_save.png\">Salvar </a>        \n                    </div>\n                    </div>\n\n\n                    </form>\n                    <div class=\"content_round_bottom\"><img src=\"images/menu_background_b_l.jpg\"></div>";
} else {
    if (!empty($_SESSION['mysql_msg'])) {
        echo "<div class=\"mysql_msg_container\"><div class=\"mysql_msg\" >" . $_SESSION['mysql_msg'] . "</div></div>";
    }
    $query = "SELECT * FROM {$sys_tabela} WHERE id != 1 ORDER by ordem";
    $query = $app->db->query($query);
    $total = $query->rowCount();
    $i = 0;
    if ($total < 1) {
        echo "<div class=\"noitem\">Nenhum item para listar.</div>";