<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canadmkefu")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if
if not ef then%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif" onClick="ShowDtable(1,6)"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="119"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="90" align="center" valign="middle" background="img/r3.jpg" style="FONT-WEIGHT: bolder; Cursor:hand"  id="tableTop1"><a href="admkefu.asp"><font color="#FFFFFF">业务员管理</font></a><br></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="97"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="100" align="center" valign="middle" background="img/r3.jpg"   id="tableTop2" style="Cursor:hand"><a href="admuserlistuser.asp?kefuto=do"><font color="#FFFFFF">更换客服审批</font></a>
           </td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="17">&nbsp;</TD>
      <TD width="155" align="left">&nbsp;</TD>
      <TD width="27" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif"  id=rightid>&nbsp;</TD>
      <TD height="462" align="center" vAlign=top background="contopa.gif" bgcolor="#FFFFFF">


<%Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	


	Set dskefu = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_KeFu order by id"
if request("kefu")<>"" then 	Sql="Select * from FreeHost.FreeHost_KeFu  where kefumd5='"&md5(trim(request("kefu")))&"'"
'if request("kefu")<>"" then 	Sql="Select * from FreeHost.FreeHost_KeFu  where kefu='"&trim(request("kefu"))&"'"
	dskefu.PageSize = 25
	dskefu.Open Sql,conn,1,1
if dskefu.Eof then
%>
<br>
没有这类内容。
<%
else
if Request.ServerVariables("QUERY_STRING")<>"" then
ask=Split(Request.ServerVariables("QUERY_STRING"), chr(38)&"pn")
else
ask=Split("freehost=1", "")
ask(0)="freehost=lsoft"
end if
	pn=1
if Request.QueryString ("pn")<>"" then pn=Request.QueryString ("pn")
If dskefu.RecordCount <> 0 Then dskefu.AbsolutePage = CLng(pn)  
    if clng(pn)<=10 then
    begini=1
      if dskefu.PageCount<=10 then
       endini=dskefu.PageCount 
       else
       endini=10
      end if
    end if
%><br>
<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="?<%=ask(0)%>&pn=1"><font color="#000000">最新[1]--[10]</font></a>　　现在是第<font color=red>[<%=pn%>]</font>页 
        　共<%=dskefu.PageCount%>页　<%end if%><%If Clng(pn)>1 Then%><a href="?<%=ask(0)%>&pn=<%=pn-1%>">上一页</a><%End If%>|<%If Clng(pn)<dskefu.PageCount Then%><a href="?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
        <%End If%>
        
 
        <table width="98%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#EEEEEE">
            <td width="11%" align="center">编号</td>
            <td width="18%" align="center">业务员名</td>
            <td width="15%" align="center">名下直接客户</td>
            <td width="20%" align="center">名下直接代理</td>
            <td width="10%" align="center">业务完成金额</td>
            <td width="7%" align="center">提成比例</td>
            <td width="19%" align="center">总提成金额/已结算/未结算</td>
          </tr>
<%
For N=1 To dskefu.PageSize 
					If dskefu.RecordCount=0 Then Exit For
%>
          <tr bgcolor="#FFFFFF">
            <td width="11%" align="center"><%=dskefu("id")%></td>
            <td width="18%" align="center"><a href="admkefu.asp?kefu=<%=dskefu("kefu")%>&per=<%=dskefu("per")/100%>&havegetmoney=<%=dskefu("havegetmoney")%>"><font color="#000000"><%=dskefu("kefu")%></a></td>
            <td width="15%" align="center"><a href="admuserlistuser.asp?kefu=<%=dskefu("kefu")%>">
              <%
		  	Set dsphagn = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Agent where kefunow = '"&dskefu("kefu")&"'"
		        dsphagn.Open Sql,conn,1,1  
		  %>
		  <%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_User where kefunow = '"&dskefu("kefu")&"' and agent1='n'"
		        dsph.Open Sql,conn,1,1  
		  %>
              <%=dsph(0)%>
              <%dsph.close%> 
            个</a></td>
            <td width="20%" align="center"><a href="admuserlistagent.asp?kefu=<%=dskefu("kefu")%>">
              
              <%=dsphagn(0)%>
              <%dsphagn.close%> 
            个</a></td>
            <td width="10%" align="center"><a href="moneyalllist.asp?kefu=<%=dskefu("kefu")%>"><%=dskefu("finishmoney")%> 元</a></td>
            <td width="7%" align="center"><%=dskefu("per")/100%>%</td>
            <td width="19%" align="center"><%=dskefu("finishmoney")*dskefu("per")/100/100%> 元/<%=dskefu("havegetmoney")%> 元/<%=dskefu("finishmoney")*dskefu("per")/100/100-dskefu("havegetmoney")%> 元</td>
          </tr>

        <%
If clng(pn)=dskefu.PageCount Then
I = dskefu.RecordCount - (dskefu.PageCount-1) * dskefu.PageSize
If N=I Then Exit For
End If
dskefu.movenext
Next%>
</table>
<%end if
dskefu.close
set dskefu=nothing%>	  
	  
	  
	  <form action="kefu2.asp" method="get" name="form1">
        <table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table1">
          <tr>
            <td width="10" height="23" background="img/contopa.gif">&nbsp;</td>
            <td height="23" align="left" valign="top" background="img/contopb.gif"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="8" colspan="3"></td>
                </tr>
                <tr>
                  <td width="25">&nbsp;</td>
                  <td align="left" valign="top"><font color="#FFFFFF"><strong>业务员管理</strong></font></td>
                  <td width="10">&nbsp;</td>
                </tr>
            </table></td>
            <td width="10" height="23" background="img/contopc.gif">&nbsp;</td>
          </tr>
          <tr>
            <td background="img/conmid1.gif">&nbsp;</td>
            <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="10" colspan="3"></td>
                </tr>
                <tr>
                  <td width="25" height="50">&nbsp;</td>
                  <td height="50" align="left">业务员名：
                      <input name="kefu" type="text" id="kefu" value="<%=request("kefu")%>" size="10" maxlength="20">
                      　提成比例
                      <input name="per" type="text" id="per" value="<%=request("per")%>" size="3" maxlength="3">
                      %　已结算提成
                      <input name="havegetmoney" type="havegetmoney" id="kefu" value="<%=request("havegetmoney")%>" size="10" maxlength="20">
                      <input type="submit" name="Submit" value="新增/修改">
            
            改成新名：
            <input name="kefunew" type="text" id="kefunew" size="10" maxlength="20">
            <input type="submit" name="Submit" value="改名">
            　　　　
            <input type="submit" name="Submit" value="删除"></td>
                  <td width="10" height="50">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="3">&nbsp;</td>
                </tr>
            </table></td>
            <td width="10" background="img/conmid2.gif">&nbsp;</td>
          </tr>
          <tr>
            <td width="10" height="10"><img src="img/conend1.gif" width="10" height="10"></td>
            <td height="10" background="img/conend2.gif"></td>
            <td width="10" height="10"><img src="img/conend3.gif" width="10" height="10"></td>
          </tr>
        </table>
	  </form>
      <iframe name="iframeFreeHost" width="0" height="0" scrolling="no"></iframe>
<table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table0" style="display:none">
  <tr>
    <td width="10" height="23" background="img/contopa.gif">&nbsp;</td>
    <td height="23" align="left" valign="top" background="img/contopb.gif"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="8" colspan="3"></td>
        </tr>
        <tr>
          <td width="25">&nbsp;</td>
          <td align="left" valign="top"><font color="#FFFFFF"><strong>执行结果</strong></font></td>
          <td width="10">&nbsp;</td>
        </tr>
    </table></td>
    <td width="10" height="23" background="img/contopc.gif">&nbsp;</td>
  </tr>
  <tr>
    <td background="img/conmid1.gif">&nbsp;</td>
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="10" colspan="3"></td>
        </tr>
        <tr>
          <td width="25" height="50">&nbsp;</td>
          <td height="50" align="left" id=outconM>正在提交数据中.........</td>
          <td width="10" height="50">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
    </table></td>
    <td width="10" background="img/conmid2.gif">&nbsp;</td>
  </tr>
  <tr>
    <td width="10" height="10"><img src="img/conend1.gif" width="10" height="10"></td>
    <td height="10" background="img/conend2.gif"></td>
    <td width="10" height="10"><img src="img/conend3.gif" width="10" height="10"></td>
  </tr>
</table>


</TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if
%>


