<%@ Page CodeBehind="admin_copyurl_see.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.admin_copyurl_see" %>
<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>共享管理</title>
		
		<link href="img/main.css" rel="stylesheet" type="text/css">
			<script src="../js/calendar.js" type="text/javascript"></script>
			<script language="javascript">
   var CalendarWebControl = new atCalendarControl();
			</script>
			<style type="text/css">.style1 { FONT-WEIGHT: bold; COLOR: #ffffff }
	</style>
			<script language="JAVASCRIPT">
function checkAll()
{
	var objID=document.getElementsByTagName("input");
	for (var i=0 ;i<objID.length;i++)
	{
		if (objID[i].type=="checkbox")
		{
			if(objID[i].checked)
			{
				objID[i].checked=false;
				document.all.CheckBox2.checked=false;
				AddRemoveValues(objID[i]); 
				
			}
			else
			{
				objID[i].checked=true;
				document.all.CheckBox2.checked=true;
				AddRemoveValues(objID[i]);
			}
		}
	}
}
function AddRemoveValues(oChk) { 
if(oChk.checked)
Form1.HdnSelectedValues.value += "," + oChk.value; 
else
Form1.HdnSelectedValues.value = Form1.HdnSelectedValues.value.replace("," + oChk.value,""); 
}
			</script>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb"
				height="27">
				<tr>
					<td colSpan="3" class="td_title">短地址库管理（点击表头可升降排序）
					</td>
				</tr>
			</table>
			<div align="center"><asp:datagrid id="DataGrid" runat="server" AllowSorting="True" CssClass="GridBody" GridLines="None"
					PageSize="20" Width="100%" AutoGenerateColumns="False">
					<AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
					<ItemStyle CssClass="GridItem"></ItemStyle>
					<HeaderStyle CssClass="GridHead"></HeaderStyle>
					<Columns>
						<asp:TemplateColumn HeaderText="选择">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<HeaderTemplate>
								<INPUT type="checkbox" id="CheckBox2" onClick="checkAll()">
							</HeaderTemplate>
							<ItemTemplate>
								<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"id")%>' name=chkSelect runat="server">
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
						<asp:BoundColumn DataField="url" SortExpression="url" HeaderText="文件地址">
							<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="usetime" SortExpression="usetime" HeaderText="最后使用时间">
							<HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
					</Columns>
					<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
				</asp:datagrid>
				<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
					<tr>
						<td height="25"><webdiyer:AspNetPager id="Pager" runat="server" PageSize="20" AlwaysShow="True" ShowCustomInfoSection="Left"
								NumericButtonCount="15" HorizontalAlign="Right" 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" CssClass="page" onpagechanged="Pager_PageChanged"></webdiyer:AspNetPager></td>
					</tr>
					<tr>
						<th height="25">
							操作区</th>
					</tr>
					<tr>
						<td align="center">
								<div align="center">
									<asp:Button ID="btndel" runat="server" Width="100px" CssClass="formbutton" Text="删除选定" onclick="btndel_Click"></asp:Button>
									<font face="宋体">
										<br>
										<br>
								  </font><font face="宋体">删除
										<asp:TextBox ID="usetime" runat="server" Width="105px"></asp:TextBox>
										时间以前的地址</font>
									<asp:Button ID="Button1" runat="server" Width="100px" CssClass="formbutton" Text="确定删除" onclick="Button1_Click"></asp:Button>
								</div>
							<input id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server"></td>
					</tr>
				</table>
				<fieldset style="MARGIN-LEFT: 100px; MARGIN-RIGHT: 100px">
					<legend style="WIDTH: 37px; HEIGHT: 15px"></legend>
				</fieldset>
			</div>
		</form>
	</body>
</HTML>
