$db = mysql_connect("mysql.sindhishaan.com", "sindhish","iqhp6p");
mysql_select_db("dbsindhish",$db);
if($qid<>"")
{
$qtr=sprintf("select * from discussiontopic where tid='%s'",$qid);
$rsqtr=mysql_query($qtr);
$rowqtr=mysql_fetch_array($rsqtr);
$qtrTopic=$rowqtr["topic"];
//$sel="select * from message where boardid='$boardid'";
//$rsel=mysql_query($sel);
}
?>
$msql="select * from discussion where msgid=$msgid";
$result1=mysql_query($msql);
$myrow=mysql_fetch_array($result1);
$topic=sprintf("RE : ");
//$topic=ereg_replace(" ","_",$topic);
?>
| %s",$myrow[author]);?> |
|
|
%s",$myrow[message]);?> |
$nsql="select * from discussion where refmsgid=$msgid";
$rsnsql=mysql_query($nsql);
$color="#CCCCCC";
$no=1;
while ($myrow = mysql_fetch_array($rsnsql))
{
if($no==1)
{?>
}?>
| %s",$no);?> |
%s",$myrow[msgid],$qid,$myrow[author]);?> |
%s ",$myrow[author]);?> |
%s %s", $myrow[date],$myrow[time]);?> |
$no=$no+1;
}
?>
|
$gcolo = "lightgrey";
function DispRep($depth,$id,$mbid)
{
$SQL = "SELECT * FROM discussion WHERE refmsgid = $id ORDER BY msgid";
$replies = mysql_query($SQL);
while ($reprow = mysql_fetch_array($replies))
{
$varauthor = $reprow[author];
$vartdate = $reprow[date];
$varmsgid = $reprow[msgid];
$str="";
echo " | ";
$str=str_repeat(" ",$depth);
$str1=sprintf("%s - %s - %s ",$id,$qid,$vartopic,$varauthor,$vartdate);
echo $str;
echo $str1;
echo " |
";
DispRep($depth+1,$varmsgid,$mbid);
}
}
?>