<%@ page language="C#" autoeventwireup="true" inherits="admin_ordinary_buildhtml, localhost_deploy" %>

<!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>
<title>页面生成</title>
<link href='/admin/common/client.css' rel='stylesheet' type='text/css' />
<script type="text/javascript" src="/common/client.js" charset="utf-8"></script>
<script type="text/javascript" src="/common/JSBalloon.js" charset="utf-8"></script>
<script type="text/javascript" src="/admin/manage.js" charset="utf-8"></script>

<script type="text/javascript">
function CheckData()
{
 
}	
</script>
</head>
<body>
	<br /><br />
	<%if(Para("sel")==""){%>
	<form action="" method="get" onsubmit="return CheckData ()">
	<input type="hidden" name="sel" value="1" /> 
	<table cellspacing="0"  cellpadding="0" id='itemtable' >
	<thead>
	<tr>
	<td colspan='2'>页面生成</td>
	</tr>
	</thead>
	  <tr style="display:none;">
			<td width="30%" class="tright"><nobr>每批页面数：</nobr></td>
			<td class="tleft">
				<select  class="inputbox" name="range">
					<option value="25" selected>25</option>
					<option value="50">50</option>
					<option value="100">100</option>
					<option value="200">200</option>
					<option value="500">500</option>
				</select><%=GetTip("20-1")%>
			</td>
		</tr>
		
		
		<tr>
			<td width="30%" class="tright">内容页：</td>
			<td class="tleft">
				<input type="radio" id="radcontent1"  name="radcontent" value="0" checked="checked" /><label for="radcontent1">不生成</label><br />
				<input type="radio" id="radcontent2"  name="radcontent" value="1"  /><label for="radcontent2">全部生成</label><br />
				<input type="radio" id="radcontent3"  name="radcontent" value="2" /><label for="radcontent3">部分生成 </label>
				<input type="text" class="inputbox wnum" name="contentstart"	onclick="$('radcontent3').checked='true';" style="width:45px;" maxlength="6"  /> - <input type="text"	onclick="$('radcontent3').checked='true';" class="inputbox" style="width:45px;" maxlength="6"  name="contentend"  />。
				<%=GetTip("20-2")%>
			</td>
		</tr>
		<tr>
			<td width="30%" class="tright">分类页：</td>
			<td class="tleft">
				<input type="radio" id="radclass1"  name="radclass" value="0"  checked="checked" /><label for="radclass1">不生成</label><br />
				<input type="radio" id="radclass2"  name="radclass" value="1"  /><label for="radclass2">全部生成</label><br />
				<input type="radio" id="radclass3"  name="radclass" value="2" /><label for="radclass3">部分生成 </label>
				<input type="text" class="inputbox" style="width:45px;" onclick="$('radclass3').checked='true';" maxlength="6" name="classstart" id="classstart" /> - <input type="text"	onclick="$('radclass3').checked='true';" class="inputbox" style="width:45px;" maxlength="6"  name="classend" id="classend" />。
				<%=GetTip("20-3")%>
			</td>
		</tr>
		<tr>
			<td width="30%" class="tright">首页：</td>
			<td class="tleft"><input type="checkbox" id="chkhomepage"  name="chkhomepage" value="1"  /><label for="chkhomepage">生成</label>
			<%=GetTip("20-4")%>
			</td>
		</tr>
		<tr>
			<td width="30%" class="tright">脚本：</td>
			<td class="tleft"><input type="checkbox" id="chkjs"  name="chkjs" value="1"  /><label for="chkjs">生成</label>
			<%=GetTip("20-5")%>
			</td>
		</tr>
		<tr>
			<td width="30%" class="tright">索引：</td>
			<td class="tleft">
			<input type="radio" id="chkindex0"  name="chkindex" value="0"  checked="checked"   /><label for="chkindex0">不生成</label><br />
			<input type="radio" id="chkindex1"  name="chkindex" value="1"   /><label for="chkindex1">全部生成</label><br />
			<input type="radio" id="chkindex2"  name="chkindex" value="2"   /><label for="chkindex2">更新生成</label>
			<%=GetTip("20-6")%>
			</td>
		</tr>
		
		<tr><td colspan='2' align='center'>
		<input value=" 生成 " name="butsave" type="submit" class="button" />&nbsp; <input value=" 重置 " name="butreset" type="reset" class="button" /> 
</td></tr>
	</table>
	<%}else if(Para("sel")=="1"){%>
	<div	id="divtip"	 style="margin:0 auto;width:500px;padding:10px;line-height:22px;border:black solid 1px;">
	开始生成数据.....<br />	
	</div>
	<div style="text-align:center;display:none;margin:0 auto;width:500px;padding:10px;" id="divret"><input value=" 返回 " type="button" onclick="location.href='buildhtml.aspx';" class="button" /></div>
	
	<iframe name="frebuild" class="nodsp"></iframe>
	<script type="text/javascript">
	var i_index=0;
	var i_finished=1;
	var s_con=new Array();
	function LoadBody()
	{
		<%=BuildUrl()%>
		runbuild();
	}	
	
	function runbuild()
	{
		var s_url=s_con.shift();
		
		if (s_url != undefined)
		{
			//window.open("buildhtml.aspx?sel=2&"+s_url,"frebuild");	
			frames["frebuild"].location.href="buildhtml.aspx?sel=2&"+s_url;
		}
		else
		{
			$('divtip').innerHTML+="生成数据完成！";
			$('divret').style.display="";
		}
		
	}
	
	LoadBody();
	</script>
	
	<%}else if(Para("sel")=="2"){%>
	
	<script type="text/javascript">
	$P('divtip').innerHTML+="<%=BuildHTML()%>";
	parent.runbuild();
	</script>
	<%}%>
</body>
</html>   