Quote:
Originally Posted by Xenon
As for the eval problem, a little code snipet would help more ^^
For the file download, check the chmod, sometimes it's just that 
|
chmod it's not...
here's the call:
PHP Code:
while ($quote = $DB->fetch_array($quotes))
{
if ($setting['showtimedate'] == 1)
{
$datetime = date("d.n.Y", $quote[timestamp]);
}
if ($setting['showcompany'] == 1 AND $setting['showcompanyurl'] == 1)
{
eval('$companypiece = "' . gettemplate('companypiece') . '";');
}
$parsedquote = nl2br($quote[quote]);
eval('$testimonialbits .= "' . gettemplate('testimonialbit') . '";');
}
echo $testimonialbits;
and this is the gettemplate function:
PHP Code:
// output template to var, fetch template from DB if not preloaded
function gettemplate($templatename)
{
global $DB, $preloadedtemplates;
if(!array_key_exists($templatename, $preloadedtemplates))
{
$template = $DB->query_first("SELECT * FROM " . TABLE_PREFIX . "template WHERE title = '$templatename'");
$template = $template[template];
$preloadedtemplates[$templatename] = $template;
}
else
{
$template = $preloadedtemplates[$templatename];
}
return addslashes($template);
}