设为首页 加入收藏 网站搜索 繁體中文 中国建站网 — 站长资源分享平台

一个模仿oso的论坛程序(之二)

来源:网络收集 作者:佚名 时间:2007-04-25 21:22:34
程序二: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> </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>

[1] [2] [3] [4]  下一页

Tags:

  • 好的评价 如果您觉得好,就请您
      0%(0)
  • 差的评价 如果您觉得差,就请您
      0%(0)
  • 相关文章
    广告赞助

    文章随便看看 设计素材 建站学院 网页模板 视频教程

    网友评论

    共有 0 位网友发表了评论,得分 0 分,平均 0 分    查看完整评论

    用户名: 查看更多评论

    分 值:100分 85分 70分 55分 40分 25分 10分 1分

    内 容:

             通知管理员 验证码: