<%
	response.write "物品禁止赠送！"
	response.end
%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<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">
<title>我的物品</title>
<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>
</head>
<body bgcolor="#396BA5">
　
<p>
<%
wpid=request.form("user")
wpid=replace(wpid,"'","")
set rs=Server.CreateObject("ADODB.RecordSet")    
Rs.open "Select * from userinfo where username='"&wpid&"'",conn,1
if not rs.eof then
set rs1=Server.CreateObject("ADODB.RecordSet")    
Rs1.open "Select * from userbox where id='"&session("wid")&"'",conn,1

	conn.execute "insert message (title,incept,content,sender) values ('恭喜你，有人送来礼品','"&wpid&"','恭喜你：<br>"&session("username")&"送给你"&rs1("ProductName")&"一个，已经放入你的物品里，快去看看吧！<br>[系统]','系统')"
	conn.execute "update userbox set userid='"&rs("userid")&"' where id="&session("wid")
	
rs1.close

	msg="物品赠送成功！"
else  
	msg=wpid&" 这个用户不存在！"  
end if  
rs.close
  %>
<br>  
<br>  
  
<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">iChat信息</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"><%=msg%></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>     
</body>      
      
</html>      
