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

📄 admin_mail.asp

📁 政府网站集成OA办公考勤新闻发布网站信息管理会员管理
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_FrontSetFeedback")<>1 then HX_GoBack "对不起,您的权限不够!","" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../HXinclude/HX_Style.css" rel="stylesheet" type="text/css">
</head>
<body topmargin='20' leftmargin='0' bottommargin='0'>
<%
    dim indeximg,txt,action_e,rscount,sqlCount,page2,m,unhtmlgl,nowtime,cText,startubb,endubb_a,endubb_b,endubb,server_v1,server_v2
    indeximg="Images/" '图片文件夹
    n=6 '每页显示邮件数
    x=5  '每页显示的页数
    txt=1000  '邮件的最大字数
    dim webtitle,webname,webyn,webgl,webyn2,view2
    set rs1 = conn.execute("select * From a125_Set")
    if rs1("gbyn")<>"" then webyn=rs1("gbyn")
    webgl=rs1("gl")
    rs1.close
    set rs1=nothing
    '设置页脚信息,这里可以加入你的地址
    page =Request.QueryString("page")
    if page="" or page=0 then page=1
    action = Request.QueryString("action")
    action_e = Request.Form("action_e")
    if action_e <>"" then
    server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
    server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
    if mid(server_v1,8,len(server_v2))<>server_v2 then 
    response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>" 
    response.write "<tr><td style='font:9pt Verdana'>" 
    response.write "你提交的路径有误,禁止从站点外部提交数据请不要乱该参数!"
    response.write "</td></tr></table></center>"
    response.end
    end if
    end if
%>
<script language="JavaScript">
    function gbcount(message,total,used,remain)
    {
    var max;
    max = total.value;
    if (message.value.length > max) {
    message.value = message.value.substring(0,max);
    used.value = max;
    remain.value = 0;
    alert("邮件不能超过 <%=txt%> 个字!");
    }
    else {
    used.value = message.value.length;
    remain.value = max - used.value;
    }
    }
</script>
<table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#115F8F'><tr><td colspan='2' bgcolor=ffffff>
 <table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>领导信箱管理</font></td></tr></table>
<%
    '主程序
    Select Case action_e
    Case ""
    Case "reply"
    Call Reply_Execute()
    Case "admin"
    Call Admin_Login_Execute()
    Case "EditPWD"
    Call EditPWD_Execute()
    Case "Edit"
    Call Edit_Execute()
    Case "Edit_web"
    Call Edit_web()
    End Select
    
    Call Main_Menu()
    
    Select Case action
    Case "UbbHelp"
    Call UbbHelp()
    Case "Admin_Login"
    Call Admin_Login()
    Case "Exit"
    Call Exit_Admin()
    Call View_a125_gb()
    Case ""	
    Call View_a125_gb()
    Case "Add_New"
    Call Add_New()
    Case "reply"
    Call Reply()
    Case "View_a125_gb"
    Call View_a125_gb()
    Case "Delete"
    Call Delete()
    Call View_a125_gb()
    Case "EditPWD"
    Call EditPWD()
    Case "Edit"
    Call Edit()
    Case "Edit_web"
    Call Edit_web()
    End Select
%>
      </td>
    </tr>
  </table>
<% Sub Main_Menu() %>
 <table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor='#A1BBE0'>
   <tr bgcolor='#F6F6F6'><td><div align="left">
<%
    if webyn=1 then
    set rscount=server.createobject("adodb.recordset")
    sqlCount="select count(View) from a125_gb where view=2"
    rsCount.open sqlCount,conn,1,1
    if RsCount(0)=0 then
    response.write "<font color=#FF0000>您暂时没有未处理的邮件</font>"
    else
    response.write "<font color=#FF0000>您还有<b> " & rsCount(0) & " </b>条邮件未处理</font>"
    rsCount.close
    end if
    else
    response.write "您没有设置邮件审核功能"
    end if
%>
&nbsp;&nbsp;&nbsp;<a href="?cl=no">未处理邮件</a>&nbsp;&nbsp;<a href="?cl=yes">已处理邮件</a>&nbsp;&nbsp;<a href="?cl=all">全部邮件</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="?action=Edit_web">基本设置</a> 
</div></td>
</tr>
</table>
<%
    End Sub
    '''''''''''''''''''''''
    '查看邮件
    Sub View_a125_gb()
    dim gbcount,y,j,k

   if request("cl")="" or request("cl")="all" then
    set rs = conn.execute("select COUNT(*) as gbcount From a125_gb where view>1")
    gbcount=rs("gbcount")
    rs.close
    if gbcount/n = int(gbcount/n) then '计算出分页数
    y=int(gbcount/n)
    else
    y=int(gbcount/n)+1
    end if
    page2= int(page/x)
    if page/x>page2 then page2=page2+1
    k=page2*x
    if k>y then k=y
    '打开邮件字段'
    if page=1 then
    sql="select top "&n&" id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view>1 Order By id Desc"
    else
    sql="select id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view>1 Order By id Desc"
    end if
   end if
   if request("cl")="yes" then
       set rs = conn.execute("select COUNT(*) as gbcount From a125_gb where view=3")
    gbcount=rs("gbcount")
    rs.close
    if gbcount/n = int(gbcount/n) then '计算出分页数
    y=int(gbcount/n)
    else
    y=int(gbcount/n)+1
    end if
    page2= int(page/x)
    if page/x>page2 then page2=page2+1
    k=page2*x
    if k>y then k=y
    '打开邮件字段'
    if page=1 then
    sql="select top "&n&" id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=3 Order By id Desc"
    else
    sql="select id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=3 Order By id Desc"
    end if
   end if  
   if request("cl")="no" then
       set rs = conn.execute("select COUNT(*) as gbcount From a125_gb where view=2")
    gbcount=rs("gbcount")
    rs.close
    if gbcount/n = int(gbcount/n) then '计算出分页数
    y=int(gbcount/n)
    else
    y=int(gbcount/n)+1
    end if
    page2= int(page/x)
    if page/x>page2 then page2=page2+1
    k=page2*x
    if k>y then k=y
    '打开邮件字段'
    if page=1 then
    sql="select top "&n&" id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=2 Order By id Desc"
    else
    sql="select id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=2 Order By id Desc"
    end if
   end if     
    if Page >100 then
    rs.Open sql,Conn,1
    else
    Set Rs=Conn.Execute(sql)
    end if
    if Page>1 then RS.Move n*page-n
%>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%" height="20" >
有<%=gbcount %>条邮件 <%=page %>/<%=y %>页 分页 <a href="?page=1"><<</a>
<% if page2>1 then %>
  <a href="?page=<%=page2*x-x%>"><</a>
<% end if %>
<% For m =page2*x-(x-1) To k %>
[<a href="?page=<%=m%>"><%=m%></a>]
<% Next %>
<% if page2*x < y then %>
<a href="?page=<%=m%>">></a>
<% end if %>
	  <a href="?page=<%=y %>">>></a>
            </td>
          </tr>

</table>
<% if rs.bof  and rs.eof then Response.Write "当前没有邮件记录" %>
<%
    dim lou,a125_gb,reply,email,qq,web,come,phone
    if Request.QueryString("page")<2 then
    lou=gbcount
    else
    lou=gbcount-((Request.QueryString("page")-1)*n)
    end if
    i=0
    do while not rs.eof and i<n
    i=i+1
    a125_gb=rs("a125_gb")
    reply=rs("reply")
%>
<table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor='#f1f1f1'><TBODY>
 <tr bgcolor='#A1BBE0' class='td4'>
        <TD colSpan=2 height=25><table width="100%" height="31"  border="0" background="Images/a125_gbdaohang.gif" class="unnamed1">
<tr>
            
<td height="21">&nbsp;&nbsp;主题:<b><%=rs("title")%></b></td>
            
<td> 
<div align="right">
<% if len(trim(rs("phone")))>5  then %>
                <img src="../<%=indeximg%>phone.gif" alt="<%=Rs("phone")%>" width="16" height="16" border="0">
<% end if %>
<% if len(trim(rs("email")))>6  then %>
             	<a href="mailto:<%=rs("email")%>"><img src="../<%=indeximg%>a125_email.gif" alt="<%=rs("email")%>" width="16" height="16" border="0"></a> 
<% end if %>
<% if len(trim(rs("qq")))>4  then %>
                <img src="../<%=indeximg%>a125_oicq.gif" alt="<%=Rs("qq")%>" width="16" height="16" border="0">
<% end if %>
<% if len(trim(Rs("come")))>1  then %>
                <img src="../<%=indeximg%>a125_come.gif" alt="联系地址:<%=Rs("come")%>" width="16" height="16">
<% end if %>

                                        <img src="../<%=indeximg%>a125_ip.gif" alt="IP:<%=Rs("ip")%>" width="16" height="16" align=absMiddle><font color="#666666"><a href="?action=Edit&id=<%=Rs("id")%>"> 
                                        <img src="../<%=indeximg%>a125_reply.gif" alt="编辑回复" width="16" height="16" border="0"></a> 
                                        <a href="?action=Delete&id=<%=Rs("id")%>" onClick="return confirm('确定要删除吗?\n\n该操作不可恢复!')"> 
                                        <img src="../<%=indeximg%>a125_del.gif" alt="删除邮件" width="15" height="15" border="0"></a></font> 

              </div></td>
            
<td width="14%"> 第 <font color="#ff0000"><%=lou %></font> 条邮件</td>
          </tr>
        </table>          </TD>
      </TR>
  <tr bgcolor='#f1f1f1' onmouseover=javascript:this.bgColor='#EAEAEA' onmouseout=javascript:this.bgColor='#f1f1f1'>       
<TD width="111" height="21" align=middle valign="top"> 
<table width="100%" border="0" align="center">
<tr>        
<td width="118"align="center">
<%if rs("sex")=1 then %>
  <img src="../<%=indeximg%>a125_male.gif">
<% else %>
  <img src="../<%=indeximg%>a125_female.gif">
<% end if %>
<br>
邮件:<%=rs("name")%>
</td>
</tr>
</table></TD>       
<TD width="446" height="21"  style="word-break:break-all"> 
<table width="96%" height="132" border="0" align="center">
<tr>            
<td width="100%" height="70" style="word-break:break-all"> 
  <br>
<% if webyn=1 and rs("view")=3 then %>
<%=Ubb(unHtml(a125_gb))%>
<% if len(trim(reply))>1 then%>
  <hr size="1">
  <span class="style1">主管回复:</span><br>
  <font color="#990000"> <%=Ubb(unHtml(reply))%> </font>
<%end if %>
<%end if %>
<% if webyn<>1 then %>
<%=Ubb(unHtml(a125_gb))%>
<% if len(trim(reply))>1 then%>
  <hr size="1">
  <span class="style1">主管回复:</span><br>
  <font color="#990000"><%=Ubb(unHtml(reply))%> </font>
<%end if %>
<%end if %>

<% if webyn=1 and rs("view")=2 then%>
              <font color="#FF0000">此邮件还未经过处理</font> 
<%end if %>
            </td>
          </tr>
      <tr bgcolor='#f1f1f1' onmouseover=javascript:this.bgColor='#EAEAEA' onmouseout=javascript:this.bgColor='#f1f1f1'>
  <td height="22" align="right" style="word-break:break-all">发表于:<%=year(Rs("date"))%>年<%=month(Rs("date"))%>月<%=day(Rs("date"))%>日</td>
</tr>
        </table> 
        
      </TD>
      </TR>
    </TBODY>
</TABLE>
<%
    lou=lou-1	 
    rs.movenext
    loop
    Rs.Close
    Set Rs = Nothing
%>
<table width="600" border="0" cellspacing="1" cellpadding="4" align="center">
<tr>
<td width="100%" height="20" align="right" class="unnamed1">有<%=gbcount %>条邮件 <%=page %>/<%=y %>页 分页 <a href="?page=1"><<</a>
<% if page2>1 then %>
  <a href="?page=<%=page2*x-x%>"><</a>
<% end if %>
<% For m =page2*x-(x-1) To k %>
[<a href="?page=<%=m%>"><%=m%></a>]
<% Next %>
<% if page2*x < y then %>
<a href="?page=<%=m%>">></a>
<% end if %>
	  <a href="?page=<%=y %>">>></a>
	</td>
  </tr>
</table>
<% End Sub %>
<%
    Sub Edit()
    Sql="Select * From a125_gb where view>1 and id="&Request.QueryString("id")
    set rs=conn.execute(sql)
    dim view2
    if rs("view")=3 then
    view2="checked"
    end if
%>
 <table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor='#A1BBE0'>
<form name="reply" method="post" action="Admin_mail.asp">
<tr bgcolor='#A1BBE0' class='td4'>
<td colspan="2" align="center"> 编辑邮件内容及回复</td>
</tr>
<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff'> 
<td align="right">邮件者:</td>
<td>姓名:<font color="#ff0000"><%=Rs("name")%></font>&nbsp;性别: <font color="#ff0000">
<%if Rs("sex")=1 then Response.Write "男" else Response.Write "女" end if%>
</font> &nbsp;联系地址:<font color="#ff0000"><%=Rs("come")%></font> </td>
</tr>
<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff'> 
<td align="right" valign="top"> </td>
<td>时间:<font color="#ff0000"><%=Rs("date")%></font>&nbsp;ip:<font color="#ff0000"><%=Rs("ip")%></font>&nbsp;联系电话:<font color="#ff0000"><%=Rs("phone")%></font>&nbspQQ:<font color="#ff0000"><%=Rs("qq")%></font></td>
</tr>
<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff'> 
<td align="right" valign="top">邮箱:</td>
<td>&nbsp;<b><%=Rs("email")%></b></td>
</tr>
<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff'> 
<td width="78" align="right" valign="top"> 邮件内容:<br> <br> <input name="replyedit" id="replyedit" type="checkbox" value="1" style="border:0px"> 
<font color="#FF0000">修改</font> </td>
<td width="433"> <textarea name="reply" cols="60" rows="8" class="input1" id="reply"><%=Rs("a125_gb")%></textarea> 
</td>
</tr>
 <tr  bgcolor='#FFFFFF'>
<td height="26" align="right"> </td>
<td align="left"> <% call ubb_jd100() %></td>
</tr>
<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff' align="center">
<td align="right">回复:</td>
<td align="left"> <textarea name="a125_gb" cols="60" rows="8" class="input1" id="a125_gb"><%=Rs("reply")%></textarea> 
<% if webyn=1 then%>

⌨️ 快捷键说明

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