<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sharesee.aspx.cs" Inherits="Webdisk.sharesee" %>

<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Register Src="~/userleft.ascx" TagPrefix="uc1" TagName="userleft" %>
<%@ Register Src="~/usertop.ascx" TagPrefix="uc1" TagName="usertop" %>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我的共享</title>
    <!-- Plugin styles -->
   <link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/atlantis.css">
</head>
<body>
    <div class="wrapper">
    <!-- begin::navigation -->
         <uc1:usertop runat="server" ID="usertop" />
    <uc1:userleft runat="server" ID="userleft" />
    <!-- end::navigation -->

   <div class="main-panel">

        <div class="content">
            <div class="page-inner">

            <div>

                <div class="card">
                    <div class="card-body">
                        <div class="row">&nbsp;&nbsp;&nbsp;&nbsp;<img src="pics/filesys.gif" width="16" height="16" align="absMiddle">&nbsp;&nbsp;&nbsp;&nbsp;<h5><b>我的共享</b></h5>
                            </div>
                        <form id="Form2" method="post" runat="server">
                        <div class="<%=Webdisk.DAL.Config.IsMobile %>">
                            <asp:datagrid id="DataGrid" runat="server" CssClass="table-hover" AllowSorting="True" PageSize="20"
												Width="100%" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" GridLines="None" AlternatingItemStyle-CssClass="GridMove">
												<ItemStyle CssClass="GridItem"></ItemStyle>
                                                 <HeaderStyle CssClass="GridHead"></HeaderStyle>
												<Columns>
													<asp:TemplateColumn HeaderText="选择">
														<HeaderStyle HorizontalAlign="Center" Width="3%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<HeaderTemplate>
															<div class="custom-control custom-checkbox mr-0">
												<input type="checkbox" class="custom-control-input" id="customCheckAll">
												<label class="custom-control-label" for="customCheckAll"></label>
											</div>
														</HeaderTemplate>
														<ItemTemplate>
                                                             <div class="custom-control custom-checkbox mr-0">
															<INPUT id='chkSelect<%# Eval("id") %>' onclick=AddRemoveValues(this) class='custom-control-input' type=checkbox value='<%# DataBinder.Eval(Container, "DataItem.Postion").ToString()+DataBinder.Eval(Container, "DataItem.DirName").ToString()+DataBinder.Eval(Container, "DataItem.FileName").ToString() %>' name=checkbox>
														<label class="custom-control-label" for="chkSelect<%# Eval("id") %>"></label></div>
                                                        </ItemTemplate>
													</asp:TemplateColumn>
													<asp:BoundColumn Visible="False" DataField="Postion"></asp:BoundColumn>
													<asp:BoundColumn Visible="False" DataField="dirname"></asp:BoundColumn>
													<asp:BoundColumn Visible="False" DataField="filename" HeaderText="filename"></asp:BoundColumn>
													<asp:TemplateColumn SortExpression="postion" HeaderText="共享目录和文件">
														<ItemTemplate>
															<%# DataBinder.Eval(Container, "DataItem.Postion").ToString()+DataBinder.Eval(Container, "DataItem.DirName").ToString()+DataBinder.Eval(Container, "DataItem.FileName").ToString() %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn SortExpression="share" HeaderText="共享类型">
														<HeaderStyle CssClass="tablehead" HorizontalAlign="Center" Width="15%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<%# showtype(DataBinder.Eval(Container, "DataItem.Share").ToString()) %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn SortExpression="OpenPass" HeaderText="密码">
														<HeaderStyle CssClass="tablehead" HorizontalAlign="Center" Width="8%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<%# showpass(DataBinder.Eval(Container, "DataItem.OpenPass").ToString()) %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn SortExpression="addfile" HeaderText="权限">
														<HeaderStyle CssClass="tablehead" HorizontalAlign="Center" Width="7%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															 <%# show(DataBinder.Eval(Container, "DataItem.AddFile").ToString(),"1") %>
                                                    <%# show(DataBinder.Eval(Container, "DataItem.EditFile").ToString(),"2") %>
                                                    <%# show(DataBinder.Eval(Container, "DataItem.DelFile").ToString(),"3") %>
                                                    <%# show(DataBinder.Eval(Container, "DataItem.UserTop").ToString(),"4") %>
                                                    <%# show(DataBinder.Eval(Container, "DataItem.UserGood").ToString(),"5") %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:ButtonColumn Text="编辑" HeaderText="编辑" CommandName="Edit">
														<HeaderStyle HorizontalAlign="Center" Width="7%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
													</asp:ButtonColumn>
													<asp:ButtonColumn Text="取消" HeaderText="取消" CommandName="Delete">
														<HeaderStyle HorizontalAlign="Center" Width="7%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
													</asp:ButtonColumn>
												</Columns>
												<PagerStyle Visible="False" PageButtonCount="20" Mode="NumericPages"></PagerStyle>
											</asp:datagrid></div><br>
                            <div class="hidden-sm hidden-md hidden-lg text-center"><%=sjinfo %><p></div>
                                <webdiyer:AspNetPager CssClass="paginator" CurrentPageButtonClass="cpb" PagingButtonSpacing="0" ID="Pager" runat="server" PageSize="20" NumericButtonCount="5"
                                ShowCustomInfoSection="Left" AlwaysShow="True" HorizontalAlign="Right" FirstPageText="|<" PrevPageText="<" NextPageText=">" LastPageText=">|" Height="20px" OnPageChanged="Pager_PageChanged" CustomInfoTextAlign="Left">
                            </webdiyer:AspNetPager><br><br> <div align="center">
                                    <button id="editbtn" type="button" class="btn btn-outline-light" runat="server" onserverclick="Submit1_ServerClick">编辑选中</button>
                                    &nbsp;&nbsp;
												<button id="cancelbtn" type="button" class="btn btn-outline-light" runat="server" onserverclick="Button3_ServerClick">取消选中</button>
                                    &nbsp;&nbsp;
												<button type="button" class="btn btn-outline-light" id="top" runat="server" onserverclick="top_ServerClick">设置固顶</button>
                                    &nbsp;&nbsp;
												<button type="button" class="btn btn-outline-light" id="untop" runat="server" onserverclick="untop_ServerClick">取消固顶</button>
                                    &nbsp;&nbsp;
												<button type="button" class="btn btn-outline-light" id="good" runat="server" onserverclick="good_ServerClick">设置精华</button>
                                    &nbsp;&nbsp;
												<button type="button" class="btn btn-outline-light" id="ungood" runat="server" onserverclick="ungood_ServerClick">取消精华</button>
                                </div>
                            </br>
                            <div align="center">
                                <button id="but" type="button" class="btn btn-outline-success" onclick="javascript:document.getElementById('search').style.display=(document.getElementById('search').style.display=='none' ? '' : 'none');document.getElementById('but').value=(document.getElementById('but').value=='↓高级查找↓' ? '↑高级查找↑' : '↓高级查找↓');">↓高级查找↓</button>

                                <p>
                                    <div class="col-sm" id="search" style="display: none">
                                        <div class="form-group row">
                                            <label for="inputEmail3" class="col-sm-2 col-form-label"><%=lstr%>名</label>
                                            <div class="col-sm">
                                                <input type="text" class="form-control" id="key" runat="server" placeholder="可模糊输入，不填为不限，多个关键字用半角空格分隔">
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label for="inputEmail3" class="col-sm-2 col-form-label">更新时间</label>
                                            <div class="col">
                                                <input type="text" id="txttime1" name="daterangepicker" class="form-control" placeholder="不选为不限" onfocus="new Calendar().show(this);" runat="server">
                                            </div>
                                            <span>-
                                            </span>
                                            <div class="col">
                                                <input type="text" id="txttime2" name="daterangepicker" class="form-control" placeholder="不选为不限" onfocus="new Calendar().show(this);" runat="server">
                                            </div>
                                        </div>
                                        <div class="form-group row" id="show1" runat="server">
                                            <label for="inputEmail3" class="col-sm-2 col-form-label">文件大小</label>
                                            <div class="col">
                                                <input type="text" id="txtsize1" class="form-control" placeholder="不填为不限" runat="server">
                                            </div>
                                            <span>KB－
                                            </span>
                                            <div class="col">
                                                <input type="text" id="txtsize2" class="form-control" placeholder="不填为不限" runat="server">
                                            </div>
                                            <span>KB
                                            </span>
                                        </div>
                                        <div class="form-group row" id="show2" runat="server">
                                            <label for="inputEmail3" class="col-sm-2 col-form-label">文件类型</label>
                                            <div class="col-sm">
                                                <input type="text" class="form-control" id="txttype" placeholder="输入扩展名，用半角,分隔，不填为不限" runat="server">
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label for="inputEmail3" class="col-sm-2 col-form-label"><%=lstr%>注释</label>
                                            <div class="col-sm">
                                                <input type="text" class="form-control" id="txtnote" placeholder="不填为不限" runat="server">
                                            </div>
                                        </div>
                                        <div class="form-group row" id="show3" runat="server">
                                            <label for="inputEmail3" class="col-sm-2 col-form-label">上传用户</label>
                                            <div class="col-sm">
                                                <input type="text" class="form-control" id="txtuploaduser" placeholder="不填为不限" runat="server">
                                            </div>
                                        </div>
                                        <button type="submit" class="btn btn-primary" runat="server" onserverclick="submit2_ServerClick">查 找 </button>
                                    </div>
                            </div>
                            <input id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server">
                        </form>
                    </div>
                </div>
            </div>
    </div>

    </div></div></div>
    <!-- end::main content -->
</body>
</html>
<!-- Plugin scripts -->
<script type="text/javascript" src="js/calendar.js"></script>
<script src="js/jquery.3.2.1.min.js"></script>
	<script src="js/popper.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<!-- jQuery UI -->
	<script src="js/jquery-ui.min.js"></script>
	<script src="js/jquery.ui.touch-punch.min.js"></script>
	
	<!-- jQuery Scrollbar -->
	<script src="js/jquery.scrollbar.min.js"></script>
	<!-- Atlantis JS -->
	<script src="js/webfont.min.js"></script>
	<script src="js/atlantis.js"></script>
<script>
    $("#customCheckAll").click(function () {
        $("input[name='checkbox']:checkbox").each(function () {
            $(this).click();
        });
    });
    function edit(id) {
        document.all.HdnSelectedValues.value = "`" + document.getElementById("chkSelect" + id).value;
        document.getElementById("editbtn").click();
    }
    function cancel(id) {
        document.all.HdnSelectedValues.value = "`" + document.getElementById("chkSelect" + id).value;
        document.getElementById("cancelbtn").click();
    }
    function AddRemoveValues(oChk) {
        if (oChk.checked) {
            document.all.HdnSelectedValues.value += "`" + oChk.value;
        }
        else
            document.all.HdnSelectedValues.value = document.all.HdnSelectedValues.value.replace("`" + oChk.value, "");
    }
    function getUrlParam(paramName) {
        var s = location.search;
        if (s != null) {
            var sarr = s.substr(1).split("&");
            var tarr;
            for (i = 0; i < sarr.length; i++) {
                tarr = sarr[i].split("=");
                if (tarr.length == 2 && tarr[0].toLowerCase() == paramName) {
                    return tarr[1];
                }
            }
            return "";
        }
    }
    if ((getUrlParam('key') != "") || (getUrlParam('txtuploaduser') != "") || (getUrlParam('txttime1') != "") || (getUrlParam('txttime2') != "") || (getUrlParam('txtsize1') != "") || (getUrlParam('txtsize2') != "") || (getUrlParam('txttype') != "") || (getUrlParam('txtnote') != "")) document.getElementById("but").click();
</script>
