<%qx="11"%>
<!--#include file="../login/0.asp"-->
<!--#include file="../../mycartconn/conn.asp"-->
<!--#include file="../../mycartconn/function.asp"-->
<!--#include file="../../mycartconn/fso.asp"-->
<!--#include file="../../mycartconn/page.asp"-->
<!--#include file="../../mycartconn/my.asp"-->
<!--#include file="../../mycartconn/md5.asp"-->
<link href="../../mycartconn/admin.css" rel="stylesheet" type="text/css">
<title>会员认证</title>
<TABLE width="650" align="center" cellpadding="0" cellspacing="0">
<TR>
	<TD height=5></TD>
</TR>
</TABLE>
<table width="650" align="center" cellpadding="0" cellspacing="0">
  <form name="form" method="post" action="huiyuan.asp"><tr> 
      <td height="25" align="center" valign="middle"> 会员、姓名、地址、email、电话： 
        <input name="key" type="text" class="wenbenkuang" id="key" size="15" maxlength="15"><input name="lx" type="radio" value="0" checked>所有会员<input type="radio" name="lx" value="1">VIP会员<input type="radio" name="lx" value="2">锁定会员<input type="radio" name="lx" value="3">未审会员<input name="Submit" type="submit" class="go-wenbenkuang" value="搜索">
      </td>
  </tr></form>
</table>
<%
Select case request("abc")
case "duanxin_ok"
   if request("bt")<>"" and request("nr")<>"" and request("name1")<>"" then
   conn.execute("Insert into duanxin(bt,nr,name1,name2,lx,DailiID)values('"&request("bt")&"','"&request("nr")&"','"&request("name1")&"','"&my_name&"',6,0)")
     Response.Write "<meta http-equiv=refresh content=2;url='?key="&request("key")&"&page="&request("page")&"'><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>您已成功地发出短信！！！</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;·恭喜您，您填写的短信已成功的发送！！"
   end if
case "duanxin"%><br><br>
<table width="400" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC"><form name="form1" method="post" action="?abc=duanxin_ok">
  <tr bgcolor="#FFFFFF"> 
    <td height="25" colspan="2" bgcolor="#f1f1f1"><font color="#FF6600">&nbsp;&nbsp;-&gt; 
      站内短信通知</font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="100" height="25" align="center">收 信 人</td>
    <td height="25"><%=request("name1")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="100" height="25" align="center">短信标题</td>
    <td height="25"><input name="bt" type="text" class="wenbenkuang" id="bt" size="40" maxlength="25"></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="100" height="25" align="center">短信内容</td>
    <td height="25"><textarea name="nr" cols="40" rows="5" class="wenbenkuang" id="nr"></textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25" align="center">&nbsp;</td>
    <td height="25"><input name="Submit" type="submit" class="go-wenbenkuang" value="发送短信">
      <input name="Submit" type="reset" class="go-wenbenkuang" value="重置">
        <input name="Submit2" type="button" class="go-wenbenkuang" value="返回上一页" onclick="javascript:window.history.go(-1)">
        <input name="name1" type="hidden" id="name1" value="<%=request("name1")%>">
        <input name="key" type="hidden" id="key" value="<%=request("key")%>">
        <input name="page" type="hidden" id="page" value="<%=request("page")%>"> </td>
  </tr></form>
</table>
<%
case "rz_on"
	conn.execute("update photo set zt=1 where id="&request("classid")&"")
	Response.redirect "?abc=rz&lx="&request("lx")&"&id="&request("id")
case "rz_off"
	conn.execute("update photo set zt=0 where id="&request("classid")&"")
	Response.redirect "?abc=rz&lx="&request("lx")&"&id="&request("id")
case "zt"
	Select Case request("lx")
	Case 1
		myfield="rz_sp"
		title="照片认证"
	Case 2
		myfield="rz_sf"
		title="身份认证"
	Case 3
		myfield="rz_xl"
		title="学历认证"
	Case 4
		myfield="rz_hy"
		title="婚姻认证"
	Case 5
		myfield="rz_sr"
		title="收入认证"
	Case 6
		myfield="rz_fc"
		title="房产认证"
	Case 7
		myfield="rz_qc"
		title="汽车认证"
	End Select

	conn.execute("update huiyuan set "&myfield&"="&request("zt")&" where id="&request("id")&"")
	If request("lx")=1 Then
		If request("zt")=0 Then
			delPicUrl=conn.execute("select top 1 dt from photo where lbid=100 and show=1 and huiyuan='"&request("huiyuan")&"'")(0)
			If delPicUrl<>"" Then
				wj_del="/tp/userface/"&delPicUrl
				del_wj_myfso wj_del
				conn.execute("delete shangchuan where tp='tp/userface/"&delPicUrl&"' where dx=2000")
			End If
			PicUrl=conn.execute("select img from huiyuan where huiyuan='"&request("huiyuan")&"'")(0)
			userXB=conn.execute("select xb from huiyuan where huiyuan='"&request("huiyuan")&"'")(0)
			If userXB="男" then
				defaultPic="face/man_n.jpg"
			Else
				defaultPic="face/woman_n.jpg"
			End if
			conn.execute("update huiyuan set rz_sp=0,img='"&defaultPic&"' where huiyuan='"&request("huiyuan")&"'")
			conn.execute("update photo set show=0 where huiyuan='"&request("huiyuan")&"' and lbid=100 and dt='"&PicUrl&"'")
		Else
			delPicUrl=conn.execute("select top 1 dt from photo where lbid=100 and show=1 and huiyuan='"&request("huiyuan")&"'")(0)
			If delPicUrl<>"" Then
				wj_del="/tp/userface/"&delPicUrl
				del_wj_myfso wj_del
				conn.execute("delete shangchuan where tp='tp/userface/"&delPicUrl&"' where dx=2000")
			End If
			
			PicUrl=conn.execute("select top 1 xt from photo where lbid=100 and xc_id=0 and huiyuan='"&request("huiyuan")&"'")(0)
			conn.execute("update huiyuan set rz_sp=1,img='"&PicUrl&"' where huiyuan='"&request("huiyuan")&"'")
			conn.execute("update photo set show=0 where huiyuan='"&request("huiyuan")&"' and lbid=100")
			conn.execute("update photo set show=1 where huiyuan='"&request("huiyuan")&"' and lbid=100 and dt='"&PicUrl&"'")
			conn.execute("delete photo where huiyuan='"&request("huiyuan")&"' and lbid=100 and xc_id=0")
		End if
	Else
		If request("zt")=0 then
			conn.execute("Insert into duanxin(bt,nr,name1,name2,lx,DailiID)values('身份认证','尊敬的用户您好，由于您提供的资料不符合要求，管理员已撤消您的"&title&"，如有疑问请与管理员联系。 ','"&request("huiyuan")&"','红豆情缘',5,0)")
		Else
			conn.execute("Insert into duanxin(bt,nr,name1,name2,lx,DailiID)values('身份认证','恭喜您，您的"&title&"已通过！','"&request("huiyuan")&"','红豆情缘',5,0)")
		End If
	End If
	Response.redirect "?abc=rz&lx="&request("lx")&"&id="&request("id")
case "rz"
	If request("id")="" Then
	  Response.Write "<script language=JavaScript>{window.alert('参数错误，请返回检查!');window.history.go(-1);}</script>"
	  response.end
	End if
	set rs = conn.execute("select * from huiyuan where id="&request("id")&"")
	If Not (rs.bof And rs.eof) Then
	rzFlag=0
	Select Case request("lx")
	Case 1
		myfield="rz_sp"
		title="照片认证"
		rzFlag=rs("rz_sp")
	Case 2
		myfield="rz_sf"
		title="身份认证"
		rzFlag=rs("rz_sf")
	Case 3
		myfield="rz_xl"
		title="学历认证"
		rzFlag=rs("rz_xl")
	Case 4
		myfield="rz_hy"
		title="婚姻认证"
		rzFlag=rs("rz_hy")
	Case 5
		myfield="rz_sr"
		title="收入认证"
		rzFlag=rs("rz_sr")
	Case 6
		myfield="rz_fc"
		title="房产认证"
		rzFlag=rs("rz_fc")
	Case 7
		myfield="rz_qc"
		title="汽车认证"
		rzFlag=rs("rz_qc")
	Case Else
	  Response.Write "<script language=JavaScript>{window.alert('参数错误，请返回检查!');window.history.go(-1);}</script>"
	  response.end
	End Select
	If request("lx")=1 Then
		picPath="/tp/userface/"
	Else
		picPath="/tp/photo/"
	End if
	%>
	<br>
	<table width="65%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"><form name="form" method="post" action="?abc=pass">
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" colspan="3" bgcolor="#f1f1f1"> &nbsp;<font color="#FF6600">&nbsp;-&gt; 
		  ID:<%=rs("id")%> 会员认证相关信息</font></td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td width="15%" height="22" align="center">会员账号</td>
		<td width="65%" height="22">&nbsp;<%=rs("huiyuan")%></td>
		<td width="20%" rowspan=6 align=center>
            <TABLE style="BORDER-RIGHT: #efefef 2px solid; BORDER-BOTTOM: #efefef 2px solid" height=106 cellSpacing=1 cellPadding=0 width=130 align=center bgColor=#cccccc border=0>
              <TBODY>
              <TR>
                <TD vAlign=center align=middle bgColor=#ffffff><IMG 
                  src="/tp/userface/<%=rs("img")%>" border=0></TD>
			  </TR>
			  </TBODY>
			</TABLE>
            <TABLE cellSpacing=1 cellPadding=0 width=130 align=center border=0>
              <TBODY>
              <TR>
			    <td align=center style="padding-top:5px">
			<%If rs("rz_sp")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
			    </td>
			  </TR>
			  </TBODY>
			</TABLE>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">真实姓名</td>
		<td height="22">&nbsp;<%=rs("name")%>&nbsp;<%=getSex(rs("huiyuan"))%>
			<%If rs("rz_sf")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">出生年月</td>
		<td height="22">&nbsp;<%=rs("nyr")%>
			<%If rs("rz_sf")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">籍贯地址</td>
		<td height="22">&nbsp;<%=rs("sf")%>&nbsp;-&nbsp;<%=rs("city")%>
			<%If rs("rz_sf")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">婚姻状况</td>
		<td height="22">&nbsp;<%=getUserValue("hyzk",rs("hyzk"))%>
			<%If rs("rz_hy")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">民　　族</td>
		<td height="22">&nbsp;<%=rs("mz")%>
			<%If rs("rz_sf")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">住房状况</td>
		<td height="22" colspan=2>&nbsp;<%=getUserValue("zfzk",rs("zfzk"))%>
			<%If rs("rz_fc")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF">
		<td height="22" align="center">交通工具</td>
		<td height="22" colspan=2>&nbsp;<%=getUserValue("gcqk",rs("gcqk"))%>
			<%If rs("rz_qc")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">教育程度</td>
		<td height="22" colspan=2>&nbsp;<%=getUserValue("xl",rs("xl"))%>
			<%If rs("rz_xl")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">毕业院校</td>
		<td height="22" colspan=2>&nbsp;<%=rs("yx")%>
			<%If rs("rz_xl")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">月 收 入</td>
		<td height="22" colspan=2>&nbsp;<%=getUserValue("ysr",rs("ysr"))%>
			<%If rs("rz_sr")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">证件类型</td>
		<td height="22" colspan=2>&nbsp;<%=rs("zjlx")%>
			<%If rs("rz_sf")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" align="center">证件号码</td>
		<td height="22" colspan=2>&nbsp;<%=rs("zjhm")%>
			<%If rs("rz_sf")=1 then%>
				&nbsp;<font color="#009900"><img src="/images/ok.gif" width="14" height="14" hspace="3" align="absmiddle">已认证</font>
			<%else%>
				&nbsp;<font color="#FF0000"><img src="/images/delx.gif" width="10" height="10" hspace="3">未认证</font>
			<%End if%>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" colspan=3>
			<TABLE cellSpacing=0 cellPadding=0 width=95% align=center border=0>
			  <TR>
				<TD align=center><font color=red><b><%=title%>请求</b></font></TD>
			  </TR>
			  <TR>
				<TD style="padding-top:10px;padding-bottom:10px">
				<%
				Set rs2=Server.CreateObject("ADODB.Recordset")
				If request("lx")=1 Then
					sql2="select * from photo where lbid=100 and xc_id=0 and huiyuan='"&rs("huiyuan")&"' order by orders,sj2 desc"
				else
					sql2="select * from photo where lbid=101 and huiyuan='"&rs("huiyuan")&"' and mc='"&title&"' order by orders,sj2 desc"
				End if
				rs2.open sql2,conn,3,1

				if not (rs2.bof And rs2.eof) then
					%>
						  <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#ECF8FB" style="border:#dddddd 1px solid;">
							<tr>
						<%
						ii=0
						do while not rs2.eof%>
							   <td align="center" style="padding-top:10px;padding-bottom:10px;" valign=bottom>
								 <table width="33%" border="0" cellpadding="2" cellspacing="0" bgcolor="cccccc" style="border:#dddddd 0px solid;">
								  <tr>
									<td height="100" align="center" bgcolor="#FFFFFF"  style="border:#dddddd 1px solid;" bgcolor=#ECF8FB><a href="/my/show.asp?tp=<%=rs2("dt")%>&title=<%=rs2("mc")%>&code=红豆情缘" target=_blank><img src=<%=picPath&rs2("xt")%> alt="放大照片" border="0"></a></td>
								  </tr>
								 </table>
								 <table width="180" border="0" cellpadding="2" cellspacing="0" bgcolor="cccccc" style="border:#dddddd 0px solid;">
								  <tr>
									<td width=180 height="20" align="center" bgcolor=#ECF8FB><a href="b_photo_list.asp?submitok=delpicupdate&classid=<%=rs2("id")%>&page=<%=request("page")%>&photokind=<%=rs2("xc_id")%>" onClick="return confirm('请 慎 重 ！\n\n★确认删除？ 此操作将永久删除，不得恢复！')"  class="u666666">删除</a>&nbsp;&nbsp;<%If rs2("zt")=0 then%>
									<a href="?abc=rz_on&lx=<%=request("lx")%>&classid=<%=rs2("id")%>&id=<%=request("id")%>"><font color=red>未审核</font></a>
									<%else%>
									<a href="?abc=rz_off&lx=<%=request("lx")%>&classid=<%=rs2("id")%>&id=<%=request("id")%>"><font color=blue>已审核</font></a>
									<%End if%>
									</td>
								  </tr>
							  </table></td>
						<%
							rs2.MoveNext 
							ii=ii+1
							If ii Mod 3=0 Then response.write "</tr><tr>"
						loop%>
								</tr>
						  </table>
					<%else%>
						  <table width="281" height="65" border="0" cellpadding="0" cellspacing="1" align=center bgcolor="#dddddd">
							<tr>
							  <td align="center" bgcolor="#F7F7F7" style="color:#666666;">
								没有上传相关证件</td>
							</tr>
						  </table>
					<%
					End If
					rs2.close
					Set rs2=Nothing

				%>
				</TD>
			  </TR>
			</TABLE>
		</td>
	  </tr>
	  <tr valign="middle" bgcolor="#FFFFFF"> 
		<td height="22" colspan="3" align="center"><input name="Submit2" type="button" class="go-wenbenkuang" value="返回上一页" onclick="window.location='huiyuan.asp?id=<%=request("id")%>&abc=xs&key=<%=request("key")%>&page=<%=page%>&home=<%=request("home")%>'"> 
		<%If rzFlag=1 then%>
		  <input name="Submit3" type="button" class="go-wenbenkuang" value="撤消认证" onclick="window.location='?abc=zt&zt=0&id=<%=request("id")%>&lx=<%=request("lx")%>&huiyuan=<%=rs("huiyuan")%>'">
		<%else%>
		  <input name="Submit4" type="button" class="go-wenbenkuang" value="通过认证" onclick="window.location='?abc=zt&zt=1&id=<%=request("id")%>&lx=<%=request("lx")%>&huiyuan=<%=rs("huiyuan")%>'">
		<%End if%>
		  <input name="Submit5" type="button" class="go-wenbenkuang" value="发送站内短信" onclick="window.location='?name1=<%=rs("huiyuan")%>&abc=duanxin'"></td>
	  </tr><form>
	</table>
	<%
	End if
	rs.close
End Select
conn.close
Set conn=nothing%>