<%@ 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_Friend.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.user_friend" enableViewState="False"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<META http-equiv="Content-Type" content="text/html; charset=gb2312">
		
		<script language="JAVASCRIPT">
function showly(id)
{
var url='sms_input.aspx?username='+id;
window.open(url,'','scrollbars=yes,resizable=no,status=no,toolbar=no,menubar=no,location=no,width=550,height=300');
}
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 name="button" type="button" class="button1" id="button" value="发短消息" onClick="showly(document.all.HdnSelectedValues.value);">
												<INPUT id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server" size="1">&nbsp;
											</div>
										</td>
										<td><div align="right">
												<INPUT type="text" id="key" name="key" runat="server" class="text1" size="20"> <INPUT class="button1" id="Button2" type="button" value=" 查 找 " name="Button2" runat="server" onserverclick="Button2_ServerClick">
											</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="150"><IMG src="images/icon_user.gif" width="16" height="14" align="absMiddle">
														&nbsp; 我的好友
													</td>
													<td align="center"><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 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:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
													<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,"FriendName")%>' name=checkbox>
															</div>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:HyperLinkColumn DataNavigateUrlField="FriendName" DataNavigateUrlFormatString="user_info.aspx?username={0}"
														DataTextField="FriendName" HeaderText="好友用户名">
														<HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
													</asp:HyperLinkColumn>
													<asp:TemplateColumn HeaderText="发短消息">
														<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<div align="center"><a href="#" onClick='showly("<%# DataBinder.Eval(Container.DataItem, "FriendName").ToString()%>");'>发短消息</a>
															</div>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:HyperLinkColumn Text="查看共享" DataNavigateUrlField="FriendName" DataNavigateUrlFormatString="Share_Album.aspx?UserName={0}"
														HeaderText="查看共享">
														<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
													</asp:HyperLinkColumn>
													<asp:ButtonColumn Text="删除好友" HeaderText="删除好友" CommandName="Delete">
														<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
													</asp:ButtonColumn>
												</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('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" onpagechanged="Pager_PageChanged"></webdiyer:AspNetPager></td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</FORM>
	</body>
</HTML>
