<!--#include file="conn.asp"-->
<%if request.cookies("bjx")("shjianame")="" then
response.Redirect "shjia.asp"
response.End
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}
.style4 {color: #FFFFFF}
.style8 {
	color: #0000FF;
	font-size: 12pt;
	font-weight: bold;
}
.style9 {color: #000000}
.style13 {color: #0000FF}
.style14 {color: #FF00FF}
-->
</style>
</head>
<body>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
  <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("day1"))&"-"&trim(Request.Form("month1"))&""
day2=""&trim(Request.Form("year2"))&"-"&trim(Request.Form("day2"))&"-"&trim(Request.Form("month2"))&""
	%>佣金计划提成查询(</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 shop_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.cookies("bjx")("shjianame")&"' 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=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型￥360"
	case "2"
	response.Write "C型￥500"
	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" bgcolor="#D9E6FF">
	    <%
	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>
<br>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td colspan="4" align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">详细佣金提成</font></b></td>
  </tr>
  <tr>
    <td bgcolor="#E8F1FF"><table width="400" border="0" align="center" cellpadding="2" cellspacing="1">
        <form name="form1" method="post" action="yongjinmanage.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">
            </td>
          </tr>
        </form>
    </table></td>
  </tr>
</table>
<br>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td colspan="4" align="center" background="../images/admin_bg_1.gif"><b><STRONG><span class="style4">咕噜噜商家联盟付款计划</span></STRONG></b></td>
  </tr>
  <tr>
    <td bgcolor="#E8F1FF">    <p><span class="style8">每次推荐都可成为你赚钱的机会</span></p>
      <table width="650" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="258" valign="top"><p><STRONG><FONT color=#003163>1.难以置信的咕噜噜商家联盟直接计划<br>
            </FONT></STRONG><span class="style1">只要您加入我们商家联盟就可以取得佣金资格<br>
          <span class="style13">注册成为任何类型的商家就可以取得佣金资格</span></span></p>
            <table width="199" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
              <tr>
                <td width="46" bgcolor="#D9E6FF"><div align="center">商家</div></td>
                <td width="138" bgcolor="#D9E6FF"><div align="center">佣金</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">A型</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">0元</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">B型</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">50元</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">C型</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">150元</div></td>
              </tr>
            </table></td>
          <td width="1" valign="top" bgcolor="#CCCCCC"></td>
          <td width="30" valign="top"><p>&nbsp;</p>
          </td>
          <td valign="top"><p><STRONG><FONT color=#003163>2.周佣金奖励计划<br>
            </FONT></STRONG><span class="style1">周佣金奖励计划换算:1C型=4B型=100A型</span> <br>
            <span class="style13"> N表示您一周内推荐加盟的商家数,<span class="style14">N超过100请和我们联系洽谈</span></span></p>
            <table width="199" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
              <tr>
                <td width="66" bgcolor="#D9E6FF"><div align="center"><span class="style9">C型</span>商家数</div></td>
                <td width="118" bgcolor="#D9E6FF"><div align="center">奖励</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">5=&lt;N&lt;10</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">500元</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">10=&lt;N&lt;20</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">1200元</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">20=&lt;N&lt;50</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">2600元</div></td>
              </tr>
              <tr>
                <td bgcolor="#D9E6FF"><div align="center"><span class="style9">50=&lt;N&lt;100</span></div></td>
                <td bgcolor="#D9E6FF"><div align="center">6000元</div></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <p><STRONG><FONT color=#008000 size=4><FONT color=#003163 size=5>按周付出佣金,每周周六结算,周日公布佣金.佣金就当日汇出.</FONT></FONT></STRONG></p>
      <p><STRONG><span class="style1">特殊说明:</span></STRONG><span class="style1">银行卡付款，处理费为每次￥（20-50）元人民币，具体为佣金金额×1%。这笔费用将在佣金中自动扣除。</span><FONT color=#008000 size=4><FONT 
color=#008000><STRONG><BR>
      </STRONG></FONT></FONT><span class="style9">    </span></p>
    </td>
  </tr>
</table>
</body>
</html>