Ejemplo n.º 1
0
 $con_type[18] = array('type' => 'date', 'descr' => 'Datum/Zeit', 'input' => '$code .= type_form_date($formname, $content, $type_config, $cms_side);');
 //    $con_type[19]=array('type'=>'time'         ,'descr'=>'Zeit'                 ,'input'=>'$code .= type_form_time($formname, $content, $type_config, $cms_side);');
 $con_type[20] = array('type' => 'checkboxsave', 'descr' => 'Checkbox', 'input' => '$code .= type_form_checkboxsave($formname, $content, $type_config, $cms_side);');
 // Content-Array erstellen
 $sql = "SELECT\r\n\t\t\t\tA.idcontent, container, number, idtype, typenumber, value\r\n\t\t\tFROM\r\n\t\t\t\t{$cms_db['content']} A\r\n\t\t\t\tLEFT JOIN {$cms_db['side_lang']} B USING(idsidelang)\r\n\t\t\tWHERE\r\n\t\t\t\tB.idside='{$idside}'\r\n\t\t\t\tAND B.idlang='{$lang}'";
 $db->query($sql);
 while ($db->next_record()) {
     $content_array[$db->f('container')][$db->f('number')][$db->f('idtype')][$db->f('typenumber')] = array($db->f('idcontent'), htmlentities($db->f('value'), ENT_COMPAT, 'UTF-8'));
 }
 // Module finden
 if ($con_side[$idcatside]['idtplconf'] == '0') {
     $idtplconf = $con_tree[$con_side[$idcatside]['idcat']]['idtplconf'];
 } else {
     $idtplconf = $con_side[$idcatside]['idtplconf'];
 }
 $modlist = browse_template_for_module('0', $idtplconf);
 // Containernamen suchen
 $sql = "SELECT idlay FROM {$cms_db['tpl_conf']} A LEFT JOIN {$cms_db['tpl']} B USING(idtpl) WHERE A.idtplconf='{$idtplconf}'";
 $db->query($sql);
 $db->next_record();
 $idlay = $db->f('idlay');
 $list = browse_layout_for_containers($idlay);
 // Browserinformationen in Array schreiben
 $tmp_sniffer = explode(',', $sid_sniffer);
 // Bearbeitungsarray erstellen
 $con_content = explode(';', $content);
 unset($content);
 // Einzelne Container auflisten
 foreach ($con_content as $value) {
     // Konfiguration einlesen
     $con_config = explode('.', $value);
Ejemplo n.º 2
0
function con_config_tpl_save($idtpl, $idlay, $idcatlang, $idsidelang, $idtplconf, $have_perm_save_configdata = true)
{
    global $db, $cms_db, $cfg_client, $configtpl;
    if (!(is_numeric($idtpl) || is_int($idtpl))) {
        return;
    }
    if (!(is_numeric($idtplconf) || is_int($idtplconf))) {
        return;
    }
    $is_new_tpl = false;
    // Array der alten Container erstellen
    $used_container = browse_template_for_module('0', $idtplconf);
    if (!is_array($used_container['id'])) {
        $used_container['id']['0'] = '0';
    }
    // Eintrag in 'tpl_conf' Tabelle
    if ($idtplconf == '0') {
        if ($idtpl != '0') {
            // Template erstellen
            $sql = "INSERT INTO {$cms_db['tpl_conf']} (idtpl) VALUES ('{$idtpl}')";
            mysql_query($sql);
            //print_r($db);
            $idtplconf = mysql_insert_id();
            //echo mysql_insert_id();
            $is_new_tpl = true;
            //echo "<br>new tpl idtpl: $idtpl idtplconf: $idtplconf<br>";
        } else {
            return;
        }
    } else {
        if ($idtpl != '0' && $idtpl != $configtpl) {
            // Template ändern
            $sql = "UPDATE {$cms_db['tpl_conf']} SET idtpl='{$idtpl}' WHERE idtplconf='{$idtplconf}'";
            $db->query($sql);
            $is_new_tpl = true;
        } elseif ($idtpl == '0') {
            // Template löschen
            $sql = "DELETE FROM {$cms_db['container_conf']} WHERE idtplconf='{$idtplconf}'";
            $db->query($sql);
            $sql = "DELETE FROM {$cms_db['tpl_conf']} WHERE idtplconf='{$idtplconf}'";
            $db->query($sql);
            // Status der 'code' Tabelle ändern
            $list = get_idcode_by_idtplconf($idtplconf);
            change_code_status($list, '1');
            unset($list);
            // Containerinhalt löschen
            $list = get_idsidelang_by_idtplconf($idtplconf);
            $sql = "DELETE FROM {$cms_db['content']} WHERE idsidelang IN(" . implode(',', $list) . ")";
            $db->query($sql);
            $sql = "DELETE FROM {$cms_db['content_external']} WHERE idsidelang IN(" . implode(',', $list) . ")";
            $db->query($sql);
            unset($list);
            $idtplconf = '0';
        }
    }
    // Content aus Cache löschen
    sf_factoryCallMethod('UTILS', 'DbCache', null, null, 'flushByGroup', array('frontend', 'content'));
    // Template bei Seite oder Ordner eintragen
    if ($idcatlang) {
        $sql = "UPDATE {$cms_db['cat_lang']} SET idtplconf='{$idtplconf}' WHERE idcatlang='{$idcatlang}'";
    } else {
        $sql = "UPDATE {$cms_db['side_lang']} SET idtplconf='{$idtplconf}' WHERE idsidelang='{$idsidelang}'";
    }
    if ($idcatlang || $idsidelang) {
        //print_r($GLOBALS);
        //echo $lang."zzy"; exit;
        $db->query($sql);
    }
    if ($idtplconf == '0') {
        return;
    }
    // Array der neuen Container erstellen
    // ein vorhandenes template wird neu konfiguriert und benutzer hat das recht dazu
    if ($idlay && $have_perm_save_configdata) {
        $list = browse_layout_for_containers($idlay);
        if (is_array($list['id'])) {
            foreach ($list['id'] as $i) {
                global ${'C' . $i . 'MOD_VAR'}, ${'c' . $i}, ${'cview' . $i}, ${'cedit' . $i};
                if (${'c' . $i}) {
                    $container['id'][] = $i;
                }
                if (${'C' . $i . 'MOD_VAR'}) {
                    $cconfig[$i] = make_array_to_urlstring(${'C' . $i . 'MOD_VAR'});
                }
            }
        }
        //Ein neues Template wird angelegt - recht des benutzers ist egal
    } else {
        if (!$idlay) {
            //idlay ist bei zu wenig rechten nicht vorhanden, prüfen ob neues Template
            if (!$is_new_tpl && !$have_perm_save_configdata) {
                return;
            }
            // Templatevorlage kopieren
            $sql = "SELECT container, config, view, edit FROM {$cms_db['container']} A LEFT JOIN {$cms_db['container_conf']} B\n                USING(idcontainer) WHERE A.idtpl='{$idtpl}' AND B.idtplconf='0'";
            $db->query($sql);
            while ($db->next_record()) {
                $container['id'][] = $db->f('container');
                $cconfig[$db->f('container')] = $db->f('config');
                ${'cview' . $db->f('container')} = $db->f('view');
                ${'cedit' . $db->f('container')} = $db->f('edit');
            }
            //es wurde kein neues template angelegt -> benutzer hat nicht das recht weiterzumachen
        } else {
            return;
        }
    }
    if (!is_array($container['id'])) {
        $container['id']['0'] = '0';
    }
    foreach ($container['id'] as $value) {
        if ($value != '0') {
            // neue Container hinzufügen
            if (!in_array($value, $used_container['id'])) {
                $sql = "SELECT idcontainer FROM {$cms_db['container']} WHERE idtpl='{$idtpl}' AND container='{$value}'";
                $db->query($sql);
                $db->next_record();
                $sql = "INSERT INTO {$cms_db['container_conf']} (idtplconf, idcontainer, config, view, edit)\n                        VALUES ('{$idtplconf}', '" . $db->f('idcontainer') . "', '{$cconfig[$value]}', '" . ${'cview' . $value} . "', '" . ${'cedit' . $value} . "')";
                $db->query($sql);
                $change = 'true';
            }
            // geänderte Container updaten
            if (in_array($value, $used_container['id'])) {
                // Modulkonfiguration hat sich geändert
                if ($used_container[$value]['config'] != $cconfig[$value] || $used_container[$value]['view'] != ${'cview' . $value} || $used_container[$value]['edit'] != ${'cedit' . $value}) {
                    $sql = "UPDATE {$cms_db['container_conf']} SET config='" . $cconfig[$value] . "', view='" . ${'cview' . $value} . "', edit='" . ${'cedit' . $value} . "' WHERE idcontainer='" . $used_container[$value]['idcontainer'] . "' AND idtplconf='{$idtplconf}'";
                    $db->query($sql);
                    $change = 'true';
                }
                // Modul hat sich durch Templatewechsel geändert
                if ($idtpl != $configtpl) {
                    $sql = "SELECT idcontainer FROM {$cms_db['container']} WHERE idtpl='{$idtpl}' AND container='{$value}'";
                    $db->query($sql);
                    $db->next_record();
                    $sql = "UPDATE {$cms_db['container_conf']} SET idcontainer='" . $db->f('idcontainer') . "'\n                            WHERE idcontainer='" . $used_container[$value]['idcontainer'] . "' AND idtplconf='{$idtplconf}'";
                    $db->query($sql);
                    if ($used_container[$value]['idmod'] != ${'c' . $value}) {
                        $empty_container[] = $value;
                    }
                }
            }
        }
    }
    // alte Container löschen
    foreach ($used_container['id'] as $value) {
        if ($value != '0') {
            if (!in_array($value, $container['id'])) {
                $sql = "DELETE FROM {$cms_db['container_conf']} WHERE idcontainer='" . $used_container[$value]['idcontainer'] . "'\n                        AND idtplconf='{$idtplconf}'";
                $db->query($sql);
                $change = 'true';
                $empty_container[] = $value;
            }
        }
    }
    // Status der 'code' Tabelle ändern
    if ($change) {
        $list = get_idcode_by_idtplconf($idtplconf);
        change_code_status($list, '1');
        unset($list);
    }
    // Containerinhalt löschen
    if (is_array($empty_container)) {
        $list = get_idsidelang_by_idtplconf($idtplconf);
        if (is_array($list)) {
            $sql = "DELETE FROM {$cms_db['content']} WHERE idsidelang IN(" . implode(',', $list) . ")\n                    AND container IN(" . implode(',', $empty_container) . ")";
            $db->query($sql);
            $sql = "DELETE FROM {$cms_db['content_external']} WHERE idsidelang IN(" . implode(',', $list) . ")\n                    AND container IN(" . implode(',', $empty_container) . ")";
            $db->query($sql);
            unset($list);
        }
    }
}
Ejemplo n.º 3
0
    public function getBackendEditForm($cms_path, $lang_charset, $cfg_cms, $idcatside, $lang, $sess, $cfg_client, $con_tree, $con_side, $cms_lang, $idside)
    {
        //echo "$cms_path, $lang_charset, $cfg_cms, $idcatside, $lang, $sess, $cfg_client, $con_tree, $con_side, $cms_lang, $idside";exit;
        $cfg = sf_api('LIB', 'Config');
        $this->cfg->setVal('env', 'current_container_editable', TRUE);
        $enable_code_editor = (bool) $this->cfg->cms('enable_code_editor');
        // Formularelemente includieren
        include_once $cms_path . 'inc/fnc.type_forms.php';
        $code .= '<head>' . "\n";
        $code .= '<title>Sefrengo | Edit-Mode</title>' . "\n";
        $code .= '<meta http-equiv="content-type" content="text/html; charset=' . $lang_charset . '" />' . "\n";
        $code .= '<link rel="stylesheet" type="text/css" href="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/css/sefrengo-theme/jquery-ui.custom.css" />' . "\n";
        $code .= '<link rel="stylesheet" type="text/css" href="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/css/styles.css" />' . "\n";
        if ($enable_code_editor) {
            $code .= '<link rel="stylesheet" type="text/css" href="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/editor/codemirror/lib/codemirror.css" />' . "\n";
            $code .= '<link rel="stylesheet" type="text/css" href="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/editor/codemirror/theme/default.css" />' . "\n";
            $code .= '<link rel="stylesheet" type="text/css" href="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/editor/codemirror/sefrengo/sf_codemirror.css" />' . "\n";
        }
        $code .= '<script type="text/javascript" src="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/init.sefrengo.js"></script>' . "\n";
        $code .= '<script type="text/javascript" src="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/lib/jquery.min.js"></script>' . "\n";
        $code .= '<script type="text/javascript" src="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/lib/jquery-ui.custom.min.js"></script>' . "\n";
        $code .= "<script type=\"text/javascript\">/* <![CDATA[ */\n\t\t\t\t\tvar \$jqsf = jQuery;\n\t\t\t\t\t//var \$jqsf = \$.noConflict(true); // currently the jQuery plugins won\\'t work in this mode \n\t\t\t\t\t\n\t\t\t\t\tSF.Config.debug = false;\n\t\t\t\t\tSF.Config.backend_dir = '" . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . "'; // e.g. /backend/\n\t\t\t\t\tSF.Config.js_dir = SF.Config.backend_dir + 'tpl/" . $cfg_cms['skin'] . "/js/';\n\t\t\t\t\tSF.Config.css_dir = SF.Config.backend_dir + 'tpl/" . $cfg_cms['skin'] . "/css/';\n\t\t\t\t\tSF.Config.img_dir = SF.Config.backend_dir + 'tpl/" . $cfg_cms['skin'] . "/img/';\n\t\t\t\t/* ]]> */</script>";
        if ($enable_code_editor) {
            $code .= '<script type="text/javascript" src="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/jquery.frontend.js"></script>' . "\n";
            $code .= '<script type="text/javascript" src="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/editor/codemirror/lib/codemirror-compressed.js"></script>' . "\n";
            $code .= '<script type="text/javascript" src="' . $cfg_cms['path_base_http'] . $cfg_cms['path_backend_rel'] . 'tpl/' . $cfg_cms['skin'] . '/js/editor/codemirror/sefrengo/jquery.sf_codemirror.js"></script>' . "\n";
        }
        //disable selector content sync
        $copycontent_disabled = true;
        $code .= '<script type="text/javascript">
			try {	
				window.parent.con_nav.sf_setCurrentIdcatside(' . $idcatside . ', ' . $copycontent_disabled . ', ' . $lang . ')
			} catch (e) {
	
			}
			</script>';
        $code .= '</head>' . "\n";
        $code .= '<body id="con-edit2">' . "\n";
        $code .= '<!-- inc.con_edit.php -->' . "\n";
        $code .= '<div id="main">' . "\n";
        $code .= "    <form name=\"editcontent\" method=\"post\" action=\"" . $sess->url($cfg_client['contentfile']) . "\">\n";
        $code .= "    <input type=\"hidden\" name=\"view\" value=\"edit\" />\n";
        $code .= "    <input type=\"hidden\" name=\"lang\" value=\"{$lang}\" />\n";
        $code .= "    <input type=\"hidden\" name=\"action\" value=\"save\" />\n";
        $code .= "    <input type=\"hidden\" name=\"entry\" value=\"" . $_REQUEST['entry'] . "\" />\n";
        $code .= "    <input type=\"hidden\" name=\"idcatside\" value=\"{$idcatside}\" />\n";
        $code .= "    <input type=\"hidden\" name=\"content\" value=\"" . $_REQUEST['content'] . "\" />\n";
        $code .= "    <table class=\"config\" cellspacing=\"1\">\n";
        $con_type['1'] = array('type' => 'text', 'descr' => $cms_lang['type_text'], 'input' => 'type_form_text');
        $con_type['2'] = array('type' => 'wysiwyg', 'descr' => $cms_lang['type_wysiwyg'], 'input' => 'type_form_wysiwyg');
        $con_type['3'] = array('type' => 'textarea', 'descr' => $cms_lang['type_textarea'], 'input' => 'type_form_textarea');
        $con_type['4'] = array('type' => 'image', 'descr' => $cms_lang['type_image'], 'input' => 'type_form_img');
        $con_type['5'] = array('type' => 'imgdescr', 'descr' => $cms_lang['type_image_desc'], 'input' => 'type_form_imgdescr');
        $con_type['6'] = array('type' => 'link', 'descr' => $cms_lang['type_link'], 'input' => 'type_form_link');
        $con_type['7'] = array('type' => 'linkdescr', 'descr' => $cms_lang['type_link_name'], 'input' => 'type_form_linkdescr');
        $con_type['8'] = array('type' => 'linktarget', 'descr' => $cms_lang['type_link_target'], 'input' => 'type_form_linktarget');
        $con_type['9'] = array('type' => 'sourcecode', 'descr' => $cms_lang['type_sourcecode'], 'input' => 'type_form_sourcecode');
        $con_type['10'] = array('type' => 'file', 'descr' => $cms_lang['type_file'], 'input' => 'type_form_file');
        $con_type['11'] = array('type' => 'filedescr', 'descr' => $cms_lang['type_file_desc'], 'input' => 'type_form_filedescr');
        $con_type['12'] = array('type' => 'filetarget', 'descr' => $cms_lang['type_file_target'], 'input' => 'type_form_filetarget');
        $con_type['13'] = array('type' => 'wysiwyg2', 'descr' => $cms_lang['type_wysiwyg'], 'input' => 'type_form_wysiwyg2');
        $con_type['14'] = array('type' => 'select', 'descr' => $cms_lang['type_select'], 'input' => 'type_form_select');
        $con_type['15'] = array('type' => 'hidden', 'descr' => $cms_lang['type_hidden'], 'input' => 'type_form_hidden');
        $con_type['16'] = array('type' => 'checkbox', 'descr' => $cms_lang['type_checkbox'], 'input' => 'type_form_checkbox');
        $con_type['17'] = array('type' => 'radio', 'descr' => $cms_lang['type_radio'], 'input' => 'type_form_radio');
        $con_type['18'] = array('type' => 'date', 'descr' => $cms_lang['type_date'], 'input' => 'type_form_date');
        $con_type['20'] = array('type' => 'checkboxsave', 'descr' => $cms_lang['type_checkbox'], 'input' => 'type_form_checkboxsave');
        // Content-Array erstellen
        $sql = "SELECT\n\t\t\t\t\tA.idcontent, container, number, idtype, typenumber, value\n\t\t\t\tFROM\n\t\t\t\t\t{$this->dbnames[content]} A\n\t\t\t\t\tLEFT JOIN {$this->dbnames[side_lang]} B USING(idsidelang)\n\t\t\t\tWHERE\n\t\t\t\t\tB.idside='{$idside}'\n\t\t\t\t\tAND B.idlang='{$lang}'";
        $this->db->query($sql);
        while ($this->db->next_record()) {
            $content_array[$this->db->f('container')][$this->db->f('number')][$this->db->f('idtype')][$this->db->f('typenumber')] = array($this->db->f('idcontent'), htmlentities($this->db->f('value'), ENT_COMPAT, 'UTF-8'));
        }
        // Module finden
        $idtplconf = $con_side[$idcatside]['idtplconf'];
        if ($con_side[$idcatside]['idtplconf'] == '0') {
            $idtplconf = $con_tree[$con_side[$idcatside]['idcat']]['idtplconf'];
        }
        $modlist = browse_template_for_module('0', $idtplconf);
        // Containernamen suchen
        $sql = "SELECT idlay FROM {$this->dbnames[tpl_conf]} A LEFT JOIN {$this->dbnames[tpl]} B USING(idtpl) WHERE A.idtplconf='{$idtplconf}'";
        $this->db->query($sql);
        $this->db->next_record();
        $idlay = $this->db->f('idlay');
        $list = browse_layout_for_containers($idlay);
        // Bearbeitungsarray erstellen
        $content = $_REQUEST['content'];
        //TODO
        $con_content = explode(';', $content);
        unset($content);
        // Einzelne Container auflisten
        foreach ($con_content as $value) {
            // Konfiguration einlesen
            $con_config = explode('.', $value);
            $con_container = $con_config['0'];
            $con_contnbr = explode(',', $con_config[1]);
            $con_content_type = explode(',', $con_config[2]);
            // Konfigurationsparameter mod_values extahieren und aufbereiten
            $sql = "SELECT\n\t\t\t\t\t\tcontainer_conf.config\n\t\t\t\t\tFROM\n\t\t\t\t\t\t" . $this->dbnames['container_conf'] . " container_conf\n\t\t\t\t\t\tLEFT JOIN " . $this->dbnames['tpl_conf'] . " tpl_conf USING(idtplconf)\n\t\t\t\t\t\tLEFT JOIN " . $this->dbnames['container'] . " container USING(idtpl)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tcontainer_conf.idtplconf = {$idtplconf}\n\t\t\t\t\t\tAND container = {$con_container}\n\t\t\t\t\t\tAND container_conf.idcontainer = container.idcontainer";
            $this->db->query($sql);
            $this->db->next_record();
            $tpl_config_vars = $this->db->f('config');
            // mod_values aus Container ersetzen
            $container = $modlist[$con_container]['output'];
            $config = preg_split('/&/', $tpl_config_vars);
            foreach ($config as $key1 => $value1) {
                $tmp2 = explode('=', $value1);
                if ($tmp2['1'] != '') {
                    // $mod_value Array schreiben
                    $cms_mod['value'][$tmp2['0']] = cms_stripslashes(urldecode($tmp2['1']));
                    // MOD_VALUE[x] ersetzen
                    $container = str_replace('MOD_VALUE[' . $tmp2['0'] . ']', str_replace("\\'", "'", urldecode($tmp2['1'])), $container);
                    //'
                }
                unset($tmp2);
            }
            // nicht benutzte Variablen strippen
            $container = preg_replace('/MOD_VALUE\\[\\d*\\]/', '', $container);
            if (stristr($container, '<cms:mod constant="tagmode" />')) {
                $container = str_replace('<cms:mod constant="tagmode" />', '', $container);
                $container = cms_stripslashes($container);
                //todo: 2remove
            } elseif (stristr($container, '<dedi:mod constant="tagmode" />')) {
                $container = str_replace('<dedi:mod constant="tagmode" />', '', $container);
                $container = cms_stripslashes($container);
            }
            // Moduloutput simulieren, zum generieren der CMS-Tag Informationen
            $sefrengotag_config = extract_cms_tags($container, 'type');
            // Rowspan für Containertabelle berechnen
            $rowspan = 1;
            foreach ($con_contnbr as $con_containernumber) {
                $rowspan++;
                foreach ($con_content_type as $value3) {
                    $rowspan++;
                    $rowspan++;
                }
            }
            $code .= "  <tr>\n";
            // Containername
            $code .= "    <td class=\"head\" width=\"110\" rowspan=\"{$rowspan}\"><p>";
            if (!empty($list[$con_container]['title'])) {
                $code .= $list[$con_container]['title'];
            } else {
                $code .= "{$con_container}. " . $cms_lang['tpl_container'];
            }
            $code .= "</p></td>\n";
            unset($rowspan);
            foreach ($con_contnbr as $con_containernumber) {
                // neues Modul erstellen?
                if ($con_containernumber == '-1') {
                    $print_containernumber = '';
                } else {
                    $print_containernumber = $con_containernumber . '. ';
                }
                // Modulname
                $modname = ($modlist[$con_container]['verbose'] != '' ? $modlist[$con_container]['verbose'] : $modlist[$con_container]['modname']) . (empty($modlist[$con_container]['version']) ? '' : ' (' . $modlist[$con_container]['version'] . ')');
                $code .= "    <td class=\"header\"><!-- {$print_containernumber} -->" . $modname . "</td>\n";
                $code .= "  </tr>\n";
                foreach ($con_content_type as $value3) {
                    $value3 = explode('-', $value3);
                    $con_contype = $value3['0'];
                    $con_typenumber = $value3['1'];
                    // Name f�r Eingabefeld
                    // Nicht anzeigen bei Dateilink, wenn hidetarget auf true gesetzt ist
                    if ($GLOBALS['filetarget_is_hidden'] == 'true' && $con_contype == 12) {
                        $code .= "    <td></td>\n";
                        $code .= "  </tr>\n";
                        $code .= "  <tr>\n";
                        //				} elseif ($con_contype == 15) {
                        //				    $code .="";
                    } elseif ($con_contype == 20) {
                        $code .= "    <td height=\"0\">";
                        $code .= "    </td>\n";
                        $code .= "  </tr>\n";
                        $code .= "  <tr>\n";
                    } else {
                        if (in_array($con_contype, array(1, 2, 3, 4, 6, 9, 10, 13, 14, 15, 16, 17, 18))) {
                            $code .= "  <tr class=\"fomrstitle\">\n";
                        } else {
                            $code .= "  <tr>\n";
                        }
                        $code .= "    <td>";
                        if (!empty($sefrengotag_config[$con_type[$con_contype]['type']][$con_typenumber]['title'])) {
                            $code .= $sefrengotag_config[$con_type[$con_contype]['type']][$con_typenumber]['title'];
                        } else {
                            $code .= $con_type[$con_contype]['descr'];
                        }
                        $code .= ":</td>\n";
                        $code .= "  </tr>\n";
                        $code .= "  <tr>\n";
                    }
                    // Name des Formularfeldes
                    $formname = 'content_' . $con_container . '_' . $con_containernumber . '_' . $con_contype . '_' . $con_typenumber;
                    // Variable f�r den Content
                    $content = $content_array[$con_container][$con_containernumber][$con_contype][$con_typenumber]['1'];
                    $type_config = $sefrengotag_config[$con_type[$con_contype]['type']][$con_typenumber];
                    if ($con_contype == '16') {
                        $type_config['saved'] = $content_array[$con_container][$con_containernumber]['20'][$con_typenumber]['1'];
                    }
                    //make element
                    $code .= $con_type[$con_contype]['input']($formname, $content, $type_config);
                    unset($content);
                    unset($formname);
                    $code .= "  </tr>\n";
                }
            }
        }
        $code .= "      <tr>\n";
        $code .= "        <td class='content7' colspan='2' style='text-align:right'>\n";
        $code .= "        <input type='submit' value='" . $cms_lang['gen_save'] . "' class=\"sf_buttonAction\" />\n";
        $code .= "        <input type='submit' value='" . $cms_lang['gen_apply'] . "' class=\"sf_buttonAction\" onclick=\"document.editcontent.action.value='saveedit'\" />\n";
        $code .= "        <input type='button' value='" . $cms_lang['gen_cancel'] . "' class=\"sf_buttonActionCancel\" onclick=\"window.location='" . $sess->url("" . $cfg_client['contentfile'] . "?lang={$lang}&action=abort&view=edit&idcatside={$idcatside}") . "'\" />\n";
        $code .= "      </tr>\n";
        $code .= "    </table>\n";
        $code .= "    </form>\n";
        $code .= '</div>' . "\n";
        $code .= '</body>' . "\n";
        $code .= '</html>' . "\n";
        return $code;
    }