<%@ Page Language="c#" CodeBehind="Index.aspx.cs" Inherits="Webdisk.Index" %>

<%@ Register TagPrefix="uc" TagName="uc1" Src="~/Top.ascx" %>
<%@ Register TagPrefix="uc" TagName="uc2" Src="bottom.ascx" %>
<% @ Import Namespace="Webdisk.DAL" %>
<!doctype html>
<html >
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=Other.GetTitle()%></title>
    <link href="css/common.css" rel="stylesheet" type="text/css" />
    <link href="js/artDialog/css/ui-dialog.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/artDialog/dist/dialog-plus.js" type="text/javascript"></script>
    <script src="js/index.js" type="text/javascript"></script>
</head>
<body>
    <!-- Header Start -->
    <div>
        <uc:uc1 ID="top" runat="server" />
    </div>
    <!-- Header End -->
    <!-- Content Start -->
    <div class="content">
    <div style="" id="Adblank" ></div>
        <%--<div class="banner">
            <img src="images/banner_01.png" /></div>--%>
        <div class="cLeft">
            <div class="block02">
                <div class="title02">
                    <h2>
                        最新公告</h2>
                    <a href="ggMore.aspx" target="_blank">更多公告</a></div>
                <ul class="newsList">
                    <%=template.GetCode("Default_GG") %>
                </ul>
            </div>
            <div class="block03 mt20">
                <div class="title02">
                    <h3>
                        热门分类</h3>
                </div>
                <dl class="flList">
                    <asp:Repeater ID="repeater1" runat="server" OnItemDataBound="repeater1_ItemDataBound">
                        <ItemTemplate>
                            <dt><a href="shareMng.aspx?kind=<%# DataBinder.Eval(Container.DataItem,"id") %>">
                                <%# DataBinder.Eval(Container.DataItem, "Kind") %></a></dt>
                            <span>
                                <dd>
                                    <asp:Repeater ID="repWZ" runat="server">
                                        <ItemTemplate>
                                            <a class="ml10" href="ShareMng.aspx?kind=<%# DataBinder.Eval(Container.DataItem,"id") %>">
                                                <%# DataBinder.Eval(Container.DataItem, "Kind") %></a>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </dd>
                            </span>
                        </ItemTemplate>
                    </asp:Repeater>
                </dl>
            </div>
        </div>
        <div class="cCenter">
            <div class="searchBox2">
                <form id="search" target="_self" action="ResourceMng.aspx" method="post">
                    <p>
                        <input class="input_2" name="key" type="text" id="Key"/>
                        <input class="but_2" name="" type="button" onclick="search()"/>
                        <a href="#" onclick="adSearch.showAdvanceSearch('setAdSearch.aspx?target=ResourceMng')">高级搜索</a></p>
                    <p>
                        <input name="fileType" type="radio" value="all" />
                        全部
                        <input name="fileType" type="radio" value="doc,docx" />
                        DOC
                        <input name="fileType" type="radio" value="jpg,jpeg,gif,bmp" />
                        JPG
                        <input name="fileType" type="radio" value="mp3,wma,wav,mod,mid,cd" />
                        MP3
                        <input name="fileType" type="radio" value="pdf" />
                        PDF
                        <input name="fileType" type="radio" value="xls,xlsx" />
                        XLS</p>
                        <input type="hidden" id="key" />
                        <input type="hidden" id="fileType" />
                </form>
            </div>
            <div class="title03 mt20" id="usual1">
                <ul>
                    <li><a class="selected" href="#tab01">最新资源文件</a></li>
                    <%--<li><a href="#tab02">最新文件</a></li>--%>
                </ul>
            </div>
            <div class="block04" id="tab01">
                <ul class="topimg">
                    <%=template.GetCode("Default_ShowZY3") %>
                </ul>
                <ul class="newsList2">
                    <%=template.GetCode("Default_ShowZY2")%>
                </ul>
            </div>
            <%--<div class="block04" id="tab02">
                <ul class="topimg">
                    <%=template.GetCode("Default_NewFile3") %>--%>
             <%--   </ul>
                <ul class="newsList2">
                    <%=template.GetCode("Default_NewFile2") %>--%>
               <%-- </ul>
            </div>--%>
        </div>
        <div class="cRight">
            <div class="block02">
                <div class="title02">
                    <h3>
                        热门资源排行榜</h3>
                </div>
                <ul class="numList">
                    <%=template.GetCode("hotestzy")%>
                   
                </ul>
            </div>
            <div class="block02 mt20">
                <div class="title02">
                    <h3>
                        用户排行榜</h3>
                </div>
                <ul class="numList numList2">
                    <%=template.GetCode("userRankList")%>
                
                </ul>
            </div>
        </div>
        <div class="block05 mt20">
            <div class="title02">
                <h2>
                    推荐资源</h2>
            </div>
            <ul class="imgList">
                <%--这是根据已关联图片的资源文件进行时间倒叙排序--%>
                <%=template.GetCode("recommendSourceList")%>
            </ul>
        </div>
        <div class="block05 mt20">
            <div class="title02">
                <h2>
                    热门课件</h2>
            </div>
            <ul class="imgList">
                <%--这是根据已关联图片的资源‘课件’文件进行下载量倒叙排序--%>
                <%=template.GetCode("hotestKJZY")%>
            </ul>
        </div>
    </div>
    <!-- Content End -->
    <!-- Footer Start -->
    <div id="foot">
        <div class="foot">
            <uc:uc2 ID="bootom" runat="server" />
        </div>
    </div>
    <!-- Footer End -->
</body>
</html>
<!-- 栏目切换 -->
<script src="js/jquery.idTabs.min.js" type="text/javascript"></script>
<script type="text/javascript">
	setHeadMenu(1);
    $("#usual1 ul").idTabs();
    

    $(function () {
        $("input:radio[name='fileType']").val(["all"]);

        $.ajax({
            type: "POST",
            contentType: "application/json;utf-8",
			cache:false,
            url: "FileSpaceHandler.ashx?cmd=GetADUrl",
            success: function (data) {
                if (data == undefined || data == "undefined" || data == "") {
                }
                else {
                    $("#Adblank").append(data);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert("错误:" + XMLHttpRequest.responseText);
                return false;
            }
        });
    });
    function search() {
        if (checkKey()) {
            $("#search").submit();
        }
    }
    function checkKey() {
        var pattern = new RegExp("[~'!@#$%^&*()-+_=:]");
        if (pattern.test($("#key").val())) {
            $("#key").focus();
            return false;
        } else return true;
    }
</script>

