📄 message_view.php
字号:
<?
/**********************************
* 查看留言
***********************************/
include_once("top.php");
if($_REQUEST[viewstate]=="1"){
$now_time=time();
$sql_board="select * from message where s_id=$_REQUEST[id] and username='$_SESSION[adser_username]' order by id desc";
$rs_board=mysql_query($sql_board);
$int_numrows=mysql_num_rows($rs_board);
if($int_numrows<1){
$sql_up="update message set is_view='$now_time' where id=$_REQUEST[id] and username='$_SESSION[adser_username]'";
}else{
$row_board=mysql_fetch_array($rs_board);
$pid=$row_board[id];
$sql_up="update message set is_view='$now_time' where id=$pid and username='$_SESSION[adser_username]'";
}
$rs_up=mysql_query($sql_up);
}
$sql="select * from message where id='$_REQUEST[id]' and username='$_SESSION[adser_username]'";
$rs=mysql_query($sql);
$row_message=mysql_fetch_array($rs);
$tit=$row_message[tit];
$time=$row_message["time"];
$conn=$row_message[conn];
$s_name=$row_message[s_name];
$to_type=$row_message[to_type];
$str_name=($to_type==4)?"<span class=style1>管理员 $row_message[admin_user]</span> 留言给 <span class=style1>$s_name</span>":"<span class=style1>$s_name</span> 留言给 <span class=style1>管理员</span>";
$conn=nl2br($conn);
?>
<style type="text/css">
<!--
.style1 {color: #000088}
-->
</style>
<table width="1001" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f7f7f7">
<tr>
<td width="200" height="323" valign="top" bgcolor="#E8EEF4">
<?
include("menu.php");
?></td>
<td align="center" valign="top" class="bgconn">
<table width="98%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td height="40" class="orange_text">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="40" class="orange_text">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" align="left" valign="middle"><img src="../image/ab13.gif" width="150" height="20"></td>
</tr>
<tr>
<td align="center" valign="middle">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="left" valign="middle"> 查看留言具体内容。</td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" align="left" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td width="3%"><img src="../image/bot14.gif" width="16" height="16"></td>
<td width="19%" align="left"><a href="message_add.php?tit=留言管理"><span class="bluetext">关于本问题给我们留言</span></a></td>
<td width="2%"><img src="../image/bot13.gif" width="16" height="16"></td>
<td width="47%" align="left">电话:
<?=$cfg_phone?></td>
<td width="29%" align="right"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="4" bgcolor="#556D85" ></td>
</tr>
<tr>
<td height="3"></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="3" class="listtable">
<tr align="center" class="listbody">
<td class="listtbhd" height="28">留言内容</td>
</tr>
<tr class="listbody">
<td height="150" valign="top"> <table width='100%'>
<tr>
<td>
<?=$str_name?> 于 <span class="style1"><?=$time?></span> 主题: <?=$tit?>
<hr noshade size="1" color="758ba2">
<?=$conn?>
</td>
</tr>
</table>
<br> </td>
</tr>
<?
$sql_mess="select*from message where s_id=$row_message[id] order by id asc";
$rs_mess=mysql_query($sql_mess);
while($row_mess=mysql_fetch_array($rs_mess)){
$tit=$row_mess[tit];
$time=$row_mess["time"];
$conn=$row_mess[conn];
$s_name=$row_mess[s_name];
$to_type=$row_mess[to_type];
$str_namere=($to_type==4)?"管理员 $row_mess[admin_user]":"$s_name";
$conn=nl2br($conn);
?>
<tr class="listbody">
<td height="150" valign="top"> <table width='100%'>
<tr>
<td>
<span class="style1"><?=$str_namere?></span> 回复于 <span class="style1"><?=$time?></span> <? if(!empty($tit)){ echo "主题: $tit<br>";}?>
<hr noshade size="1" color="758ba2">
<?=$conn?>
<br> </td>
</tr>
</table></td>
</tr>
<? }?>
<tr class="listbody"><form name="form1" method="post" action="message_add.php">
<td><div align="center">
<input type="button" name="Submit3" value="添加新留言" class="subbt" onClick="location='message_add.php'">
<input type="submit" name="Submit" value="回复留言" class="subbt">
<input type="button" name="Submit2" value="返回留言管理" class="subbt" onClick="location='message.php'">
<input name="hdn_id" type="hidden" value="<? echo $row_message[id];?>">
</div></td></form>
</tr>
</table>
<p><br>
<br>
<br>
<br>
<br>
<br>
</p> </tr>
</table>
<?
include("foot.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -