Пример #1
0
<?php 
if (support("columns")) {
    ?>
<table cellspacing="0" id="edit-fields" class="nowrap">
<?php 
    $comments = $_POST ? $_POST["comments"] : $row["Comment"] != "";
    if (!$_POST && !$comments) {
        foreach ($row["fields"] as $field) {
            if ($field["comment"] != "") {
                $comments = true;
                break;
            }
        }
    }
    edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
    ?>
</table>
<p>
<?php 
    echo lang('Auto Increment');
    ?>
: <input type="number" name="Auto_increment" size="6" value="<?php 
    echo h($row["Auto_increment"]);
    ?>
">
<?php 
    echo adminer_checkbox("defaults", 1, true, lang('Default values'), "columnShow(this.checked, 5)", "jsonly");
    if (!$_POST["defaults"]) {
        ?>
<script type="text/javascript">editingHideDefaults()</script><?php 
Пример #2
0
            if ($_POST) {
                $row = $_POST;
                $row["fields"] = (array) $row["fields"];
                process_fields($row["fields"]);
            } elseif (strlen($_GET["procedure"])) {
                $row = routine($_GET["procedure"], $routine);
                $row["name"] = $_GET["procedure"];
            } else {
                $row = array("fields" => array());
            }
            ?>

<form action="" method="post" id="form">
<table border="0" cellspacing="0" cellpadding="2">
<?php 
            edit_fields($row["fields"], $collations, $routine);
            if (isset($_GET["function"])) {
                ?>
<tr><td><?php 
                echo lang('Return type');
                ?>
</td><?php 
                echo edit_type("returns", $row["returns"], $collations);
                ?>
</tr><?php 
            }
            ?>
</table>
<?php 
            echo type_change(count($row["fields"]));
            if (isset($_GET["function"])) {