<?
//-----------------------------------------------------------------------------
//    ID002同学录 单班级 (PHP & MySQL) 1.0 标准版
//-----------------------------------------------------------------------------
//    Copyright(C) aNErG, 2003. All rights reserved
//
//    技术支持 http://anerg.126.com
//-----------------------------------------------------------------------------
//    本软件对个人完全免费使用
//
//    如用于商业用途,您必须与我联系并支付RMB ￥20
//-----------------------------------------------------------------------------
if (!$HTTP_COOKIE_VARS["class_username"]){echo "请不要干坏事，谢谢合作！";exit;}
include ('conn.php');
$checkname=$HTTP_COOKIE_VARS["class_username"];
$checkpwd=$HTTP_COOKIE_VARS["class_userpwd"];
$query="select userpwd from classuser where username='$checkname'";
$result=mysql_db_query("$dbname",$query);
$r=mysql_fetch_array($result);
$userpwd=$r["userpwd"];
if($checkpwd!=$userpwd){
echo "请不要干坏事，谢谢合作！";exit;}
require('java.js');
$query="select u2uid,u2ufrom,u2uinfo,u2udate from u2u where u2uto='$checkname'";
$result=mysql_db_query("$dbname",$query);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>短消息</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><? 
	while($r=mysql_fetch_array($result))
	{
	  $u2uid=$r["u2uid"];
	  $u2ufrom=$r["u2ufrom"];
	  $u2uinfo=$r["u2uinfo"];
	  $u2udate=$r["u2udate"];
	  echo "<p>";
	  echo "来自&nbsp;<font color=#7597B0>$u2ufrom</font>&nbsp;&nbsp;时间:$u2udate";
	  echo "<br>";
	  echo "$u2uinfo";
	  echo "<br>";
	  echo "<a href=\"###\" onclick=\"Popup('sendu2u.php?u2u_to=$u2ufrom','send',400,200);\">[ 回复$u2ufrom ]<a>";	 
	 $query="delete from u2u where u2uid='$u2uid'";
	 $delresult=mysql_db_query("$dbname",$query);
	 }

	?>
	</td>
  </tr>
</table>
	<br>
	<br>
	
<div align="center"> 提示:<font color="#FF0000">刷新</font>或者<font color="#FF0000">关闭窗口</font>，短消息都会被<font color="#FF0000">删除</font>！如有重要信息请及时保存！</div>
</body>
</html>
<?php require("bottom.php"); ?>