⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mailbox.asp

📁 功能非常强大的一款办公自动化软件原代码,其中的文档签收功能特别实用.不相信下下来看下.
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#include file="connect.asp"-->
<html>
<head>


<link rel="stylesheet" href="mail.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script language=javascript>
function TurnColor(td) {
td.bgColor="#BCE4B8"

}
function Turn(td) {
td.bgColor="#E6F2FD"
}
function openmail(td) {
document.location.href="readmail.asp?id="+td
return false;
}
function TurnGreen(td) {
  if (form.checkbox.length+""=="undefined")
  form.checkbox.click()
  else
  form.checkbox[td].click()		 
}
var status=false
//选择所有邮件
function checkall() {
if (!status) {
for (var i=0;i<form.checkbox.length;i++)
            {var e = form.checkbox[i];
			  e.checked=true}
			 
      }
   else 
   {
   for (var i=0;i<form.checkbox.length;i++)
            {var e = form.checkbox[i];
			  e.checked=false}
			  
    }
   status=!status
}
//删除邮件
function delmail() {
  var status
for (var i=0;i<form.checkbox.length;i++)
	{
		var e = form.checkbox[i];
			if (e.checked==true)
			{
				status="true"
				break;
			}
	} 
	if(form.checkbox.checked==true) status="true"
	if (status=="true")
	{
	if (confirm("您确定要删除邮件吗?"))
		{document.form.submit()}
	}
			else
			{
			alert("你至少要选择一个你要删除的邮件")
			}
			return false;
}


</script>
<%
set rs=server.createobject("adodb.recordset")
set ptr=server.createobject("adodb.recordset")
	sql="select * from mail where topeopleid='"&session("uid")&"' order by mailtime desc"
	rs.open sql,conn,1,1
	   no=0
	   mypage=10
	   Pagepre=false
	   PageNext=false
	   rs.pagesize=CINT(mypage)
	   PageNo=REQUEST("PageNO")
	   PageNo=CINT(PageNo)
	  TSum="1"
	  if PageNo="" or PageNo=0 then
	   PageNo=1
	   	   else
	   PageNo=PageNo+1
	   PageNo=PageNo-1
     end if
       if not rs.eof then
	 TSum=INT(rs.RECORDCOUNT/Mypage*-1)*-1
	 rs.absolutepage=PageNo
	 if PageNo>1 then PagePre=true
	 if (PageNO*mypage)<rs.recordcount then PageNext=true
	end if
  totalnum=rs.recordcount 
    sql="select count(id) as newnum from mail where topeopleid='"&session("uid")&"' and status=0"
    ptr.open sql,conn,1,1
    newnum=ptr("newnum")
	ptr.close
	set ptr=nothing
%>
<form name="form" method="post" action="delmails.asp">

  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="26">
    <tbody>
	<tr> 
      
      <td width="100%" background="images/emailt.gif" class="9blue">
	  &nbsp;收件箱邮件数(<%=totalnum%>),新邮件数(<%=newnum%>)</td>
      
    </tr>
	</tbody>
  </table>
  
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="33">
    <tr>
	
      <td background="images/email10.gif" valign="top"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
          <tr> 
            <td width="65" align="center"> <a href="#" onClick="return delmail()" class="wlink">删 
              除</a></td>
           
			<td width="6"><img src="images/email12.gif" width="6" height="33"></td>
            <td width="65" align="center"> <a href="writemail.asp" class="wlink">写邮件</a></td>
			<td width="6"><img src="images/email12.gif" width="6" height="33"></td>
            <td width="65" align="center"> <a href="mailbox.asp" class="wlink">收邮件</a></td>
             <td width="6"><img src="images/email12.gif" width="6" height="33"></td>
            <td width="65" align="center" class="wnolink"> 
              <%
			if (PageNo*mypage-mypage)>0 then
		    PrwePage=PageNo-1   
	      response.write "<a href='mailbox.asp?PageNo="&PrwePage&"' class='wlink'>上 页</a>"
	       else
	        response.write "上 页"
	        end if
			%>
            </td>
			 <td width="6"><img src="images/email12.gif" width="6" height="33"></td>
            <td width="65" align="center" class="wnolink"> 
              <%
			 if (PageNO*mypage)<rs.recordcount then
	        NextPage=PageNo+1   
	        response.write "<a href='mailbox.asp?PageNo="&NextPage&"' class='wlink'>下 页</a>"  
	        else
	       response.write "下 页" 
		     end if
			%>
            </td>
			<td width="6"><img src="images/email12.gif" width="6" height="33"></td>
			<td width="65" align="center"> <a href="right.asp" class="wlink">首 
              页</a></td>
			<td width="6"><img src="images/email12.gif" width="6" height="33"></td>
            <td width="65" align="center"><a href="redirectmain.asp" class="wlink">返 
              回</a></td>
            <td width="6"><img src="images/email12.gif" width="6" height="33"></td>
			<td class="wnolink">&nbsp;</td>
          </tr>
        </table>
      </td>
	 
    </tr>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="33">
    <tr> 
	
      <td width="570"><img src="images/email8.gif" width="575" height="50"></td>
      <td background="images/email9.gif" width="100%">&nbsp;</td>
	  
    </tr>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
    <tbody> 
    <tr> 
    
      <td width="1005" valign="top"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="60">
          <tr> 
            <td height="54" valign="top"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
                <tbody> 
                <tr> 
                  
                <td width="100%" valign="top"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="20" bgcolor="#BADCFC">
                    <tr> 
                        <td width="60" align="right"> <img src="images/email14.gif" width="19" height="16" onClick="checkall()"> 
                        </td>
                        <td width="48" align="center"><img src="images/email15.gif" width="19" height="16"></td>
                        <td width="171" class="textblue">发件人</td>
                        <td width="378" class="textblue"><img src="images/email16.gif" width="8" height="16">主 
                          题</td>
                        <td width="228" class="textblue"><img src="images/email16.gif" width="8" height="16">时 
                          间</td>
                        <td width="134" class="textblue">状 态</td>
                    </tr>
                  </table>
				  <% dim no
					no=0
				  for i=1 to mypage
				    if rs.eof then exit for%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td bgcolor="ffffff"><img src="images/spacer.gif" width="1" height="1"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
                <tr bgColor="E6F2FD" class="textfont" onClick="TurnGreen('<%=no %>')"> 
                      <td width="35" align="center"> </td>
                      <td width="36" align="center"> 
                        <input type="checkbox" name="checkbox" value="<%=rs("id")%>">
                      </td>
                      <td width="37" align="center"><img src="images/list4.gif" width="16" height="16"></td>
                      <td width="177" class="textfont"> 
                        <a href="#" onClick="return openmail('<%=rs("id")%>')">
						<%response.write rs("sendername")%>
						</a>
                      </td>
                        <td width="377" class="textfont"> <a href="#" onClick="return openmail('<%=rs("id")%>')"> 
                          <%temp=rs("title")
					  if len(temp)>20 then temp=left(temp,20)&"…"
					  response.write temp
					  %>
                          </a> </td>
                      <td width="219" class="textfont"><%=rs("mailtime")%></td>
                      <td width="35" align="center" class="textfont"> 
                        <%if rs("status")=0 then 
						  response.write "<img src='images/email13.gif'>"
						  else
						  response.write "<img src='images/email17.gif'>"
						  end if
						  %>
                      </td>
                      
                          
                      <td width="96">&nbsp;</td>
                    </tr>
                  </table>
				     <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td bgcolor="#C9E9FC"><img src="images/spacer.gif" width="1" height="1"></td>
                    </tr>
                  </table>
				    <%
				  rs.movenext
				  no=no+1
				  next
				
                      %>
                  </td>
      
    </tr>
    </tbody> 
  </table>
			 </td>
          </tr>
        </table>
      </td>
  
    </tr>
    </tbody> 
  </table>
  
 </form>
<%
rs.close
set rs=nothing
conn=close
set conn=nothing
%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -