https://www.icyphoenix.com/viewtopic.php?f=36&t=5762&p=39214#p39214
-----------------------------------
Informpro
Sat 09 May, 2009 10:01

Re: Theme Compilation For Viewing
-----------------------------------
is there possible to insert php in this ? u can do like this:[code syntax="php"]$Templates = Array();
$Query = "SELECT ".TEMPLATES_NAMES.", ".TEMPLATES_ID."
FROM ".TEMPLATES_TABLE;
if(!($_Query = $db->query($Query)))
{
die("Problem On getting tpl data"); //Hum .. I don't know how to use message_die()
}
else
{
while($row = $db->sql_fetch_assoc($_Query))
{
$Templates += Array($row[TEMPLATES_NAMES] => $row[TEMPLATES_ID]);
}
}
/*We get something like:
$Templates = array(
'Aphrodite' => template_id,
template => '2')
);*/
$TheThingToSetInTheTemplates = NULL;
foreach($Templates as $TemplateName => $TemplateID)
{
//{L_TEMPLATES} == Templates:&nbsp;
$TheThingToSetInTheTemplates += '<a href="ThePageForChangingTemplates.php?Templates_ID='.$TemplateID.'>{L_TEMPLATES}'.$TemplateName.'</a>'.'<br />';
}
[/code](WooW, I was forgotting that we've to use [code syntax] :D)
(It could work, just replace the const by real value :D)


