<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Register TagPrefix="uc1" TagName="UIFrameLeft" Src="Controls/UIFrameLeft.ascx" %>
<%@ Register TagPrefix="uc1" TagName="UIFrameTop" Src="Controls/UIFrameTop.ascx" %>
<%@ Register TagPrefix="uc1" TagName="UIHead" Src="Controls/UIHead.ascx" %>

<%@ Page CodeBehind="User_Sms.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.user_sms" enableViewState="False"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		
		<script language="javascript">
function showly()
{
var url='sms_input.aspx';
window.open(url,'','scrollbars=yes,resizable=no,status=no,toolbar=no,menubar=no,location=no,width=550,height=300');
}
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)
document.Form1.HdnSelectedValues.value += "," + oChk.value; 
else
document.Form1.HdnSelectedValues.value = document.Form1.HdnSelectedValues.value.replace("," + oChk.value,""); 
}
			function over(obj){
			obj.className=(obj.className == "GridMove" ? "GridItem" : "GridMove")
			}
		</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="Submit1" type="button" value=" 删 除 " runat="server" onserverclick="Submit1_ServerClick">
												<INPUT id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server">&nbsp;
											</div>
										</td>
										<td><div align="right"><span class="main_tool_1">
													<input name="button" type="button" class="button1" id="button" value="收件箱" onClick="javascript:window.location='user_sms.aspx?show=1'">
													<input name="button2" type="button" class="button1" id="button2" value="发件箱" onClick="javascript:window.location='user_sms.aspx?show=2'">
													<input name="button22" type="button" class="button1" id="button22" value="已发送" onClick="javascript:window.location='user_sms.aspx?show=3'">
													<input name="button23" type="button" class="button1" id="button23" value="废件箱" onClick="javascript:window.location='user_sms.aspx?show=4'">
													<input name="button24" type="button" class="button1" id="button24" value=" 撰 写 " onClick="showly();">
												</span></div>
										</td>
									</tr>
									<tr>
										<td height="32" colspan="2" class="main_title_1">
											<table cellSpacing="2" cellPadding="3" width="100%" border="0">
												<tr>
													<td width="277"><IMG src="images/13.gif" width="16" height="16" align="absMiddle"> &nbsp; 
														短消息——
														<asp:label id="curr" runat="server">收件箱</asp:label></td>
													<td width="886" align="right"><A href="javascript:history.back();"><IMG src="images/link_back.gif" align="absMiddle"></A></td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td colspan="2" 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 name="checkbox" type="checkbox" id="CheckBox2" onClick="checkAll()">
															</div>
														</HeaderTemplate>
														<ItemTemplate>
															<div align="center">
																<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"id")%>' name=chkSelect runat="server">
															</div>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn SortExpression="InceptTime" HeaderText="状态">
														<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<HeaderTemplate>
															<%=InceptTime%>
														</HeaderTemplate>
														<ItemTemplate>
															<div align="center"><%# ShowType(DataBinder.Eval(Container.DataItem, "InceptTime").ToString()) %>
															</div>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="收件人">
														<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<HeaderTemplate>
															<%=To_User%>
														</HeaderTemplate>
														<ItemTemplate>
															<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.To_User") %>' NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.To_User", "user_info.aspx?username={0}") %>' Target="_blank">
															</asp:HyperLink>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="发件人">
														<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<HeaderTemplate>
															<%=From_User%>
														</HeaderTemplate>
														<ItemTemplate>
															<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.From_User") %>' NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.From_User", "user_info.aspx?username={0}") %>' Target="_blank">
															</asp:HyperLink>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="主题">
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<HeaderTemplate>
															<%=title%>
														</HeaderTemplate>
														<ItemTemplate>
															<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.id", "sms_show.aspx?id={0}") %>' Target="_blank">
															</asp:HyperLink>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="日期">
														<HeaderStyle Width="20%"></HeaderStyle>
														<HeaderTemplate>
															<%=SendTime%>
														</HeaderTemplate>
														<ItemTemplate>
															<%# DataBinder.Eval(Container, "DataItem.SendTime") %>
														</ItemTemplate>
													</asp:TemplateColumn>
												</Columns>
												<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
											</asp:datagrid></td>
									</tr>
									<tr>
										<td height="32" colspan="2" class="main_title_1">
											<table width="100%">
												<tr>
													<td width="8%"><input id="bAll" onClick="document.getElementById('CheckBox2').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" onpagechanged="Pager_PageChanged"></webdiyer:AspNetPager></td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</FORM>
	</body>
</HTML>
