一個模仿oso的php論壇程序源碼(之二)第1/3頁
更新時間:2007年03月11日 00:00:00 作者:
程序二: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>發(fā)表信息</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("帖子已成功提交,請勿重復(fù)發(fā)帖!nDon't submit the form twice, please."); return false;
}
}
}
function check_com(){
if (document.form.username.value.length == 0){
submitcount--;
alert("請輸入您的網(wǎng)上大名!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("加貼內(nèi)容不能為空!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">當(dāng)前位置:主頁——論壇——發(fā)表論壇</td>';
}
else
{
print ' <td class="text">當(dāng)前位置:主頁——論壇——回復(fù)帖子</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">加帖標(biāo)題:</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>發(fā)表信息</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("帖子已成功提交,請勿重復(fù)發(fā)帖!nDon't submit the form twice, please."); return false;
}
}
}
function check_com(){
if (document.form.username.value.length == 0){
submitcount--;
alert("請輸入您的網(wǎng)上大名!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("加貼內(nèi)容不能為空!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">當(dāng)前位置:主頁——論壇——發(fā)表論壇</td>';
}
else
{
print ' <td class="text">當(dāng)前位置:主頁——論壇——回復(fù)帖子</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">加帖標(biāo)題:</div>';
print ' </td> <td width="609"> ';
相關(guān)文章
Laravel 默認(rèn)郵箱登錄改成用戶名登錄的實現(xiàn)方法
Laravel中默認(rèn)的登錄是通過郵箱和密碼進(jìn)行登錄的。那么,怎么樣才能用最少的改動將它改成用密碼登錄呢?下面腳本之家小編給大家?guī)砹薒aravel 默認(rèn)郵箱登錄改成用戶名登錄的實現(xiàn)方法,需要的朋友一起看看吧2019-08-08php使用正則表達(dá)式提取字符串中尖括號、小括號、中括號、大括號中的字符串
PHP使用正則表達(dá)式提取字符串中尖括號<>、小括號()、中括號[]、大括號{}中的字符示例,需要的朋友可以參考下2014-04-04