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

📄 default.asp

📁 亿众购物系统 一套设计完善、高效的web商城解决方案
💻 ASP
字号:
<!--#include file="../Session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--//
	function checksignup() {
		if ( document.form2.BigId.value == '' ) {
			window.alert('请选择产品分类!!');
			document.form2.BigId.focus();
		}
		else if ( document.form2.SmallId.value == '' ) {
			window.alert('您是通过后退按扭回到本网页,请先涮新本网页,或重新选择产品类别!');
			document.form2.SmallId.focus();
		}
else {
			return true;
			}
		return false;
	}
//-->
</script>
</head>
<body>
<table width="100%" align="center" cellpadding="1" cellspacing="0">
  <form action="../Sorry.asp" method="get" name="form1" id="form1">
    <tr align="center" valign="middle"> 
      <td height="50" colspan="2" class="tdstyle"><font color="#000000" size="3"><strong>全部销售报表</strong></font></td>
    </tr>
    <tr valign="middle"> 
      <td width="30%" align="center" class="tdstyle">报表类型:</td>
      <td width="70%" class="tdstyle"> 
        <INPUT type=radio CHECKED value=1 name="genre" onFocus=this.blur()>
        日报 
        <INPUT type=radio value=10 name="genre" onFocus=this.blur()>
        旬报 
        <INPUT type=radio value=30 name="genre" onFocus=this.blur()>
        月报 
        <INPUT type=radio value=365 name="genre" onFocus=this.blur()>
        年报 
        <INPUT type=radio value=36500 name="genre" onFocus=this.blur()>
        全部</td>
    </tr>
    <tr valign="middle"> 
      <td align="center" class="tdstyle">排序方式:</td>
      <td class="tdstyle"> <INPUT type=radio CHECKED value=desc name="mode1" onFocus=this.blur()>
        降序 
        <INPUT type=radio value=asc name="mode1" onFocus=this.blur()>
        升序</td>
    </tr>
    <tr valign="middle"> 
      <td height="30" colspan="2" align="center" class="tdstyle"> 
        <input name="Submit2" type="submit" class="button" value="生成报表" onFocus="this.blur()"></td>
    </tr>
  </form>
</table>
<p> 
</p>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
  <form action="../Sorry.asp" method="get" name="form2" id="form2">
    <tr align="center" valign="middle"> 
      <td height="50" colspan="2" class="tdstyle"><font color="#000000" size="3"><strong>分类销售报表</strong></font></td>
    </tr>
    <tr valign="middle" class="tdstyle"> 
      <td width="30%" align="center" class="tdstyle">报表范围:</td>
      <td width="70%" class="tdstyle">
	   <%
		dim count
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from SmallClass order by SmallId asc"
		rs.open sql,conn,0,1
		%> <script language = "JavaScript">
		var onecount;
		onecount=0;
		subcat = new Array();
				<%
				count = 0
				do while not rs.eof 
				%>
		subcat[<%=count%>] = new Array("<%= trim(rs("SCName"))%>","<%= trim(rs("BigId"))%>","<%= trim(rs("SmallId"))%>");
				<%
				count = count + 1
				rs.movenext
				loop
				rs.close
				%>
		onecount=<%=count%>;
		
		function changelocation(locationid)
			{
			document.form2.SmallId.length = 0; 
		
			var locationid=locationid;
			var i;
			for (i=0;i < onecount; i++)
				{
					if (subcat[i][1] == locationid)
					{ 
						document.form2.SmallId.options[document.form2.SmallId.length] = new Option(subcat[i][0], subcat[i][2]);
					}        
				}
				
			}    
		</script>
		<%
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from BigClass"
		rs.open sql,conn,0,1
		if rs.eof and rs.bof then
			response.write "请先添加类别。"
			response.end
		else%>
		<select name="BigId" size="1" class="input1" onChange="changelocation(document.form2.BigId.options[document.form2.BigId.selectedIndex].value)">
          <option value="" selected>请选择大类别</option>
          <%do while not rs.eof%>
          <option value="<%=trim(rs("BigId"))%>"><%=trim(rs("BCName"))%></option>
          <%	rs.movenext
		  	loop
		  end if
		  rs.close
		  set rs = nothing
		  conn.Close
		  set conn = nothing
		  %>
        </select> 
		<select name="SmallId" class="input1">
          <option selected value="">请先选择大类别</option>
        </select> 
		</td>
    </tr>
    <tr valign="middle"> 
      <td align="center" class="tdstyle">报表类型:</td>
      <td class="tdstyle"> <INPUT type=radio CHECKED value=1 name="genre" onFocus=this.blur()>
        日报 
        <INPUT type=radio value=10 name="genre" onFocus=this.blur()>
        旬报 
        <INPUT type=radio value=30 name="genre" onFocus=this.blur()>
        月报 
        <INPUT type=radio value=365 name="genre" onFocus=this.blur()>
        年报 
        <INPUT type=radio value=36500 name="genre" onFocus=this.blur()>
        全部</td>
    </tr>
    <tr valign="middle"> 
      <td align="center" class="tdstyle">排序方式:</td>
      <td class="tdstyle"> <INPUT type=radio CHECKED value=desc name="mode1" onFocus=this.blur()>
        降序 
        <INPUT type=radio value=asc name="mode1" onFocus=this.blur()>
        升序</td>
    </tr>
    <tr valign="middle"> 
      <td height="30" colspan="2" align="center" class="tdstyle"> 
        <input name="Submit" type="submit" class="button" value="生成报表" onFocus="this.blur()" onClick="javascript:return checksignup()"></td>
    </tr>
  </form>
</table>
<p>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
//set todays date
Now = new Date();
NowDay = Now.getDate();
NowMonth = Now.getMonth();
NowYear = Now.getYear();
if (NowYear < 2000) NowYear += 1900; //for Netscape

//function for returning how many days there are in a month including leap years
function DaysInMonth(WhichMonth, WhichYear)
{
  var DaysInMonth = 31;
  if (WhichMonth == "4" || WhichMonth == "6" || WhichMonth == "9" || WhichMonth == "11") DaysInMonth = 30;
  if (WhichMonth == "2" && (WhichYear/4) != Math.floor(WhichYear/4))	DaysInMonth = 28;
  if (WhichMonth == "2" && (WhichYear/4) == Math.floor(WhichYear/4))	DaysInMonth = 29;
  return DaysInMonth;
}

//function to change the available days in a months
function ChangeOptionDays(Which)
{
  DaysObject = eval("document.form3." + Which + "Day");
  MonthObject = eval("document.form3." + Which + "Month");
  YearObject = eval("document.form3." + Which + "Year");

  Month = MonthObject[MonthObject.selectedIndex].text;
  Year = YearObject[YearObject.selectedIndex].text;

  DaysForThisSelection = DaysInMonth(Month, Year);
  CurrentDaysInSelection = DaysObject.length;
  if (CurrentDaysInSelection > DaysForThisSelection)
  {
    for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
    {
      DaysObject.options[DaysObject.options.length - 1] = null
    }
  }
  if (DaysForThisSelection > CurrentDaysInSelection)
  {
    for (i=0; i<(DaysForThisSelection-CurrentDaysInSelection); i++)
    {
      NewOption = new Option(DaysObject.options.length + 1);
      DaysObject.add(NewOption);
    }
  }
    if (DaysObject.selectedIndex < 0) DaysObject.selectedIndex == 0;
}

//function to set options to today
function SetToToday(Which)
{
  DaysObject = eval("document.form3." + Which + "Day");
  MonthObject = eval("document.form3." + Which + "Month");
  YearObject = eval("document.form3." + Which + "Year");

  YearObject[0].selected = true;
  MonthObject[NowMonth].selected = true;

  ChangeOptionDays(Which);

  DaysObject[NowDay-1].selected = true;
}

//function to write option years plus x
function WriteYearOptions(YearsAhead)
{
  line = "";
  for (i=0; i<YearsAhead; i++)
  {
    line += "<OPTION>";
    line += NowYear + i;
  }
  return line;
}
//  End -->
</script>
<form name="form3" method="post" action="../Sorry.asp">
  <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
    <tr valign="middle">
      <td height="50" colspan="2" align="center" class="tdstyle"><font color="#000000" size="3"><strong>详细销售报表</strong></font></td>
    </tr>
    <tr valign="middle"> 
      <td height="30" colspan="2" align="center" class="tdstyle"> 自 
        <select name="FirstSelectYear" class="input1" onChange="ChangeOptionDays('FirstSelect')">
          <script language="JavaScript">document.write(WriteYearOptions(50));</script>
        </select>
        <select name="FirstSelectMonth" class="input1" onChange="ChangeOptionDays('FirstSelect')">
          <option>1 
          <option>2 
          <option>3 
          <option>4 
          <option>5 
          <option>6 
          <option>7 
          <option>8 
          <option>9 
          <option>10 
          <option>11 
          <option>12 
        </select>
        <select name="FirstSelectDay" class="input1">
          <option>1 
          <option>2 
          <option>3 
          <option>4 
          <option>5 
          <option>6 
          <option>7 
          <option>8 
          <option>9 
          <option>10 
          <option>11 
          <option>12 
          <option>13 
          <option>14 
          <option>15 
          <option>16 
          <option>17 
          <option>18 
          <option>19 
          <option>20 
          <option>21 
          <option>22 
          <option>23 
          <option>24 
          <option>25 
          <option>26 
          <option>27 
          <option>28 
          <option>29 
          <option>30 
          <option>31 
        </select>
        日至
        <select name="FirstSelecteYear" class="input1" onChange="ChangeOptionDays('FirstSelecte')">
          <script language="JavaScript">document.write(WriteYearOptions(50));</script>
        </select>
        <select name="FirstSelecteMonth" class="input1" onChange="ChangeOptionDays('FirstSelecte')">
          <option>1 
          <option>2 
          <option>3 
          <option>4 
          <option>5 
          <option>6 
          <option>7 
          <option>8 
          <option>9 
          <option>10 
          <option>11 
          <option>12 
        </select>
        <select name="FirstSelecteDay" class="input1">
          <option>1 
          <option>2 
          <option>3 
          <option>4 
          <option>5 
          <option>6 
          <option>7 
          <option>8 
          <option>9 
          <option>10 
          <option>11 
          <option>12 
          <option>13 
          <option>14 
          <option>15 
          <option>16 
          <option>17 
          <option>18 
          <option>19 
          <option>20 
          <option>21 
          <option>22 
          <option>23 
          <option>24 
          <option>25 
          <option>26 
          <option>27 
          <option>28 
          <option>29 
          <option>30 
          <option>31 
        </select>日 
        <input name="Submit" type="submit" class="button" value="查 询">
      </td>
    </tr>
  </table>
</form>
</p>
</body>
</html>

⌨️ 快捷键说明

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