📄 admin_news_to_html.asp
字号:
<!--#include file = admin_chk.asp -->
<%
If Not ChkAdmin("CreateHtml") Then
Call ArtErr("","")
End If
%>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel="stylesheet" type="text/css" href="../images/admin/style.css">
</head>
<script Language="JavaScript" Type="text/javascript">
<!--
//显示显示选择日期图层
function show_date_cho(i)
{
var xx=document.form1.create_time.options[document.form1.create_time.selectedIndex].value;
if(xx=="cho_time")
{
i.style.display = "";
}
else
{
i.style.display = "none";
}
}
//结束,显示选择日期图层
//提交验证函数
function Form_Validator(theForm)
{
if (theForm.select_lm.selectedIndex == 0)
{
alert("请选择新闻栏目!");
theForm.select_lm.focus();
return (false);
}
if (theForm.create_time.selectedIndex == 0)
{
alert("请选择时间段!");
theForm.create_time.focus();
return (false);
}
return (true);
}
//-->
</script>
<%
if_html=config("file_html")
if if_html<>1 then
call ArtErr("<li>要批量处理静态网页,请先在后台中设置:[基本设置]-->[生成静态网页]!</li>","1")
end if
DIM ChannelStr:ChannelStr=50
Dim select_lm:select_lm=trim(request("select_lm"))
Dim done_action:done_action=trim(request("done_action"))
Dim db_news_del:db_news_del=request("db_news_del")
Dim create_time:create_time=trim(request("create_time"))
Dim action: action=trim(request("action"))
'增一个功能,对时间段进行查询--2006-9-11
select_year_1=request("select_year_1")
select_month_1=request("select_month_1")
select_day_1=request("select_day_1")
select_year_2=request("select_year_2")
select_month_2=request("select_month_2")
select_day_2=request("select_day_2")
if select_year_1="" then select_year_1=year(date()-60)
if select_month_1="" then select_month_1=month(date()-60)
if select_day_1="" then select_day_1=day(date()-60)
if select_year_2="" then select_year_2=year(date())
if select_month_2="" then select_month_2=month(date())
if select_day_2="" then select_day_2=day(date()) '只取本月份的公文
d1=select_year_1&"-"&select_month_1&"-"&select_day_1
d2=select_year_2&"-"&select_month_2&"-"&select_day_2
if not isdate(d1) or not isdate(d2) then
response.redirect "javascript:history.back()"
end if
yymmdd_1=CDate(select_year_1&"-"&select_month_1&"-"&select_day_1)
yymmdd_2=CDate(select_year_2&"-"&select_month_2&"-"&select_day_2)
if yymmdd_1>yymmdd_2 then '调整顺序,保持日期1比日期2早.
d_temp=yymmdd_2
yymmdd_2=yymmdd_1
yymmdd_1=d_temp
end if
yymmdd_1=yymmdd_1
yymmdd_2=yymmdd_2+1
'输出时间结束。
%>
<body onLoad="show_date_cho(show_date)">
<table cellpadding=2 cellspacing=1 border=0 width=98% class=tableBorder align=center>
<tr align=center>
<th height=25 align=center colspan="2"><strong>生成静态页面管理</strong></th>
</tr>
<tr>
<td width=12% height=30 class=forumRow> <strong>管理导航:</strong></td>
<td width=88% height=30 class=forumRow><a href="CreatHmlIndex.asp">生成或更新静态的网站首页</a> | <a href="admin_news_to_html.asp">生成静态的内容页</a> </td>
</tr>
</TABLE>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td colspan="2" align="center" class="bg_tr"><strong>生成静态页面方式</strong></td>
</tr>
<form name="IDForm" method="POST" action="?action=New" >
<tr class="tdbg">
<td width="20%" align="right"><strong> 发布最新添加的:</strong></td>
<td width=""78%"" height=""35""> <input name="TotalNum" onBlur="CheckNumber(this,'<%=ChannelStr %>');" type="text" id="TotalNum" style="width:20%" value="50">篇文章 <input name="Submit2" type="submit" id="Submit2" class="button" value=" 发 布 >>" border="0"></td>
</tr>
</form>
<form name="IDForm" method="POST" action="?action=InfoID" >
<tr class="tdbg">
<td width="20%" align="right"><strong> 按文章ID发布:</strong></td>
<td width=""78%"" height=""35"">从 <input name="StartID" type="text" value="1" id="StartID"> 到" <input name="EndID" type="text" value="100" id="EndID"> <input name="Submit2" type="submit" id="Submit2" class="button" value=" 发 布 >>" border="0"></td>
</tr>
</form>
<form name="form1" method="POST" action="?action=Lmordate" onSubmit="return Form_Validator(this)">
<tr class="tdbg">
<td rowspan="3" width="20%" align="right" ><strong> 按栏目、时间批量发布:</strong></td>
<td height="40" > 文章栏目:
<select size="1" id="id1" name="select_lm" >
<option value="">请选择新闻栏目</option>
<option value="lm=0" <%if select_lm="lm=0" then response.write " selected"%>>全部新闻栏目</option>
<%
html_lm_sql = "select * from lm where lm<>'' order by id_desc,id asc"
Set html_lm_rs = Server.CreateObject("ADODB.RecordSet")
html_lm_rs.Open html_lm_sql,conn,1,1
while not html_lm_rs.eof
%>
<option value="lm=<%=html_lm_rs("id")%>" <% if select_lm="lm="&html_lm_rs("id") then response.write " selected" %>>1级: <%=html_lm_rs("lm")%></option>
<%
html_lm_sql2 = "select * from lm where lmid='"&html_lm_rs("id")&"' order by id_desc,id asc"
Set html_lm_rs2 = Server.CreateObject("ADODB.RecordSet")
html_lm_rs2.Open html_lm_sql2,conn,1,1
while not html_lm_rs2.eof
%>
<option value="lm2=<%=html_lm_rs2("id")%>" <% if select_lm="lm2="&html_lm_rs2("id") then response.write " selected" %>> 2级: <%=html_lm_rs2("lm2")%></option>
<%
Set html_lm_rs33 = Server.CreateObject("ADODB.RecordSet")
html_lm_rs33.Open "select * from [lm] where lmid='"&html_lm_rs2("id")&"' and lm3<>'' order by id_desc,id asc",conn,1,1
while not html_lm_rs33.eof
%>
<option value="lm3=<%=html_lm_rs33("id")%>" <% if select_lm="lm3="&html_lm_rs33("id") then response.write " selected" %>> 3级: <%=html_lm_rs33("lm3")%></option>
<%
html_lm_rs33.movenext
wend
html_lm_rs33.close
set html_lm_rs33=nothing
html_lm_rs2.movenext
wend
html_lm_rs2.close
set html_lm_rs2=nothing
html_lm_rs.movenext
wend
html_lm_rs.close
set html_lm_rs=nothing
%>
</select>
<!-- 时间段 ,豪--特别声明一下:ACCESEE数据库的时间要用#时间串#来表示,但在SQL数据库中只需用'时间串'。区别就在#与单引号。真是,调了几个小时。TMM的。 -->
<%now_day=cdate(date())%>
文章的时间段:
<select size="1" id="create_time" name="create_time" onChange="show_date_cho(show_date)" >
<option value="">请选择时间段</option>
<option value="[time]<=#<%=now_day+1%>#" <%if create_time="[time]<=#"&now_day+1&"#" then response.write " selected"%>>全部的时间段</option>
<option value="cho_time" <%if create_time="cho_time" then response.write " selected" %>>自定义时间段</option>
<!-- 之内的时间 -->
<option value="[time]>=#<%=now_day-7%>#" <%if create_time="[time]>=#"&now_day-7&"#" then response.write " selected" %>>一星期内的新闻</option>
<option value="[time]>=#<%=now_day-15%>#" <%if create_time="[time]>=#"&now_day-15&"#" then response.write " selected" %>>半个月内的新闻</option>
<option value="[time]>=#<%=now_day-30%>#" <%if create_time="[time]>=#"&now_day-30&"#" then response.write " selected" %>>一个月内的新闻</option>
<option value="[time]>=#<%=now_day-60%>#" <%if create_time="[time]>=#"&now_day-60&"#" then response.write " selected" %>>二个月内的新闻</option>
<option value="[time]>=#<%=now_day-182%>#" <%if create_time="[time]>=#"&now_day-182&"#" then response.write " selected" %>>半年内的新闻</option>
<option value="[time]>=#<%=now_day-365%>#" <%if create_time="[time]>=#"&now_day-365&"#" then response.write " selected" %>>1年内的新闻</option>
<option value="[time]>=#<%=now_day-730%>#" <%if create_time="[time]>=#"&now_day-730&"#" then response.write " selected" %>>2年内的新闻</option>
<option value="[time]>=#<%=now_day-1095%>#" <%if create_time="[time]>=#"&now_day-1095&"#" then response.write " selected" %>>3年内的新闻</option>
<!-- 以后的新闻 -->
<option value="[time]<#<%=now_day-7%>#" <%if create_time="[time]<#"&now_day-7&"#" then response.write " selected" %>>一星期以前的新闻</option>
<option value="[time]<#<%=now_day-15%>#" <%if create_time="[time]<#"&now_day-15&"#" then response.write " selected" %>>半个月以前的新闻</option>
<option value="[time]<#<%=now_day-30%>#" <%if create_time="[time]<#"&now_day-30&"#" then response.write " selected" %>>一个月以前的新闻</option>
<option value="[time]<#<%=now_day-60%>#" <%if create_time="[time]<#"&now_day-60&"#" then response.write " selected" %>>二个月以前的新闻</option>
<option value="[time]<#<%=now_day-182%>#" <%if create_time="[time]<#"&now_day-182&"#" then response.write " selected" %>>半年以前的新闻</option>
<option value="[time]<#<%=now_day-365%>#" <%if create_time="[time]<#"&now_day-365&"#" then response.write " selected" %>>1年以前的新闻</option>
<option value="[time]<#<%=now_day-730%>#" <%if create_time="[time]<#"&now_day-730&"#" then response.write " selected" %>>2年以前的新闻</option>
<option value="[time]<#<%=now_day-1095%>#" <%if create_time="[time]<#"&now_day-1095&"#" then response.write " selected" %>>3年以前的新闻</option>
</select>
</td></tr>
<tr class="tdbg"><td>
<!-- 自选时间段 -->
<!-- 增加--查找从某年某月某日到某年某月某日的选择 2006-9-11-->
<div id="show_date" style="DISPLAY:none" >
自定义时间段:从
<select name="select_year_1" >
<%
begin_year=2000
end_year=year(date())
for year_hao=begin_year to end_year
response.write "<option value="&year_hao
if year_hao=cint(select_year_1) then response.write " selected"
response.write ">"&year_hao&"</option>"
next
%>
</select>
年
<select name="select_month_1" >
<%
for month_hao=1 to 12
response.write "<option value="&month_hao
if month_hao=cint(select_month_1) then response.write " selected"
response.write ">"&month_hao&"</option>"
next
%>
</select>
月
<select name="select_day_1" >
<%
for day_hao=1 to 31
response.write "<option value="&day_hao
if day_hao=cint(select_day_1) then response.write " selected"
response.write ">"&day_hao&"</option>"
next
%>
</select>
日
到
<select name="select_year_2" >
<%
begin_year=2000
end_year=year(date())
for year_hao=begin_year to end_year
response.write "<option value="&year_hao
if year_hao=cint(select_year_2) then response.write " selected"
response.write ">"&year_hao&"</option>"
next
%>
</select>
年
<select name="select_month_2" >
<%
for month_hao=1 to 12
response.write "<option value="&month_hao
if month_hao=cint(select_month_2) then response.write " selected"
response.write ">"&month_hao&"</option>"
next
%>
</select>
月
<select name="select_day_2" >
<%
for day_hao=1 to 31
response.write "<option value="&day_hao
if day_hao=cint(select_day_2) then response.write " selected"
response.write ">"&day_hao&"</option>"
next
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -