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

<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title></title>
    <link href="images/Site_Css.css" type="text/css" rel="stylesheet">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="images/Css.css" type="text/css" rel="stylesheet">
    <meta content="MSHTML 6.00.6000.16544" name="GENERATOR">
    <script src="../js/calendar.js" type="text/javascript"></script>
    <script language="javascript">
        var CalendarWebControl = new atCalendarControl();
    </script>
    <script language="javascript" src="../js/function.js" type="text/javascript"></script>
    <script language="JAVASCRIPT">
        function Result() {
            Webdisk.admin.admin_file.GetBmAll(document.all.company.value, get_Result_CallBack);
        }

        function get_Result_CallBack(response) {
            if (response.value != null) {
                document.all("dept").length = 0;
                document.all("dept").options.add(new Option("全部部门", ""));
                var ds = response.value;
                if (ds != null && typeof (ds) == "object") {
                    for (var i = 0; i < ds.Rows.length; i++) {
                        var name = ds.Rows[i].knamem;
                        var id = ds.Rows[i].id;
                        document.all("dept").options.add(new Option(name, id));
                    }
                    document.all.hiddept.value = document.all.dept.value;
                }
            }
            return
        }
        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 "";
            }
        }
        function gosearch() {
            var str = "";
            if ((getUrlParam('page') != null) && (getUrlParam('page') != "")) str = str + "&page=" + getUrlParam('page');
            if ((getUrlParam('share') != null) && (getUrlParam('share') != "")) str = str + "&share=" + getUrlParam('share');
            if (document.all.filename.value != "") str = str + "&dirname=" + document.all.filename.value;
            if (document.all.username.value != "") str = str + "&username=" + document.all.username.value;
            if (document.all.txttime1.value != "") str = str + "&txttime1=" + document.all.txttime1.value;
            if (document.all.txttime2.value != "") str = str + "&txttime2=" + document.all.txttime2.value;
            if (document.all.txtnote.value != "") str = str + "&txtnote=" + document.all.txtnote.value;
            if (document.all.hiddept.value != "") str = str + "&dept=" + document.all.hiddept.value;

            str = "?" + str.substring(1, str.length);
            window.location = 'admin_Dir.aspx' + str;
        }
    </script>
</head>
<BODY bgColor="#ffffff" topMargin="5" marginheight="0" marginwidth="0">
		<form id="Form1" name="Form1" method="post" runat="server">
			<DIV></DIV>
			<DIV>
				<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
					<TBODY>
						<TR>
							<TD class="menubar_title"><IMG hspace="3" src="images/default.gif" align="absMiddle" vspace="3" border="0">&nbsp;
								
							</TD>
							<TD class="menubar_readme_text" vAlign="bottom">&nbsp;</TD>
						</TR>
						<TR>
							<TD class="menubar_function_text" height="1">&nbsp;</TD>
							<TD class="menubar_menu_td" align="right">&nbsp;</TD>
						</TR>
						<TR>
							<TD colSpan="2" height="5"></TD>
						</TR>
					</TBODY></TABLE>
				<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
					<TBODY>
						<TR>
							<TD background="images/tab_top_bg.gif" height="22">
								<TABLE cellSpacing="0" cellPadding="0" border="0">
									<TBODY>
										<TR>
											<!--按钮　Start-->
											<TD>
												<TABLE height="22" cellSpacing="0" cellPadding="0" border="0">
													<TBODY>
														<TR>
															<TD width="3"><IMG id="tabImgLeft__0" height="22" src="images/tab_unactive_left.gif" width="3"></TD>
															<TD class="tab" id="tabLabel__0" onClick="javascript:tabClick(0,2)" background="images/tab_unactive_bg.gif"
																UNSELECTABLE="on">文件共享管理</TD>
															<TD width="3"><IMG id="tabImgRight__0" height="22" src="images/tab_unactive_right.gif" width="3"></TD>
														</TR>
													</TBODY></TABLE>
											</TD>
										</TR>
									</TBODY></TABLE>
							</TD>
						</TR>
						<TR>
							<TD bgColor="#ffffff">
								<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
									<TBODY>
										<TR>
											<TD width="1" background="images/tab_bg.gif"><IMG height="1" src="images/tab_bg.gif" width="1"></TD>
											<TD class="borderstyle" vAlign="top" height="100">
												<DIV id="tabContent__0"><asp:datagrid id="DataGrid" runat="server" AllowSorting="True" PageSize="20" Width="100%" AutoGenerateColumns="False"
														CssClass="GridBody">
														<AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
														<ItemStyle CssClass="GridItem"></ItemStyle>
														<HeaderStyle CssClass="GridHead"></HeaderStyle>
														<Columns>
															<asp:TemplateColumn HeaderText="选择">
																<HeaderStyle HorizontalAlign="Center" Width="3%"></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
																<HeaderTemplate>
																	<input type="checkbox" name="chkSelect" id="chkSelect" onClick='checkAll();' />
																</HeaderTemplate>
																<ItemTemplate>
																	<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"id")%>' name=checkbox>
																</ItemTemplate>
															</asp:TemplateColumn>
                                                            <asp:TemplateColumn SortExpression="dirname" HeaderText="目录名">
																<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
																<ItemTemplate>
																	<%# DataBinder.Eval(Container, "DataItem.dirname").ToString() == "" ? "/" : DataBinder.Eval(Container, "DataItem.dirname").ToString() %>
																</ItemTemplate>
															</asp:TemplateColumn>
															<asp:HyperLinkColumn Text="用户名" DataNavigateUrlField="username" DataNavigateUrlFormatString="admin_edituser.aspx?username={0}"
																DataTextField="username" SortExpression="username" HeaderText="用户名">
																<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:HyperLinkColumn>
															<asp:BoundColumn DataField="lasttime" SortExpression="lasttime" HeaderText="上传时间">
																<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:BoundColumn>
                                                            <asp:TemplateColumn SortExpression="mark" HeaderText="已审核">
                                                                <ItemTemplate>
                                                                    <%# showzy(Eval("mark").ToString()) %>
                                                                </ItemTemplate>
                                                                <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" 
                                                                    Width="5%" />
                                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" />
                                                            </asp:TemplateColumn>
														</Columns>
														<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
													</asp:datagrid><br>
													<DIV align="right"><webdiyer:aspnetpager id="Pager" runat="server" PageSize="20" CssClass="page" Height="20px" LastPageText="<font face=webdings>:</font>"
															NextPageText="<font face=webdings>4</font>" PrevPageText="<font face=webdings>3</font>" FirstPageText="<font face=webdings>9</font>"
															ShowBoxThreshold="21" HorizontalAlign="Right" NumericButtonCount="15" ShowCustomInfoSection="Left" AlwaysShow="True" onpagechanged="Pager_PageChanged"></webdiyer:aspnetpager></DIV>
													
                                                        <asp:button class="formbutton" id="btnshareno" runat="server" Text="取消共享" 
                                                        onclick="btnshareno_Click" ></asp:button>
                                                   
                                                </DIV>
												<!--内容框Start--></TD>
											<TD width="1" background="images/tab_bg.gif"><IMG height="1" src="images/tab_bg.gif" width="1"></TD>
										</TR>
									</TBODY></TABLE>
							</TD>
						</TR>
						<TR>
							<TD background="images/tab_bg.gif" bgColor="#ffffff"><IMG height="1" src="images/tab_bg.gif" width="1"></TD>
						</TR>
					</TBODY></TABLE> <!--选项卡 End--></DIV>
			<DIV>
				<div align="center"></div>
			</DIV>
			<INPUT id="hiddept" type="hidden" name="hiddept" runat="server"> <INPUT id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server">
		</form>
		<script language="javascript">
		    function tabClick(idx, count) {
		        for (i_tr = 0; i_tr < count; i_tr++) {
		            if (i_tr == idx) {
		                var tabImgLeft = eval('document.all.tabImgLeft__' + idx);
		                var tabImgRight = eval('document.all.tabImgRight__' + idx);
		                var tabLabel = eval('document.all.tabLabel__' + idx);
		                var tabContent = eval('document.all.tabContent__' + idx);

		                tabImgLeft.src = 'images/tab_active_left.gif';
		                tabImgRight.src = 'images/tab_active_right.gif';
		                tabLabel.background = 'images/tab_active_bg.gif';
		                tabContent.style.visibility = 'visible';
		                tabContent.style.display = 'block';
		                continue;
		            }
		            var tabImgLeft = eval('document.all.tabImgLeft__' + i_tr);
		            var tabImgRight = eval('document.all.tabImgRight__' + i_tr);
		            var tabLabel = eval('document.all.tabLabel__' + i_tr);
		            var tabContent = eval('document.all.tabContent__' + i_tr);

		            tabImgLeft.src = 'images/tab_unactive_left.gif';
		            tabImgRight.src = 'images/tab_unactive_right.gif';
		            tabLabel.background = 'images/tab_unactive_bg.gif';
		            tabContent.style.visibility = 'hidden';
		            tabContent.style.display = 'none';
		        }
		    }
		    tabClick(0, 2);
		</script>
		<BR>
	</BODY>
</html>
