<!--
<?php
print <<<EOT
--> 
<div class="ListTopMenu">
	<a href="index.php?lfj=$lfj&job=list">模型列表(创建模型)</a>
    <a href="index.php?lfj=$lfj&job=editmodule&id=$id">模型设置</a>
    <a href="index.php?lfj=$lfj&job=editsort&id=$id">管理模型字段</a>
    <a href="?lfj=$lfj&job=addfield&id=$id">添加字段</a>
    <a href="index.php?lfj=$lfj&job=tpl&id=$id">本模型生成模板</a>
</div>
<div class="MainCont">
	<div class="head"><div class="tag">模型名称<span class="B red">$rsdb[name]</span></div><div class="more">&nbsp;</div></div>
	<form name="form1" method="post" action="?lfj=$lfj&action=editorder&id=$id">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="ListTable">
    <tr> 
      <th width="40%">字段名称</th>
      <th width="29%">字段ID</th>
      <th width="17%">排序</th>
      <th width="7%">修改</th>
      <th width="7%">删除</th>
    </tr>
<!--
EOT;
foreach($listdb AS $key=>$rs){
print <<<EOT
-->
    <tr> 
      <td class="txL">$rs[title]</td>
      <td>$rs[field_name]</td>
      <td><input type="text" name="postdb[{$rs[field_name]}]" size="6" value="$rs[orderlist]"></td>
      <td><a href='?lfj=$lfj&job=editfield&id=$id&field_name=$rs[field_name]'>管理</a></td>
      <td>
<!--
EOT;
if(in_array($rs[field_name],$ForbidDo[$id])){print <<<EOT
-->
			<a style="color:#ccc;" onclick="return alert('受保护字段,不可删除');">删除</a>
       <!--
EOT;
}else{print <<<EOT
-->    <a href="?lfj=$lfj&action=delfield&id=$id&field_name=$rs[field_name]">删除</a>   
<!--
EOT;
}print <<<EOT
-->
	 </td>
    </tr>
    <!--
EOT;
}print <<<EOT
-->
	</table>
    <div class="ListBut"><input type="submit" name="Submit" value="修改排序"></div>
	</form>
    <ul class="NoteList">
    	<li>注意:</li>
        <li>1.数值大的排在前面</li>
        <li>2.在列表页的模板,你可以插入显示自定义的字段,如<font color="#0000FF">{\$rs[字段名ID]}</font></li>
    </ul>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function show_more(va){
	var s=document.getElementsByTagName("tr");
	for(var i=0;i<s.length;i++){
		if( document.form1.showmore.checked==true ||va==1 ){
			if(s[i].className=='hidetr'){
				s[i].style.display="";
			}	
		}else{
			if(s[i].className=='hidetr'){
				s[i].style.display="none";
			}	
		}
	}
}
//show_more(1);
//-->
</SCRIPT>
<!--
EOT;
?>
-->