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

📄 rtop.aspx

📁 一个完整的办公自动化源码,免费提供给大家下载
💻 ASPX
字号:
<%@ Page Language="VB" ContentType="text/html" debug="true" %>
<%@ Import Namespace="system.data" %>
<%@ Import Namespace="system.data.oledb" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="refresh" content='<%=session("timez")%>' >
<title>top</title>
<link href="CSS.CSS" rel="stylesheet" type="text/css">
<base target="rbottom">
</head>

<body  bgcolor="#CCCCCC" topmargin="0" leftmargin="0"> 
<table width="600" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="24" width="150">
	<table width="100%" cellpadding="0">
        <tr> 
          <td> 
            <p> 
              <input name="image222" type="image" onClick="history.back()" value="后退" src="images/tui.gif" align="bottom">
              退 
              <input name="image32" type="image" onClick="history.forward()" value="前进" src="images/jin.gif" align="bottom">
              <input name="image2" type="image" onClick="history.go(0)" value="刷新"src="images/shua.gif" align="bottom">
              刷新<br>
              <br>
           
            </td>
        </tr>
      </table>
	  </td>
    <td width="450">
<form runat="server" action="rtop.aspx" method="post" target="_self">
<input type="hidden" id="emailid" runat="server">

        <table width="450" height="24" border="0" cellpadding="0" cellspacing="0">
          <tr valign="middle"> 
            <td width="70" height="7" align="left"> <strong><font color="#FFFFFF"></font></strong> </strong> 
              <strong><font color="#FFFFFF"> 
              <asp:label ID="yesnoemail" runat="server" />
                </font></strong>  
                 <asp:panel runat="server" ID="zpa1" Visible="false"> 
                <bgsound src="mail.wav" loop="1">
              </td>
            <td width="200" align="left"> 
              <asp:label runat="server" ID="msgemail" /></td>
            <td width="60" align="left"> 
              <asp:button runat="server" Text="已读" OnClick="reademail"/></td>
             	</asp:panel>
            <td width="100" align="left"><font color="#FFFFFF"><strong> 
              <asp:label ID="ztixin" runat="server" />
              </strong> </font> </td>
          </tr>
        </table>
</form>
      </td>
  </tr>
</table>
</body>
</html>
<script language="VB" runat="server">
	sub page_load(s as object,e as eventargs)
		zmail()
		ztx()
	end sub
	sub zmail()
		'检查当前是否有没有读取的EMAIL
		dim conn as new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("office.mdb"))
		conn.open()
		dim oinfo=session("lguinfo")
		dim objcmd as new oledbcommand("select * from userdata where outid ='" & oinfo(0) & "' and isnumeric(outid) and readZ='2' order by id desc",conn)
		'readZ='2'表示没有读取
		dim objrd as oledbdatareader=objcmd.executereader()
		if objrd.read() then
			'如果有新的邮件,则提醒用户
			zpa1.visible=true
			yesnoemail.text="<img src=""pic/m_news.gif"" width=""21"" height=""14"">有邮件:"
			msgemail.text=objrd("otitle")
			emailid.value=objrd("id")
		else
			'如果没有,即不提醒,并隐藏相关信息
			zpa1.visible=false
			yesnoemail.text="<img src=""pic/m_olds.gif"" width=""21"" height=""14"">无邮件"
			emailid.value=0
		end if
		conn.close()
	end sub
	sub ztx()
		dim conn as new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("office.mdb"))
		conn.open()
		dim oinfo=session("lguinfo")
		dim objcmd as new oledbcommand("select * from notebook where myid =" & oinfo(0) & " and datevalue(outtime)=#" & datevalue(now()) & "# and timed='0' order by id desc",conn)
		dim objrd as oledbdatareader=objcmd.executereader()
		if not objrd.read() then
			ztixin.text="<font color=""#FFFFFF""><strong><img src=""pic/m_olds.gif"" width=""21"" height=""14""> 无提醒</strong></font>"
		else
			ztixin.text="<font color=""#FFFFFF""><strong><img src=""pic/m_news.gif"" width=""21"" height=""14""> 有提醒</strong></font><bgsound src=""msg.wav"" loop=""1"">"
		end if
		conn.close()
	end sub
	sub reademail(s as object,e as eventargs)
		'response.write("已经修改了数据:" & emailid.value)
		if emailid.value=0 then exit sub
		dim conn as new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("office.mdb"))
		conn.open()
		dim objcmd as new oledbcommand()
		objcmd.connection=conn
		objcmd.commandtext="update userdata set readZ='1' where id=" & emailid.value
		objcmd.executenonquery()
		conn.close()
		response.Redirect("rtop.aspx")
	end sub
</script>

⌨️ 快捷键说明

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