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

PHP
PHP 加密/解密函数 dencrypt(动态密文,带压缩功能,支持中文)
用mysql内存表来代替php session的类
简化php模板页面中分页代码的解析
一周让你学会PHP 不错的学习资料
PHP 数据库树的遍历方法
php实现从ftp服务器上下载文件树到本地电脑的程序
PHP 操作文件的一些FAQ总结
PHP 截取字符串 分别适合GB2312和UTF8编码情况
PHP 编程的 5个良好习惯
php下几个常用的去空、分组、调试数组函数
PHP Ajax中文乱码问题解决方法
php 采集书并合成txt格式的实现代码
php Try Catch异常测试
解决了Ajax、MySQL 和 Zend Framework 的乱码问题
Zend 输出产生XML解析错误
php动态生成JavaScript代码
隐性调用php程序的方法
在JavaScript中调用php程序
php 数组的创建、调用和更新实现代码
php生成SessionID和图片校验码的思路和实现代码

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


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