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

📄 21-7.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=\"21-5.php\">这里</a>返回</div>";
  exit();
}
else
{
  require "21-1.php";
  $sql="select m_id,type_n from $bbs_type where id='$_GET[id]'";
  $result=mysql_query($sql,$my_conn);
  $row=mysql_fetch_array($result);
  if($row[0]==0)
  {
    echo "<div class=\"title\">指定ID不是分版块ID<p>点<a href=\"21-5.php\">这里</a>返回</div>";
    exit();
  }
  else
  {
    $sql="select type_n from $bbs_type where id='$row[0]'";
    $temp=mysql_fetch_array(mysql_query($sql,$my_conn));
    echo "<div class=\"huifu\"><a href=\"21-5.php\">论坛首页</a> → <a href=\"21-6.php?id=".$row[0]."\">".$temp[0]."</a> → ".$row[1]." <a href=\"21-8.php?type_id=".$_GET["id"]."\">发表新贴</a></div>";
    echo "<div class=\"title\">";
    $sql2="select * from $bbs_post where type_id='$_GET[id]' and re_id=0";
    $result2=mysql_query($sql2,$my_conn);
    if(mysql_num_rows($result2)==0)
    {
      echo "本论坛还没有任何贴子!";
    }
    else
    {
      echo "<table width=\"95%\">\n";
      echo "<tr>\n";
      echo "<td width=\"50%\">标题</td>\n";
      echo "<td width=\"15%\">作者</td>\n";
      echo "<td width=\"5%\">浏览</td>\n";
      echo "<td width=\"5%\">回复</td>\n";
      echo "<td width=\"25%\">最后更新</td>\n";
      echo "</tr>\n";
      while($row2=mysql_fetch_array($result2))
      {
        echo "<tr>\n";
        echo "<td class=\"input\"><a href=\"21-9.php?id=".$row2["id"]."\">".$row2["title"]."</a></td>\n";
        echo "<td class=\"input\">";
        $sql3="select nickname from $bbs_user where id='$row2[poster_id]'";
        $temp=mysql_fetch_array(mysql_query($sql3,$my_conn));
        echo $temp[0];
        echo "</td>\n";
        echo "<td class=\"input\">".$row2[v_num]."</td>\n";
        echo "<td class=\"input\">".$row2[r_num]."</td>\n";
        echo "<td class=\"input\">".$row2[r_time]."</td>\n";
        echo "</tr>\n";
      }
    echo "</table>";
    echo "</div>";
    }
  }
}
echo "</div>";
echo "</doby>";
echo "</html>";
?>

⌨️ 快捷键说明

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