疑难问题
if (!$cook_user)
{echo "";}
else {include ("connect.inc.php");
$query = "select * from my_user where user='".$cook_user."' and password='".$cook_password."'";
$res = mysql_query($query);
if (!$res)
{echo "";}
include "connect.inc.php";
if ($content) {$c ( "'","mysinglequotes",$content);
$c
$c
$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 = "update guestbook set time_close=now(),answer_count=answer_count+1,answer_name='".$cook_user."' where id=".$theme_id;
$res = mysql_query($query);
if ($res)
{echo "";}}}}
?>
本主题最后 5 个帖子 (按发帖时间倒序排列)
width=100%>
作 者
内 容
$query = "select * from guestbook where main_id=".$theme_id." or id=".$theme_id." order by time_open DESC limit 5 ";
$res = mysql_query($query);
function TdBackColor() {
static $ColorStr;
if ($ColorStr=="#ededed") {
$ColorStr="#dedede";
} else {
$ColorStr="#ededed";
}
return($ColorStr);
}
for ($i=1;$i {$row = @mysql_fetch_array($res);
if (!$row) break;
$ColorStr=TdBackColor();
echo " ";
echo " ".$row['name']." ";
$c ( "mysinglequotes","'",$row['content']);
echo " ".$content." ";
}
?>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
以上就介绍了supercalifragilisticexpialidoc 模仿OSO的论坛(四),包括了supercalifragilisticexpialidoc方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
查看更多关于supercalifragilisticexpialidoc模仿OSO的论坛(四)的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did62070