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

📄 20-9.php

📁 php 和 ajax 开发的一些资料
💻 PHP
字号:
<?php
echo "<html>\n";								//输出标准HTML内容
echo "<head>\n";
echo "<title>\n";
echo "论坛浏览主题显示页面\n";
echo "</title>\n";
echo "</head>\n";
echo "<body>\n";
echo "<link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\n";
echo "<div class=\"Frame\">\n";
echo "<div class=\"title\">论坛浏览主题显示页面</div>\n";
echo "<div class=\"main\"></div>\n";
if(!$_GET[id])
{
  echo "<div class=\"title\">没有指定主题ID<p>点<a href=\"history.go(-1)\">这里</a>返回</div>";
  exit();
}
else
{
	require "20-1.php";
	$sql="select * from $bbs_post where id='$_GET[id]' limit 1";
	$result=mysql_query($sql,$my_conn);
	$row=mysql_fetch_array($result);
	if($row[re_id]!=0)
	{
		  echo "<div class=\"title\">指定ID不是主题ID<p>点<a href=\"history.go(-1)\">这里</a>返回</div>";
		  exit();
	}
	else
	{
		$sql2="select id,m_id,type_n from $bbs_type where id='$row[type_id]'";
		$temp=mysql_fetch_array(mysql_query($sql2,$my_conn));
		$sql3="select id,type_n from $bbs_type where id='$temp[1]'";
		$temp2=mysql_fetch_array(mysql_query($sql3,$my_conn));
		 echo "<div class=\"huifu\"><a href=\"20-5.php\">论坛首页</a> → <a href=\"20-6.php?id=".$temp2[0]."\">".$temp2[1]."</a> → <a href=\"20-7.php?id=".$temp[0]."\">".$temp[2]."</a>→".$row[title]."  <a href=\"20-8.php?type_id=".$temp[0]."&re_id=".$_GET[id]."\">回复主题</a></div>\n";

			echo "<div class=\"title\">";
			echo "<table width=\"95%\">\n";
			echo "<tr>\n";
			echo "<td width=\"15%\" rowspan=\"2\" class=\"huifu\">";
			$sql4="select id,nickname,sex,photo,post_num,reg_date from $bbs_user where id='$row[poster_id]' limit 1";
			$temp3=mysql_fetch_array(mysql_query($sql4,$my_conn));
			echo "作者:<a href=\"20-14.php?id=".$temp3[0]."\" target=\"_blank\">".$temp3[1]."</a><br>\n";
			echo "性别:".$temp3[2]."<br>\n";
			if($temp3[3]!="") echo "<img src=\"img\\".$temp3[3].".gif\">";
			echo "发贴:".$temp3[4]."<br>\n";
			echo "注册:".$temp3[5]."<br>\n";
			echo "<br>";
			echo "发:".$row[p_time];
			echo "<br>";
			echo "<a href=\"20-12.php?id=".$row[0]."\">编辑</a>&nbsp;&nbsp;";
			echo "<a href=\"20-13.php?id=".$row[0]."\">删除</a>";
			echo "</td>\n";
			echo "<td width=\"85%\" class=\"huifu\" height=\"10%\">标题:".$row[title]."</td>\n";
			echo "</tr>\n";
			echo "<tr>\n";
			echo "<td width=\"85%\" class=\"huifu\" height=\"90%\">内容:<br>".$row[content]."</td>\n";
			echo "</tr>";
			echo "</table>";
			echo "</div>";
			$sql_n="select * from $bbs_post where re_id='$_GET[id]'";
			$result=mysql_query($sql_n,$my_conn);
			if(mysql_num_rows($result)>0)
			{
				echo "<div class=\"hf\">以下为回复内容:</div>";
				while($row2=mysql_fetch_array($result))
				{
					echo "<div class=\"title\">";
					echo "<table width=\"95%\">\n";
					echo "<tr>\n";
					echo "<td width=\"15%\" rowspan=\"2\" class=\"huifu\">";
					$sql5="select id,nickname,sex,photo,post_num,reg_date from $bbs_user where id='$row2[poster_id]' limit 1";
					$temp4=mysql_fetch_array(mysql_query($sql5,$my_conn));
					echo "作者:<a href=\"20-14.php?id=".$temp4[0]."\" target=\"_blank\">".$temp4[1]."<br>\n";
					echo "性别:".$temp4[2]."<br>\n";
					if($temp4[3]!="") echo "<img src=\"img\\".$temp4[3].".gif\">";
					echo "发贴:".$temp4[4]."<br>\n";
					echo "注册:".$temp4[5]."<br>\n";
					echo "<br>";
					echo $row2[p_time];
					echo "<br>";
					echo "<a href=\"20-12.php?id=".$row2[id]."\">编辑</a>&nbsp;&nbsp;";
					echo "<a href=\"20-13.php?id=".$row2[id]."\">删除</a>";
					echo "</td>\n";
					echo "<td width=\"85%\" class=\"huifu\" height=\"10%\">标题:".$row2[title]."</td>\n";
					echo "</tr>\n";
					echo "<tr>\n";
					echo "<td width=\"85%\" class=\"huifu\" height=\"90%\">内容:<br>".$row2[content]."</td>\n";
					echo "</tr>";
					echo "</table>";
					echo "</div>";
				}

			}
			$sql="update $bbs_post set v_num=v_num+1 where id='$_GET[id]'";
			mysql_query($sql);

	}
}
echo "</div>";
echo "</doby>";
echo "</html>";
?>

⌨️ 快捷键说明

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