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

首頁 > 開發 > PHP > 正文

一個模仿oso的論壇程序(之二)

2024-05-04 23:01:56
字體:
來源:轉載
供稿:網友
程序二:addforum.php

<html>
<head>
<link rel="stylesheet" type="text/css" href="fp_zhangcg.css">
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta name="microsoft theme" content="none">
<meta name="microsoft border" content="none">
<title>發表信息</title>
</head>
<body bgcolor="#c0c0c0" background="backcolor.gif">
<script language=javascript>
<!--
  var submitcount=0;
  function checksubmit() {
    if (submitcount == 0)  
    {
       submitcount++;    
       return true;
    }  
    else {
       if (submitcount>0){   
           alert("帖子已成功提交,請勿重復發帖!ndon't submit the form twice, please.");            return false;
       }
    }
  }
  function check_com(){
     if (document.form.username.value.length == 0){
         submitcount--;
         alert("請輸入您的網上大名!nplease input your user name.");
         return false;
     }
     if (document.form.forumtitle.value.length ==0){
         submitcount--;
         alert("主題不能為空!nyou must supply a subject.");
         return false;
     }
     if (document.form.forumcontent.value.length == 0){
        submitcount--;
        alert("加貼內容不能為空!nyou must supply a message.");
        return false;  
     }   
     return true;
}
//-->
</script>

<?
  include ("c:mydbheader.inc");
?>


<?
if (empty($theme_id))  {
   $theme_id = 0;
  }
?>

<table width="750" border="0">
  <tr>
  <?
    if ($theme_id == 0 ) {
      print ' <td class="text">當前位置:主頁——論壇——發表論壇</td>';
    }  
    else
    {
      print ' <td class="text">當前位置:主頁——論壇——回復帖子</td>';
    }
  ?>
    <td>&nbsp;</td>
  </tr>
</table>
<?
print '<form action="readforum.php?readflag=0 " ';
print ' method=post name=form   onsubmit="return check_com()">';

?>
  <table width="750" border="0">
    <tr>  
      <td width="131" class="text">  
        <div align="right"><span class="text"><span class="text">您的大</span>名:</span></div>
      </td>
      <td width="609">  
        <input type="text" name="username" size="80" value="" maxlength="12">
        <font color="#ff0000">*</font> </td>
    </tr>
    <tr>  
      <td width="131" class="text">  
        <div align="right">e_mail:</div>
      </td>
      <td width="609">  
        <input type="text" name="useremail" size="80">
      </td>
    </tr>
    <tr>  
      <td width="131" class="text">  
        <div align="right">你的主頁:</div>
      </td>
      <td width="609">  
        <p>  
          <input type="text" name="userhttp" size="80" value="http://">
        </p>
      </td>
    </tr>
    <tr>  
      <td width="131" class="text">  
      <?
        if ($theme_id == 0 ) {
           print ' <div align="right">加帖標題:</div>';
           print ' </td> <td width="609"> ';
           print ' <input type="text" name="forumtitle" size="80">';
           print '<input type="hidden" name="theme_id" value="0">';
           print '  <font color="#ff0000">*</font> </td>';
        } else {
           $dbh =  mysql_connect('localhost:3306','root','');
           mysql_select_db('test');  
           $tempstr = " select title from fr_t_forumtitle where id = ".$theme_id;
           $res=mysql_query($tempstr,$dbh);   
           $row=mysql_fetch_array($res);   
           print ' <div align="right">回帖標題:</div>';
           print ' </td> <td width="609"> ';
           print ' <font color="#ff0000">'.$row["title"].'</font>';
           print ' <input type="hidden" name="theme_id" value="'.$theme_id.'">';
           print ' <input type="hidden" name="forumtitle" value="e">';  //判斷使用
           print ' </td>';
       }

     ?>
    </tr>
    <tr>  
      <td width="131" class="text">  
        <div align="right">表情圖標:</div>
      </td>
      <td width="609">  
        <p>  
          <input type="radio" name="forumface" value="1" checked>
          <img src="http://edu.cnzz.cn/newsinfo/icon1.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="2">
          <img src="http://edu.cnzz.cn/newsinfo/icon2.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="3">
          <img src="http://edu.cnzz.cn/newsinfo/icon3.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="4">
          <img src="http://edu.cnzz.cn/newsinfo/icon4.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="5">
          <img src="http://edu.cnzz.cn/newsinfo/icon5.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="6">
          <img src="http://edu.cnzz.cn/newsinfo/icon6.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="7">
          <img src="http://edu.cnzz.cn/newsinfo/icon7.gif" width="18" height="18"><br>
          <input type="radio" name="forumface" value="8">
          <img src="http://edu.cnzz.cn/newsinfo/icon8.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="9">
          <img src="http://edu.cnzz.cn/newsinfo/icon9.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="10">
          <img src="http://edu.cnzz.cn/newsinfo/icon10.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="11">
          <img src="http://edu.cnzz.cn/newsinfo/icon11.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="12">
          <img src="http://edu.cnzz.cn/newsinfo/icon12.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="13">
          <img src="http://edu.cnzz.cn/newsinfo/icon13.gif" width="18" height="18">  
          <input type="radio" name="forumface" value="14">
          <img src="http://edu.cnzz.cn/newsinfo/icon14.gif" width="18" height="18"></p>
      </td>
    </tr>
    <tr>  
      <td width="131" valign="top" height="30" class="text">  
        <div align="right">加貼內容:</div>
      </td>
      <td width="609" valign="top" height="30">  
        <textarea name="forumcontent" cols="80" rows="6"></textarea>
      </td>
    </tr>
    <tr>  

      <td width="131" valign="top"></td>
      
      </td>

      <td width="609" valign="top">  
        <input type="submit" name="submit" value="提交">
        &nbsp;
        <input type="reset" name="submit2" value="清除">
      </td>
    </tr>
  </table>
</form>
<p><span class="text">請您注意: <br>
  <font color="#ff0000">*</font> 您的大名,加帖標題不能為空<br>
  <font color="#ff0000">* </font>尊重網上道德,遵守中華人民共和國的各項有關法律法規 <br>
  <font color="#ff0000">* </font>承擔一切因您的行為而直接或間接導致的民事或刑事法律責任 <br>
  <font color="#ff0000">*</font> 參與本論壇即表明您已經閱讀并接受上述條款 <br>
  </span> </p>

<?
  include ("c:mydbfooter.inc");
?>

<p><span class="text"> </span></p>
</body>
</html>
-----------------------

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 临颍县| 夹江县| 鲜城| 扶风县| 嘉禾县| 抚松县| 任丘市| 南丰县| 电白县| 和平区| 临洮县| 巩留县| 那曲县| 清涧县| 巫山县| 濮阳县| 电白县| 盱眙县| 鸡泽县| 新化县| 报价| 曲周县| 建瓯市| 永宁县| 荣成市| 体育| 兖州市| 海南省| 乐业县| 铜梁县| 安顺市| 阳江市| 龙山县| 福州市| 保德县| 宁乡县| 巴中市| 体育| 石阡县| 河源市| 长子县|