<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_ShopApproval, 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 href="css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/checked.js"></script>
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script src="js/topHead.js" type="text/javascript"></script>
    <script type="text/javascript">
        var page='<%=page %>';
        function edit(id,uid,typeid){
            if (confirm("是否同意用户开店？")) {
                window.location.href="ShopApprovalm.aspx?type=update&id="+id+"&uid="+uid+"&typeid="+typeid+"&page="+page;
            }
        }
        function del(id){
            if (confirm("确认要删除？")) {
                window.location.href="ShopApprovalm.aspx?id="+id+"&type=delete&page="+page;
            }
        }
        function updates(){
            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+",";
                        }
                    }
                }
                document.getElementById("hidden_idlist").value=strid;
                document.getElementById("form1").submit();
            }
        }
        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+",";
                        }
                    }
                }
                window.location.href="ShopApprovalm.aspx?strid="+strid+"&type=dels&page="+page;
            }
        }
        function select(){
            var strkey=document.getElementById("strkey").value;
            window.location.href="ShopApproval.aspx?strkey="+escape(strkey)+"&page=1";
        }
    </script>
</head>
<body onload="Input_()">
    <form id="form1" runat="server">
        <script>header(1,3,"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>
               <input type="text" id="strkey" class="input" style="width:150px;" runat=server /><input type="button" border="0" title=" 查询 " onclick="location.href='javascript:select()';return false;" class="btn-search" align="absmiddle" /> 
            </td>
            </tr><tr><td style="height:30px;">
                <input type="image" title=" 同意开店 " onclick="updates();return false;" src="images/bt_app.gif"
                align="absmiddle" />
            <input type="image" name="Submit" title=" 删除 " onclick="dels();return false;" src="images/bt_delete.gif"
                align="absmiddle" />
            </td></tr></table>
        </div>
        <div id="datalist">
                <table cellpadding="0" cellspacing="0" width="100%" border="0" id="list">
                   
                    <tr>
                        <th style="width: 5%; cursor: pointer;" title="全选" onclick="AllChecked()">
                            选择</th>
                        <th style="width: 12%">
                            申请人</th>
                        <th style="width: 12%">
                            用户名称
                        </th>
                        <th style="width: 12%">
                            公司名称
                        </th>
                        <th style="width: 15%">
                            电话/手机
                        </th>
                        <th style="width: 20%">
                            地址
                        </th>
                        <th style="width: 10%">
                            店铺类型
                        </th>
                        <th style="width:6%">
                            状态
                        </th>
                        <th style="width: 8%">
                            操作<input type="hidden" id="hidden_idlist" name="hidden_idlist"/>
                        </th>
                    </tr>
                    <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++){%>
                    <tr >
                        <td >
                            <input type="checkbox" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                            <input type="hidden" id="hidden_id<%=ds.Tables[0].Rows[i]["id"] %>" name="hidden_id<%=ds.Tables[0].Rows[i]["id"] %>" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                            <input type="hidden" id="hidden_typeid<%=ds.Tables[0].Rows[i]["id"] %>" name="hidden_typeid<%=ds.Tables[0].Rows[i]["id"] %>" value="<%=ds.Tables[0].Rows[i]["typeid"] %>" />
                            <input type="hidden" id="hidden_uid<%=ds.Tables[0].Rows[i]["id"] %>" name="hidden_uid<%=ds.Tables[0].Rows[i]["id"] %>" value="<%=ds.Tables[0].Rows[i]["uid"] %>" />
                        </td>
                        <td >
                            <%=subStr(ds.Tables[0].Rows[i]["Linkman"].ToString()) %>
                        </td>
                        <td >
                            <%=subStr(ds.Tables[0].Rows[i]["username"].ToString()) %>
                        </td>
                        <td >
                            <%=subStr(ds.Tables[0].Rows[i]["Comanyname"].ToString())%>
                        </td>
                        <td >
                            <%=ds.Tables[0].Rows[i]["tel"]%>
                            /
                            <%=subTelStr(ds.Tables[0].Rows[i]["mobile"].ToString()) %>
                        </td>
                        <td >
                            <%=subAddress(ds.Tables[0].Rows[i]["address"].ToString())%>
                        </td>
                        <td >
                            <%=ds.Tables[0].Rows[i]["sname"] %>
                            &nbsp;<%=ds.Tables[0].Rows[i]["Pricename"] %>
                        </td>
                        <td >
                            <%if (ds.Tables[0].Rows[i]["isagree"].ToString() == "0"){ %>未设置<%}else{ %>已开通<%} %>
                        </td>
                        <td >
                            <a href="javascript:edit(<%=ds.Tables[0].Rows[i]["id"] %>,<%=ds.Tables[0].Rows[i]["uid"] %>,<%=ds.Tables[0].Rows[i]["typeid"] %>)">同意</a>| <a href="javascript:del(<%=ds.Tables[0].Rows[i]["id"] %>)">删除</a>
                        </td>
                    </tr>
                    <%} %>
                    <tr>
                        <td colspan="9" class="list-foot">
                            <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("list");</script>
</div>
            </div>
        </div>
    </form>
</body>
</html>
