当前位置: 首页 > 图文教程 > 网络编程 > PHP > 一个模仿oso的论坛程序(之二)

PHP
dedecms模版制作使用方法
dede3.1分页文字采集过滤规则详说(图文教程)
dede3.1分页文字采集过滤规则详说(图文教程)续二
dede3.1分页文字采集过滤规则详说(图文教程)续四
手把手教你使用DedeCms V3的在线采集图文教程
PHP实现MVC开发得最简单的方法:模型
php下用GD生成生成缩略图的两个选择和区别
Win2003服务器安全加固设置--进一步提高服务器安全性
[php] 我的微型论坛的简单教程[已完成]
phpMyAdmin下载、安装和使用入门教程
PHP 优化配置:加速你的VBB,phpwind,Discuz,IPB,MolyX
php+mysql开源XNA 聚合程序发布 下载
Bo-Blog专用的给Windows服务器的IIS Rewrite程序
MySQL数据库转移,access,sql server 转 MySQL 的图文教程
小结下MySQL中文乱码,phpmyadmin乱码,php乱码 产生原因及其解决方法
首页四格,首页五格For6.0(GBK)(UTF-8)[12种组合][9-18][版主安装测试通过]
[PHP]经常用到的实用函数集合
php扩展ZF:Validate扩展
php开发工具之vs2005图解
PHP 5.0创建图形的实用方法完整篇

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 92 ::
收藏到网摘: n/a

  程序二: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="