<%@ Import Namespace="System.Data" %>
<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContentPane.aspx.cs" Inherits="Webdisk.ContentPane" %>

<%@ 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">
    <title>文件管理</title>

    <!-- Plugin styles -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/atlantis.css">
    <link href="css/daterangepicker.min.css" rel="stylesheet">
</head>
<body>
    <div class="wrapper">
        <uc1:usertop runat="server" ID="usertop" />
    <!-- begin::navigation -->
    <uc1:userleft runat="server" ID="userleft" />
    <!-- end::navigation -->
   <div class="main-panel">

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

            <div class="row app-block">

                <div class="col-md app-content">
                    <div class="app-content-overlay"></div>

                    <h6 class="mb-3">当前位置: 
                        <a href="javascript:void(0)" onclick="window.location='ContentPane.aspx?GoRoot=1&path='+getUrlParam('path');"> <img src="pics/tools3.png" width="15px" title="根目录"></a> | 
                         <a href="javascript:void(0)" onclick="window.location='ContentPane.aspx?UpBtn=1&path='+getUrlParam('path');"><img src="pics/tools1.png" width="15px" title="上一级"></a> | 
                        <a href="javascript:void(0)" onclick="window.location='ContentPane.aspx?path='+getUrlParam('path');"><img src="pics/tools2.png" width="15px" title="刷新"></a>
                       <%=Postion%></h6>
                     <div class="app-action">
                        <div class="row mb-3">
                            <div class="col-12 col-xl-6">
                                 <div class="list-inline-item mb-0" id="Panel1" runat="server">
                                  <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>
                                </div>
                                    <div class="list-inline-item mb-0">
                                    <a id="menu1" href="javascript:void(0)" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">
                                       <img src="pics/upload.png" width="15" /><span class="hidden-xs">&nbsp;
                                        上传</span>
                                    </a>
                                    <div class="dropdown-menu">
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="Upload('');"><img src="pics/upload.png" width="15" />&nbsp;&nbsp;上传多文件</a>
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="alert('仅商业版提供');"><img src="pics/upload.png" width="15" />&nbsp;&nbsp;上传文件夹(商业版)</a>
                                         <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="alert('仅商业版提供');"><img src="pics/button1.png" width="15" />&nbsp;&nbsp;链接网址(商业版)</a>
                                        <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="alert('仅商业版提供');"><img src="pics/button2.png" width="15" />&nbsp;&nbsp;外部下载(商业版)</a>
                                    </div>
                                </div>
                                  <div class="list-inline-item mb-0">
                                    <a id="menu0" href="javascript:void(0)" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">
                                       <img src="pics/button3.png" width="15" /><span class="hidden-xs">&nbsp;
                                        新建</span>
                                    </a>
                                    <div class="dropdown-menu">
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="newdirbox();$('#menu0').click();"><img src="pics/button5.png" width="15" />&nbsp;&nbsp;新建文件夹</a>
                                        <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="newfile();$('#menu0').click();"><img src="pics/button4.png" width="15" />&nbsp;&nbsp;新建文本文件</a>
                                   </div>
                                </div>
                             <div class="list-inline-item mb-0">
                                    <a id="menu4" href="javascript:void(0)" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">
                                         <img src="pics/button6.png" width="15" /><span class="hidden-xs">&nbsp;
                                        分享</span></a>
                                    <div class="dropdown-menu">
                                         <a id="tdshare" runat="server" class="dropdown-item" href="javascript:void(0)" onclick="toShare();"><img src="pics/button6.png" width="15" />&nbsp;&nbsp;设置共享
                                        </a>
                                    </div>

                                </div>
                                 <div class="list-inline-item mb-0">
                                    <a id="menu2" href="javascript:void(0)" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">
                                         <img src="pics/caozuo.png" width="15" /><span class="hidden-xs">&nbsp;
                                        更多</span></a>
                                    <div class="dropdown-menu">
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="$('#menu2').click();deletefile();"><img src="pics/button4_1.png" width="15" />&nbsp;&nbsp;删除
                                        </a>
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="$('#menu2').click();cutfile('1');"><img src="pics/button4_2.png" width="15" />&nbsp;&nbsp;移动到...
                                        </a>
                                        <a class="dropdown-item" href="javascript:void(0)" onclick="$('#menu2').click();cutfile('2');"><img src="pics/button4_3.png" width="15" />&nbsp;&nbsp;复制到...
                                        </a>
                                        <div class="dropdown-divider"></div>
                                        <a id="tdzip" runat="server" class="dropdown-item" href="javascript:void(0)" onclick="$('#menu2').click();zipfile();"><img src="pics/button4_5.png" width="15" />&nbsp;&nbsp;压缩
                                        </a>
                                        <a id="tdunzip" runat="server" class="dropdown-item" href="javascript:void(0)" onclick="$('#menu2').click();unzipfile();"><img src="pics/button4_6.png" width="15" />&nbsp;&nbsp;解压缩
                                        </a>
                                    </div>

                                </div>
                            </div>
                            <div class="col-12 col-xl-6 text-right">
                                 <div class="list-inline-item mb-0"  style="padding-right:10px;vertical-align:middle">
												<div class="input-icon">
                                                     <form id="form" name="form" action="ContentPane.aspx" method="post" onSubmit="return save_onclick()">
													<input type="text" style="max-width:200px" name="txtname" id="txtname" class="form-control p-2" placeholder="搜索..." value="<%if (Request.Form["txtname"]!=null) Response.Write(Request.Form["txtname"].ToString());%>">
                                                    <span class="input-icon-addon">
														 <a id="searchadv" class="btn-sm btn-light dropdown-toggle" style="float:right;height:28px;" title="高级搜索" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></a>
														<ul id="menulist" class="dropdown-menu notif-box p-2 animated" aria-labelledby="notifDropdown">
								                            
                                                                <li class="form-group form-inline mt-3">
												                    <label class="p-2" style="font-size:11px">搜索范围</label>
												                    <div class="selectgroup">
													                    <label class="selectgroup-item p-0">
														                    <input id="search1" type="radio" name="searchtype" value="1" class="selectgroup-input">
														                    <span class="selectgroup-button" style="font-size:11px">全部文件夹</span>
													                    </label>
													                    <label class="selectgroup-item p-0">
														                    <input id="search2" type="radio" name="searchtype" value="2" class="selectgroup-input" checked="">
														                    <span class="selectgroup-button" style="font-size:11px">当前文件夹</span>
													                    </label>
												                    </div>
											                    </li>
                                                                   <li class="form-group form-inline">
												                    <label for="inlineinput" class="col-form-label p-2">时间范围</label>
												                    <div class="p-0 form-inline">
													                    <input type="text" name="txttime1" id="txttime1"  class="form-control form-control-sm" style="width:100px;" placeholder="不限" > - <input type="text" name="txttime2" id="txttime2"  class="form-control form-control-sm" style="width:100px;" placeholder="不限">
												                    </div>
											                    </li>
                                                                   <li class="form-group form-inline">
												                    <label for="inlineinput" class="col-form-label p-2">文件大小</label>
												                    <div class="p-0 form-inline">
													                    <input type="text" id="txtsize1" name="txtsize1" class="form-control form-control-sm" style="width:100px" placeholder="不限" runat="server">M - <input type="text" id="txtsize2" name="txtsize2" class="form-control form-control-sm" style="width:100px" placeholder="不限" runat="server">M
												                    </div>
											                    </li>
                                                                <li class="form-group form-inline">
												                    <label for="inlineinput" class="col-form-label p-2">文件类型</label>
												                    <div class="p-0">
													                    <input type="text" class="form-control form-control-sm" id="txttype" name="txttype" placeholder="不限" style="width:90%" >
                                                                        <div style="font-size:10px;color:darkgray">输入扩展名，用半角,分隔，不填为不限</div>
												                    </div>
											                    </li>
                                                               <li class="form-group form-inline">
												                    <label for="inlineinput" class="col-form-label p-2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注释</label>
												                    <div class="p-0">
													                    <input type="text" class="form-control form-control-sm" id="txtnote" name="txtnote" placeholder="不限" style="width:90%" >
												                    </div>
											                    </li>
                                                                <li class="form-group form-inline">
												                    <label for="inputEmail3" class="col-form-label p-2"></label>
                                                                    <div class="p-0">
                                                                            <div class="custom-control custom-checkbox">
												                        <input type="checkbox" class="custom-control-input" id="zi" value="1" checked name="zi" runat="server">
												                        <label class="custom-control-label" for="zi">搜索子目录</label>
											                        </div>
                                                                    </div>
											                    </li>
                                                                  
                                                                 <input id="path" type="hidden" size="4" name="path" value="<%if (Request["path"]!=null) Response.Write(Request["path"].ToString());%>">
                                                                <input id="toFind" type="hidden" size="2" value="1" name="toFind">
									                            <li align="center" class="justify-content-center m-3"><input class="btn-sm btn-primary" id="Button3" type="submit" value=" 搜 索 " name="Button3"></li>
								                           
							                         
                                                        </ul>
                                                         <a class="btn-sm btn-light" style="float:right;height:28px;margin-right:1px" onclick="$('#form').submit();"> <i class="fa fa-search"></i></a>
                                                       
													</span>
                                                    	  </form>
												</div>
                                      </div>
                                
                                   <div class="list-inline-item mb-0">
                                    <a href="javascript:void(0)" class="btn btn-outline-light" onclick="javascript:if ($('#sltxt').text()=='缩略图') document.cookie='showtype3=1'; else document.cookie='showtype3=0';window.location.reload();">
                                        <img src="pics/list1.png" width="13" id="pic" runat="server"> <span id="sltxt" runat="server" style="display:none">缩略图</span>
                                    </a>
                                </div>
                                  <div class="list-inline-item mb-0">
                                    <a href="javascript:void(0)" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">
                                        <img src="pics/sort.png" width="15" />
                                    </a>
                                    <div class="dropdown-menu">
                                        <a class="dropdown-item" href="ContentPane.aspx?type=pic%20asc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>" ><%=sortstr1 %>类型升序</a>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=pic%20desc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr2 %>类型降序</a>
                                        <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=name%20asc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr3 %>名称升序</a>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=name%20desc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr4 %>名称降序</a>
                                        <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=size%20asc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr5 %>从小到大</a>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=size%20desc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr6 %>从大到小</a>
                                        <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=update%20asc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr7 %>时间从远到近</a>
                                        <a class="dropdown-item" href="ContentPane.aspx?type=update%20desc&path=<%if (Request["path"] != null) Response.Write(Request["path"].ToString());%>"><%=sortstr8 %>时间从近到远</a>
                                    </div>
                                </div>
                              </div>
                        </div>
                       
                    </div>
                    <div class="card card-body">
                        <form id="Form2" method="post" runat="server">
                            <div class="<%=Webdisk.DAL.Config.IsMobile %>">
                                <asp:DataGrid ID="DataGrid" runat="server" Width="100%" CssClass="table-hover wrapclass" AutoGenerateColumns="False"
                                    EnableViewState="False" AllowSorting="True" BorderStyle="None" BorderWidth="0px" GridLines="None" AlternatingItemStyle-CssClass="GridMove">
                                    <ItemStyle CssClass="GridItem"></ItemStyle>
                                    <HeaderStyle CssClass="GridHead"></HeaderStyle>
                                    <Columns>
                                        <asp:TemplateColumn>
                                            <HeaderStyle HorizontalAlign="Center" Width="1%"></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>
                                                <%# ((DataRowView)Container.DataItem)["checked"] %>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="类">
                                            <HeaderStyle HorizontalAlign="Center" Width="1%"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            <HeaderTemplate>
                                                <%=headico%>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <%# ((DataRowView)Container.DataItem)["pic"] %>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="名称">
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <HeaderTemplate>
                                                <%=headname%>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <div class='filelist'>  <%# ((DataRowView)Container.DataItem)["name"] %><span><%# ((DataRowView)Container.DataItem)["float"] %></span></div>
                                                <%# ((DataRowView)Container.DataItem)["notetxt"] %>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="大小">
                                            <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                                            <HeaderTemplate>
                                                <%=headsize%>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <%# ShowSize(Convert.ToInt64(((DataRowView)Container.DataItem)["size"])) %>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="更新时间">
                                            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            <HeaderTemplate>
                                                <%=headupdate%>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <%# ((DataRowView)Container.DataItem)["update"] %>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="操作">
                                            <HeaderStyle HorizontalAlign="Center" Width="7%"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            <HeaderTemplate>
                                                操作
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <div class="dropdown ml-0 dropleft">
                                                    <a href="javascript:void(0)" id="clickindex<%# ((DataRowView)Container.DataItem)["currindex"] %>" class="btn btn-outline-light btn-sm" data-toggle="dropdown">
                                                       <img src="pics/other.png" height="15" <%=mobilecode %> />
                                                    </a>
                                                    <div class="dropdown-menu dropdown-menu-right">
                                                        <%# ((DataRowView)Container.DataItem)["download"] %>
                                                        <%# ((DataRowView)Container.DataItem)["rename"] %>
                                                       <%# ((DataRowView)Container.DataItem)["note"] %>
                                                        
                                                         <%# ((DataRowView)Container.DataItem)["del"] %>
                                                         <%# ((DataRowView)Container.DataItem)["move"] %>
                                                         <%# ((DataRowView)Container.DataItem)["copy"] %>

                                                          <%# ((DataRowView)Container.DataItem)["share"] %>
                                                         <%# ((DataRowView)Container.DataItem)["code"] %>
                                                         <%# ((DataRowView)Container.DataItem)["send"] %>
                                                        <div class='dropdown-divider'></div>
                                                        <%# ((DataRowView)Container.DataItem)["info"] %>
                                                    </div>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                    </Columns>
                                    <PagerStyle Visible="False" HorizontalAlign="Right" ForeColor="#4A3C8C" BackColor="#E7E7FF"
                                        Mode="NumericPages"></PagerStyle>
                                </asp:DataGrid>
                            
				<asp:panel id="Panel3" runat="server" Visible="False">
					<TABLE class="tableborder1" id="nospace" style="WIDTH: 98%; WORD-BREAK: break-all" cellSpacing="1"
						cellPadding="2" align="center">
						<TR>
							<TD class="tablebody1" vAlign="middle" align="center" width="100%" height="130">没有任何文件</TD>
						</TR>
					</TABLE>
			  </asp:panel>
				<table width="100%" border="0" align="center">
					<tr>
						<td><div id="content"><asp:repeater id="DataList" runat="server" EnableViewState="False">
									<ItemTemplate>
										<div style="width:145px;height:200px;margin-right:3px; float:left;" class="p-1">
<div class="card app-file-list" id="b<%# Container.ItemIndex %>">
    <div class="p-1"><%# ((DataRowView)Container.DataItem)["checked"] %>
     <div class="dropdown dropleft" style="float:right"> 
                                            <a href="#" class="font-size-14" data-toggle="dropdown" >
                                                <img src="pics/other.png" height="15" <%=mobilecode %>/>
                                            </a>
                                            <div class="dropdown-menu dropdown-menu-right">
                                                <%# ((DataRowView)Container.DataItem)["download"] %>
                                                        <%# ((DataRowView)Container.DataItem)["rename"] %>
                                                       <%# ((DataRowView)Container.DataItem)["note"] %>

                                                 <%# ((DataRowView)Container.DataItem)["del"] %>
                                                         <%# ((DataRowView)Container.DataItem)["move"] %>
                                                         <%# ((DataRowView)Container.DataItem)["copy"] %>

                                                          <%# ((DataRowView)Container.DataItem)["share"] %>
                                                         <%# ((DataRowView)Container.DataItem)["code"] %>
                                                         <%# ((DataRowView)Container.DataItem)["send"] %>
                                                 <div class='dropdown-divider'></div>
                                                        <%# ((DataRowView)Container.DataItem)["info"] %>
                                            </div>
                                        </div></div>
                                    <div class="app-file-icon flex">
                                        <div class="thumbnail-img"><%# ((DataRowView)Container.DataItem)["link"] %></div>
                                    </div>
                                   <div class="p-2 small">
                                        <div class="filelistname" data-toggle='popover' data-html='true' data-trigger='hover' data-placement="bottom" data-content='<%# ((DataRowView)Container.DataItem)["tipinfo"] %>'><%# ((DataRowView)Container.DataItem)["newname"] %></div>
                                    </div>
                                </div>

											
										</div>
									</ItemTemplate>
								</asp:repeater><input name="checkbox" type="checkbox" style="DISPLAY:none"></div>
						</td>
					</tr>
				</table>
                           </div>  <div class="hidden-sm hidden-md hidden-lg text-center"><%=sjinfo %><p></div>
                            <webdiyer:aspnetpager CssClass="paginator" CurrentPageButtonClass="cpb" PagingButtonSpacing="0" id="Pager" UrlPaging="True" runat="server" PageSize="20" NumericButtonCount="5"
												ShowCustomInfoSection="Left" AlwaysShow="True" HorizontalAlign="Right" FirstPageText="|<" PrevPageText="<" NextPageText=">" LastPageText=">|" Height="20px" CustomInfoTextAlign="Left"></webdiyer:aspnetpager><br>
                            <input id="HdnSelectedValues" type="hidden" size="1" name="HdnSelectedValues" runat="server">
                            <input id="pathurl" type="hidden" size="1" runat="server">
                            <input id="temp" type="hidden" size="1" runat="server"><input id="txttmp" type="hidden" size="1" runat="server"><input id="txttmp1" type="hidden" size="1" runat="server"><input id="spanid" type="hidden" size="1" runat="server"><input id="rowcount" type="hidden" size="1"><input id="noteid" type="hidden" size="1"><input id="copytype" type="hidden" size="20"><input id="selpath" type="hidden" size="20"><input type="hidden" id="isshift" value="false" size="20" runat="server">
                            <input type="hidden" id="usernamestr" value="<%=usernamestr%>">
                       	</form>
                    </div>
                    <div align="center"><%=adv4%></div>
                </div>
            </div>

        </main>
        <!-- end::main content -->

        <!-- begin::footer -->
        <!-- end::footer -->
    </div>
    <!-- 新文件夹 -->
    <div class="modal fade" id="newdir" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="ModalLabel">新建文件夹</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <i class="ti-close"></i>
                    </button>
                </div>
                <div class="modal-body">
                        <div class="form-group" id="modalshow1">
                            <label for="recipient-name" class="col-form-label" id="ModalText1">输入新名称</label>
                            <input type="text" class="form-control" id="text1" onchange="document.all.txttmp.value=document.all.text1.value;">
                        </div>
                        <div class="form-group" id="modalshow2">
                            <label for="message-text" class="col-form-label" id="ModalText2">目录描述</label>
                            <input type="text"  class="form-control" id="text2" placeholder="(可选)" onchange="document.all.txttmp1.value=document.all.text2.value;">
                        </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                    <button id="butnewdir" type="button" class="btn btn-primary"> <span id="loading" style="display:none" class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>确定</button>
                </div>
            </div>
        </div>
    </div>
   <!-- 移动/复制 -->
    <div class="modal fade" id="move" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="moveLabel">移动到</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <i class="ti-close"></i>
                    </button>
                </div>
                <div class="modal-body">
                        <div class="form-group">
                            <label for="recipient-name" class="col-form-label" id="moveText">选择要移动到的目标路径</label>
                           <select class="form-control" name="vpath" id="vpath" onchange="document.all.selpath.value=document.all.vpath.value;">
                            <option>正在读取……</option>
                         </select>
                        </div>
                       <br><a href='#' onclick="javascript:shareuser('search_user.aspx?sel=1');"><u>选择其它位置</u></a>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                    <button id="butmove" type="button" class="btn btn-primary" onclick="moveto();"> <span id="loading2" style="display:none" class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>确定</button>
                </div>
            </div>
        </div>
    </div>
 <!-- 删除确认 -->
<div class="modal fade" tabindex="-1" role="dialog" id="suredel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">删除</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
           <i class="ti-close"></i>
        </button>
      </div>
      <div class="modal-body">
        <p>确认删除吗？</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" id="btnsuredel">确认</button>
      </div>
    </div>
  </div>
</div>
<div id="loadingModal" class="spinner-border text-primary" style="width: 3rem; height: 3rem;position:fixed;margin: auto;top: 0px;left: 0px;right: 0px;bottom: 0px;z-index:9999;display:none" role="status">
  <span class="sr-only">Loading...</span>
</div>
<!-- 目录/文件属性 -->
<div class="modal fade" id="shuxing" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="infotitle">目录属性</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <i class="ti-close"></i>
                    </button>
                </div>
                <div class="modal-body">
                       <div class="form-group form-inline">
			            <label class="col-form-label p-2 col-3">名称</label>
			            <div class="p-0 col-9" id="inforow1"> </div></div>
                      <div class="form-group form-inline" id="inforow4">
			            <label class="col-form-label p-2 col-3">大小</label>
			            <div class="p-0 col-9" id="inforow2"> </div></div>
                     <div class="form-group form-inline">
			            <label class="col-form-label p-2 col-3">更新时间</label>
			            <div class="p-0 col-9" id="inforow3"> </div></div>
                     <div class="form-group form-inline" id="inforow6">
			            <label class="col-form-label p-2 col-3">备注</label>
			            <div class="p-0 col-9" id="inforow5"> </div></div>
                </div>
                <div class="modal-footer">
                     <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    </div>
            </div>
        </div>
    </div>
</div>
    <!-- Plugin scripts -->
    <script src="js/ContentPane.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>
	<script src="js/sweetalert.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 src="js/moment.min.js"></script>
    <script src="js/daterangepicker.min.js"></script>
    <script>
        $(function () {
            $(document).on('click', '.app-block .app-content .app-action .action-left input[type="checkbox"]', function () {
                $('.app-lists ul li input[type="checkbox"]').prop('checked', $(this).prop('checked'));
                if ($(this).prop('checked')) {
                    $('.app-lists ul li input[type="checkbox"]').closest('li').addClass('active');
                } else {
                    $('.app-lists ul li input[type="checkbox"]').closest('li').removeClass('active');
                }
            });

            $(document).on('click', '.app-lists ul li input[type="checkbox"]', function () {
                if ($(this).prop('checked')) {
                    $(this).closest('li').addClass('active');
                } else {
                    $(this).closest('li').removeClass('active');
                }
            });

            $(document).on('click', '.app-block .app-content .app-content-body .app-lists ul.list-group li.list-group-item', function (e) {
                if (!$(e.target).is('.custom-control, .custom-control *, a, a *')) {
                    $('.app-detail').addClass('show').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
                        $('.app-block .app-content .app-content-body .app-detail .app-detail-article').niceScroll().resize();
                    });
                }
            });

            $(document).on('click', 'a.app-detail-close-button', function () {
                $('.app-detail').removeClass('show');
                return false;
            });

            $(document).on('click', '.app-sidebar-menu-button', function () {
                $('.app-block .app-sidebar, .app-content-overlay').addClass('show');
                // $('.app-block .app-sidebar .app-sidebar-menu').niceScroll().resize();
                return false;
            });

            $(document).on('click', '.app-content-overlay', function () {
                $('.app-block .app-sidebar, .app-content-overlay').removeClass('show');
                return false;
            });
			 $("input[name='checkbox']:checkbox").each(function () {
            if ($(this).prop('checked')) document.getElementById("HdnSelectedValues").value += "`" + $(this).val(); 
			});
        });
        $("#customCheckAll").click(function () {
            $("input[name='checkbox']:checkbox").each(function () {
                $(this).click();
            });
        });
        $("input[name='checkbox']:checkbox").each(function () {
            if ($(this).prop('checked')) document.getElementById("HdnSelectedValues").value += "`" + $(this).val(); 
        });
        $("#menulist").on("click", function (e) {
            e.stopPropagation();
        })

        function checkDate(theDate) {
            var reg = /^\d{4}-((0{0,1}[1-9]{1})|(1[0-2]{1}))-((0{0,1}[1-9]{1})|([1-2]{1}[0-9]{1})|(3[0-1]{1}))$/;
            var result = true;
            if (!reg.test(theDate))
                result = false;
            else {
                var arr_hd = theDate.split("-");
                var dateTmp;
                dateTmp = new Date(arr_hd[0], parseFloat(arr_hd[1]) - 1, parseFloat(arr_hd[2]));
                if (dateTmp.getFullYear() != parseFloat(arr_hd[0])
                    || dateTmp.getMonth() != parseFloat(arr_hd[1]) - 1
                    || dateTmp.getDate() != parseFloat(arr_hd[2])) {
                    result = false
                }
            }
            return result;
        }
        function save_onclick() {
            var strTemp = document.getElementById("txtsize1").value;
            if ((strTemp.length > 0) && (isNaN(strTemp))) {
                alert("文件大小请输入数字！");
                document.form.txtsize1.focus();
                return false;
            }
            var strTemp = document.getElementById("txtsize2").value;
            if ((strTemp.length > 0) && (isNaN(strTemp))) {
                alert("文件大小请输入数字！");
                document.form.txtsize2.focus();
                return false;
            }
            if ((document.getElementById("txttime1").value != "") && (!checkDate(document.getElementById("txttime1").value))) {
                alert('请输入正确的日期！');
                document.form.txttime1.focus();
                return false;
            }
            if ((document.getElementById("txttime2").value != "") && (!checkDate(document.getElementById("txttime2").value))) {
                alert('请输入正确的日期！');
                document.form.txttime2.focus();
                return false;
            }
            if ((document.getElementById("txtname").value == "") && (document.getElementById("txtsize1").value == "") && (document.getElementById("txtsize2").value == "") && (document.getElementById("txttime1").value == "") && (document.getElementById("txttime2").value == "") && (document.getElementById("txttype").value == "") && (document.getElementById("txtnote").value == "")) {
                var currpath;
                if (getUrlParam('path') == "") currpath = "/"; else currpath = getUrlParam('path');
                window.location = 'ContentPane.aspx?path=' + currpath;
                return false;
            }
            else return true;
        }

        $("#searchadv").click(function () {
            var day_length = 1;
            // $('#startdate').on("focus",function(){
            $('#txttime1').daterangepicker({
                singleDatePicker: true,
                format: 'YYYY-MM-DD', //控件中from和to 显示的日期格式
                separator: 'to',
                // startDate:moment().startOf('day'),
                // endDate: moment().add(1, "days"),
                minDate: moment(),
                locale: {
                    format: "YYYY-MM-DD",
                    applyLabel: "确定",
                    cancelLabel: "取消",
                    fromLabel: "起始时间",
                    // toLabel : "结束时间",
                    customRangeLabel: "自定义",
                    daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
                    monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
                        '七月', '八月', '九月', '十月', '十一月', '十二月'],
                    firstDay: 1
                },

            }).on('hide.daterangepicker', function () {
                var s1 = $('#txttime1').val();
                s1 = new Date(s1.replace(/-/g, "/"));
                var s2 = new Date();
                var days = s1.getTime() - s2.getTime();
                var time = parseInt(days / (1000 * 60 * 60 * 24));
                if (s1.getTime() - s2.getTime() < 0) {
                    day_length = time + parseInt(1)
                } else {
                    day_length = time + parseInt(2)
                }
                useLast()
                $('#txttime2').focus()

            })
            // });

            function useLast() {
                $('#txttime2').daterangepicker({
                    singleDatePicker: true,
                    format: 'YYYY-MM-DD', //控件中from和to 显示的日期格式
                    separator: 'to',
                    // startDate:moment().startOf(1,'day'),
                    // endDate: moment().add(1, "days"),
                    minDate: moment().add(day_length, "days"),
                    locale: {
                        format: "YYYY-MM-DD",
                        applyLabel: "确定",
                        cancelLabel: "取消",
                        // fromLabel : "起始时间",
                        toLabel: "结束时间",
                        customRangeLabel: "自定义",
                        daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
                        monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
                            '七月', '八月', '九月', '十月', '十一月', '十二月'],
                        firstDay: 1
                    }
                })
            }
            useLast();
            $('#txttime1').val(""); $('#txttime2').val("");
        });
        $("#DataGrid tr").hover(function () {
            $(this).find("span").show();
        }, function () {
            $(this).find("span").hide();
        })
		  $('.table-responsive').on('show.bs.dropdown', function () {
            $('.table-responsive').css("overflow", "inherit");
        });

        $('.table-responsive').on('hide.bs.dropdown', function () {
            $('.table-responsive').css("overflow", "auto");
        })
    </script>
	</body>
</HTML>
