
03-10-2005, 04:03 AM
|
|
Quote:
Originally Posted by Lionel
Can someone please tell me what is wrong with the below? That module is causing an unclosed tag at the bottom of the page </html and when you click on any link in front page, it sometimes takes you to a blank page with only the rest of the tag > at the top
PHP Code:
$getlateste= $DB_site->query("
SELECT journal_entries.entrytitle,journal_entries.entrydate,
journal_entries.entry_id,journal_entries.entrytext,
journal_entries.journal_id,journals.journalist,journals.journalist_id
FROM ".TABLE_PREFIX."journal_entries AS journal_entries
LEFT JOIN ".TABLE_PREFIX."journals AS journals ON (journal_entries.journal_id=journals.journal_id)
WHERE journal_entries.entry_active=1 AND journal_entries.private!=1 AND journals.private!=1
ORDER BY journal_entries.entrydate DESC
LIMIT 5
");
$countlatest= $DB_site->num_rows($getlateste);
$latestentrybits = "";
if($countlatest>0)
{
while($latest= $DB_site->fetch_array($getlateste))
{
$latestentrydate= vbdate($vboptions['dateformat'], $latest['entrydate'], 1);
$latestentrytime= vbdate($vboptions['timeformat'], $latest['entrydate']);
exec_switch_bg();
if(strlen($latest[entrytitle])>20)
{
$latest[entrytitle]= "".substr($latest[entrytitle],0,20)."...";
}
if(strlen($latest[entrytext])>150)
{
$latest[entrytext]= "".substr($latest[entrytext],0,150)."...";
}
eval('$latestentrybits .= "' . fetch_template('journal_latestentrybits') . '";');
}
$DB_site->free_result($latest);
}
else
{
$latestentrybits=$vbphrase['adv_no_entries'];
}
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_latestjournalentry') . '";');
unset($latestentrybits,$latest,$latestentrytime,$latestentrydate,$countlatest);
|
It's the template we need, not the php file.
|