首頁  >  文章  >  後端開發  >  模仿OSO的論壇(四)_PHP教程

模仿OSO的論壇(四)_PHP教程

WBOY
WBOY原創
2016-07-21 16:02:151039瀏覽

reply.php(用來回覆主題)

疑難題;

if (!$cook_user)
{echo "<script>";  <br>echo "parent.location.href='index.php'";  <br>echo "</script>";}
else {include ("connect.inc.php");
$query = "從 my_user 中選擇*,其中 user='".$cook_user."' 和密碼='".$cook_password."'";  
$res = mysql_query($query);  
if (!$res)
{echo "";}
include "connect.inc.php";
if ($content) {$content= str_replace("'","mysinglequotes",$content);  
$content=htmlspecialchars($content);
$content=nl2br($content);
$query = "INSERT INTO guestbook (name,type,content,icon,time_open,time_close,answer_count,answer_name,main_id) VALUES ('".$cook_user."',0,'".$content."' ,".$icon.",now(),now(),1,'".$cook_user."',".$theme_id.")";  
$res = mysql_query($query);
if ($res)  
{$query = "更新留言簿設定 time_close=now(),answer_count=answer_count 1,answer_name='".$cook_user."' where id=".$theme_id;  
$res = mysql_query($query);  
if ($res)
{echo "";}}}}
?>




;

  
    
      
           回覆主題


          href="read.php? theme_id=">
$query = "從留言簿選擇主題,其中id=".$theme_id;
$res = mysql_query($query );  
$row = mysql_fetch_row($res);  
回顯$row[0];
? >



        
          TD> 模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height             width=18> 模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height=18  
           width=18> 模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height=18  
           width=18> 模仿OSO的論壇(四)_PHP教程 align=ABSCENTER height=18  
            src="mypic/icon4.gif"  
     🎜>            align=ABSCENTER height=18  
            src="mypic/icon5.gif"  
               align=ABSCENTER height=18  
            src="mypic/ icon6.gif"  
            width=18> 模仿OSO的論壇(四)_PHP教程            width =18>
模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height   >寬度=18> 模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height >            width=18> 模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height=18  
           width=18> 模仿OSO的論壇(四)_PHP教程            align=ABSCENTER height=18  
           width=18> 模仿OSO的論壇(四)_PHP教程 align=ABSCENTER height=18  
            src="mypic/icon12.gif"  
    =c 🎜>            align=ABSCENTER height=18  
            src="mypic/icon13.gif"  
                align=ABSCENTER height=18  
            src="mypic/icon14 .gif"  
            width=18>;
        den" name="theme_id" size ="12" class="stedit" value="" >
          新增貼內容
     
        
            ()" type=submit value="發表">  
                   作者
內容
$query = "從留言簿中選擇*,其中main_id=".$theme_id." 或id=".$theme_id." order by time_open DESC limit 5 ";
$res = mysql_query($query);  
函數TdBackColor() {
ColorStr;
  if ($ColorStr=="#ededed") {
    $ColorStr="#dedede";
  } else {   return($ColorStr);
}
for ($i=1;$i{$row = @mysql_fetch_array($res);  
if ( !$row) 中斷;  
$ColorStr=TdBackColor();
echo "";
echo "".$row[ 'name']."";  
$content= str_replace("mysinglequotes","'",$row['content']);  
echo "".$content. " ";  
}
? >      


表格>
  

[著作權作者與奧論文歸作者與奧論文歸作者與奧索網共同擁有,如需轉載,請版權作者及出處】    



http://www.bkjia.com/PHPjc/316586.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316586.htmlTechArticlereply.php(用於回覆主題) HTMLHEADTITLE疑難問題/TITLE LINK href=mypic/style.css rel=樣式表type=text/css/HEAD ?php if (!$cook_user) {echo 腳本語言='javascript'; e...
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn