<html>
<head>
<title>{/$module_name/}</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<link href="../images/default/style.css" rel="stylesheet" type="text/css">
<link href="../images/default/deeptree.css" rel="stylesheet" type="text/css">
<style type="text/css">
	<!--
	body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	}
	.style1 {
		font-size: 24px;
		font-family: "楷体_GB2312";
	}
	.style2 {font-size: 30px}
	a:link {
		color: #990000;
		text-decoration: none;
	}
	a:visited {
		text-decoration: none;
		color: #990000;
	}
	a:active {
		text-decoration: none;
		color: #990000;
	}
.style3 {color: #FF0000}
	-->
	</style>
<script src="../includes/js/checkFunction.js"></script>
<script src="../includes/js/Popcalendar.js"></script>
<script language="javascript" for="document" event="onkeydown">
	<!--
	  if(event.keyCode==13 && event.srcElement.type!='button' && event.srcElement.type!='submit' && event.srcElement.type!='reset' && event.srcElement.type!='textarea' && event.srcElement.type!='')
		 event.keyCode=9;
	-->
	</script>
<script>
	function check_parent(check_id,this_value){
		if(this_value==check_id){
			alert("选择错误：不能选择自己的！");
		}
	}
	</script>
<base target="_self">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<form name="form1" method="post" action="{/$action_file/}">
  <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr valign="bottom">
      <td height="50" valign="middle">
        <div align="center" class="style1 style2">{/$module_name/}</div>
	  </td>
    </tr>
	<tr height="90%">
        <td>
			<table width="55%" height="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
			  <tr>
				<td valign="top">
					<div id="Layer1" style="position:absolute; width:150px; height:350px; z-index:1; top: 50px; left: 40px; background-color:#CCCCCC; overflow: auto;">
						<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr height="30"><td><div align="center"><strong><font color="#0000FF">文档资料字段列表</font></strong></div></td></tr>
							{/section name=sec loop=$file_array/}
							<tr id="file_{/$file_array[sec].auto_id/}" onDblClick="javascript:if(document.all['file_id'].value!='')return false;document.all['file_{/$file_array[sec].auto_id/}'].style.display = 'none';document.all['selected_{/$file_array[sec].auto_id/}'].style.display = '';document.all['file_id'].value='{/$file_array[sec].auto_id/}';" {/if $file_array[sec].display=="false"/} style="display:none " {//if/}>
								<td  height="20" style="cursor:hand ">
								<div>
								   &nbsp;&nbsp;{/$file_array[sec].name/}
								</div>
								</td>
							</tr>
							{//section/}
						</table>
				  </div>
				</td>
				<td valign="top" >
					<div id="Layer3" style="position:absolute; width:290px; height:350px; z-index:1; top:50px; left: 200px; background-color:#CCCCCC; overflow: auto;">
						<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr><td colspan="3" align="center" height="20">先选择文档字段，后选择数据库字段（双击）</td></tr>
							<tr height="30"><td colspan="3"><div align="center"><strong><font color="#0000FF">已经确认对应关系列表</font></strong></div></td></tr>
							{/section name=sec loop=$select_array/}
							<tr id="selected_{/$select_array[sec].auto_id/}" onDblClick="javascript:if(document.all['file_id'].value!='')return false;document.all['selected_{/$select_array[sec].auto_id/}'].style.display = 'none';document.all['div_{/$select_array[sec].auto_id/}'].innerHTML = '';document.all['selected_value[]'][{/$select_array[sec].auto_id/}].value='';document.all['file_{/$select_array[sec].auto_id/}'].style.display = '';document.all['database_'+document.all['database_value[]'][{/$select_array[sec].auto_id/}].value].style.display = '';document.all['file_id'].value='';" {/if $select_array[sec].display=="false"/} style="display:none " {//if/}>
								<td  height="20" style="cursor:hand " align="center">
									&nbsp;&nbsp;{/$select_array[sec].name/}<input type="hidden" name="selected_value[]"><input type="hidden" name="database_value[]">
								</td>
								<TD><=></TD>
								<td  height="20" style="cursor:hand "><div id="div_{/$select_array[sec].auto_id/}" align="center"></div></td>
							</tr>
							{//section/}
						</table>
			    </div>
				</td>
				<td valign="top">
					<div id="Layer2" style="position:absolute; width:150px; height:350px; z-index:1; top: 50px; left: 500px; background-color:#CCCCCC; overflow: auto;">
						<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr height="30"><td><div align="center"><strong><font color="#0000FF">数据库字段列表</font></strong></div></td></tr>
							{/section name=sec loop=$database_array/}
							<tr id="database_{/$database_array[sec].auto_id/}" onDblClick="javascript:if(document.all['file_id'].value=='')return false;document.all['database_{/$database_array[sec].auto_id/}'].style.display = 'none';document.all['div_'+document.all['file_id'].value].innerHTML='{/$database_array[sec].name/}';document.all['selected_value[]'][document.all['file_id'].value].value='{/$database_array[sec].value/}';document.all['database_value[]'][document.all['file_id'].value].value='{/$database_array[sec].auto_id/}';document.all['file_id'].value='';" {/if $database_array[sec].display=="false"/} style="display:none " {//if/}>
								<td  height="20" style="cursor:hand ">
								<div>
								   &nbsp;&nbsp;{/$database_array[sec].name/}
								</div>
								</td>
							</tr>
							{//section/}
						</table>
				  </div>
				</td>
			  </tr>
		  </table>
		</td>
	</tr>
    <tr valign="top">
      <td height="35"><div align="center">
        <input type="checkbox" name="checkerror" value="1">是否检查数据重复和数据完整（说明：如果数据库还没有任何资料，可以不检查！检查数据需要比较多时间！）<br>{/$IdIsAUTO/}
        <input type="hidden" name="select_table" value="{/$table_name/}"><input type="hidden" name="file_name" value="{/$file_name/}"><input type="hidden" name="file_id"><input class="INPUT_BUTTON" type="submit" name="load_confirm" value=" 确认导入 "  onClick="if(confirm('确定要导入资料吗？')) return true; else return false;">
      </div></td>
    </tr>
  </table>
</form>
</BODY>
</HTML>