📄 index.aspx
字号:
<%@ Page language="c#" Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="OASelfManage.Module.Mail.index" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Index</title>
<meta content="Microsoft Visual Studio 7.0" name=GENERATOR>
<meta content=C# name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema><LINK href="../../css/BasicLayout.css" type=text/css rel=stylesheet >
<script language=javascript>
var ball1 = new Image();
var ball2 = new Image();
ball1.src = 'images/ball1.gif';
ball2.src = 'images/ball2.gif';
var active = new Image();
var nonactive = new Image();
active.src = '../../images/maillistbutton2.gif';
nonactive.src = '../../images/maillistbutton1.gif';
function onMouseOver(img)
{
document.images[img].src = ball2.src;
}
function onMouseOut(img)
{
document.images[img].src = ball1.src;
}
function onOverBar(bar)
{
if (bar != null) {
bar.style.backgroundImage = "url("+active.src+")";
}
}
function onOutBar(bar)
{
if (bar != null) {
bar.style.backgroundImage = "url("+nonactive.src+")";
}
}
function selectAll(){
var len=document.MailList.elements.length;
var i;
for (i=0;i<len;i++){
if (document.MailList.elements[i].type=="checkbox"){
document.MailList.elements[i].checked=true;
}
}
}
function unSelectAll(){
var len=document.MailList.elements.length;
var i;
for (i=0;i<len;i++){
if (document.MailList.elements[i].type=="checkbox"){
document.MailList.elements[i].checked=false;
}
}
}
</script>
</HEAD>
<body leftMargin=0 topMargin=0 rightMargin=0
MS_POSITIONING="GridLayout">
<form id=MailList method=post runat="server">
<table cellSpacing=0 cellPadding=0 width="100%">
<tr>
<td vAlign=top height=38>
<TABLE borderColor=#111111 height=1 cellSpacing=0 cellPadding=0
width="100%" border=0>
<TR height=30>
<TD class=GbText align=right background=../../Images/treetopbg.jpg
bgColor=#e8f4ff><FONT face=宋体
><asp:label id=lblMsg runat="server" Font-Size="X-Small" Width="88px"></asp:label>
<asp:button id=btnClear runat="server" CssClass="redButtonCss" Text="清 空" Visible="False"></asp:button>
<asp:button id=btnDelete runat="server" CssClass="redButtonCss" Text="删 除"></asp:button>
<INPUT class=redButtonCss onclick=selectAll() type=button value="全 选">
<INPUT class=redButtonCss onclick=unSelectAll() type=button value="取 消">
<asp:dropdownlist id=listFolderType runat="server" OnSelectedIndexChanged="FolderListChange" AutoPostBack="True"></asp:dropdownlist></FONT></TD></TR></TABLE></TD></TR>
<tr>
<td vAlign=bottom height=25>
<table cellSpacing=0 cellPadding=0 width="100%" border=0
>
<tr height=25>
<td style="HEIGHT: 25px" width=1></TD>
<td id=bar1
style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; WIDTH: 71px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px"
align=center width=89
background='<% Response.Write(Session["FolderType"].ToString()=="1"?"../../images/maillistbutton2.gif":"../../images/maillistbutton1.gif"); %>'
bgColor=#000099> <A class=Newbutton href="Index.aspx?FolderType=1" >收件箱</A></TD>
<td class=Newbutton id=bar2
style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px"
align=center width=90
background='<% Response.Write(Session["FolderType"].ToString()=="2"?"../../images/maillistbutton2.gif":"../../images/maillistbutton1.gif"); %>'
bgColor=#000099> <A class=Newbutton href="Index.aspx?FolderType=2" >发件箱</A></TD>
<td id=bar3
style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px"
align=center width=90
background='<% Response.Write(Session["FolderType"].ToString()=="3"?"../../images/maillistbutton2.gif":"../../images/maillistbutton1.gif"); %>'
bgColor=#000099> <A class=Newbutton href="Index.aspx?FolderType=3" >废件箱</A></TD>
<td id=bar4
style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px"
align=center width=90 background=../../images/maillistbutton1.gif
> <A class=Newbutton href="Compose.aspx?ClassID=0" >撰写新邮件</A></TD>
<td style="HEIGHT: 25px" align=right><FONT
face=宋体> </FONT></TD></TR></TABLE></TD></TR>
<tr>
<td vAlign=top align=center><asp:datagrid id=dgMailList runat="server" Width="100%" CellSpacing="2" PageSize="15" DataKeyField="MailID" OnPageIndexChanged="DataGrid_PageChanged" PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NumericPages" AllowPaging="True" AutoGenerateColumns="False" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" BackColor="#DEBA84" CellPadding="3" AllowSorting="True" OnSortCommand="DataGrid_Sort" OnItemDataBound="DataGrid_ItemDataBinding">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#738A9C"></SelectedItemStyle>
<ItemStyle Font-Size="X-Small" HorizontalAlign="Center" ForeColor="#8C4510" VerticalAlign="Middle"
BackColor="#FFF7E7"></ItemStyle>
<HeaderStyle Font-Size="X-Small" Font-Bold="True" HorizontalAlign="Center" Height="10px" ForeColor="White"
VerticalAlign="Top" BackColor="#A55129"></HeaderStyle>
<FooterStyle Font-Size="XX-Small" HorizontalAlign="Center" Height="10px" ForeColor="#8C4510"
VerticalAlign="Bottom" BackColor="#F7DFB5"></FooterStyle>
<Columns>
<asp:TemplateColumn HeaderText="选择">
<HeaderStyle HorizontalAlign="Center" Width="40px"></HeaderStyle>
<ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Height="20px" Width="60px"></ItemStyle>
<ItemTemplate>
<asp:CheckBox id="grpMailID" Checked="False" Runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="邮件主题">
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<ItemStyle Font-Size="X-Small" HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<a href='ReadMail.aspx?MailId=<%# DataBinder.Eval(Container.DataItem,"MailID") %>&CurrentPageIndex=<%=CurrentPageIndex%>&FolderType=<%=Session["FolderType"].ToString()%>'>
<%# (DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Length>20)?DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Substring(0,20)+"...":DataBinder.Eval(Container.DataItem,"MailSubject").ToString() %>
</a>
<%# DataBinder.Eval(Container.DataItem,"attnumber").ToString()=="0"?"":"<img src='../../DataImages/attach.gif' border='0'>" %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="MailSender" SortExpression="MailSender" HeaderText="发送者">
<HeaderStyle Width="100px"></HeaderStyle>
<ItemStyle Font-Size="X-Small"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="接收者">
<HeaderStyle Width="100px"></HeaderStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# GetRealNameStr(DataBinder.Eval(Container, "DataItem.MailReceiver").ToString()) %>' ID="Label1">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="所有接收者">
<HeaderStyle Width="100px"></HeaderStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# GetRealNameStr(DataBinder.Eval(Container, "DataItem.MailReceiverStr").ToString()) %>' ID="Label2">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="是否已读">
<HeaderStyle Width="80px"></HeaderStyle>
<ItemStyle Font-Size="X-Small"></ItemStyle>
<ItemTemplate>
<%# (string)DataBinder.Eval(Container.DataItem,"MailReadFlag")=="False"?"<img src='../../Images/mailclose.gif'>":"<img src='../../Images/mailopen.gif'>" %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn SortExpression="attsize" HeaderText="大小(Kb)">
<ItemStyle Font-Size="X-Small"></ItemStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# (DataBinder.Eval(Container, "DataItem.attsize")).ToString()!=""&&(DataBinder.Eval(Container, "DataItem.attsize")).ToString()!="0"?(DataBinder.Eval(Container, "DataItem.attsize")).ToString()+"":"1" %>' ID="Label3">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn SortExpression="MailSendDate" HeaderText="日期">
<ItemStyle Font-Size="X-Small"></ItemStyle>
<ItemTemplate>
<ItemStyle Font-Size="X-Small"></ItemStyle>
<asp:Label runat="server" Text='<%# DateTime.Parse(DataBinder.Eval(Container, "DataItem.MailSendDate").ToString()).ToString("yyyy-MM-dd") %>' ID="Label4">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Center"
ForeColor="#8C4510" Mode="NumericPages"></PagerStyle>
</asp:datagrid></TD></TR>
<TR>
<TD vAlign=top> </TD></TR></TABLE></FORM>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -