<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<!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" />
<title>静态生成</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function $(fr,id)
{ 
//return document.getElementById(id); 
return document.fr.id;
} 
function checkalls(obj,form,fr)
{ 
  var bool=(obj.checked)?true:false; 
  for(var i=0;i<form.length;i++)
  { 
   form.all[i].selected=bool; 
   } 
} 
</script>
</head>


<body id="page">
<h2 class="title">静态生成</h2>
<table width="99%" border="0" align="center" class="line_table">
  <tr>
    <td height="20">&nbsp;网站后台管理 &gt;&gt; <a href="cw_create.asp?action=1">静态生成管理</a></td>
  </tr>
</table>
<%if request("action")=5 then%>
<table border="0" width="99%">
		  <tr>
		  <%
		  for j=1 to 5
		  select case j
		   case 1
		     tab="cw_news_class"
			 ti="新闻列表"
		   case 2
		     tab="cw_info_class"
			 ti="分类列表"
		   case 3
		     tab="cw_job_class"
			 ti="招聘列表"
		   case 4
		     tab="cw_shop_class"
			 ti="商家列表"
		   case 5
		     tab="cw_hous_class"
			 ti="房产列表"
		   end select		   
		  %>
		   <td width="150">
			 <form action="cw_create.asp?html=89&action=5&tab=<%=tab%>" method="post" name="form<%=j%>" id="form<%=j%>" >
			 <select name="lid" size="10" multiple="multiple" id="lid" style="width:100px">
		   <%
		   set cl=server.CreateObject("adodb.recordset")
		   clq="select * from "&tab&" order by id asc"
		   cl.open clq,conn,1,1
		   if not cl.eof then
		   do while not cl.eof
		   %>
		     <option value="<%=cl("id")%>"><%=cl("title")%></option>
			 <%
			 cl.movenext
			 loop
			 end if
			 cl.close
			 set cl=nothing
			 %>
		     </select><br /><input type="checkbox" name="checkbox" value="checkbox" onclick="checkalls(this,this.form.lid)" />全选<br /><input name="Submit" type="submit" class="btn" value="<%=ti%>" />
			 </form></td>
			 <%next%>
			 <td>
			 <form action="cw_create.asp?html=15&action=5" method="post" name="form88" id="form88" >
			 <select name="lid" size="10" id="lid" style="width:100px">
		     <option value="cw_hr">人才简历</option>
		     </select><br /><br /><input name="Submit" type="submit" class="btn" value="其它列表" />
			 </form>
			 </td>
			 
  </tr>
</table>
<%end if%>
<%if request("action")=6 then%>
<table border="0" width="99%">
		  <tr>
		  <%
		  for f=1 to 5
		  select case f
		   case 1
		     tab="cw_news"
			 ti="新闻信息"
		   case 2
		     tab="cw_info"
			 ti="分类信息"
		   case 3
		     tab="cw_job"
			 ti="招聘信息"
		   case 4
		     tab="cw_shop"
			 ti="商家信息"
		   case 5
		     tab="cw_hous"
			 ti="房产信息"
		   end select		   
		  %>
			 <td width="150">
			 <form action="cw_create.asp?html=87&action=6&tab=<%=tab%>" method="post" name="form<%=f%>" id="form<%=f%>" >
         <select name="sid" size="10" multiple="multiple" id="sid" style="width:100px">
		   <%
		   set cl=server.CreateObject("adodb.recordset")
		   clq="select * from "&tab&"_class where islist<>0 order by id asc"
		   cl.open clq,conn,1,1
		   if not cl.eof then
		   do while not cl.eof
		   %>
		     <option value="<%=cl("id")%>"><%=cl("title")%></option>
			 <%
			 cl.movenext
			 loop
			 end if
			 cl.close
			 set cl=nothing
			 %>
		     </select><br /><input type="checkbox" name="checkbox" value="checkbox" onclick="checkalls(this,this.form.sid)" />全选<br /><input name="Submit2" type="submit" class="btn" value="<%=ti%>" />		
			 </form></td>
			 <%
			 next
			 %>
			 <td>
			 <form action="cw_create.asp?html=16&action=6" method="post" name="form99" id="form99" >
			 <select name="tab" size="10" id="tab" style="width:100px">
		     <option value="cw_hr">人才简历</option>
		     </select><br /><br /><input name="Submit" type="submit" class="btn" value="其它信息" />
			 </form>
			 </td>
  </tr>
</table>
<%end if%>
<%if request("action")=2 then%>
<form action="cw_create.asp?html=20&amp;action=2" method="post" name="form1" id="form1" >
<table width="99%" border="0">
   <tr>
      <td width="16%"><select name="fid" size="10" multiple="multiple" id="fid" style="width:200px">
		   <%
		   set cl=server.CreateObject("adodb.recordset")
		   clq="select * from cw_pages order by id asc"
		   cl.open clq,conn,1,1
		   if not cl.eof then
		   do while not cl.eof
		   %>
		     <option value="<%=cl("id")%>"><%=cl("title")%></option>
			 <%
			 cl.movenext
			 loop
			 end if
			 cl.close
			 set cl=nothing
			 %>
		     </select></td>
             <td width="84%"><input type="checkbox" name="checkbox" value="checkbox" onclick="checkalls(this,this.form.fid)" />全选<br /><br />
		   <input name="Submit" type="submit" class="btn" value="生成单页" /> </td>
                           </tr>
  </table> 	   
</form>
<%end if%>
<%if request("action")=1 then%>
<table width="99%" border="0">	  
	  <tr>
	    <td><input name="Submit" type="button" class="btn" onclick="location.href='Cw_create.asp?html=1&action=1'" value="生成首页" /></td>
	  </tr>	  
</table>
<%end if%>
<%if request("action")=3 then%>
<table width="99%" border="0">	  
	  <tr>
	    <td><input name="Submit" type="button" class="btn" onclick="location.href='Cw_create.asp?html=5&action=3'" value="静态网站地图" /></td>
	  </tr>	  
</table>
<%end if%>
<table width="99%" border="0">
        <tr>
          <td>
		  <div style="white-space:nowrap;overflow-y:auto;overflow-x:hidden; height:250px; background-color:#FFFFFF; padding-top:10px; padding-left:10px; line-height:20px; border:1px solid #DDDDDD" id="html">
		  <%
		  select case request("html")
		     case 1
			     call c_index()
			 case 5
			     call c_sitemap()
			 case 15 '其它列表
			     if request("lid")="" then
			        response.Write("<script>alert('请选择要生成的列表！');history.back();</script>")
				    response.End()
			     else
		            call c_olist(request("lid"))
		         end if
			 case 16 '其它信息
			     if request("tab")="" then
			        response.Write("<script>alert('请选择要生成的列表！');history.back();</script>")
				    response.End()
			     else
		            call c_oshow(request("tab"),0,0,request("action"),request("page"))
		         end if			 
			 case 20'单页
			     if request("fid")="" then
			        response.Write("<script>alert('请选择要静态的单页！');history.back();</script>")
				    response.End()
			     else
		            call c_pages(request("fid"),request("page"))
		         end if
			 case 87'所有内容
			     if request("sid")="" then
			        response.Write("<script>alert('请选择要静态的分类！');history.back();</script>")
				    response.End()
			     else
		            call c_show(request("sid"),1,request("page"),request("action"),request("tab"))
		         end if
			  case 89'生成所有列表			  
			     if request("lid")="" then
			        response.Write("<script>alert('请选择要生成的列表！');history.back();</script>")
				    response.End()
			     else
		            call c_list(request("lid"),request("page"),request("action"),request("tab"))
		         end if
		  end select
		  %>
		  </div></td>
  </tr>
</table>
<%
call closes()
%>
</body>
</html>
