<input type="hidden" name="table_name" value="<?=$table_name?>" />
<dl class="adminoption">
	<dt></dt>
	<dd><a href="#tab1">字段设置</a></dd>
	<dd><a href="#tab2">表单设置</a></dd>
</dl>
<div id="tab1" class="tab">
<table cellspacing="0" cellpadding="0" class="adminform">
  <tr>
    <th>字段名称</th></tr><tr>
    <td><input id="field_0_14" size="12" name="field_comments" dataType="Require" msg="字段名称只不能为空" class="text"/></td>
  </tr>
  <tr>
    <th>字段标识</th></tr><tr>
    <td><input id="field_0_1" title="字段" maxlength="64" size="10" name="field_name" dataType="Custom"  class="text" regexp="[a-zA-Z_]+" msg="字段标识只能是英文或下画线"/></td>
  </tr>
  <tr>
    <th>类型</th></tr><tr>
    <td><select id="field_0_2" name="field_type">
      <option value="VARCHAR" selected="selected">VARCHAR</option>
      <option value="TINYINT">TINYINT</option>
      <option value="TEXT">TEXT</option>
      <option value="DATE">DATE</option>
      <option value="SMALLINT">SMALLINT</option>
      <option value="MEDIUMINT">MEDIUMINT</option>
      <option value="INT">INT</option>
      <option value="BIGINT">BIGINT</option>
      <option value="FLOAT">FLOAT</option>
      <option value="DOUBLE">DOUBLE</option>
      <option value="DECIMAL">DECIMAL</option>
      <option value="DATETIME">DATETIME</option>
      <option value="TIMESTAMP">TIMESTAMP</option>
      <option value="TIME">TIME</option>
      <option value="YEAR">YEAR</option>
      <option value="CHAR">CHAR</option>
      <option value="TINYBLOB">TINYBLOB</option>
      <option value="TINYTEXT">TINYTEXT</option>
      <option value="BLOB">BLOB</option>
      <option value="MEDIUMBLOB">MEDIUMBLOB</option>
      <option value="MEDIUMTEXT">MEDIUMTEXT</option>
      <option value="LONGBLOB">LONGBLOB</option>
      <option value="LONGTEXT">LONGTEXT</option>
      <option value="ENUM">ENUM</option>
      <option value="SET">SET</option>
      <option value="BIT">BIT</option>
      <option value="BOOL">BOOL</option>
      <option value="BINARY">BINARY</option>
      <option value="VARBINARY">VARBINARY</option>
    </select></td>
  </tr>
  <tr>
    <th>长度/值*1</th></tr><tr>
    <td><input id="field_0_3" size="8" name="field_length"  class="text" dataType="Custom" regexp="[0-9]*" msg="长度只能是数字"/>
    </td>
  </tr>
  <tr>
    <th>Null</th></tr><tr>
    <td><select id="field_0_6" name="field_null">
      <option value="NOT NULL" selected="selected">not null</option>
      <option value="">null</option>
    </select></td>
  </tr>
  <tr>
    <th>默认2</th></tr><tr>
    <td><input id="field_0_7" size="12" name="field_default"  class="text" />
        <br />
        <div id="div_0_7">
          <input id="field_0_7a" type="checkbox" name="field_default_current_timestamp[0]" />
          <label for="field_0_7a">CURRENT_TIMESTAMP</label>
        </div></td>
  </tr>
  <tr>
    <th>索引</th></tr><tr>
    <td><input title="索引" type="radio" value="index_0" name="field_index" /></td>
  </tr>
  <tr>
    <th>全文搜索</th></tr><tr>
    <td><input title="全文搜索" type="checkbox" value="0" name="field_fulltext" /></td>
  </tr>
</table>
</div>
<div id="tab2" class="tab">
<input type="hidden" name="input[model_id]" value="<?=$modelid?>" />
<input type="hidden" name="input[tab]" value="<?=$tabstring?>" />
<input type="hidden" name="input[form_type]" value="<?=$form_type?>" />
<table class="adminform" cellspacing="0">
    <tr>
    	<th>INPUT标题</th>
    </tr>
    <tr>
    	<td><input type="text" name="input[input_title]" value="<?=@$input->input_title?>" class="text" /></td>
    </tr>
    <tr>
    	<th>选项卡</th>
    </tr>
    <tr>
    	<td><select name="input[tabid]">
              	<?php foreach($tabs as $tab){?>
                <option value="<?=$tab->tabid?>" <?php if(@$input->tabid==$tab->tabid){?> selected="selected" <?php }?>><?=$tab->name?>
                <?php }?>
              </select></td>
    </tr>
    <tr>
    	<th>排序</th>
    </tr>
    <tr>
    	<th><input type="text" name="input[input_order]" value="<?=@$input->input_order?>" class="text" dataType="Number" msg="排序值只能是整数" /></th>
    </tr>
    <tr>
    	<th>输入类型</th>
    </tr>
    <tr>
    	<td>
        <select name="input[input_type]">
            <?php foreach($FiledType as $tmpType){?>
            <option value="<?=$tmpType->column_type?>" <?php if(@$input->input_type==$tmpType->column_type){?> selected="selected" <?php }?>>
            <?=$tmpType->column_type_des?>
            <?php }?>
        </select></td>
    </tr>
    <tr>
    	<th>预设值</th>
    </tr>
    <tr>
    	<td>
        <select name="input[beforehand]">
            <option value="">无
            <?php foreach($beforehand as $tmpType){?>
            <option value="<?=$tmpType->default_type?>" <?php if(@$input->beforehand==$tmpType->default_type){?> selected="selected" <?php }?>>
            <?=$tmpType->default_description?>
            <?php }?>
        </select>
        </td>
    </tr>
    <tr>
    	<th>验证类型</th>
    </tr>
    <tr>
    	<td>
        <select name="input[vlidata]" id="vlidata">
                  <option value="">无
                  <?php foreach($valids as $k=>$v){?>
                  <option value="<?=$k?>" <?php if($k==@$input->vlidata){?> selected="selected" <?php }?>><?=$v?>
                  <?php }?>
                </select>
                </td>
    </tr>
    <tr>
    	<th>错误提示信息</th>
    </tr>
    <tr>
    	<td><input type="text" name="input[error_msg]" value="<?=@$input->error_msg?>" class="text" /></td>
    </tr>
    <tr>
    	<th>默认值</th>
    </tr>
    <tr>
    	<td>
        	<input type="text" class="text" name="input[default_value]" value="<?=@$input->default_value?>" />
        </td>
    </tr>
    <tr>
    	<th>输入说明</th>
    </tr>
    <tr>
    	<td><input type="text" class="text" name="input[input_description]" value="<?=@$input->default_value?>" /></td>
    </tr>
</table>	
</div>
<div><input type="submit" name="sb" value="提交" class="submit"></div>
<div class="adminform_bottom">
</div>