<%@ Page CodeBehind="admin_share_file.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.admin_share_file" %>
<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
		<title>共享管理</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
		
		<link href="img/main.css" rel="stylesheet" type="text/css">
		<style type="text/css">
.style1 { FONT-WEIGHT: bold; COLOR: #ffffff }
</style>
<script language=JAVASCRIPT>
function checkAll()
{
	var objID;
	objID=document.all.Photo;
	for (var i=0 ;i<objID.length;i++)
	{
		if(objID[i].checked)
		{
			objID[i].checked=false;
			AddRemoveValues(objID[i]); 
			
		}
		else
		{
			objID[i].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,""); 
}
		</script>
</HEAD>
	<body>
		<DIV id="mytips" style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; DISPLAY: none; FONT-SIZE: 9pt; FILTER: progid: DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3); BORDER-LEFT: gray 1px solid; WIDTH: 150px; COLOR: red; BORDER-BOTTOM: gray 1px solid; POSITION: absolute; HEIGHT: 16px; BACKGROUND-COLOR: #ffffff"></DIV><FONT style="BACKGROUND-COLOR: #ffffff" 
face=宋体></FONT><FONT style="BACKGROUND-COLOR: #ffffff" 
face=宋体></FONT><FONT style="BACKGROUND-COLOR: #ffffff" 
face=宋体></FONT><FONT face=宋体></FONT>
		<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"><strong 
      >相片管理—
					    <asp:Label id=userstr runat="server" Font-Bold="True"></asp:Label>
					    —
					    <asp:Label id=dir runat="server" Font-Bold="True"></asp:Label>
					</strong></td>
			  </tr>
			</table>
<div align=center><div class=main_content_2 id=content><asp:repeater id=dPhotos runat="server">
																	<ItemTemplate>
																		<div class="photo" title='<%# DataBinder.Eval(Container.DataItem, "fileName") %>'>
																			<div class="pic" align="center" >
																				<div style="vertical-align:top" align=right><a href='admin_edituser.aspx?username=<%# DataBinder.Eval(Container.DataItem, "username") %>'><%# DataBinder.Eval(Container.DataItem, "username") %></a>&nbsp;&nbsp;<a href='admin_share_edit.aspx?id=<%# DataBinder.Eval(Container.DataItem, "id") %>' target="_blank"><img src='../images/edit.gif' border="0"></a></div><div align="center" style='WIDTH: 120px;  ; PADDING-TOP: expression(this.style.top+(this.offsetHeight-a<%# Container.ItemIndex + 1 %>.offsetHeight)/2);  HEIGHT: 100px' ><a href='<%# showimg(DataBinder.Eval(Container.DataItem, "alias").ToString(),DataBinder.Eval(Container.DataItem, "username").ToString()) %>' target=_blank>
																				  <img src='<%# tuurl(DataBinder.Eval(Container.DataItem, "alias").ToString(),DataBinder.Eval(Container.DataItem, "username").ToString()) %>' border="0" id="a<%# Container.ItemIndex + 1 %>"></a></div>
																			</div>
																			<div class="title">
																				<input name="Photo" value='<%# DataBinder.Eval(Container.DataItem, "id") %>' type="checkbox" onClick="AddRemoveValues(this)">
																				<a href='<%# showimg(DataBinder.Eval(Container.DataItem, "alias").ToString(),DataBinder.Eval(Container.DataItem, "username").ToString()) %>' target=_blank>
																					<%# showname(DataBinder.Eval(Container.DataItem, "fileName").ToString(),DataBinder.Eval(Container.DataItem, "good").ToString()) %>
																				</a>
																			</div>
																		</div>
																	</ItemTemplate>
							</asp:repeater><input id=Photo style="DISPLAY: none" type=checkbox 
name=Photo> </div></div>
				<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 height="81" align="center"><STRONG><STRONG>
                      <INPUT id=bAll onclick=checkAll() type=checkbox 
name=bAll>
                      <LABEL for=bAll><B>全 选</B></LABEL>
                    </STRONG>查找照片：</STRONG>
                      <asp:textbox id=key runat="server" CssClass="tableTdtext"></asp:textbox>
                      <asp:button id=Button2 runat="server" CssClass="formbutton" Text="查找" Width="50px" onclick="Button2_Click"></asp:button>
                      <INPUT 
id=HdnSelectedValues type=hidden name=HdnSelectedValues runat="server"> <STRONG><FONT 
      style="BACKGROUND-COLOR: #ffffff"><BR><BR></FONT></STRONG>
                      <asp:button id=btndel runat="server" CssClass="formbutton" Text="删除选定" Width="73px" onclick="btndel_Click"></asp:button>&nbsp;&nbsp;&nbsp;&nbsp;<asp:button class=formbutton id=tj runat="server" Width="84px" Text="选定设为推荐" onclick="tj_Click"></asp:button>&nbsp;&nbsp;<asp:button class=formbutton id=untj runat="server" Width="84px" Text="选定取消推荐" onclick="untj_Click"></asp:button>&nbsp; 
<asp:button class=formbutton id=Button3 runat="server" Width="84px" Text="批量编辑" onclick="Button3_Click"></asp:button></td>
                  </tr>
                </table>
<DIV><FONT face=宋体></FONT></DIV>
		</form>
	</body>
</HTML>
