登录 | 注册 | 论坛 | 搜索 | 会员中心 | 关于我们
91LAMP   »   论坛首页    »   PHP原创&高级应用   »    PHP代码有错 请老师帮忙看看哦 上次发的不对 重发下  
  
上一主题 下一主题
 标题:PHP代码有错 请老师帮忙看看哦 上次发的不对 重发下  

xiaoyumao
状态: 这家伙又在潜水~
等级: 版主发帖: 22帖
排名: 第3名积分: 64分
离线: 2008年11月17日
        
1 楼

PHP代码有错 请老师帮忙看看哦 上次发的不对 重发下

<?
include_once("inc/meconn.php");
$n=$_GET["n"];
$m=$_GET["m"];
$a=$_GET["a"];
$b=$_GET["b"];
$c=$_GET["c"];
$d=$_GET["d"];
$e=$_GET["e"];
ft_na($n,$m,$a,$b,$c,$d,$e);
Function ft_na($n,$m,$a,$b,$c,$d,$e){
if ($d==1){
$sql="SELECT * from ft_bbs_cate,ft_bbstitle where ft_bbs_cate.BBS_Cate_ID = ft_bbstitle.BoardID_2 and ft_bbstitle.deleted=0 and ft_bbstitle.BoardID_1=A_".$m." and ft_bbstitle.huati=1 order by redate desc limit 0,".$n."";
}
elseif ($d==2){
$sql="SELECT * from {$tablepre}bbs_cate,bbstitle where bbs_cate.BBS_Cate_ID = bbstitle.BoardID_2 and bbstitle.deleted=0 and bbstitle.BoardID_1=A_".$m." and bbstitle.sign=1 order by redate desc limit 0,".$n."";
}
else{
$sql="SELECT * from {$tablepre}bbs_cate,bbstitle where bbs_cate.BBS_Cate_ID = bbstitle.BoardID_2 and bbstitle.deleted=0 and bbstitle.BoardID_1=A_".$m." and bbs_cate.BBS_Cate_Qs=0 order by redate desc limit 0,".$n."";
}
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
if ($numrows!=0){
  $nl="";
  do {
  $id=$myrow[0];
  $title=substr($myrow["title"],0,$e);
  $boardid_1=$myrow["BoardID_1"];
  $boardid_2=$myrow["BoardID_2"];
  $BBS_Cate_Name=$myrow["BBS_Cate_Name"];
  $tk1="default.php?a=".$boardid_1."&b=".$boardid_2."";
  if ($a==1){
  $astring="[<a href=".$tk1.">".$myrow["BBS_Cate_Name"]."</a>]";
  }
  if ($b==1){
  $bstring=dateFormat($myrow["redate"],'y-m-d');
  }
  if ($c==1){
  $cstring="<a href=ftbbsmyinfo.php?ftbbsuser=".$myrow["user_id"].">".$myrow["user_id"]."</a>";
  }
  $nl=$nl.$astring."<a href=ftbbs.php?id=".$id." target=\"_blank\">".$title."</a>&nbsp;".$cstring. " ".$bstring."<br>";
 }
  while ($myrow = mysql_fetch_array($rs));
}
else{
  $nl="记录为空";
}
echo "document.write('".$nl."');";
}
?>

2008-11-17 17:11:53      
  
11/11


Powered by BbsFine 0.2 © 2002-2008 Xingmo.com Archiver
91LAMP ©2002-2008 版权所有 京ICP备05011686号