<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_Realnamelist, LebiMall" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>实名认证审批</title>
    <link rel="stylesheet" type="text/css" href="css/css.css" media="screen"/>
    <script type="text/javascript" language="javascript" src="js/topHead.js"></script>
    <script src="js/ryjs.js" type="text/javascript"></script>
     <script src="js/checked.js" type="text/javascript"></script>
    <script type="text/javascript">
        var page='<%=page %>';
        function pz(id){
            window.location.href="Realnamem.aspx?id="+id+"&type=pz&page="+page;
        }
        function ppz(){
            var form =document.forms[0];
            var strid="";
           
                for(i=0;i<form.elements.length;i++)
                {
                    if(form.elements[i].type=="checkbox")
                    {
                        if(form.elements[i].checked==true){
                            strid+=form.elements[i].value+",";
                        }
                    }
                }
                window.location.href="Realnamem.aspx?strid="+strid+"&type=pzs&page="+page;
        }
        function bpz(id){
            window.location.href="Realnamem.aspx?id="+id+"&type=bpz&page="+page;
        }
        function bppz(){
            var form =document.forms[0];
            var strid="";
                for(i=0;i<form.elements.length;i++)
                {
                    if(form.elements[i].type=="checkbox")
                    {
                        if(form.elements[i].checked==true){
                            strid+=form.elements[i].value+",";
                        }
                    }
                }
                window.location.href="Realnamem.aspx?strid="+strid+"&type=bpzs&page="+page;
        }
        function del(id){
            if (confirm("确认要删除？")) {
                window.location.href="Realnamem.aspx?id="+id+"&type=del&page="+page;
            }
        }
        function dels(){
            var form =document.forms[0];
            var strid="";
            if (confirm("确认要删除？")) {
                for(i=0;i<form.elements.length;i++)
                {
                    if(form.elements[i].type=="checkbox")
                    {
                        if(form.elements[i].checked==true){
                            strid+=form.elements[i].value+",";
                        }
                    }
                }
                if(strid!="")
                window.location.href="Realnamem.aspx?strid="+strid+"&type=dels&page="+page;
            }
        }
        function selectr(){
            var strkey=document.getElementById("strkey").value;
            var isfc=document.getElementById("Select1").value;
            window.location.href="Realnamelist.aspx?strkey="+escape(strkey)+"&isfc="+isfc+"&page=1";
        }
        function initr(){
            var state='<%=state %>';
            var lists=document.getElementById("select1");
            for(var i=0;i<lists.length;i++){
                if(state==lists[i].value){
                    lists[i].selected=true;
                    break;
                }
            }
        }
    </script>
</head> 
<body onload="initr();">
    <div id="dhtmltooltip"><img src=""></div>
    <script type="text/javascript" language="javascript" src="js/js_link.js"></script>
    <form id="form1" runat="server" method="post" >
        <script>header(4,2,"images/");</script>
        <div class="blank clearfix"></div>
        <div class="tab-mainbody3">
            <div class="tab-mainbody4">
                <div class="functionHandleArea clearfix" style="padding:3px 0 3px 4px">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="width:70px">
                                <select id="Select1">
                                    <option value="-1">全部</option>
                                    <option value="0">未审批</option>
                                    <option value="1">已通过</option>
                                </select>
                            </td>
                            <td><input type=text class=input id="strkey" style="width:150px;" runat="server" /><input type=button class="btn-search" onclick="selectr()" /></td>
                        </tr>
                        <tr>
                            <td colspan="6" style="height:30px;"> 
                                <input type="image"  title=" 批准 " onClick="ppz();return false;" src="images/bt_ok.gif" align="absmiddle" />
                                <input type="image"  title=" 拒绝 " onClick="bppz();return false;" src="images/bt_r.gif" align="absmiddle" />
                                <input type="image"  title=" 删除 " onClick="dels();return false;" src="images/bt_delete.gif" align="absmiddle" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="datalist">
                    <table cellspacing="0" border="0" id="Table2" style="width: 100%; border-collapse: collapse;">
                    <!-- table 导航 -->
                        <tr>
                            <th style="width: 5%; cursor: pointer;" title="全选" onclick="AllChecked()">
                                选择</th>
                            <th style="width: 15%">
                                用户名</th>
                            <th style="width: 8%">
                                真实姓名
                            </th>
                            <th style="width: 18%">
                                身份证号
                            </th>
                            <th style="width: 5%">
                                照片
                            </th>
                            <th style="width: 18%">
                                公司名称
                            </th>
                            <th style="width: 5%">
                                执照
                            </th>
                            <th style="width: 8%">
                                是否认证
                            </th>
                            <th style="width: 16%">
                                基本操作
                            </th>
                        </tr>
                         <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++){%>
                        <tr class="row">
                            <td class="row">
                                <input type="checkbox" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                                <input type="hidden" id="hidden1" name="hidden_id<%=i %>" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                            </td>
                            <td class="row">
                                <%=subStr(ds.Tables[0].Rows[i]["username"].ToString()) %>
                            </td>
                            <td class="row">
                                <%=ds.Tables[0].Rows[i]["truename"] %>
                            </td>
                            <td class="row">
                                <%=ds.Tables[0].Rows[i]["idcard"] %>
                            </td>
                            <td class="row">
                                <%if(ds.Tables[0].Rows[i]["idcardimg"].ToString()!=""){ %>
                                        <img src="../images/kind-pic001.jpg" align='absmiddle' onmouseover="javascript:ddrivetip('<div class=hideimg><img src=../Upload/Idcard/<%=ds.Tables[0].Rows[i]["idcardimg"] %>></div>', '#ffffff', '150')"
                                            onmouseout="hideddrivetip()" /><%} %>&nbsp;
                            </td>
                            <td class="row">
                                    <%=subStrCompany(ds.Tables[0].Rows[i]["companyname"].ToString())%>&nbsp;
                            </td>
                            <td class="row">
                                <%if(ds.Tables[0].Rows[i]["zhizhao"].ToString()!=""){ %>
                                        <img src="../images/kind-pic001.jpg" align='absmiddle' onmouseover="javascript:ddrivetip('<div class=hideimg><img src=../Upload/company/<%=ds.Tables[0].Rows[i]["zhizhao"] %>></div>', '#ffffff', '150')"
                                            onmouseout="hideddrivetip()" /><%} %>&nbsp;
                            </td>
                            <td class="row">
                                <%if (ds.Tables[0].Rows[i]["renzheng"].ToString() == "1"){ %>已认证<%}else{ %><span style="color:Red">未认证</span><%} %>
                            </td>
                            <td class="row">
                                <a href="javascript:pz(<%=ds.Tables[0].Rows[i]["id"] %>)">批准</a>&nbsp;|&nbsp;
                                <a href="javascript:bpz(<%=ds.Tables[0].Rows[i]["id"] %>)">不批准</a>&nbsp;|&nbsp;
                                <a href="javascript:del(<%=ds.Tables[0].Rows[i]["id"] %>)">删除</a>&nbsp;
                            </td>
                        </tr>
                        <%} %>
                        <tr>
                            <td class="list-foot" colspan="9">
                                <div style="float: left; padding-top: 3px;">
                                </div>
                                <div id="divAsp" runat="server" style="float: right; padding-top: 3px;">
                                    <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                                        runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                        PrevPageText="上一页" PageSize="20" UrlPaging="True" CustomInfoClass="pages1" CurrentPageButtonPosition="Center" ShowBoxThreshold="50"
                                        ShowFirstLast="true" NumericButtonCount="4" BackColor="Transparent" ShowDisabledButtons="False" EnableViewState="False">
                                    </webdiyer:AspNetPager>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <script type="text/javascript">tdshowm("Table2");</script>
                </div>
            </div>
        </div>
</form>
</body>
</html>
