<?php
$id=$_GET['id'];
header("content-type:text/html;charset=utf-8");
$conn=mysql_connect("localhost","root","") or die("连接失败");
mysql_set_charset("utf8");
mysql_select_db("bbs",$conn);
$sql="select * from bbs_ref where bbs_id=".$id;
$res=mysql_query($sql);
$sql1="select * from bbs_main where id=".$id;
$res1=mysql_query($sql1);
$row1=mysql_fetch_array($res1);
$sql2="update bbs_main set hits=hits+1 where id=".$id;
$res2=mysql_query($sql2);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div{border:1px solid black;
margin:auto;}
</style>
</head>
<body>
<div align="center" style="width:60%;">
<div>
</div>
<div style="display: flex;height:50px;">
<div align="left" style="margin-left: 5%;border: 0px">讨论主题:<?php echo $row1['title'] ?></div>
<div class="a" style="margin-right: 0px">
</div>
</div>
<div>
<table border=1 style="width:100%; ">
<tr align="center">
<td rowspan="2" style="width:30%"><br>发送人:<?php echo $row1['name'] ?></td>
<td style="height:70%">发送内容:<?php echo $row1['content'];?>
<tr align="left">
<td>
<a href="" rel='nofollow' onclick='return false;'>电子邮箱</a>
<a href="" rel='nofollow' onclick='return false;'>主页</a>
              
              
              
              
              
<a href="" rel='nofollow' onclick='return false;'>回复主题</a>
</td>
</tr>
</td>
</tr>
<?php while($row=mysql_fetch_array($res)) { ?>
<tr align="center">
<td rowspan="2" style="width:30%">" alt=""><br>回复人:<?php echo $row['ref_name'] ?></td>
<td style="height:70%">回复内容:<?php echo $row['ref_content'];?>
<tr>
<td>
<a href="" rel='nofollow' onclick='return false;'>电子邮箱</a>
<a href="" rel='nofollow' onclick='return false;'>主页</a></td>
</tr>
</td>
</tr>
<?php } ?>
</table>
</div>
<div style="background-image: url('images/bg1.gif')">
<h3 align="center" style="color:white">秦皇岛职业技术学院     信息工程系</h3>
</div>
</div>
</body>
</html>