<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站后台管理</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>
</head>

<body>
	<table class="table-list" cellpadding="1" cellspacing="1">
		<tr>
			<th>字段名称</th>
			<th>变量名</th>
			<th>类型</th>
			<th>所属模型</th>
			<th>操作</th>
		</tr>
		<?php if($result){foreach($result as $no =>$val){?>
		<tr <?php if($no%2==0){?>class="light"<?php }?>>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $val['name'];?></td>
			<td style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $val['enname'];?></td>
			<td style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $val['form'];?></td>
			<td><?php echo $modelobj->modelname($val['modelid']);?></td>
			<td><a href="?mod=model&file=model&action=manage&job=field_edit&id=<?php echo $val['id'];?>">配置字段</a> <font style="color:#CCCCCC">|</font> <?php if(!$val['issystem']){;?><a href="?mod=model&file=model&action=manage&job=field_delete&id=<?php echo $val['id'];?>" style="color:#FF0000; font-weight:bold" onclick="if(!confirm('确实要删除该字段？')){return false;}">删除字段</a><?php }else{echo '<font style="color:#CCCCCC; font-weight:bold">删除字段</font>';}?></td>
		</tr>
		<?php }?>
		<tr class="page">
			<td colspan="5">
			<?php echo $modelobj->pagestring;?>
			</td>
		</tr>
		<?php }else{?>
			<tr><td colspan="5" bgcolor="#FFFFFF">该模型暂无字段</td></tr>
		<?php }?>
		
	</table>
	
</body>
</html>
