国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > PHP > 正文

模仿OSO的論壇(四)

2024-05-04 23:01:44
字體:
供稿:網(wǎng)友
  • 本文來源于網(wǎng)頁設(shè)計愛好者web開發(fā)社區(qū)http://www.html.org.cn收集整理,歡迎訪問。
  • reply.php(用來回復(fù)主題)
    <html><head><title>疑難問題</title>
    <link href="mypic/style.css" rel=stylesheet type=text/css></head>
    <?php
    if (!$cook_user)
    {echo "<script language='javascript'>";  
    echo "parent.location.href='index.php'";  
    echo "</script>";}
    else {include ("connect.inc.php");
    $query = "select * from my_user where user='".$cook_user."' and password='".$cook_password."'";  
    $res = mysql_query($query);  
    if (!$res)
    {echo "<script language='javascript'>";  
    echo "parent.location.href='index.php'";  
    echo "</script>";}
    include "connect.inc.php";
    if ($content) {$content= str_replace ( "'","mysinglequotes",$content);  
    $content=htmlspecialchars($content);
    $content=nl2br($content);
    $query = "insert into guestbook (name,type,content,icon,time_open,time_close,answer_count,answer_name,main_id) values ('".$cook_user."',0,'".$content."',".$icon.",now(),now(),1,'".$cook_user."',".$theme_id.")";  
    $res = mysql_query($query);
    if ($res)  
    {$query = "update guestbook set time_close=now(),answer_count=answer_count+1,answer_name='".$cook_user."' where id=".$theme_id;  
    $res = mysql_query($query);  
    if ($res)
    {echo "<script language='javascript'>";  
    echo "parent.location.href='post_end.php'";
    echo "</script>";}}}}
    ?>
    <script language=javascript>
    <!--
    var submitcount=0;
    function check_com(){
       if(document.form.theme.value.length ==0){
          submitcount--;
          alert("主題不能為空!nyou must supply a subject.");
          return false;
       }

       if(document.form.content.value.length == 0){
          submitcount--;
          alert("加貼內(nèi)容不能為空!nyou must supply a message.");
          return false;
       }
       return true;
    }
    //-->
    </script>
    <body bgcolor=#cccc99 bottommargin=0 leftmargin=0 topmargin=0 marginwidth="0" marginheight="0">
    <form method="post" action="reply.php" name="form" onsubmit="return check_com()">
    <script language=javascript  
    src="mypic/x.js"></script>
      <tr>
        <td valign=top>
          <table align=center border=0 cellpadding=4 cellspacing=0 width=100%>
            <tbody>
            <tr>
              <td class=mid width=20%>回復(fù)主題<br><br></td>
              <td class=mid><a class=title  
                href="read.php?theme_id=<?php echo $theme_id ?>">
    <?php  
    $query = "select theme from guestbook where id=".$theme_id;
    $res = mysql_query($query);  
    $row = mysql_fetch_row($res);  
    echo $row[0];
    ?>
    </a><br><br></td></tr>
            <tr>
              <td class=mid valign=top>表情圖標(biāo)</td>
              <td><input checked name=icon type=radio value=1> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon1.gif"  
                width=18><input name=icon type=radio value=2> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon2.gif"  
                width=18><input name=icon type=radio value=3> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon3.gif"  
                width=18><input name=icon type=radio value=4> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon4.gif"  
                width=18><input name=icon type=radio value=5> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon5.gif"  
                width=18><input name=icon type=radio value=6> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon6.gif"  
                width=18><input name=icon type=radio value=7> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon7.gif"  
                width=18><br><input name=icon type=radio value=8> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon8.gif"  
                width=18><input name=icon type=radio value=9> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon9.gif"  
                width=18><input name=icon type=radio value=10> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon10.gif"  
                width=18><input name=icon type=radio value=11> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon11.gif"  
                width=18><input name=icon type=radio value=12> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon12.gif"  
                width=18><input name=icon type=radio value=13> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon13.gif"  
                width=18><input name=icon type=radio value=14> <img  
                align=abscenter height=18  
                src="http://edu.cnzz.cn/newsinfo/mypic/icon14.gif"  
                width=18></td></tr>
            <tr>
              <td class=mid valign=top><input type="hidden" name="theme_id" size="12" class="stedit" value="<?php echo $theme_id ?>">
              加貼內(nèi)容</td>
              <td><textarea cols=50 name=content rows=6></textarea> </td></tr>
            <tr>
              <td>&nbsp;</td>
              <td><input name=submit type=submit value=" 發(fā) 表 ">  
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name=reset type=reset value=" 清 除 "> </td></tr>
                   </form>
            <tr>
              <td colspan=2><br><br><font color=#797979>
                <li>本主題最后 5 個帖子 (按發(fā)帖時間倒序排列)</font></li></td></tr></tbody></table>
          <table align=center bgcolor=#000000 border=0 cellpadding=4 cellspacing=1  
          width=100%>
            <tbody>
            <tr bgcolor=#666666>
              <td width="10%"><font color=#ffffff>作 者</font></td>
              <td width="90%"><font color=#ffffff>內(nèi) 容</font></td></tr>
    <?php
    $query = "select * from guestbook where main_id=".$theme_id." or id=".$theme_id." order by time_open desc limit 5 ";
    $res = mysql_query($query);  
    function tdbackcolor() {
      static $colorstr;
      if ($colorstr=="#ededed") {
        $colorstr="#dedede";
      } else {
        $colorstr="#ededed";
      }
      return($colorstr);
    }
    for ($i=1;$i<=5;$i++)
    {$row = @mysql_fetch_array($res);  
    if (!$row) break;  
    $colorstr=tdbackcolor();
    echo "<tr bgcolor=".$colorstr.">";
    echo "<td valign=top>".$row['name']."</td>";  
    $content= str_replace ( "mysinglequotes","'",$row['content']);  
    echo "<td>".$content."</td></tr>";  
    }
    ?>      
    </tbody></table>
    </tbody></table>
    </form>
    </html>  
    發(fā)表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發(fā)表
    主站蜘蛛池模板: 拉萨市| 迁安市| 历史| 盐边县| 邳州市| 福贡县| 南宁市| 吴忠市| 周至县| 东阿县| 永善县| 温泉县| 正安县| 西贡区| 寿宁县| 子长县| 同仁县| 邢台市| 荃湾区| 玛沁县| 侯马市| 吉林市| 玉田县| 安丘市| 钟祥市| 剑川县| 文昌市| 古丈县| 金湖县| 江都市| 乐平市| 锡林郭勒盟| 北流市| 汕尾市| 游戏| 北京市| 寻乌县| 象州县| 梧州市| 英山县| 抚顺市|