<!--#include file="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<html>
<head>
<titel></titel>
<LINK href="admin/admin.css" type=text/css rel=stylesheet>
</head>
<body>
<%
If Request.QueryString("action")="pass" Then
Dim cid
cid = Request.QueryString("id")
Conn.ExeCute("Update [User] Set [Check]=1 Where id="&cid&"")
JaSys("管理员" & session("ManagerUser") & "<font color=red>通过ID为"&cid&"的用户审核</font>")
 Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('通过审核成功!');" & Chr(13)
		Response.write "window.document.location.href='User_Check.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
    Response.End
End If
If Request.QueryString("action")="close" Then
cid = Request.QueryString("id")
Conn.ExeCute("Update [User] Set [Check]=0 Where id="&cid&"")
JaSys("管理员" & session("ManagerUser") & "<font color=red>取消ID为"&cid&"的用户审核</font>")
 Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('取消审核成功!');" & Chr(13)
		Response.write "window.document.location.href='User_Check.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
    Response.End
End If
Dim CheckUser
CheckUser = Request.Form("check")
%>
<TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
  <TBODY>
  <TR>
    <TD width="100%" bgColor=#f7f3f7 colSpan=2 
      height=30>&nbsp;&nbsp;<B>说明</B>：系统配置中设置用户是否需要审核为开时用户审核才有效，关闭无效</TD></TR>
</TBODY>
<table width="100%" height="77%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> <br> <p align="center"><strong>用 户 审 核 管 理</strong></p>
      <table width="720" border="0" align="center" cellpadding="0" cellspacing="2" class="border">
        <tr class="title"> 
          <td height="25">
          <form name="form1" method="post" action="">
              <table width="45%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="30%">审核选项： </td>
                  <td width="5%"><div align="right">
                      <input name="check" type="radio" value="true" onclick="submit();" <%If CheckUser<>"false" Then Response.Write "CHECKED" End if%>>
                    </div></td>
                  <td width="30%"><div align="left">已审核的用户 </div></td>
                  <td width="2%"><div align="right">
                      <input type="radio" name="check" value="false" onclick="submit();" <%If CheckUser="false" Then Response.Write "CHECKED" End if%>>
                    </div></td>
                  <td width="33%"><div align="left">未审核的用户</div></td>
                </tr>
              </table>
            </form> </td>
        </tr>
      </table>

      <form name="del" method="Post" action="Product_Check.asp?action=all" onsubmit="return ConfirmDel();">
        <table width="720" border="0" cellpadding="0" cellspacing="2">
          <tr> 
            <td height="25">&nbsp;<a href="User_Check.asp">用户审核管理</a> &gt;&gt;
<%If CheckUser<>"false" Then Response.Write "已审核的用户" Else Response.Write "未审核的用户" End if%>           </td>
            <td width="150">&nbsp; </td>
          </tr>
        </table>
<table width="750" border="0" align="center" cellpadding="2" cellspacing="0" class=tableBorder>
  <tr> 
    <td width="38" height="25" align="center" background="admin/admin_bg_1.gif"><strong> 
      <font color="#FFFFFF">ID</font></strong></td>
    <td width="108" height="25" align="center" background="admin/admin_bg_1.gif"><strong> 
      <font color="#FFFFFF">用户名</font></strong></td>
    <td width="43" height="25" align="center" background="admin/admin_bg_1.gif"><strong> 
      <font color="#FFFFFF">性别</font></strong></td>
    <td width="150" height="25" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">Email</font></strong></td>
    <td width="176" height="25" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">公司名称</font></strong></td>
    <td width="100" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">注册时间</font></strong></td>
     <td width="100" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">审核情况</font></strong></td>
    <td width="200" height="25" align="center" background="admin/admin_bg_1.gif"><strong> 
      <font color="#FFFFFF">操作</font></strong></td>
  </tr>
<%
If CheckUser<>"false" Then
Sql = "Select * From [User] Where [Check]=1"
Else
Sql = "Select * From [User] Where [Check]=0"
End If
Dim Rs
Set Rs = Conn.ExeCute(Sql)
Do While Not rs.Eof
%>
  <tr> 
    <td height="22" align="center"><%=rs("ID")%></td>
    <td align="center"><%=rs("UserName")%></td>
    <td align="center"> 
      <%If rs("Sex")=1 Then 
	  Response.Write "男"
	  Else
	  Response.Write "女"
	  End if
	  %>
    </td>
    <td><div align="center"><a href="mailto:<%=rs("Email")%>"><%=rs("Email")%></a></div></td>
    <td> <%=rs("Compname")%> </td>
    <td><div align="center"><%=FormatdateTime(rs("RegTime"),2)%></div></td>
    <td><div align="center"><%If Cint(Rs("Check"))=1 Then Response.Write "已审核" Else Response.Write "未审核" End if%></div></td>
    <td align="center"><a href="User_Edit.asp?action=update&id=<%=rs("ID")%>">修改</a> 
      | &nbsp;<a href="User_Edit.asp?action=del&id=<%=rs("ID")%>" onClick="return ConfirmDel();">删除</a>&nbsp;|&nbsp;<%If int(Rs("Check"))=1 Then%><a href="?action=close&id=<%=rs("ID")%>">取消审核</a><%Else%><a href="?action=pass&id=<%=rs("ID")%>">通过审核</a><%End If%></td>
  </tr>
  <%
 rs.MoveNext
 Loop
 %>
        </table>
        </form>
      <br>
    </td>
  </tr>
</table>

</body>
</html>