<%@ Page CodeBehind="Zip_List.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.Zip_List" enableViewState="False"%>
<%@ Register TagPrefix="uc1" TagName="UIHead" Src="Controls/UIHead.ascx" %>

<%@ Register TagPrefix="uc1" TagName="UIFrameTop" Src="Controls/UIFrameTop.ascx" %>
<%@ Register TagPrefix="uc1" TagName="UIFrameLeft" Src="Controls/UIFrameLeft.ascx" %>
<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		
		<script language="JAVASCRIPT">
function checkAll()
{
   var a = document.getElementsByTagName("input");
   var check = document.getElementById("chkSelect");
   
   for (var i=0; i<a.length; i++)
   {
      if (a[i].type == "checkbox" && a[i].name=="checkbox") 
	    {
	  		a[i].checked = !check.checked;
	  		a[i].click();
	    }
	 }
}
function AddRemoveValues(oChk) { 
if(oChk.checked)
document.Form1.HdnSelectedValues.value += "," + oChk.value; 
else
document.Form1.HdnSelectedValues.value = document.Form1.HdnSelectedValues.value.replace("," + oChk.value,""); 
}
function over(obj){
try{
obj.className=(obj.className == "GridMove" ? "GridItem" : "GridMove")
}
catch(e){
}
}
function btnover(obj){
obj.className="butdiv";
}
function btnout(obj){
obj.className="";
}
		</script>
		<form id="Form1" name="Form1" method="post" runat="server">
	</HEAD>
	<body class="body_1" scroll="no">
		<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
			<tr>
				<td height="60"><uc1:uihead id="UIHead1" runat="server"></uc1:uihead></td>
			</tr>
			<tr>
				<td height="10"><uc1:uiframetop id="UIFrameTop1" runat="server"></uc1:uiframetop></td>
			</tr>
			<tr>
				<td>
					<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
						<tr>
							<td class="frame_left_1" vAlign="top" width="193"><uc1:uiframeleft id="UIFrameLeft1" runat="server" Current="MyZips"></uc1:uiframeleft></td>
							<td class="frame_body_1" vAlign="top">
								<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
									<tr>
										<td height="32">
											<div class="main_tool_1"><input class="button1" id="bDelete" type="button" value="删 除" runat="server" onserverclick="bDelete_ServerClick">
												<input class="button1" id="bClear" type="button" value="清空文件压缩包" runat="server" onserverclick="bClear_ServerClick">
												<INPUT id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server">&nbsp;
											</div>
										</td>
									</tr>
									<tr>
										<td class="main_title_1" height="32">
											<table cellSpacing="2" cellPadding="3" width="100%" border="0">
												<tr>
													<td><IMG src="images/icon_zip.gif" align="absMiddle"> &nbsp; 我的文件压缩包													  <span id="dMessage" runat="server"></span></td>
													<td align="right" width="180"><A href="javascript:history.back();"><IMG src="images/link_back.gif" align="absMiddle"></A></td>
												</tr>
											</table>
									  </td>
									</tr>
									<tr>
										<td vAlign="top" class="main_content_0">
											<asp:datagrid id="DataGrid" runat="server" CssClass="GridBody" PageSize="20" Width="100%" AutoGenerateColumns="False"
												AllowSorting="True" CellPadding="3">
												<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>
															<div align="center">
																<input type="checkbox" name="chkSelect" id="chkSelect" onClick='checkAll();' />
															</div>
														</HeaderTemplate>
														<ItemTemplate>
															<div align="center">
																<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"id")%>' name=checkbox>
															</div>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn SortExpression="zipname" HeaderText="名称">
														<HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Left"></ItemStyle>
														<HeaderTemplate>
															<%=zipname%>
														</HeaderTemplate>
														<ItemTemplate>
															<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.zipname") %>' NavigateUrl='<%# ConfigUrl(DataBinder.Eval(Container, "DataItem.FileUrl").ToString()) %>'>
															</asp:HyperLink>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="照片数量">
														<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Right"></ItemStyle>
														<HeaderTemplate>
															<%=PCount%>
														</HeaderTemplate>
														<ItemTemplate>
															<%# DataBinder.Eval(Container, "DataItem.PCount") %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn SortExpression="Length" HeaderText="大小">
														<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Right"></ItemStyle>
														<HeaderTemplate>
															<%=Length%>
														</HeaderTemplate>
														<ItemTemplate>
															<%# ShowSize(long.Parse(DataBinder.Eval(Container, "DataItem.Length").ToString())) %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="创建日期">
														<HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<HeaderTemplate>
															<%=CDate%>
														</HeaderTemplate>
														<ItemTemplate>
															<%# DataBinder.Eval(Container, "DataItem.CDate") %>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="下载链接">
														<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<asp:HyperLink runat="server" Text='[点此下载]' NavigateUrl='<%# ConfigUrl(DataBinder.Eval(Container, "DataItem.FileUrl").ToString()) %>' ID="Hyperlink1" NAME="Hyperlink1">
															</asp:HyperLink>
														</ItemTemplate>
													</asp:TemplateColumn>
												</Columns>
												<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
											</asp:datagrid></td>
									</tr>
									<tr>
										<td class="main_title_1" height="32">
											<table width="100%">
												<tr>
													<td width="8%"><input id="bAll" onClick="document.getElementById('chkSelect').click();" type="checkbox"
															name="bAll">
														<label for="bAll">
															<b>全 选</b></label>
														<asp:label id="lStat" Runat="server"></asp:label></td>
													<td id="tdStat" align="right" width="92%" runat="server">
															<webdiyer:AspNetPager id="Pager" runat="server" PageSize="24" HorizontalAlign="Right" AlwaysShow="True"
																ShowCustomInfoSection="Left" NumericButtonCount="15" ShowBoxThreshold="21" FirstPageText="<font face=webdings>9</font>"
																PrevPageText="<font face=webdings>3</font>" NextPageText="<font face=webdings>4</font>" LastPageText="<font face=webdings>:</font>"
																Height="20px" UrlPaging="True"></webdiyer:AspNetPager></td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</FORM>
	</body>
</HTML>
