Index.aspx
上传用户:jdb8708888
上传日期:2013-05-29
资源大小:19971k
文件大小:11k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="Index.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.Mail.MailList" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>Index</title>
  6. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  7. <meta content="C#" name="CODE_LANGUAGE">
  8. <meta content="JavaScript" name="vs_defaultClientScript">
  9. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  10. <script language="javascript">
  11. var ball1 = new Image();
  12. var ball2 = new Image();
  13. ball1.src = 'images/ball1.gif';
  14. ball2.src = 'images/ball2.gif';
  15. var active = new Image();
  16. var nonactive = new Image();
  17. active.src = '../../../images/maillistbutton2.gif';
  18. nonactive.src = '../../../images/maillistbutton1.gif';
  19. function onMouseOver(img)
  20. {
  21. document.images[img].src = ball2.src;
  22. }
  23. function onMouseOut(img)
  24. {
  25. document.images[img].src = ball1.src;
  26. }
  27. function onOverBar(bar)
  28. {
  29. if (bar != null) {
  30. bar.style.backgroundImage = "url("+active.src+")";
  31. }
  32. }
  33. function onOutBar(bar)
  34. {
  35. if (bar != null) {
  36. bar.style.backgroundImage = "url("+nonactive.src+")";
  37. }
  38. }
  39. function selectAll(){
  40. var len=document.MailList.elements.length;
  41. var i;
  42.     for (i=0;i<len;i++){
  43. if (document.MailList.elements[i].type=="checkbox"){
  44.         document.MailList.elements[i].checked=true;
  45.  }
  46. }
  47. }
  48. function unSelectAll(){
  49.           var len=document.MailList.elements.length;
  50.           var i;
  51.           for (i=0;i<len;i++){
  52.                if (document.MailList.elements[i].type=="checkbox"){
  53.                   document.MailList.elements[i].checked=false; 
  54.                }   
  55.           } 
  56.     }
  57. </script>
  58. <LINK href="../../../Css/BasicLayout.css" type="text/css" rel="stylesheet">
  59. </HEAD>
  60. <body leftMargin="0" topMargin="0" rightMargin="0" MS_POSITIONING="GridLayout">
  61. <form id="MailList" method="post" runat="server">
  62. <table cellSpacing="0" cellPadding="0" width="100%">
  63. <tr>
  64. <td vAlign="top" height="38"><TABLE borderColor="#111111" height="1" cellSpacing="0" cellPadding="0" width="100%" border="0">
  65. <TR height="30">
  66. <TD class="GbText" width="20" background="../../../Images/treetopbg.jpg" bgColor="#c0d9e6"
  67. align="right"><FONT color="#003366" size="3"><IMG height="16" src="../../../Images/icon/284.GIF" width="16"></FONT></TD>
  68. <TD class="GbText" background="../../../Images/treetopbg.jpg" bgColor="#e8f4ff" width="60"
  69. align="right">我的邮件</TD>
  70. <TD class="GbText" background="../../../Images/treetopbg.jpg" bgColor="#e8f4ff" align="right"><FONT face="宋体">
  71. <asp:label id="lblMsg" runat="server" Width="88px" Font-Size="X-Small"></asp:label>&nbsp;
  72. <asp:button id="btnClear" runat="server" Visible="False" Text="清 空" CssClass="redButtonCss"></asp:button>
  73. &nbsp;
  74. <asp:button id="btnDelete" runat="server" Text="删 除" CssClass="redButtonCss"></asp:button>&nbsp;
  75. <INPUT class="redButtonCss" onclick="selectAll()" type="button" value="全 选">&nbsp;
  76. <INPUT class="redButtonCss" onclick="unSelectAll()" type="button" value="取 消">&nbsp;
  77. <asp:dropdownlist id="listFolderType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="FolderListChange"></asp:dropdownlist></FONT></TD>
  78. </TR>
  79. </TABLE>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td vAlign="bottom" height="25">
  84. <table cellSpacing="0" cellPadding="0" width="100%" border="0">
  85. <tr height="25">
  86. <td style="HEIGHT: 25px" width="1"></td>
  87. <td style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px" id=bar1 align=center width=90 
  88.           background='<% Response.Write(Session["FolderType"].ToString()=="1"?"../../../images/maillistbutton2.gif":"../../../images/maillistbutton1.gif"); %>' 
  89.           >&nbsp;<A href="Index.aspx?FolderType=1" class="Newbutton">收件箱</A></td>
  90. <td style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px" id=bar2 align=center width=90 
  91.           background='<% Response.Write(Session["FolderType"].ToString()=="2"?"../../../images/maillistbutton2.gif":"../../../images/maillistbutton1.gif"); %>' 
  92.           class=Newbutton>&nbsp;<A href="Index.aspx?FolderType=2" class="Newbutton">发件箱</A></td>
  93. <td style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px" id=bar3 align=center width=90 
  94.           background='<% Response.Write(Session["FolderType"].ToString()=="3"?"../../../images/maillistbutton2.gif":"../../../images/maillistbutton1.gif"); %>' 
  95.           >&nbsp;<A href="Index.aspx?FolderType=3" class="Newbutton">废件箱</A></td>
  96. <td style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px"
  97. id="bar4" align="center" width="90" background="../../../images/maillistbutton1.gif">&nbsp;<A href="Compose.aspx?ClassID=0" class="Newbutton">撰写新邮件</A></td>
  98. <td style="BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat; HEIGHT: 25px" id=bar5 align=center width=90 
  99.           background='<% Response.Write(Session["FolderType"].ToString()=="4"?"../../../images/maillistbutton2.gif":"../../../images/maillistbutton1.gif"); %>' 
  100.           >&nbsp;<A href="Index.aspx?FolderType=4" class="Newbutton">外部邮件</A></td>
  101. <td style="HEIGHT: 25px" align="right"><FONT face="宋体">
  102. <asp:DropDownList id="listExtMail" runat="server" Visible="False"></asp:DropDownList>
  103. <asp:Button id="btnBeginReceive" runat="server" CssClass="redButtonCss" Text="开始接收" Visible="False"></asp:Button>
  104. &nbsp;
  105. <asp:Button id="btnExtPopSetup" runat="server" CssClass="redButtonCss" Text="外部邮箱设置" Visible="False"></asp:Button></FONT></td>
  106. </tr>
  107. </table>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td vAlign="top" align="center">
  112. <asp:datagrid id="dgMailList" runat="server" Width="100%" OnItemDataBound="DataGrid_ItemDataBinding"
  113. OnSortCommand="DataGrid_Sort" AllowSorting="True" CellPadding="3" BackColor="White" BorderWidth="1px"
  114. BorderStyle="None" BorderColor="#93BEE2" AutoGenerateColumns="False" AllowPaging="True" PagerStyle-Mode="NumericPages"
  115. PagerStyle-HorizontalAlign="Right" OnPageIndexChanged="DataGrid_PageChanged" DataKeyField="MailID"
  116. PageSize="15">
  117. <SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#008A8C"></SelectedItemStyle>
  118. <AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
  119. <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" ForeColor="Black" VerticalAlign="Middle"
  120. BackColor="White"></ItemStyle>
  121. <HeaderStyle Font-Size="X-Small" HorizontalAlign="Center" Height="10px" ForeColor="White" VerticalAlign="Top"
  122. BackColor="#337FB2"></HeaderStyle>
  123. <FooterStyle Font-Size="XX-Small" HorizontalAlign="Center" Height="10px" ForeColor="Black" VerticalAlign="Bottom"
  124. BackColor="#93BEE2"></FooterStyle>
  125. <Columns>
  126. <asp:TemplateColumn HeaderText="选择">
  127. <HeaderStyle HorizontalAlign="Center" Width="40px"></HeaderStyle>
  128. <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Height="20px" Width="60px"></ItemStyle>
  129. <ItemTemplate>
  130. <asp:CheckBox id="grpMailID" Checked="False" Runat="server"></asp:CheckBox>
  131. </ItemTemplate>
  132. </asp:TemplateColumn>
  133. <asp:TemplateColumn HeaderText="邮件主题">
  134. <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
  135. <ItemStyle Font-Size="X-Small" HorizontalAlign="Left"></ItemStyle>
  136. <ItemTemplate>
  137. <a href='ReadMail.aspx?MailId=<%# DataBinder.Eval(Container.DataItem,"MailID") %>&CurrentPageIndex=<%=CurrentPageIndex%>&FolderType=<%=Session["FolderType"].ToString()%>'>
  138. <%# (DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Length>20)?DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Substring(0,20)+"...":DataBinder.Eval(Container.DataItem,"MailSubject").ToString() %>
  139. </a>
  140. <%# DataBinder.Eval(Container.DataItem,"attnumber").ToString()=="0"?"":"<img src='../../../DataImages/attach.gif' border='0'>" %>
  141. </ItemTemplate>
  142. </asp:TemplateColumn>
  143. <asp:BoundColumn DataField="MailSender" SortExpression="MailSender" HeaderText="发送者">
  144. <HeaderStyle Width="100px"></HeaderStyle>
  145. <ItemStyle Font-Size="X-Small"></ItemStyle>
  146. </asp:BoundColumn>
  147. <asp:TemplateColumn HeaderText="接收者">
  148. <HeaderStyle Width="100px"></HeaderStyle>
  149. <ItemTemplate>
  150. <asp:Label runat="server" Text='<%# GetRealNameStr(DataBinder.Eval(Container, "DataItem.MailReceiver").ToString()) %>'>
  151. </asp:Label>
  152. </ItemTemplate>
  153. </asp:TemplateColumn>
  154. <asp:TemplateColumn HeaderText="所有接收者">
  155. <HeaderStyle Width="100px"></HeaderStyle>
  156. <ItemTemplate>
  157. <asp:Label runat="server" Text='<%# GetRealNameStr(DataBinder.Eval(Container, "DataItem.MailReceiverStr").ToString()) %>'>
  158. </asp:Label>
  159. </ItemTemplate>
  160. </asp:TemplateColumn>
  161. <asp:TemplateColumn HeaderText="是否已读">
  162. <HeaderStyle Width="80px"></HeaderStyle>
  163. <ItemStyle Font-Size="X-Small"></ItemStyle>
  164. <ItemTemplate>
  165. <%# (string)DataBinder.Eval(Container.DataItem,"MailReadFlag")=="False"?"<img src='../../../Images/mailclose.gif'>":"<img src='../../../Images/mailopen.gif'>" %>
  166. </ItemTemplate>
  167. </asp:TemplateColumn>
  168. <asp:BoundColumn DataField="ClassName" SortExpression="ClassName" HeaderText="所属项目">
  169. <ItemStyle Font-Size="X-Small"></ItemStyle>
  170. </asp:BoundColumn>
  171. <asp:TemplateColumn SortExpression="attsize" HeaderText="大小(Kb)">
  172. <ItemStyle Font-Size="X-Small"></ItemStyle>
  173. <ItemTemplate>
  174. <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" %>'>
  175. </asp:Label>
  176. </ItemTemplate>
  177. </asp:TemplateColumn>
  178. <asp:TemplateColumn SortExpression="MailSendDate" HeaderText="日期">
  179. <ItemStyle Font-Size="X-Small"></ItemStyle>
  180. <ItemTemplate>
  181. <ItemStyle Font-Size="X-Small"></ItemStyle>
  182. <asp:Label runat="server" Text='<%# DateTime.Parse(DataBinder.Eval(Container, "DataItem.MailSendDate").ToString()).ToString("yyyy-MM-dd") %>'>
  183. </asp:Label>
  184. </ItemTemplate>
  185. </asp:TemplateColumn>
  186. </Columns>
  187. <PagerStyle Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right"
  188. BackColor="#E8F4FF" Mode="NumericPages"></PagerStyle>
  189. </asp:datagrid></td>
  190. </tr>
  191. <TR>
  192. <TD vAlign="top">&nbsp;&nbsp;&nbsp;</TD>
  193. </TR>
  194. </table>
  195. </form>
  196. </body>
  197. </HTML>