<%@ Reference Page="~/wpdcc/Wpbak/operate.aspx" %>

<%@ Page Language="c#" Inherits="WebApp.WebSiteSearch" EnableEventValidation="false" CodeBehind="WebSiteSearch.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>单位网站占用磁盘空间统计</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/adminCssEdit.htm" -->
    

    <base target="_self" />
</head>
<body>
    <div class="list-func-box func-box">
        <div class="hd">
            子站搜索列表
        </div>
        <form id="frmSpaceStat" method="post" runat="server">
        <div class="bd">
            <asp:DataGrid ID="webList" runat="server" class="list-table">
                <Columns>
                    <asp:TemplateColumn HeaderText="操作" >
                        <ItemTemplate>
                            <asp:LinkButton ID="btnDetail" runat="server">详细信息</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                </Columns>
            </asp:DataGrid>
            <div id="trButton" runat="server" class="ft">
                <div class="pagination">
                    <asp:Label ID="lblPage" runat="server" HeaderStyle-CssClass="title"></asp:Label>
                </div>
            </div>
            <div class="hd">
                子站搜索统计</div>
            <div class="bd">
                <div class="function-hd">
                    <div class="search-box fr">
                    </div>
                    <!--/search-box-->
                    <div class="action-field">
                        <asp:Button ID="btnRefresh" runat="server" Text="刷新列表" CssClass="btn"
                            OnClick="btnRefresh_Click"></asp:Button>
                        <asp:Button ID="btnExcel" runat="server" Text="导出Excel" CssClass="btn" OnClick="btnExcel_Click" />
                        <asp:HyperLink ID="hlDown" runat="server" Visible="False">下载Excel文件</asp:HyperLink>
                    </div>
                    <!--/action-field-->
                </div>
                <table cellspacing="0" cellpadding="0" width="760" border="0" align="center">
                    <tr class="tdbg">
                        <td align="left" width="40%">
                            <asp:ListBox ID="schoolList" runat="server" Width="100%" Height="216px" Rows="10">
                            </asp:ListBox>
                        </td>
                        <td style="width: 129px" align="center">
                            <table height="100%" cellspacing="0" cellpadding="4" border="0">
                                <tr>
                                    <td valign="top" height="100%" style="width: 121px" align="center">
                                        <asp:Button ID="btnSelSchools" CssClass="btn" runat="server" Text="WEB服务选择"></asp:Button>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" height="100%" style="width: 121px" valign="bottom">
                                        <asp:Button ID="btnSelField" CssClass="btn" runat="server" Text="显示字段选择" />
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="bottom" height="100%" style="width: 121px" align="center">
                                        <asp:Button ID="btnStat" CssClass="btn" runat="server" Text="搜   索" OnClientClick="javascript:queryform();return true;" OnClick="btnStat_Click">
                                        </asp:Button>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <asp:ListBox ID="listField" runat="server" Width="100%" Height="216px" Rows="10">
                            </asp:ListBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            
                                        <input id="d_name" style="width: 80px; height: 21px" type="hidden" size="8" name="Hidden1"
                                            runat="server"><input id="d_value" style="width: 88px; height: 21px" type="hidden"
                                                size="9" name="Hidden2" runat="server">
                        </td>
                        <td align="center" colspan="1">
                            <input id="f_name" style="width: 80px; height: 21px" type="hidden" size="8" name="Hidden1"
                                runat="server"><input id="f_value" style="width: 88px; height: 21px" type="hidden"
                                    size="9" name="Hidden2" runat="server">
                        </td>
                    </tr>
                </table>
            </div>
            <div class="ft">
                <div class="pagination">
                </div>
            </div>
        </div>
        </form>
    </div>
    <script type="text/javascript">

        jQuery(function ($) {
            //改用弹出层，因为201409发布的最新ghome开始不支持showModalDialog()
            $("#btnSelSchools").click(function () {
                return true;
            }).fancybox({
                'type': 'iframe',
                'width': 500,
                'height': 400,
                'hideOnOverlayClick': false,
                'href': 'selectWebService.aspx'
            });


            $("#btnSelField").click(function () {
                return true;
            }).fancybox({
                'type': 'iframe',
                'width': 500,
                'height': 400,
                'hideOnOverlayClick': false,
                'href': 'selectFields.aspx'
            });
        })
    </script>
    
    <script language="javascript" type="text/javascript">
        //function selectWebService()
        //{	
        //	var arr = showModalDialog("selectWebService.aspx", window, "dialogWidth:500px;dialogHeight:325px;help:no;scroll:no;resizable:yes;status:no");
        //	if(arr!=null)
        //	  location.href="WebSiteSearch.aspx";
        //}
        //function selectFields()
        //{	
        //	var arr = showModalDialog("selectFields.aspx", window, "dialogWidth:500px;dialogHeight:325px;help:no;scroll:no;resizable:yes;status:no");
        //	if(arr!=null)
        //	  location.href="WebSiteSearch.aspx";
        //}
        function DelAll() {
            var selectTo = document.frmSpaceStat.schoolList;
            var nLen = selectTo.length;
            if (nLen < 1) return;
            for (var loop = nLen; loop >= 0; loop--) {
                selectTo.options[loop] = null;
            }
        }

        function DelAllField() {
            var selectTo = document.frmSpaceStat.listField;
            var nLen = selectTo.length;
            if (nLen < 1) return;
            for (var loop = nLen; loop >= 0; loop--) {
                selectTo.options[loop] = null;
            }
        }

        function checkform(text, value) {
            var selectFrom = document.frmSpaceStat.schoolList;
            selectFrom.add(new Option(text, value));
            //alert(text+","+value);
        }

        function checkfield(text, value) {
            var selectFrom = document.frmSpaceStat.listField;
            selectFrom.add(new Option(text, value));
            //alert(text+","+value);
        }

        function queryform() {
            var sel = document.frmSpaceStat.schoolList;
            var nLen = sel.length;
            var str1 = "";
            var str2 = "";
            for (var i = 0; i < nLen; i++) {
                if (i > 0)
                { str2 += ","; str1 += ","; }
                str2 += sel.options[i].value;
                str1 += sel.options[i].text;
            }
            document.frmSpaceStat.d_name.value = str1;
            document.frmSpaceStat.d_value.value = str2;

            var sel1 = document.frmSpaceStat.listField;
            var nLen1 = sel1.length;
            var str11 = "";
            var str12 = "";
            for (var i = 0; i < nLen1; i++) {
                if (i > 0)
                { str12 += ","; str11 += ","; }
                str12 += sel1.options[i].value;
                str11 += sel1.options[i].text;
            }
            document.frmSpaceStat.f_name.value = str11;
            document.frmSpaceStat.f_value.value = str12;
            //alert(str1+str2);
            return true;
        }

        function showDetail(id) {
            showModalDialog("WebDetail.aspx?applyID=" + id, window, "dialogWidth:760px;dialogHeight:500px;help:no;scroll:no;status:no");
        }
    </script>
</body>
</html>
