开发者网络 动网主机 支持论坛 邮局 帮助
当前位置:网络学院PHP技术数据库操作 → 一个模仿oso的论坛程序(之二)
一个模仿oso的论坛程序(之二)
日期:2000年11月30日 作者: 人气:     [ ]
程序二: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"> ';
print ' <input type="text" name="forumtitle" size="80">';
print '<input type="hidden" name="theme_id" value="0">';
print ' <font color="#ff0000">*</font> </td>';
} else {
$dbh = mysql_connect('localhost:3306','root','');
mysql_select_db('test');
$tempstr = " select title from fr_t_forumtitle where id = ".$theme_id;
$res=mysql_query($tempstr,$dbh);
$row=mysql_fetch_array($res);
print ' <div align="right">回帖标题:</div>';
print ' </td> <td width="609"> ';
print ' <font color="#ff0000">'.$row["title"].'</font>';
print ' <input type="hidden" name="theme_id" value="'.$theme_id.'">';
print ' <input type="hidden" name="forumtitle" value="e">'; //判断使用
print ' </td>';
}

?>
</tr>
<tr>
<td width="131" class="text">
<div align="right">表情图标:</div>
</td>
<td width="609">
<p>
<input type="radio" name="forumface" value="1" checked>
<img src="icon1.gif" width="18" height="18">
<input type="radio" name="forumface" value="2">
<img src="icon2.gif" width="18" height="18">
<input type="radio" name="forumface" value="3">
<img src="icon3.gif" width="18" height="18">
<input type="radio" name="forumface" value="4">
<img src="icon4.gif" width="18" height="18">
<input type="radio" name="forumface" value="5">
<img src="icon5.gif" width="18" height="18">
<input type="radio" name="forumface" value="6">
<img src="icon6.gif" width="18" height="18">
<input type="radio" name="forumface" value="7">
<img src="icon7.gif" width="18" height="18"><br>
<input type="radio" name="forumface" value="8">
<img src="icon8.gif" width="18" height="18">
<input type="radio" name="forumface" value="9">
<img src="icon9.gif" width="18" height="18">
<input type="radio" name="forumface" value="10">
<img src="icon10.gif" width="18" height="18">
<input type="radio" name="forumface" value="11">
<img src="icon11.gif" width="18" height="18">
<input type="radio" name="forumface" value="12">
<img src="icon12.gif" width="18" height="18">
<input type="radio" name="forumface" value="13">
<img src="icon13.gif" width="18" height="18">
<input type="radio" name="forumface" value="14">
<img src="icon14.gif" width="18" height="18"></p>
</td>
</tr>
<tr>
<td width="131" valign="top" height="30" class="text">
<div align="right">加贴内容:</div>
</td>
<td width="609" valign="top" height="30">
<textarea name="forumcontent" cols="80" rows="6"></textarea>
</td>
</tr>
<tr>

<td width="131" valign="top"></td>

</td>

<td width="609" valign="top">
<input type="submit" name="Submit" onclick="return checkSubmit()" value="提交">
 
<input type="reset" name="Submit2" value="清除">
</td>
</tr>
</table>
</form>
<p><span class="text">请您注意: <br>
<font color="#ff0000">*</font> 您的大名,加帖标题不能为空<br>
<font color="#ff0000">* </font>尊重网上道德,遵守中华人民共和国的各项有关法律法规 <br>
<font color="#ff0000">* </font>承担一切因您的行为而直接或间接导致的民事或刑事法律责任 <br>
<font color="#ff0000">*</font> 参与本论坛即表明您已经阅读并接受上述条款 <br>
</span> </p>

<?
include ("c:mydbfooter.inc");
?>

<p><span class="text"> </span></p>
</body>
</html>
-----------------------
http://zhangcg.yeah.net

【本文版权归作者zhangcg与奥索网共同拥有,如需转载,请注明作者及出处】

(出处:)

相关文章:
 
·网络社区论坛即将成为互联网下一热点
·玩转论坛各种权限设置
·关于论坛发邮件的集中解答
·论坛升级常见问题集锦
·论坛常用设置解析面面观
·安装论坛常见问题解答
·动网中文论坛服务网站全新登场
·动网论坛道具中心登场
·敬请论坛用户及时安装最新补丁
·动网论坛Ver7.0.0正式发布
相关软件:
 
·B.A.D论坛 v2.0(asp.net)
·lookmoon望月树型论坛系统(原CQ2S树型论坛系统) v5.10
·深度学习论坛 v0.03
·动网论坛Dvbbs v7.1.0 Sp1 Sql最新版
·ASPWIND论坛(原特利独行论坛) v1.8
·威流论坛V6bbs v1.2 Build 0103(仿西祠xici)
·雪孩论坛 v2.0
·CCBBS树型论坛
·中国非常论坛cnVery bbs v4.0 Beta 2
·颓废者论坛 v1.0 简约版
说明:本站部分内容收集于网络,如有侵犯您的权益请来信告知,我们会第一时间进行处理,谢谢
 → 特别推荐
 → 热点TOP10

关于本站 | 诚聘英才 | 业务合作 | 联系我们 | 广告合作 | 收藏本站

海口动网先锋网络科技有限公司版权所有
Copyright ? 2000 - 2003 AspSky.Net
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077