一个模仿oso的php论坛程序源码(之二)第1/3页
程序员文章站
2023-10-23 18:29:41
程序二:addforum.php
程序二: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> </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="right"><span class="text"><span class="text">您的大</span>名:</span></div>
</td>
<td width="609">
<input type="text" name="username" size="80" value="" maxlength="12">
<font color="#ff0000">*</font> </td>
</tr>
<tr>
<td width="131" class="text">
<div align="right">e_mail:</div>
</td>
<td width="609">
<input type="text" name="useremail" size="80">
</td>
</tr>
<tr>
<td width="131" class="text">
<div align="right">你的主页:</div>
</td>
<td width="609">
<p>
<input type="text" name="userhttp" size="80" value="http://">
</p>
</td>
</tr>
<tr>
<td width="131" class="text">
<?
if ($theme_id == 0 ) {
print ' <div align="right">加帖标题:</div>';
print ' </td> <td width="609"> ';
<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> </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="right"><span class="text"><span class="text">您的大</span>名:</span></div>
</td>
<td width="609">
<input type="text" name="username" size="80" value="" maxlength="12">
<font color="#ff0000">*</font> </td>
</tr>
<tr>
<td width="131" class="text">
<div align="right">e_mail:</div>
</td>
<td width="609">
<input type="text" name="useremail" size="80">
</td>
</tr>
<tr>
<td width="131" class="text">
<div align="right">你的主页:</div>
</td>
<td width="609">
<p>
<input type="text" name="userhttp" size="80" value="http://">
</p>
</td>
</tr>
<tr>
<td width="131" class="text">
<?
if ($theme_id == 0 ) {
print ' <div align="right">加帖标题:</div>';
print ' </td> <td width="609"> ';
1
上一篇: php 伪静态之IIS篇