www.pudn.com > baxun36.rar > create.asp, change:2006-04-19,size:3631b


<!--#include file="mdb.asp"--> 
<% 
if session("adminlogin")<>sessionvar then 
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='index.asp';</script>") 
Response.End 
End if 
%> 
<HTML> 
<HEAD> 
<TITLE>生成页面</TITLE> 
<META NAME="Generator" CONTENT="Microsoft FrontPage 4.0"> 
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css"> 
</HEAD> 
<BODY> 
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" bgcolor="#999999"> 
  <tr>  
    <td bgcolor="#cccccc" align="center"> 
      生成分类页面</td> 
  </tr> 
  <tr>  
    <td bgcolor="#eeeeee"><br> 
    <% 
dim allsel 
dim rs(5) 
function listunder(i) 
	set rs(i)=server.createobject("adodb.recordset") 
	rs(i).open "select classid,classname from feilei where topclass="&rs(i-1)("classid"),conn,1,3 
	while not rs(i).eof 
		dim topclassname 
		topclassname="" 
		for x=0 to i-1 
			topclassname=topclassname&rs(x)("classname")&">" 
		next 
		response.write "<option value='"&rs(i)("classid")&"'>"&topclassname&rs(i)("classname")&"</option>"&vbCrLf 
		allsel=allsel & ";" & rs(i)("classid") 
                if i<Ubound(rs) then 
			call listunder(i+1) 
		end if 
		rs(i).movenext 
	wend 
end function 
%> 
<script language=javascript></script>                    
<script language=vbscript>                    
function wz_add(theform)        
on error resume next        
wz_add=false        
dv1.style.display="none"        
dv2.style.display=""        
        
set xht=createobject("microsoft.xmlhttp")        
        
  ppp=split(theform.classid.value,";")        
    for iss=0 to ubound(ppp)        
      document.forms(1).textlog.value=document.forms(1).textlog.value & "开始生成>>" & ppp(iss)        
      xht.open "get","../create_html.asp?classid=" & ppp(iss) & "&" & now(),false        
      xht.send        
      if xht.responsetext="ok" then document.forms(1).textlog.value=document.forms(1).textlog.value & "    成功!" else document.forms(1).textlog.value=document.forms(1).textlog.value & "    失败!"        
      document.forms(1).textlog.value=document.forms(1).textlog.value & chr(13) & chr(10)        
    next        
  alert "完成!"        
  dv1.style.display=""        
end function        
</script>        
<div id=dv1>        
<form action="../create_html.asp" method="post" onsubmit="return wz_add(this)" name="form1">        
选择要生成的类别:<select name="classid">        
<option selected value="0">生成所有类别</option>        
<%        
set rs(0)=server.createobject("adodb.recordset")        
rs(0).open "select classid,classname from feilei where topclass=0",conn,1,3        
while not rs(0).eof        
	response.write "<option value='"&rs(0)("classid")&"'>"&rs(0)("classname")&"</option>"&vbCrLf        
	if allsel="" then allsel= rs(0)("classid") else allsel= allsel & ";" & rs(0)("classid")        
        call listunder(1)        
	rs(0).movenext        
wend 
response.write "<option selected value=""" & allsel & """>生成所有类别</option>"        
%>        
</select><br>生成所有类别时速度较慢,请耐心等待!        
<input type="submit" value="马上生成HTML文件">        
</form>        
<br><br>        
</div>        
<div id=dv2 style="display:none"><form>        
<textarea name="textlog" cols="80" rows="25"></textarea></form>        
</div>        
<br>        
    <br></td>        
  </tr>        
  <tr>        
    <td align="center" bgcolor="#eeeeee">[<font color=#002288> <a href="http://www.baxun.com" target="_blank">八讯免费网</a>        
      </font>]</td>       
  </tr>       
</table>       
</BODY>      
</HTML>