rendered paste body<?php
require_once 'admox/cona.php';
startsession();
connectdb();
$count = 0;
$q = 'SELECT mh.type, mh.imageid, mh.blockid, mh.fordate, mh.id, mi.path, mi.filename, mb.block FROM musthaves mh LEFT JOIN musthavesimages mi ON mi.id = mh.imageid LEFT JOIN musthavesblocks mb ON mb.id = mh.blockid WHERE mh.active = 1 ORDER BY fordate DESC';
$qr = getqr($q);
while ($ra = getra($qr))
{
print 'var back'.$count.'date = \''.$ra['fordate'].'\';'."\n";
if ($ra['type'] == 0)
{
print 'var back'.$count.' = \'<img src="'.$site_root_http . $ra['path'] . $ra['filename'].'" />\';'."\n";
} else {
print 'var back'.$count.' = \''.$ra['block'].'\';'."\n";
}
$count++;
}
print 'var count = '.$count.';';
?>