".lang('noaccessto', array(lang('addcssassociation')))."
";
}
else {
#******************************************************************************
# now really starting
#******************************************************************************
?>
ShowHeader('currentassociations'); ?>
'.lang('stylesheet').''?>:
RecordCount() > 0)
{
echo "
\n";
echo '';
echo "\n";
echo "| ".lang('title')." | \n";
echo " | \n";
echo "
\n";
echo '';
echo '';
# this var is used to show each line with different color
$currow = "row1";
# now showing each line
while ($one = $result->FetchRow())
{
# we store ids of templates found for them not to appear in the dropdown
$csslist[] = $one["assoc_to_id"];
echo "\n";
if( $modifytpl )
{
echo "| ".$one["template_name"]." | \n";
}
else
{
echo "".$one['template_name']." | \n";
}
# if user has right to delete
if ($modify || $delasso)
{
echo "";
echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'),'','','systemicon');
echo " | \n";
}
else
{
echo " | ";
}
echo "
\n";
("row1" == $currow) ? $currow="row2" : $currow="row1";
} ## foreach
echo '';
echo "
\n";
} # end of if result
if( $modify || $addasso )
{
# this var is used to store the css ids that should not appear in the
# dropdown
$notinto = "";
foreach($csslist as $key)
{
$notinto .= "$key,";
}
$notinto = substr($notinto, 0, strlen($notinto) - 1);
# this var contains the dropdown
$dropdown = "";
# we generate the dropdown
if ("" == $notinto)
{
$query = "SELECT * FROM ".cms_db_prefix()."templates WHERE active = 1 ORDER BY template_name";
}
else
{
$query = "SELECT * FROM ".cms_db_prefix()."templates WHERE template_id NOT IN (".$notinto.") AND active = 1 ORDER BY template_name";
}
$result = $db->Execute($query);
if ($result && $result->RecordCount() > 0)
{
?>