<?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>
	<div class="top-tips">
		<div class="tips-wrap">
			<div class="title">模型管理</div>
			在这里可以对网站已安装模型进行管理。
		</div>
	</div>

	<table class="table-list" cellpadding="1" cellspacing="1">
		<tr>
			<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'].' ID：'.$val['id'];?> <font style="color:#FF0000">[主表]</font></td>
			<td style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo LA_PRE.$val['tbname'];?></td>
			
			<td><?php echo $val['typeid'];?></td>
			
			<td><a href="javascript:void(0);"  onclick="popWindow('iframefieldadd<?php echo $val['id'];?>',650,450,1);">添加字段</a> <font style="color:#CCCCCC">|</font> <a href="javascript:void(0);"  onclick="popWindow('iframefield<?php echo $val['id'];?>',600,450,1);">字段管理</a> <font style="color:#CCCCCC">|</font> <a href="javascript:void(0);"  onclick="popWindow('iframeme<?php echo $val['id'];?>',600,450,1);" style="color:#FF0000; font-weight:bold">管理副表</a></td>
		</tr>
		<div id="iframefieldadd<?php echo $val['id'];?>" title="<?php echo $val['name'];?> 添加字段" style="display:none"><iframe frameborder="0" width="620" height="350" scrolling="auto" style="background:url(statics/images/large-loading.gif) center center no-repeat" src="?mod=model&file=model&action=manage&job=field_add&id=<?php echo $val['id'];?>"></iframe></div>
		<div id="iframefield<?php echo $val['id'];?>" title="<?php echo $val['name'];?> 字段" style="display:none"><iframe frameborder="0" width="570" height="350" scrolling="auto" style="background:url(statics/images/large-loading.gif) center center no-repeat" src="?mod=model&file=model&action=manage&job=field&id=<?php echo $val['id'];?>"></iframe></div>
		<div id="iframeme<?php echo $val['id'];?>" title="<?php echo $val['name'];?> 副表" style="display:none"><iframe style="background:url(statics/images/large-loading.gif) center center no-repeat" frameborder="0" width="570" height="350" scrolling="auto" src="?mod=model&file=model&action=manage&job=subform&id=<?php echo $val['id'];?>"></iframe></div>
		<?php }?>
		<tr class="page">
			<td colspan="4">
			<?php echo $modelobj->pagestring;?>
			</td>
		</tr>
		<?php }else{?>
			<tr><td colspan="4" bgcolor="#FFFFFF">暂未安装任何模型</td></tr>
		<?php }?>
		
	</table>
	
</body>
</html>
