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

📄 emailw.asp

📁 一款用ASP写的办公自动化软件
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=data/conn.asp-->
<!--#include file=connfig.asp-->
<%
	if request("post")=2 then
	call wrt1
	end if 
	function wrt1
		if request("title")="" or request("content")="" then
			response.Write("<script language=javascript>alert('请把内容填写完整!')</script>")
		else
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from email"
			rs.open sql,conn,1,3
			rs.addnew
			rs("title")=request("title")
			rs("content")=request("content")
			rs("sname")=request("sel")
			rs("fname")=session("admin_name")
			rs("time")=now()
			rs.update
			rs.close
			response.Redirect("chenggong.htm")
		end if 
	end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {
	font-size: 16px;
	font-weight: bold;
	color: #000000;
}
body,td,th {
	font-size: 12px;
}
body {
	background-color: #ffffff;
}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="">
  <p>&nbsp;</p>
  <table width="626" height="250" border="0" align="center" cellspacing="1" bgcolor="#336699">
    <tr>
      <td height="44" colspan="2" background="images/tile_sub.gif"><div align="center"><span class="style1">写邮件</span></div></td>
    </tr>
    <tr>
      <td width="86" height="29" bgcolor="#FFFFFF"><div align="center">选择收件人:</div></td>
      <td width="299" bgcolor="#FFFFFF">
	  <%
	  set rs1=server.CreateObject("adodb.recordset")
	  sql1="select * from users"
	  rs1.open sql1,conn,1,1
	  %>
	  <select name="sel" id="sel">
	  <%if not rs1.eof then
	  max=rs1.recordcount
	  for i=1 to max%>
	    <option value="<%=rs1("username")%>"><%=rs1("username")%></option>
		<% rs1.movenext
	   next
	   else
	   response.Write("暂无信息")
	   end if
	   %>
	    
      </select></td>
    </tr>
    <tr>
      <td height="30" bgcolor="#FFFFFF"><div align="center">标题:</div></td>
      <td width="299" bgcolor="#FFFFFF"><input name="title" type="text" id="title" size="50">
      <input name="post" type="hidden" id="post" value="2"></td>
    </tr>
    <tr>
      <td height="90" bgcolor="#FFFFFF"><div align="center">内容:</div></td>
      <td bgcolor="#FFFFFF"><textarea name="content" cols="76" rows="20" id="content"></textarea></td>
    </tr>
    <tr bgcolor="#F3F3F3">
      <td height="35" colspan="2"><div align="center">
        <input type="submit" name="Submit" value="提交">
            
         <input type="reset" name="Submit2" value="重填">
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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