<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SaleManageCustomConnectManage")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_CustomConnect":action=request.QueryString("action"):page=request.QueryString("page")
if action="del" then
  id=request("id")
  if WS_S.HX_IsNUM(id) then
    conn.execute("delete from "&Tablename&" where WS_CCID="&id)
	WS_S.HX_Redirect("CustomConnectManage.asp?page="&page)
  end if  	
end if
 Orderby=" where WS_CustomConnectCreateMan="&loginuid&" order by WS_CCID desc"
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>交往信息管理</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'></head><body topmargin='20' leftmargin='0' bottommargin='0'><table width='98%'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8 background='../hximages/titlelinebg.gif'><table width='590'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>交往信息管理</font>　　　　　<a href='CustomConnectCreate.asp' class='menu'>新建交往信息</a></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='0' bgcolor=FFFBE8><tr bgcolor='#BF9B73'><td width='8%' height='20' align='right'><div align='center'>编 号</div></td><td width='15%'><div align='center'>客户名称</div></td><td width='11%'><div align='center'>联系人</div></td><td width='12%'><div align='center'>交往日期</div></td><td width='14%'><div align='center'>备注</div></td><td width='32%'><div align='center'>交往内容</div></td><td width='8%'><div align='center'>操 作</div></td></tr>"
if rs.recordcount>0 then
 rs.PageSize =15 '每页记录条数
	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
	ii=0
	do while not rs.EOF
	response.Write "<tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8' align=center><td align='center' height='20'>"&rs("WS_CCID")&"</td><td align='center'><a href='CustomContactManage.asp?Ciid="&rs("WS_CIID")&"'>"
	call WS_S.HX_OutCustonInfo(rs("WS_CIID"))
	response.Write "</a></td><td align='center'>"&rs("WS_CustomConnectman")&"</td><td align='center'>"&rs("WS_CustomConnectDate")&"</td><td align='center'>"&rs("WS_CustomConnectDescribe")&"</td><td align='center'>"&rs("WS_CustomConnectContent")&"</td><td align='center'>"
	if rs("WS_CustomConnectCreateMan")=cint(loginuid) then response.Write "<a href='CustomConnectModify.asp?id="&rs("WS_CCID")&"'>修改</a> <a href='CustomConnectManage.asp?action=del&id="&rs("WS_CCID")&"&page="&page&"'>删除</a>"
	response.Write "</td></tr>"
    ii=ii+1
	  if ii>=rs.PageSize then Exit Do
	  rs.movenext
      loop
	  end if
	  for i=0 to 15-rs.recordcount
      response.Write "<tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8' align=center><td height='25'>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>"
      next
   if rs.recordcount>0 then
   call WS_S.PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>",10)
   end if
  WS_S.HX_RSClose rs 
  response.Write "</table></td></tr></table>"%>