⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_logzip.asp

📁 个人博客
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="user_chkpass.asp"-->
<!--#include file="inc/usercode.asp"-->
<!--#include file="inc/function.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<title>日志导出打包</title>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor" >

<SCRIPT language=javascript>
function VerifySubmit()
{
	var date=document.form2.selecty.value+"-"+document.form2.selectm.value+"-"+document.form2.selectd.value
	var datereg=/^(\d{4})-(\d{1,2})-(\d{1,2})$/
	var datareg=/^(\d){1,2}$/
	if (!datereg.test(date)){
	  alert("开始日志时间输入格式错误");
	   return false;
	 }
	var r=date.match(datereg)
	var d=new Date(r[1],r[2]-1,r[3])
	if (!(d.getFullYear()==r[1]&&d.getMonth()==r[2]-1&&d.getDate()==r[3])){
	  alert("开始日志时间输入格式错误");
	   return false;
	 }
	 
	 var edate=document.form2.selectey.value+"-"+document.form2.selectem.value+"-"+document.form2.selected.value
	var datereg=/^(\d{4})-(\d{1,2})-(\d{1,2})$/
	var datareg=/^(\d){1,2}$/
	if (!datereg.test(edate)){
	  alert("结束日志时间输入格式错误");
	   return false;
	 }
	var er=edate.match(datereg)
	var ed=new Date(er[1],er[2]-1,er[3])
	if (!(ed.getFullYear()==er[1]&&ed.getMonth()==er[2]-1&&ed.getDate()==er[3])){
	  alert("结束日志时间输入格式错误");
	   return false;
	 }
	
	
	date = date.replace(/\-/g,"\/");
	edate = edate.replace(/\-/g,"\/");	
	if ((new Date(date) > new Date(edate))){
		alert("结束日期不能小于开始日期!");
	return false;
	}
	 
	return true;
}
</SCRIPT>
<%
if CheckUserLogined()=False then
	response.Redirect "user_login.asp"
end if
	%>

<form name="form2" method="post" action="user_logzip_file.asp" onSubmit="return VerifySubmit()">
<br>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
  <tr align="center" >
    <td height="25" class="title">导出我的日志到本地硬盘</td>
  </tr>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">

    <td height="25"><div align="center">日志开始日期:
          <select name="selecty" id="selecty">
            <%
	  dim y
	  y=2000
	  while y<=2008
	  	if year(blognow())=y then
		  	response.Write "<option value="&y&" selected>"&y&"</option>"
		else
		  	response.Write "<option value="&y&">"&y&"</option>"
		end if
		y=y+1
	  wend
		%>
          </select>
  <select name="selectm" id="selectm" >
      <%
	  dim m
	  m=1
	  while m<=12
	  	if month(blognow())=m then
		  	response.Write "<option value="&m&" selected>"&m&"</option>"
		else
		  	response.Write "<option value="&m&">"&m&"</option>"
		end if
		m=m+1
	  wend
		%>
  </select>
  <select name="selectd" id="selectd" >
      <%
	  dim d
	  d=1
	  
	  while d<=31
	  	if day(blognow())=d then
		  	response.Write "<option value="&d&" selected>"&d&"</option>"
		else
		  	response.Write "<option value="&d&">"&d&"</option>"
		end if
		d=d+1
	  wend
		%>
  </select>
  
    </div></td>
  </tr>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
    <td height="25"><p align="center">日志结束日期:
        <select name="selectey" id="selectey">
          <%
	  dim ey
	  ey=2000
	  while ey<=2008
	  	if year(blognow())=ey then
		  	response.Write "<option value="&ey&" selected>"&ey&"</option>"
		else
		  	response.Write "<option value="&ey&">"&ey&"</option>"
		end if
		ey=ey+1
	  wend
		%>
        </select>
<select name="selectem" id="selectem" >
  <%
	  dim em
	  em=1
	  while em<=12
	  	if month(blognow())=em then
		  	response.Write "<option value="&em&" selected>"&em&"</option>"
		else
		  	response.Write "<option value="&em&">"&em&"</option>"
		end if
		em=em+1
	  wend
		%>
</select>
<select name="selected" id="selected">
  <%
	  dim ed
	  ed=1
	  
	  while ed<=31
	  	if day(blognow())=ed then
		  	response.Write "<option value="&ed&" selected>"&ed&"</option>"
		else
		  	response.Write "<option value="&ed&">"&ed&"</option>"
		end if
		ed=ed+1
	  wend
		%>
</select>
日<br>
        </p></td>
  </tr>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
    <td height="25"><div align="center">导出为:
          <input name="filetype" type="radio" value="txt" checked>
          TXT文本
             
           <input type="radio" name="filetype" value="htm">
          HTM网页
           
          <input type="radio" name="filetype" value="xml">
          XML
    </div></td>
    </tr>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
    <td height="25"><div align="center">
        <input name="Submit" type="submit" id="Submit" value="导出数据">
        <input name="username"  type="hidden" id="username" value=<%=username%> >
</div></td>
    </tr>
</table>
</form>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -