一个模仿oso的php论坛程序源码(之三)_php实例
程序三:readforum.php论坛信息 include ("c:mydbheader.inc"); ?> 0) { $theme_id = $readflag; } if (empty($theme_id)) { $theme_id = 0; } //echo $username; //echo $useremail; //echo $userhttp; //echo $forumtitle; //echo $fouumface; //echo $forumcontent; if (($readflag == 0) and ($theme_id == 0)) { //增加数据 if (empty($username)) { print "错误,请核对数据"; } $res=mysql_query("SELECT max(id) + 1 AS rid FROM fr_t_forumtitle",$dbh); $row=mysql_fetch_array($res); if (empty($row["rid"])) { $theme_id = 1; } else { $theme_id = $row["rid"] + 1; } $tempstr = " insert into fr_t_forumtitle(id,state,readcount,replycount,title,"; $tempstr = $tempstr."createman,replytime) "; $tempstr = $tempstr." values(".$theme_id.",'0',0,-1,'".$forumtitle."','".$username."',now());"; $res=mysql_query($tempstr,$dbh); } if ($readflag == 0 ) { $forumcontent = nl2br($forumcontent); $tempstr = " insert into fr_t_forumcontent(id,content,replyman,replyemail,"; $tempstr = $tempstr."replyhttp,replytime,replyface)"; $tempstr = $tempstr." values(".$theme_id.",'".$forumcontent."','".$username."','". $useremail."','".$userhttp."',now(),".$forumface.");"; $res=mysql_query($tempstr,$dbh); $tempstr = " update fr_t_forumtitle set readcount = readcount +1,replycount = replycount + 1,"; $tempstr = $tempstr."replytime = now(),replyman ='".$username."' where id=".$theme_id; $res=mysql_query($tempstr,$dbh); } else { $tempstr = " update fr_t_forumtitle set readcount = readcount +1 where id =".$theme_id; $res=mysql_query($tempstr,$dbh); } ?>
当前位置:主页——论坛——论坛内容 |
  |
主题: print $ls_theme_title; ?> | print ''; ?> | ||
共有帖子 print $li_replycount; ?> 个,已阅读 print $li_readcount; ?> 次 |
'; print ' | ';
print ' ';
print ' 作者:'.$row["replyman"].' '; print ' | ';
print ' '; print ' 发表于:'.$row["replytime"].' | '; print ''; print ' E_mail:'.$row["replyemail"].' | '; print ''; print ''.$row["replyhttp"].' | '; print '
';
print ' '.$row["content"].' '; print ' | ';
print '
'; print ' | ';
print ' ';
print ' 作者:'.$row["replyman"].' '; print ' | ';
print ' '; print ' 发表于:'.$row["replytime"].' | '; print ''; print 'E_mail:'.$row["replyemail"].' | '; print ''; print ''.$row["replyhttp"].' | '; print '
';
print ' '.$row["content"].' '; print ' | ';
print '
----------
https://www.php1.cn/
PHP之友评论