<head>
<STYLE type=text/css>
A:link {COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {	COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active { COLOR: #ff0000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {COLOR: #ff0000; TEXT-DECORATION: none}
BODY {FONT-SIZE: 9pt}
TH {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
</STYLE>
<title>我的信箱</title>

</head>
<!--#include file="conn.asp"--> 
<body bgcolor="#396BA5">
<%
id=request.querystring("id")
id=replace(id,"'","")

if request.form("title")<>"" THEN
title=request.form("title")
sjr=replace(request.form("sjr"),"'","")
s1=replace(request.form("s1"),chr(10),"")
s1=replace(s1,"<","[")
s1=replace(s1,">","]")
s1=replace(s1,chr(13),"<br>")

set rs=Server.CreateObject("ADODB.RecordSet")                            
rs.open "Select * from userinfo where username='"&sjr&"'",conn,1
if rs.eof then%>

<div align="center">
  <center>
<table border="1" bgcolor="#D6D6CE" cellpadding="2" bordercolor="#D6D6CE" bordercolorlight="#F0F0F0" bordercolordark="#808080" width="327" height="37" class="font10.5">   
<tr>   
<td width="520" height="23" bordercolor="#D6D6CE" bgcolor="#0033CC" >   

<table border="0" width="100%" height="16" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%" height="12"><font color="#FFFFFF" size="2">信息</font></td>
    <td width="50%" height="12">  <p align="right"><button style="font-family:Webdings; font-size: 12px; line-height: 10px; height: 16 ; width:16">r</button></td>
  </tr>
</table>
</td>   
</tr>   
<tr>   
<td width="520" height="105" bordercolor="#D6D6CE" >   
<p align="center"><font face="Webdings" color="#FF0000" size="7">i</font><font color="#000000" size="2">没有这个用户，不能发信！</font>
</td>   
</tr>   
<tr>   
<td width="520" height="40" bordercolor="#D6D6CE" >   
<p align="center">　  
<input type="button" value="返  回" name="B3" onclick="javascript:history.back();">&nbsp;&nbsp;&nbsp;      
<input type="submit" value="关  闭" name="B1" onclick="javascript:window.close();"> 
</td>      
</tr>      
</table>      
</div>   




<%else
set rs=Server.CreateObject("ADODB.RecordSet")                            
rs.open "Select * from message",conn,1,3
rs.addnew
rs("title")=title
rs("incept")=sjr
rs("content")=s1
rs("sender")=session("username")
rs.update%>

<div align="center">
  <center>
<table border="1" bgcolor="#D6D6CE" cellpadding="2" bordercolor="#D6D6CE" bordercolorlight="#F0F0F0" bordercolordark="#808080" width="327" height="37" class="font10.5">   
<tr>   
<td width="520" height="23" bordercolor="#D6D6CE" bgcolor="#0033CC" >   

<table border="0" width="100%" height="16" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%" height="12"><font color="#FFFFFF" size="2">信息</font></td>
    <td width="50%" height="12">  <p align="right"><button style="font-family:Webdings; font-size: 12px; line-height: 10px; height: 16 ; width:16">r</button></td>
  </tr>
</table>
</td>   
</tr>   
<tr>   
<td width="520" height="105" bordercolor="#D6D6CE" >   
<p align="center"><font face="Webdings" color="#FF0000" size="7">i</font><font color="#000000" size="2">信件发送成功！</font>
</td>   
</tr>   
<tr>   
<td width="520" height="40" bordercolor="#D6D6CE" >   
<p align="center">　  
<input type="button" value="返  回" name="B3" onclick="javascript:history.back();">&nbsp;&nbsp;&nbsp;      
<input type="submit" value="关  闭" name="B1" onclick="javascript:window.close();"> 
</td>      
</tr>      
</table>      
</div>   




<%end if
else%>    
<div align="center">
  <center>

<table border="0" width="600" cellspacing="1" cellpadding="3" height="70">
  <tr>
    <td width="100%" bgcolor="#C0C0C0"  height="18" style="border-style: ridge; border-width: 1">
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%"><a href="mess.asp">返回收件箱</a></td>
        </center>
        <td width="50%">
          　</td>   
      </tr>   
    </table>   
  </td>   
  </tr>   
  <center>   
<form method="POST" action="mess2.asp">
  <tr>   
    <td width="100%" bgcolor="#D5D5D5" height="17">标&nbsp; 题：<input type="text" name="title" size="65" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"> 
    </td>
    
  </tr>  

<tr>   
    <td width="7%" bgcolor="#D5D5D5" height="17">收信人：<input type="text" name="sjr" size="20" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" value="<%=id%>"></td>
   
  </tr>  
    
    
  <tr>   
    <td width="7%" bgcolor="#D5D5D5" height="14">
    
        内&nbsp; 容：</td>
   
  </tr>  
  <tr>   
    <td width="7%" bgcolor="#D5D5D5" height="14">
        <p align="center">
        <textarea rows="7" name="S1" cols="57" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></textarea></p>
    </td>
   
  </tr>  
  <tr>   
    <td width="7%" bgcolor="#D5D5D5" height="14">
    <p align="center"><input type="submit" value="提  交" name="B1">&nbsp;&nbsp;&nbsp;
    <input type="reset" value="重  置" name="B2"></td>
   
  </tr>  
     </form>
</table> 
 
  </center> 
</div> 
 <%end if%>
</body>