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

PHP
discuz Passport 通行证 整合笔记
flash+php+mysql打造简单留言本教程
[原创]效率较高的php下读取文本文件的代码
phpmyadmin的安装与使用图文教程
IStream与TStream之间的相互转换
继续收藏一些PHP常用函数
php-5.2下php.ini 中文版配置说明
php单件模式结合命令链模式使用说明
PHPMailer邮件类利用smtp.163.com发送邮件方法
PHP编实现程动态图像的创建代码
php仿ZOL分页类代码
php仿discuz分页效果代码
攻克CakePHP(PHP中的Ruby On Rails框架)图文介绍
PHP ajax 分页类代码
PHP和Java 集成开发详解分析 强强联合
Linux下 php5 MySQL5 Apache2 phpMyAdmin ZendOptimizer安装与配置[图文]
IIS php环境配置PHP5 MySQL5 ZendOptimizer phpmyadmin安装与配置
Pear DB 新手入门指南教程
PHPMailer安装方法及简单实例
Apache+php+mysql在windows下的安装与配置图解(最新版)

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


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