{include file="Header.htm"}
<body>
<h3>Manage the table of {$Table.Label}</h3>
<ul>
  <li><a href="#" onclick="switchDisplay('ManageTable');">Set table structure</a></li>
  <li><a href="../Page/ManageAdminList.php?TableName={$TableName}"> Build admin list page</a></li>
  <li><a href="../Page/ManageAdminAdd.php?TableName={$TableName}"> Build admin add page</a></li>
  <li><a href="../Page/ManageAdminEdit.php?TableName={$TableName}"> Build admin edit page</a></li>
  <li><a href="../Page/ManageAdminDrop.php?TableName={$TableName}"> Build admin delete page</a></li>
  <li><a href="../Page/ManageAdminView.php?TableName={$TableName}"> Build admin info page</a></li>
</ul>
<form name="ManageTable" method="post" id="ManageTable" {if $Mode!="ManageTable"}style="display:none"{/if}>
  <table align="center" class="tblfull noborder">
    <caption>Set Table {$Table.Label}</caption>
    <tr class="colhead">
      <th>FieldName</th>
      <th>FieldType</th>
      <th>Field Label</th>
      <th>Input Type</th>
      <th>Input Param</th>
      <th>Data Rule</th>
      <th>Filled or not</th>
    </tr>
    {foreach from=$Table.Fields key=FieldName item=Field}
    <tr>
      <th>{$FieldName}</th>
      <td><input type="text" value="{$Field.Type}" readonly="readonly" style="width:150px;border:none" /></td>
      <td><input type="text" name="Label[{$FieldName}]" value="{$Field.Label}" style="width:100px" /></td>
      <td>{$InputTypeList.$FieldName}</td>
      <td><input type="text" name="InputParam[{$FieldName}]" value="{$Field.InputParam}" style="width:100px"/></td>
      <td>{$DataRuleList.$FieldName}</td>
      <td align="center">
        <nobr>
        <input type="radio" name="Fill[{$Field.Name}]" value="Required"                               checked="checked"      class="radio" title="Required" />
        <input type="radio" name="Fill[{$Field.Name}]" value="Optional"  {if $Field.Fill=="Optional"} checked="checked"{/if} class="radio" title="Optional" />
        <input type="radio" name="Fill[{$Field.Name}]" value="Excluded"  {if $Field.Fill=="Excluded"} checked="checked"{/if} class="radio" title="Excluded" />
        </nobr>
      </td>
    </tr>
    {/foreach}
    <tr>
      <td colspan="7" align="center">
        <input type="submit" name="Submit" value="Save" class="submit" />
        <input type="hidden" name="Mode"   value="ManageTable" />
      </td>
    </tr>
 </table>
</form>
</body>
</html>
