<!--
<?php
print<<<EOT
-->
<div class="MainCont">
	<div class="head"><div class="tag">创建新的表单模型</div></div>
    <div class="NoteList">
		<form action="$admin_path&action=addmodule" method=POST>
            <span class=bold>创建新模型--</span>&nbsp;名称 
            <input type=text name="name" size=10>
            <input type=submit value="创 建" name="submit">
        </form>
    </div>
</div>
<form name="formlist" method="post" action="$admin_path&action=editlist">
<div class="MainCont">
	<div class="head"><div class="tag">编辑模型</div></div>
    <ul class="NoteList">
      <li>注意:<span class="red">数值大的排在前面</span></li>
      <li class="red">所有操作,必须手工点击生成模板后,前台才能生效</li>
    </ul> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ListTable">
      <tr> 
        <th width="5%">FID</th>
        <th width="30%">表单模型名称</th>
        <th width="8%">表单</th>
        <th width="8%">综合设置</th>
        <th width="6%">排序</th>
        <th width="9%">字段设置</th>
        <th width="12%">生成模板</th>
        <th width="5%">数据</th>
        <th width="8%">内容管理</th>
        <th width="9%">删除</th>
      </tr>
<!--
EOT;
foreach($listdb AS $key=>$rs){
$IS_BIZs=$IS_BIZ?"[<a href='../$dirname/form_search.php?mid=$rs[id]' target='_blank'>搜</A>]":"";
$IS_BIZb=$IS_BIZ?"<input type='button' name='Submit22' value='批量生成模板' onClick=\"postlist('automaketpl')\">":"";
print <<<EOT
-->
      <tr> 
        <td class="B red">$rs[id]</td>
        <td class="txL">【<a href='../$dirname/list_form.php?mid=$rs[id]' target="_blank">{$rs[name]}</a>】 $IS_BIZs</td>
        <td><a href="../$dirname/form.php?mid=$rs[id]" target="_blank"><img src="../member/images/icon_add.gif" alt="填写表单"/>填写</a></td>
        <td><a href="$admin_path&job=set&id=$rs[id]"><img src="../member/images/icon_manage2.gif" alt="修改表单设置"/>设置</a></td>
        <td><input type='text' name='order[{$rs[id]}]' value='$rs[list]' size='5'></td>
        <td><a href='$admin_path&job=listfield&id=$rs[id]'><img src="../member/images/button_field.gif" alt="修改字段"/>字段</a></td>
        <td><a href="$admin_path&job=tpl&id=$rs[id]"><img src="../member/images/icon_html.gif" alt="生成模板"/>生成模板</a></td>
        <td>{$rs[NUM]}条</td> 
        <td><a href="$admin_path&file=form_content&job=list&mid=$rs[id]" ><img src="../member/images/art_icon.gif" alt="管理表单"/> 管理</a></td>
        <td><a href="$admin_path&action=delete&id=$rs[id]" onclick="confirm('你确实要删除吗?不可恢复');"><img src="../member/images/button_drop.png">删除</a></td>
      </tr>
<!--
EOT;
}
$showpage=$showpage?"<div class='ShowPage'>$showpage</div>":"";
print <<<EOT
-->
	</table>
    $showpage
    <div class="ListBut">
      <input type="button" name="Submit2" value="修改排序" onclick="postlist('list')"> $IS_BIZb 
	</div>
</div>
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
function postlist(t){
	if(t=='list'){
		document.formlist.action="$admin_path&action=editlist";
	}else if(t=='automaketpl'){
		document.formlist.action="$admin_path&job=tpl&automaketpl=1";
	}
	document.formlist.submit();
}
function CheckAll(va){
	form=document.formlist
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
//-->
</SCRIPT>
<!--
EOT;
?>
-->
