if ($tmp_dbresult) {
        $tpl->setCurrentBlock('CSSSELECT');
        $tmp['CSS_RULES_SELECT_NAME'] = $cms_lang['css_rule_list_importable'];
        $tmp['CSS_RULES_SELECT'] = "<select class=\"w800\" multiple=\"multiple\" id=\"idcss[]\" name=\"idcss[]\" size=\"8\">";
        $tmp['CSS_RULES_SELECT_END'] = $tmp_dbresult ? '</select>' : '&nbsp;' . $cms_lang['css_rule_listempty'];
        $tpl->setVariable($tmp);
        $tpl->parseCurrentBlock();
        unset($tmp);
    }
}
if (!empty($idcssfile) || !empty($idcssfilecopy)) {
    // used css-rules
    $tpl->setCurrentBlock('CSSRULES1');
    $tmp_dbresult = 0;
    if ($idfile) {
        $db = get_all_cssrules_of_file($client, $idfile, 0, 2);
        while ($db->next_record()) {
            set_option_tag($db->f('idcss'), $db->f('type') . $db->f('name'), " selected", '1');
            $tmp_dbresult = true;
        }
    }
    // select-tag must be written, if any option is present
    unset($tmp);
    if ($tmp_dbresult) {
        $tpl->setCurrentBlock('CSSSELECT1');
        $tmp['CSS_RULES_SELECT_NAME1'] = $cms_lang['css_rule_list_used'];
        $tmp['CSS_RULES_SELECT1'] = "<select class=\"w800\" multiple=\"multiple\" id=\"idcss[]\" name=\"idcss[]\" size=\"8\">";
        $tmp['CSS_RULES_SELECT_END1'] = $tmp_dbresult ? '</select> ' . $cms_lang['css_rule_listhint'] : '&nbsp;' . $cms_lang['css_rule_listempty'];
        $tpl->setVariable($tmp);
        $tpl->parseCurrentBlock();
        unset($tmp);
Beispiel #2
0
                $tpl->setVariable($tmp);
                $tpl->parseCurrentBlock();
                unset($tmp);
            }
            // no css-rules in the css-file to display
            if ($int_max < 1) {
                show_none('NODETAIL', 'contenta', $cms_lang['css_norules']);
            }
        }
    }
    unset($tmp);
} else {
    if ($perm->have_perm('29', 'css_file', $idcssfile)) {
        // Zeige den Importberecih, wenn der User die Berechtigung zum Inport hat
        $tpl->setCurrentBlock('DETAIL');
        $db = get_all_cssrules_of_file($idclient, 0, 0, 1);
        $int_max = $db->affected_rows();
        for ($i = 0; $i < $int_max; $i++) {
            $db->next_record();
            set_rule_data($db, 'import');
            $tpl->setVariable($tmp);
            $tpl->parseCurrentBlock();
            unset($tmp);
        }
        // no css-rules to display for import
        if ($db->affected_rows() == '0') {
            show_none('NODETAIL', 'contenta', $cms_lang['css_norulesforimport']);
        }
        unset($tmp);
    }
}