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

📄 mail.asp

📁 一对一校友录多班级而且非常漂亮http://free.cnyys.com/my/yhe/DEFAULT.ASP
💻 ASP
📖 第 1 页 / 共 2 页
字号:
sub add%>
 <TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 
                        background=image/line1.gif>
                          <TBODY>
           <TR bgcolor="#99CCFF">
                         <TR bgcolor="#99CCFF">
                             <TD height=20><div align="center"><a href="editreg.asp"></a><a href="note.asp"><font color="#000000">记事本</font></a></div></TD>
                            <TD><div align="center"><a href="bj/ly.asp?type2=cz&type3=username&key=<%=session("wzname")%>&bj=<%=session("userclass")%>"><font color="#000000">我的留言</font></a></div></TD>
                            <TD><div align="center"><a href="grphoto.asp?mmm=0&photocx=<%=username%>"><font color="#000000">我的相册</font></a></div></TD>
                            <TD><div align="center"><a href="editreg.asp"><font color="#000000">资料修改</font></a></div></TD>
                            <TD><div align="center"><a href="mail.asp"><font color="#000000">个人信箱</font></a></div></TD>
                            <TD align=left><div align="center"><a href="xx.asp"><font color="#000000">休闲区</font></a></div></TD>
						  </TR></table>
<table width="100%"  border="1" cellspacing="1" cellpadding="1">
  <form name="form1" method="post" action="?type2=add2">
  <tr bgcolor="#CCCCCC"> 
    <td colspan="2"><div align="center" style="color: #000000">发送短消息--请完整输入下列信息</div></td>
  </tr>
  <tr>
    <td width="15%">&nbsp;    </td>
	  <%dim sql,uer
	  uer=request.querystring("uer")
	  if uer="" then	  
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select name,username from user where userclass='"&session("userclass")&"'"
rs.open sql,conn,1,3
%>
    <td width="85%"><font color=#000000>寄给:</font>
      <input name="towho" type="text" id="towho" size="13">  
      我班的:<select name="userclass" size="1" id="userclass"  onChange="document.form1.towho.value=this.options[this.selectedIndex].value">
        <%do while not rs.eof%>
		<option value="<%=rs("username")%>"><%=rs("name")%></option>
 <%rs.movenext
      loop
	  rs.close
	   set rs= nothing%>
      </select> 
       <span style="color: #000000">不是本班的,请直接填入对方的</span><span class="style2">用户名</span></td>
 <%else%>
 <td width="85%"><font color=#000000>寄给:</font>
      <input name="towho" type="text" id="towho" size="13" value="<%=uer%>"></td>
  <%end if%>
 </tr>
  <tr>
    <td><FONT color=#000000>&nbsp;</FONT></td>
    <td><font color=#000000>标题:<b>        <input name="title" type="text" id="title" size="30">
    </b>请限定50字内</font> <font color=#000000><b>    </b></font></td>
  </tr>
  <tr>
    <td><FONT color=#000000>&nbsp;</FONT></td>
    <td><font color=#000000>内容:<b><br>
        <textarea name="content" cols="50" rows="10" id="content"></textarea>
        </b></font></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
        <div align="left">
               
          <input type="submit" name="Submit" value="发送">  
          <input type="reset" name="Submit" value="清除">
        </div></td>
  </tr></form>
</table>
<%end sub
sub add2
dim use,title,content
use=request.form("towho")
content=request.form("content")
title=request.form("title")
set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from user where username='"&use&"'",conn,1,3
if rs.eof then
		Response.Write("对不起,这里没有你要发给的人,请确定输入的是用户名!")
		Response.Write("<br>")
	Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>返回</font></a>")
	rs.close
set rs=nothing
else
	if use=username then
	Response.Write("请别要发信给自己!")
	Response.Write("<br>")
	Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>返回</font></a>")
	else
set rs=Server.CreateObject("Adodb.Recordset")
	rs.open "select * from mail where 1=2",conn,1,3
	rs.addnew()
		rs("towho")=use
		rs("title")=title
		rs("username")=Session("wzname")
		rs("content")=content
		rs("date")=now()
		rs("isread")=0
	rs.update
	rs.close
set rs=nothing
Response.Write("发送成功,现在干嘛呢?")
	Response.Write("<br>")
	Response.Write("<a href='javascript:history.go(-1)'><font color=red>再去发一封吧</font></a>")
	Response.Write("<br>")
	Response.Write("<a href='index.asp'><font color=red>回首页</font></a>")
end if
end if
end sub
sub view%>
 <TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 
                        background=image/line1.gif>
                          <TBODY>
           <TR bgcolor="#99CCFF">
                        <TR bgcolor="#99CCFF">
                             <TD height=20><div align="center"><a href="editreg.asp"></a><a href="note.asp"><font color="#000000">记事本</font></a></div></TD>
                            <TD><div align="center"><a href="bj/ly.asp?type2=cz&type3=username&key=<%=session("wzname")%>&bj=<%=session("userclass")%>"><font color="#000000">我的留言</font></a></div></TD>
                            <TD><div align="center"><a href="grphoto.asp?mmm=0&photocx=<%=username%>"><font color="#000000">我的相册</font></a></div></TD>
                            <TD><div align="center"><a href="editreg.asp"><font color="#000000">资料修改</font></a></div></TD>
                            <TD><div align="center"><a href="mail.asp"><font color="#000000">个人信箱</font></a></div></TD>
                            <TD align=left><div align="center"><a href="xx.asp"><font color="#000000">休闲区</font></a></div></TD>
						  </TR></table>
	  <%dim asql
	  asql="update mail set isread=1 where id=" &id& ""
	conn.execute (asql)
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select user.name,mail.* from mail,user where mail.towho='"&username&"' and user.username=mail.username and mail.id="&id&""
rs.open sql,conn,1,3
%>
<table width="100%"  border="1" cellspacing="1" cellpadding="1">
  <form name="form1" method="post" action="?type2=add&uer=<%=rs("username")%>">
  <tr bgcolor="#CCCCCC"> 
    <td colspan="2"><div align="center" style="color: #000000">接收短消息</div></td>
  </tr>
  <tr>
    <td width="15%">&nbsp;    </td>
    <td width="85%"><font color=#000000>这是<%=rs("name")%>于<%=rs("date")%>寄给你的邮件</font></td>
  </tr>
  <tr>
    <td><FONT color=#000000>&nbsp;</FONT></td>
    <td><font color=#000000>标题:<b><%=rs("title")%></b></font></td>
  </tr>
  <tr>
    <td><FONT color=#000000>&nbsp;</FONT></td>
    <td><font color=#000000>内容:<br><%=rs("content")%>
    </font></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
        <div align="left">    
          <input type="submit" name="Submit" value="回复">
          <a href="?type2=del&ad=<%=rs("id")%>" onClick="return confirm('真的要删除?')">删除</a></div></td>
  </tr></form>
</table>
<%
	rs.close
set rs=nothing
end sub%>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TABLE>
<!--#include file="bottom.asp"--></BODY></HTML>

⌨️ 快捷键说明

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