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

📄 dispmsg.php

📁 php做的一个同学录网站,功能齐全. 后台管理非常方便,有需要的同学可以下载测试.
💻 PHP
字号:
<?php
include("pwdsuper.php");
include("connect.inc.php");
include("char.inc.php");
/////////////////////////////////////////////////////
$testquery=mysql_query('select * from message where id='.$id,$conn);
$testarray=mysql_fetch_array($testquery);
if ($userid==$testarray["userid"]){
    //这条消息是我发送的。
    if(($userid==$testarray["userid"])&&($userid==$testarray["msgtoid"])){
        $updataquery="UPDATE message SET readed=1 WHERE id=".$id." LIMIT 1";
        @mysql_query($updataquery)or die("error!");}
}else{
    //这条消息是别人发送给我的。
    $updataquery="UPDATE message SET readed=1 WHERE id=".$id." LIMIT 1";
    @mysql_query($updataquery)or die("error!");
}
 $query=mysql_query('select * from message where id='.$id,$conn);
 $array=mysql_fetch_array($query);
if(!$array){
/////////////////////////////////////////////////////
?>
<script language=vbscript>
alert ("对不起!你要的消息没有找到")
window.history.back()
</script>
<?php
exit();
}
?>
<html>
<head>
<style type="text/css">
<!--
td{font-size:12px;line-height:17px;}
a:active {text-decoration: none;}
a:link {text-decoration: none;}
a:hover{text-decoration: underline;}
a:visited {text-decoration: none;}
BODY{font-size:12px;line-height:17px;SCROLLBAR-FACE-COLOR: #83d160; SCROLLBAR-HIGHLIGHT-COLOR: #CCFF00; SCROLLBAR-SHADOW-COLOR: #CCFF00; SCROLLBAR-3DLIGHT-COLOR: #009900; SCROLLBAR-ARROW-COLOR:  #006600; SCROLLBAR-TRACK-COLOR: ##99FF00; SCROLLBAR-DARKSHADOW-COLOR: #009900; }
-->
</style>
<title>::查看消息::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#dcf6ce"  text="#666600" link="#009900" alink="#00FF00" vlink="#006600">
<?php
//echo $id."<br>".$userid;
if ($userid==$array["userid"])$text="我发送给 ".$array["msgto"].' 的消息';
else $text="消息来自:".$array["form"];
//消息来自:xxx(xxx回复的消息)
?>
<br>
<table width="400" border="1" cellspacing="2" cellpadding="0" height="322" align="center" bordercolorlight="#009900" bordercolordark="#009900">
  <tr> 
    <td colspan="2" height="21" bgcolor="#FFCC00"> 
      
      <div align="center"><?php echo $text;?></div>
    </td>
  </tr>
  <tr> 
    <td colspan="2" height="20" bgcolor="#83d160"> 
      <div align="center">
        <?php echo $array["title"]; ?>
      </div>
    </td>
  </tr>
  <tr> 
    <td colspan="2" valign="top">&nbsp;&nbsp; 
      <?php echo zlstr($array["memo"]); ?>
    </td>
  </tr>
  <tr> 
    <td width="211" height="25">&nbsp;</td>
    <td width="177" height="25" bgcolor="#83d160"> 
      <div align="center">
        <?php echo $array["senddt"]; ?>
      </div>
    </td>
  </tr>
  <tr> 
    <td width="211" height="25">&nbsp;</td>
    <td width="177" height="25" bgcolor="#83d160"> 
      <div align="center">
        <?php 
if ($userid!=$array["userid"])echo '<a href=wbmsg.php?id='.$array["id"].'&userid='.$userid.'>回复</a>';
else echo "回复";
?>
      </div>
    </td>
  </tr>
</table>
<div align="center"><br>
  <a href="javascript:window.close()">关闭窗口</a><br>
</div>
</body>
</html>

⌨️ 快捷键说明

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