if($Submit)
{
$ctr="select max(msgid) from discussion";
$rsctr=mysql_query($ctr);
$rowctr=mysql_fetch_array($rsctr);
//$sel="select * from message where boardid='$boardid'";
//$rsel=mysql_query($sel);
$id=$rowctr[0]+1;
$dd=date("dMYY",mktime());
$tt=date("H:i",mktime());
$message=ereg_replace("\"","'",$message);
$tid=$qid;
$sql="insert into discussion(msgid,author,date,time,message,refmsgid,tid) values(\"$id\",\"$author\",\"$dd\",\"$tt\",\"$message\",\"$refmsgid\",\"$tid\")";
$result=mysql_query($sql);
}
?>
$color="#CCCCCC";
//$tid=3;
$msql=sprintf("select * from discussion where tid='%s'",$qid);
$result=mysql_query($msql);
$nno=1;
while ($myrow = mysql_fetch_array($result))
{
?>
|
printf("%s",$nno);?>
|
printf("
%s",$myrow["msgid"],$qid, $myrow[author]);?> |
printf("%s %s", $myrow[date],$myrow[time]);?>
|
|
//DispRep($depth+1,$varmsgid,$mbid);
?>
|
$nno=$nno+1;
}
?>
|