天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

一個模仿oso的php論壇程序源碼(之三)第1/2頁

程序三:readforum.php 
<HTML> 
<HEAD> 
<TITLE> 論壇信息 </TITLE> 
<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"> 
<META NAME="Generator" CONTENT="EditPlus"> 
<META NAME="Author" CONTENT=""> 
<META NAME="Keywords" CONTENT=""> 
<META NAME="Description" CONTENT=""> 
</HEAD> 
<body bgcolor="#C0C0C0" background="backcolor.GIF"> 
<? 
  include ("c:mydbheader.inc"); 
?> 
<?php  
//完成功能: 
//echo $username; 
//echo $useremail; 
//echo $userhttp; 
//echo $forumtitle; 
//echo $fouumface; 
//echo $forumcontent;  
//echo $theme_id; 
echo 'g_username:'.$GLOBALS["g_username"].' is ok'; 
$dbh = mysql_connect('localhost:3306','root',''); 
mysql_select_db('test');  
if (empty($readflag)) { 
   $readflag = 0; 
}  
if ($readflag > 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); 

?> 
<table width="100%" border="0"> 
<tr class="text">  
<td width="50%">  <div align="left">當前位置:主頁――論壇――論壇內容</div> </td> 
<td width="50%">  <div align="center"> </div> </td> 
</table> 
<? 
    $tempstr = " select title,readcount,replycount from fr_t_forumtitle where id = ".$theme_id; 
     $res=mysql_query($tempstr,$dbh);   
    $row=mysql_fetch_array($res);   
    $ls_theme_title = $row["title"];   
    $li_readcount   = $row["readcount"];   
    $li_replycount  = $row["replycount"] + 1;   
?> 
<table width="100%" border="0"> 
  <tr>  
    <td width="61%" class="text">主題:<span class="text"><font color="#ff0000"> 
      <? 
        print $ls_theme_title; 
      ?> 
    </font></span></td> 
    <td width="13%">  
      <div align="center"><a href="addforum.php?theme_id=0" target="_top"><img src="post.gif" width="80" height="20" alt="加新貼字" border="0"></a></div> 
    </td> 
    <td width="13%">  
    <? 
      print '<div align="center"><a href="addforum.php?theme_id='.$theme_id.'"'; 
      print 'target="_top"><img src="reply.gif" width="80" height="20"'; 
      print 'alt="回復貼字" border="0"></a></div>'; 
    ?> 
    </td> 
    <td width="13%">  
      <div align="center"><a href="mainforum.php" target="_top"><img src="theme.gif" width="80" height="20" alt="主題列表" border="0"></a></div>

php技術一個模仿oso的php論壇程序源碼(之三)第1/2頁,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 天堂岛www天堂资源在线 | 欧美日韩另类在线观看视频 | 亚洲成年人影院 | 伊人AV一区二区三区夜色撩人 | 亚洲黄色在线播放 | 把腿张开再深点好爽宝贝 | 蜜桃成熟时33D在线嘟嘟网 | 国产h视频在线观看网站免费 | 自拍偷拍12p | 亚洲色播永久网址大全 | 影视先锋男人无码在线 | 国产69精品久久久久乱码免费 | 国产亚洲精品成人AV久久 | 99pao成人国产永久免费视频 | 亚洲女人网 | 国产精品亚洲精品爽爽 | 少妇高潮惨叫久久久久久电影 | 狠狠人妻久久久久久综合九色 | 亚洲男人97色综合久久久 | 别停好爽好深好大好舒服视频 | 成人区在线观看免费视频 | 九九热在线免费观看 | 91原创在线 | 国产欧美在线亚洲一区刘亦菲 | 先锋影音av最新资源 | 欧美成人无码A区在线观看免费 | 国产精品久久久久久日本 | CHINA学生白嫩 | 内射人妻骚骚骚 | 快播可乐网 | 久久99这里只有精品 | 国产ts调教 | 欧美日韩一二区旡码高清在线 | 快穿之H啪肉 | 国产91专区| 久青草国产在视频在线观看 | 陈红下面又紧又小好爽 | 亚洲精品久久久WWW游戏好玩 | 久久综合给会久久狠狠狠 | 久久性生大片免费观看性 | 色狠狠色综合吹潮 |