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

PHP
PHP-Javascript“返回上一页”无缓存问题
新手入门:PHP编程中“数组”的基础知识
新手入门:PHP编程中“字符串”的小常识
PHP教程.经验技巧
php完美结合mysql数据库记录分页显示
php设计模式介绍之伪对象模式
PHP程序不实用大型系统的九大原因
PHP程序开发中的中文编码问题
PHP:避免重复提交和检查数据来路
动态网页技术PHP中错误处理的一些方法
单元测试在每个层上对PHP代码进行检查
学习动态网页制作PHP技术的正则表达式
PHP 5.0对象模型深度探索之起步
成为PHP高手 学会懒惰地用PHP编程
实例讲解基于DB2及PHP的应用系统跨平台迁移
如何书写安全的PHP代码
PHP教程:Ajax进行Web开发
Flash+PHP+Mysql简单留言本制作实例教程
理解PHP中的MVC框架编程
使用PHP与XML进行网站编程

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


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