makeOpenTable();
$code .= $frmObj->makeDisplayField("
".$hisObj->name."
");
$code .= $frmObj->makeDisplayField(nl2br($hisObj->description));
$code .= $frmObj->makeDisplayField(" ");
$code .= "";
$count = 1;
$fileList = "";
for($i = 1; $i <= 10; ++$i)
{
if($hisObj->{'file'.$i} != "")
{
$fileList .= "
| {'file'.$i}."\">Attachment ".$count." |
";
++$count;
}
}
if($fileList != "")
{
$code .= $frmObj->makeOpenTable().$fileList."";
}
print $code;
}
else
{
//Display a random one
$q = "SELECT ID FROM ".$tables['History'];
if(isset($countryID) && $countryID != ""){ $q .= " WHERE CountryID=".$countryID; }
$q .= " ORDER BY RAND() LIMIT 0,1";
$r = mysql_query($q);
$ra = mysql_fetch_array($r);
$frmObj = new Form();
$hisObj = new History($ra['ID'],$tables['History']);
$code = $frmObj->makeOpenTable();
$code .= $frmObj->makeDisplayField("
".$hisObj->name."
");
if($hisObj->shortDescription != ""){ $code .= $frmObj->makeDisplayField(nl2br($hisObj->shortDescription)); } else { $code .= $frmObj->makeDisplayField(nl2br($hisObj->description)); }
$code .= $frmObj->makeDisplayField("
countryID."\">More >>","right");
$code .= $frmObj->makeDisplayField(" ");
$code .= "";
/**
$count = 1;
$fileList = "";
for($i = 1; $i <= 10; ++$i)
{
if($hisObj->{'file'.$i} != "")
{
$fileList .= "
| {'file'.$i}."\">Attachment ".$count." |
";
++$count;
}
}
if($fileList != "")
{
$code .= $frmObj->makeOpenTable().$fileList."";
}
**/
print $code;
}
?>