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

PHP
PHP实现网页自动更新块
PHP 5.0 中的对象重载技术研究
轻型数据库SQLite结合PHP的开发
PHP中模板分页的处理
在debian下为PHP5.0.3安装pdo模块
PHP下实现端口复用/劫持
PHP链接ACCESS数据库最简单的方法
IIS 不用 rewrite 实现页面静态化的方法
PHP发现安全漏洞
Windows下PHP4.0与Oracle 8的连接设置
使用OOP技术来优化PHP应用程序
用MySQL和PHP创建XML
正则表达式中的特殊字符一览
截获网站
在UNIX平台上的Netscape Enterprise Server 3.x下配置PHP
Windows 98下安装Apache(PWS) PHP4MySQLphpMyAdmin的方法
对《Windows 9x/NT下以Apache的模块方式安装PHP4》的补充
Windows2000下安装Apache PHP4 MySQL
在WIN98下安装PHP4+ PERSONAL ORACLE8I
在 PHP 中用描点法“绘制”中文

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 56 ::
收藏到网摘: 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="