gusucode.com > 爱美尔女性商城源码 1.0源码程序 > admintouch/shjyongjia.asp

    <!--#include file="conn.asp"-->
<%if session("bjxadmin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style3 {color: #66FF00}
-->
</style>
</head>
<body>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6a7f9a">
  <tr>
    <td colspan="5" align="center" background="images/admin_bg_1.gif"><b><font color="#ffffff">
	<%
	if request("act")="ok" then
day1=""&trim(Request.Form("year1"))&"-"&trim(Request.Form("month1"))&"-"&trim(Request.Form("day1"))&""
day2=""&trim(Request.Form("year2"))&"-"&trim(Request.Form("month2"))&"-"&trim(Request.Form("day2"))&""
	%>佣金计划提成查询(</font></b> 时间查询范围:<span class="style3"><%=day1%>至<%=day2%><b></b></span><font color="#ffffff"><b>)
<%
else
set rsc=server.CreateObject("adodb.recordset")
rsc.Open "select year1,year2,month1,month2,day1,day2 from BJX_config ",conn,1,1
year1=rsc("year1")
year2=rsc("year2")
month1=rsc("month1")
month2=rsc("month2")
day1=rsc("day1")
day2=rsc("day2")
rsc.close
set rsc=nothing
%>
    佣金计划提成(本周:<% Response.Write (""&year1&"-"&month1&"-"&day1&"至"&year2&"-"&month2&"-"&day2&"") %>)
    <%
	end if%>
	</b></font></td>
  </tr>
  <tr bgcolor="#D9E6FF" align="center">
    <td width="18%" height="30">商家名称 </td>
    <td width="11%">网站类型</td>
    <td width="13%">是否通过审核</td>
    <td width="23%">加盟时间</td>
    <td width="35%">佣金提成</td>
  </tr>
  <%
set rs=server.CreateObject("adodb.recordset")
if request("act")="ok" then
day1="#"&trim(Request.Form("month1"))&"-"&trim(Request.Form("day1"))&"-"&trim(Request.Form("year1"))&"#"
day2="#"&trim(Request.Form("month2"))&"-"&trim(Request.Form("day2"))&"-"&trim(Request.Form("year2"))&"#"
else
day1="#"&month1&"-"&day1&"-"&year1&"#"
day2="#"&month2&"-"&day2&"-"&year2&"#"
end if
flag="select * from shjia where (flag=1 or flag=2 and tj=1 or tj=2 or tj=3 or tj=4 or tj=5) and jieshaoren='"&request("username")&"' and  (datediff('d',adddate,"&day2&")>=0)  and (datediff('d',"&day1&",adddate)>=0) order by adddate desc"
rs.open flag,conn,1,3
'set rs=server.CreateObject("adodb.recordset")
'rs.Open "select * from shjia where flag=1 or flag=2 and tj=1 or tj=2 or tj=3 or tj=4 or tj=5",conn,1,1
if rs.recordcount=0 then 
%>
  <table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
    <tr>
      <td align=center><font color="#FF0000">暂无商家</font></td>
    </tr>
  </table>
  <%
	else
	rs.PageSize =20 '每页记录条数
	iCount=rs.RecordCount '记录总数
	iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	%>
  <% 
  zongyongjin=0
  do while not rs.EOF%>
    <tr bgcolor="#D9E6FF" height="30">
      <td style="PADDING-LEFT: 10px"><div align="center"><a href=../user/index.asp?id=<%=rs("shjiaid")%>><%=trim(rs("name"))%></a></div></td>
      <td align="center">
          <%select case rs("lx")
	case "0"
	response.Write "A型免费"
	case "1"
	response.Write "B型¥100"
	case "2"
	response.Write "C型¥365"
	end select%>
      </td>
      <td align="center">
          <%select case rs("flag")
	case "1"
	response.Write "未通过"
	case "2"
	response.Write "开 通"
	end select%>
      </td>
      <td align="center"><%=rs("adddate")%></td>
      <td align="center">
	  <%
	if rs("flag")=2 then 
	
	select case rs("lx")
	case "0"
	yongjin=0
	case "1"
	yongjin=50
	case "2"
	yongjin=150	
	end select%>
    <%=yongjin%>元
	<%else
	yongjin=0
	response.Write "商家未开通"
	end if
	%>
	  </td>
    </tr>
  <%
zongyongjin=zongyongjin+yongjin
rs.movenext
loop
rs.close
set rs=nothing%>
    <tr bgcolor="#D9E6FF" height="30">
      <td colspan="5" style="PADDING-LEFT: 10px"><div align="center" class="style1">总 佣 金 :<%=zongyongjin%> 元</div></td>
    </tr>
  <%
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次:" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "家商家信息" &  vbCrLf)
    Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
</table>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6a7f9a">
  <tr>
    <td colspan="4" align="center" background="images/admin_bg_1.gif"><b><font color="#ffffff">详细佣金提成</font></b></td>
  </tr>
  <tr>
    <td ><table width="400" border="0" align="center" cellpadding="2" cellspacing="1">
        <form name="form1" method="post" action="shjyongjia.asp">
          <tr>
            <td>开始日期:</td>
            <td><select name="year1">
                <%for i=2003 to 2100%>
                <option value="<%=i%>"  <%if year(now())=i then%>selected<%end if%>><%=i%></option>
                <%next%>
              </select>
              年
              <select name="month1">
                <%for i=1 to 12%>
                <option value="<%=i%>"  <%if year(date())=i then %>selected<% end if %>><%=i%></option>
                <%next%>
              </select>
              月
              <select name="day1">
                <%for i=1 to 31%>
                <option value="<%=i%>"  ><%=i%></option>
                <%next%>
              </select>
              日 </td>
          </tr>
          <tr>
            <td width="70">结束日期:</td>
            <td width="278"><select name="year2">
                <%for i=2004 to 2100%>
                <option value="<%=i%>" ><%=i%> </option>
                <%next%>
              </select>
              年
              <select name="month2">
                <%for i=1 to 12%>
                <option value=<%=i%>  ><%=i%> </option>
                <%next%>
              </select>
              月
              <select name="day2">
                <%for i=1 to 31%>
                <option value=<%=i%>  <%if year(date())=i then%>selected<%end if%>><%=i%> </option>
                <%next%>
              </select>
              日 </td>
          </tr>
          <tr>
            <td colspan="2" align="center"><input type="submit" name="Submit" value="统 计">
              <input name="act" type="hidden" id="act" value="ok">
              <input name="username" type="hidden" id="username" value="<%=request("username")%>">
</td>
          </tr>
        </form>
    </table></td>
  </tr>
</table>
</body>
</html>