📄 union.asp
字号:
<!--#include file="const.Asp"-->
<%CheckAdmin1%>
<%PageName="Class"%>
<!--#include file="makeconfigini.asp"-->
<%
chatype=request.form("chatype")
lianmeng=request.form("lianmeng")
timer1=request.form("timer1")
timer2=request.form("timer2")
dim i
i=0
MaxList=20
set rs2=server.createobject("adodb.recordset")
set rs3=server.createobject("adodb.recordset")
if trim(request.form("subok"))="ok" and trim(request.form("timer1"))<>"" and trim(request.form("timer2"))<>"" then
if chatype=0 then
if IsSqlDataBase = 0 then
sql="select count(id) as countid,lianmeng from [install] where DateDiff('d', time1, '" & timer1 & "') <=0 and DateDiff('d', time1, '" & timer2 & "') >=0 group by lianmeng"
else
sql="select count(id) as countid,[lianmeng] from [install] where DateDiff(d, time1, '" & timer1 & "') <=0 and DateDiff(d, time1, '" & timer2 & "') >=0 group by [lianmeng]"
end if
elseif lianmeng<>"" then
if IsSqlDataBase = 0 then
sql="select count(id) as countid,lianmeng from [install] where lianmeng='" & lianmeng & "' and DateDiff('d', time1, '" & timer1 & "') <=0 and DateDiff('d', time1, '" & timer2 & "') >=0 group by lianmeng"
else
sql="select count(id) as countid,[lianmeng] from [install] where lianmeng='" & lianmeng & "' and DateDiff(d, time1, '" & timer1 & "') <=0 and DateDiff(d, time1, '" & timer2 & "') >=0 group by [lianmeng]"
end if
end if
else
sql="select top 1 * from [install] where ip='未知' order by time1 desc"
end if
rs2.open sql,conn,1,1
%>
<link href="Images/Admin_Style.Css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="calendar.js"></script>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<form method="POST" action="">
<tr class="title">
<td height="22" align="center"><strong>联盟安装量查询</strong></td>
</tr>
<tr class="tdbg">
<td width="99%" height="30">查询方式<input type="radio" value="0" name="chatype" <%if chatype=0 then%>checked<%end if%>>全部
<input type="radio" value="1" name="chatype" <%if chatype=1 then%>checked<%end if%>>指定用户名 用户名:<input type="text" name="lianmeng" size="8" value="<%=lianmeng%>">
开始时间:<input type="text" name="timer1" size="14" onFocus="calendar()" value="<%=timer1%>"> 结束时间:<input type="text" name="timer2" size="15" onFocus="calendar()" value="<%=timer2%>"><input type=hidden name="subok" value="ok" >
<input type="submit" value="查询" name="B1"></td>
</tr></form>
</table>
<br><br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="title">
<td height="22" colspan="8" align="center"><strong>查 询 结 果</strong></td>
</tr>
<tr class="tdbg">
<td width="12%" height="30"><p align="center">用户名</td>
<td width="12%"><p align="center">查询日期</td>
<td width="12%"><p align="center">唯一安装量</td>
<td width="12%"><p align="center">显示安装量</td>
<td width="12%"><p align="center">单价</td>
<td width="12%" ><p align="center">金额</td>
<td width="12%"><p align="center">日期</td>
<td width="12%"><p align="center">导入</td>
</tr>
<%
if iseof=false then
do while not rs2.eof
i=i+1
sql="select top 1 * from [userbiao] where username='"&rs2("lianmeng")&"'"
rs3.open sql,conn,1,1
if rs3.eof then
kou=0
jiage=0
else
kou=rs3("kou")
jiage=rs3("jiage")
end if
rs3.close
%>
<form action="modshujuok.asp" method="post" name="zh" onSubmit="return checkform()">
<input type="hidden" name="baohao" value="<%=rs2("lianmeng")%>">
<input type="hidden" name="shuju" value="<%if rs2("countid")=1 then%>1<%else%><%=int(rs2("countid")*(100-kou)/100)%><%end if%>">
<tr class="tdbg">
<td width="12%" height="30"><p align="center"><%=rs2("lianmeng")%></td>
<td width="12%"><p align="center"><%=timer1%> 至 <%=timer2%></td>
<td width="12%"><p align="center"><%=rs2("countid")%></td>
<td width="12%"><p align="center"><%if rs2("countid")=1 then%>1<%else%><%=int(rs2("countid")*(100-kou)/100)%><%end if%></td>
<td width="12%"><p align="center"><input type="text" name="djj" value="<%=jiage%>" size="4"></td>
<td width="12%" ><p align="center"><input type="text" name="jine" value="<%if rs2("countid")=1 then%><%=jiage%><%else%><%=(int(rs2("countid")*(100-kou)/100))*jiage%><%end if%>" size="6"></td>
<td width="12%"><p align="center"><input type="text" name="riqi" size="10" value="<%=DateAdd("y", -1, date())%>"></td>
<td width="12%"><p align="center"><input type="submit" value=" 导 入 " name="zh"></td>
</tr>
</form>
<%
if (i mod (MaxList/2)=0) and i>=(MaxList/2) then
%>
<%
end if
'if i>=MaxList then exit do
rs2.movenext
loop
rs2.close
end if
if request.form("isok")="保 存" then
Response.Write "恭喜,保存成功"
end if
if err.number<>0 then
response.write "出错了,错误描述:"&err.description & "<br>错误来源"& err.source
response.End()
end if
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -