<html>
	<head> 
	<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"> 
	<title>{/$module_name/}</title>
	<style type='text/css'>
	<!--
		body,td {
			font-family: '宋体';
			font-size: 9pt;
		}
		body {
			margin-left: 0px;
			margin-top: 0px;
			margin-right: 0px;
			margin-bottom: 0px;
			background-color: #ECE9D8;
		}
.style3 {
	color: #993300;
	font-weight: bold;
}
		-->
	</style>
	<script language='JavaScript'>
		<!--
		function selrev() {
			with(myform) {
				for(i=0;i<elements.length;i++) {
					thiselm = elements[i];
//					if(thiselm.name.match(/table\[\w+\]/))
					if(thiselm.name=="table[]")
						thiselm.checked = !thiselm.checked;
				}
			}
			getsize();
		}
		
		function getsize(){
		 ts=0;
			with(document.myform) {
				for(i=0;i<elements.length;i++) {
					thiselm = elements[i];
					if(thiselm.datalength&&thiselm.checked)
						ts += parseInt(thiselm.datalength);
				}
			totalsize.value=ts=ts.toString();
		
			i=ts.length;
			ts2='';
			while(i>0){
			  if(ts2)ts2=','+ts2;
			  ts2=ts.substring(i-3,i)+ts2;
			  i-=3;
			}	
			document.all.totalsizetxt.innerHTML=ts2;
			
			}
		}
		-->
	</script>
	<base target="_self">
	</head>
	<body link='#0000FF' vlink='#0000FF' alink='#0000FF'>
	
	<form name='myform' method='post' action='{/$action_file/}'>
	  <input name="db_dbname" type="hidden" value="{/$db_dbname/}">
	  <input name="username" type="hidden" value="{/$username/}">
	  <input name="password" type="hidden" value="{/$password/}">
	  <input name="table_num" type="hidden" value="{/$table_num/}">
	  <table width="100%" height="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>
			<table width='500' border='0' cellspacing='1' cellpadding='3' bgcolor='#1B56C5' align=center>
				<tr bgcolor="#ECE9D8"> 
					<td height="35" colspan='4'><span class="style3">第三步：请选择要备份的数据表</span></td>
			  </tr>
				<tr bgcolor='#ECE9D8'> 
					<td width='31%' height="35"><strong>表名</strong></td>
					<td width='32%'><strong>注释</strong></td>
					<td width='21%'><strong>大小</strong></td>
					<td width='16%' nowrap><strong>选择</strong>
				  <input name='checkbox' type='checkbox' onclick='selrev();' value='' checked>				  </td>
			  </tr>
			{/section name=row loop=$table_array/}
				<tr bgcolor='#ECE9D8'> 
				  <td height="35">{/$table_array[row].Name/}</td>
				  <td>{/$table_array[row].Comment/}</td>
					<td>{/$table_array[row].Size/} Byte</td>
					<td align='center'>
				  <input name='table[]' type='checkbox' value='{/$table_array[row].Name/}' datalength='{/$table_array[row].Size/}' checked onclick='getsize()'>				  </td>
			  </tr>
			{//section/}
				<tr bgcolor='#ECE9D8'>
					<td height="35" colspan=2><B>目前选择表的总大小：</B></td>
					<td><B>
				  <input type=hidden name=totalsize value='0'><label id='totalsizetxt'></label>&nbsp;Byte</B></td>
					<td align=center>反选
				  <input name='checkbox' type='checkbox' onclick='selrev()' value=''></td>
			  </tr>
				<tr bgcolor='#ECE9D8'>
				  <td height="35" colspan=4><div align="center">
					<input name="do_step_2" type="submit" value="上一步">
					<input type="reset" name="Submit2" value="重置">
					<input name="do_step_4" type="submit" value="下一步">
				  </div>				  </td>
			  </tr>
		  	</table>
		  </td>
        </tr>
      </table>
	</form>
	<script>getsize();</script>
	</body>
</html>