# Tabellen reparieren
REPAIR TABLE `dedi_backendmenu`;
REPAIR TABLE `dedi_cat`;
REPAIR TABLE `dedi_cat_expand`;
REPAIR TABLE `dedi_cat_lang`;
REPAIR TABLE `dedi_cat_side`;
REPAIR TABLE `dedi_clients`;
REPAIR TABLE `dedi_clients_lang`;
REPAIR TABLE `dedi_code`;
REPAIR TABLE `dedi_container`;
REPAIR TABLE `dedi_container_conf`;
REPAIR TABLE `dedi_content`;
REPAIR TABLE `dedi_content_external`;
REPAIR TABLE `dedi_css`;
REPAIR TABLE `dedi_css_upl`;
REPAIR TABLE `dedi_directory`;
REPAIR TABLE `dedi_filetype`;
REPAIR TABLE `dedi_groups`;
REPAIR TABLE `dedi_js`;
REPAIR TABLE `dedi_lang`;
REPAIR TABLE `dedi_lay`;
REPAIR TABLE `dedi_lay_upl`;
REPAIR TABLE `dedi_mod`;
REPAIR TABLE `dedi_perms`;
REPAIR TABLE `dedi_sessions`;
REPAIR TABLE `dedi_side`;
REPAIR TABLE `dedi_side_lang`;
REPAIR TABLE `dedi_tpl`;
REPAIR TABLE `dedi_tpl_conf`;
REPAIR TABLE `dedi_type`;
REPAIR TABLE `dedi_upl`;
REPAIR TABLE `dedi_uplcontent`;
REPAIR TABLE `dedi_users`;
REPAIR TABLE `dedi_users_groups`;
REPAIR TABLE `dedi_values`;

# 24.12.2005 Im Defaultlayout $idpage zu $idcatside geändert
UPDATE dedi_values SET value = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r\n    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r\n<html xmlns="http://www.w3.org/1999/xhtml">\r\n<head>\r\n<title><?php echo $con_tree[$idcat][\'name\'].\': \'.$con_side[$idcatside][\'name\']; ?></title>\r\n<dedi:lay type="head"/>\r\n</head>\r\n<body>\r\n<dedi:lay type="container" id="1" title="Seiten-Content"/>\r\n\r\n<dedi:lay type="config"/>\r\n</body>\r\n</html>' WHERE group_name = 'cfg_client' AND key1 = 'default_layout';

# 24.12.2005 set new versionnumber - third bugfix-version for dedi 1.0
UPDATE dedi_values  SET value =  '01.00.04' WHERE group_name =  'cfg' AND key1 =  'version';

# 26.12.2005 Module im Modulpool auf folgende Versionen geupdated: 
#  Dateilink - v1.1
#  ContentFlex - 0.9.2
#  DediFlex - 0.92
#  Pic-Galerie 3.2
UPDATE `dedi_mod` SET `name` = 'Dateilink', `version` = '1.1', `cat` = 'Content', `description` = 'Es kann auf eine beliebige Datei gelinkt werden, die vom Dateimanger verwaltet wird', `input` = '<?PHP\r\n//configmode\r\n$mip_form[''99''][''desc''] = ''Konfigurationsmodus'';\r\n$mip_form[''99''][''cat''] = ''option'';\r\n$mip_form[''99''][''size''] = ''1'';\r\n$mip_form[''99''][''option_desc''][] = ''Normal'';\r\n$mip_form[''99''][''option_val''][] =  '''';\r\n$mip_form[''99''][''option_desc''][] = ''Erweitert'';\r\n$mip_form[''99''][''option_val''][] =  ''advanced'';\r\n$mip_form[''99''][''option_desc''][] = ''Ausgeblendet'';\r\n$mip_form[''99''][''option_val''][] =  ''hidden'';\r\n$mip_form[''99''][''cms_var''] = ''MOD_VAR[99]'';\r\n$mip_form[''99''][''cms_val''] = $dedi_mod[''value''][''99''];\r\n$mip_form[''99''][''flag''] = ''reload'';\r\nmip_formsp($mip_form[''99'']);//configmode\r\n$mip_form[''hide_in_standard_mode''] = array(0,2,4,5,6,7,8,9,10,11,12);\r\n\r\n//hidden config\r\nif($dedi_mod[''value''][''99''] == ''hidden''){\r\n  foreach($dedi_mod[''value''] AS $ke=>$va){\r\n    if($ke != ''99''){\r\n    ?>\r\n      <input name="MOD_VAR[<?php echo $ke; ?>]" type="hidden" value="<?php echo htmlentities($va);?>">\r\n    <?php\r\n     }\r\n  }\r\n}\r\n//simple and advanced config\r\nelse if($dedi_mod[''value''][''99''] == '''' || $dedi_mod[''value''][''99''] == ''advanced''){\r\n\r\n\r\n//Formularname\r\n$mip_form[''0''][''cat''] = ''txt'';\r\n$mip_form[''0''][''type''] = '''';\r\n$mip_form[''0''][''desc''] = ''Formularfeldname'';\r\n$mip_form[''0''][''cms_var''] = ''MOD_VAR[0]'';\r\n$mip_form[''0''][''cms_val''] = $dedi_mod[''value''][''0''];\r\n$mip_form[''0''][''cms_val_default''] = ''Dateilink'';\r\n$mip_form[''0''][''tab''] = ''0'';\r\n\r\n//Style\r\n$mip_form[''1''][''desc''] = $mod_lang[''gen_font''];\r\n$mip_form[''1''][''cat''] = ''app_css'';\r\n$mip_form[''1''][''output_cat''] = ''option'';\r\n$mip_form[''1''][''cms_var''] = ''MOD_VAR[1]'';\r\n$mip_form[''1''][''cms_val''] = $dedi_mod[''value''][''1''];\r\n$mip_form[''1''][''flag''] = ''class_only'';\r\n\r\n//Dateitypen\r\n$mip_form[''4''][''desc''] = ''Dateitypen: '';\r\n$mip_form[''4''][''cat''] = ''app_filetype'';\r\n$mip_form[''4''][''output_cat''] = ''option'';\r\n$mip_form[''4''][''cms_var''] = ''MOD_VAR[4]'';\r\n$mip_form[''4''][''cms_val''] = $dedi_mod[''value''][''4''];\r\n$mip_form[''4''][''flag''] = ''multiple'';\r\n$mip_form[''4''][''size''] = ''5'';\r\n\r\n//Ordner\r\n$mip_form[''5''][''desc''] = ''Ordner: '';\r\n$mip_form[''5''][''cat''] = ''app_directory'';\r\n$mip_form[''5''][''output_cat''] = ''option'';\r\n$mip_form[''5''][''cms_var''] = ''MOD_VAR[5]'';\r\n$mip_form[''5''][''cms_val''] = $dedi_mod[''value''][''5''];\r\n$mip_form[''5''][''flag''] = ''multiple'';\r\n$mip_form[''5''][''size''] = ''5'';\r\n\r\n//Unterordner anzeigen\r\n$mip_form[''7''][''cat''] = ''option'';\r\n$mip_form[''7''][''desc''] = ''Vorhandene Unterordner automatisch anzeigen'';\r\n$mip_form[''7''][''cms_var''] = ''MOD_VAR[7]'';\r\n$mip_form[''7''][''cms_val''] = $dedi_mod[''value''][''7''];\r\n$mip_form[''7''][''cms_val_default''] = ''false'';\r\n$mip_form[''7''][''option_desc''][''0''] = ''Ja'';\r\n$mip_form[''7''][''option_val''][''0''] = ''true'';\r\n$mip_form[''7''][''option_desc''][''1''] = ''Nein'';\r\n$mip_form[''7''][''option_val''][''1''] = ''false'';\r\n$mip_form[''7''][''tab''] = ''0'';\r\n\r\n//target verstecken\r\n$mip_form[''6''][''cat''] = ''option'';\r\n$mip_form[''6''][''type''] = '''';\r\n$mip_form[''6''][''desc''] = ''Im Bearbeitungsmodus Zielfensterfeld ausblenden'';\r\n$mip_form[''6''][''cms_var''] = ''MOD_VAR[6]'';\r\n$mip_form[''6''][''cms_val''] = $dedi_mod[''value''][''6''];\r\n$mip_form[''6''][''cms_val_default''] = ''false'';\r\n$mip_form[''6''][''option_desc''][''0''] = ''Ja'';\r\n$mip_form[''6''][''option_val''][''0''] = ''true'';\r\n$mip_form[''6''][''option_desc''][''1''] = ''Nein'';\r\n$mip_form[''6''][''option_val''][''1''] = ''false'';\r\n$mip_form[''6''][''tab''] = ''0'';\r\n\r\n//Tausender-Trennzeichen\r\n$mip_form[''8''][''cat''] = ''txt'';\r\n$mip_form[''8''][''type''] = '''';\r\n$mip_form[''8''][''desc''] = ''Tausender-Trennzeichen f&uuml;r Dateigr&ouml;&szlig;en'';\r\n$mip_form[''8''][''cms_var''] = ''MOD_VAR[8]'';\r\n$mip_form[''8''][''cms_val''] = $dedi_mod[''value''][''8''];\r\n$mip_form[''8''][''cms_val_default''] = ''.'';\r\n$mip_form[''8''][''tab''] = ''0'';\r\n\r\n//Kommastellen-Trennzeichen\r\n$mip_form[''9''][''cat''] = ''txt'';\r\n$mip_form[''9''][''type''] = '''';\r\n$mip_form[''9''][''desc''] = ''Kommastellen-Trennzeichen f&uuml;r Dateigr&ouml;&szlig;en'';\r\n$mip_form[''9''][''cms_var''] = ''MOD_VAR[9]'';\r\n$mip_form[''9''][''cms_val''] = $dedi_mod[''value''][''9''];\r\n$mip_form[''9''][''cms_val_default''] = '','';\r\n$mip_form[''9''][''tab''] = ''0'';\r\n\r\n//Bezeichnung für Byte\r\n$mip_form[''10''][''cat''] = ''txt'';\r\n$mip_form[''10''][''type''] = '''';\r\n$mip_form[''10''][''desc''] = ''Bezeichnung f&uuml;r Byte bei Dateigr&ouml;&szlig;en'';\r\n$mip_form[''10''][''cms_var''] = ''MOD_VAR[10]'';\r\n$mip_form[''10''][''cms_val''] = $dedi_mod[''value''][''10''];\r\n$mip_form[''10''][''cms_val_default''] = ''Byte'';\r\n$mip_form[''10''][''tab''] = ''0'';\r\n\r\n//Bezeichnung für kByte\r\n$mip_form[''11''][''cat''] = ''txt'';\r\n$mip_form[''11''][''type''] = '''';\r\n$mip_form[''11''][''desc''] = ''Bezeichnung f&uuml;r kByte bei Dateigr&ouml;&szlig;en'';\r\n$mip_form[''11''][''cms_var''] = ''MOD_VAR[11]'';\r\n$mip_form[''11''][''cms_val''] = $dedi_mod[''value''][''11''];\r\n$mip_form[''11''][''cms_val_default''] = ''kByte'';\r\n$mip_form[''11''][''tab''] = ''0'';\r\n\r\n//Bezeichnung für kByte\r\n$mip_form[''12''][''cat''] = ''txt'';\r\n$mip_form[''12''][''type''] = '''';\r\n$mip_form[''12''][''desc''] = ''Bezeichnung f&uuml;r mByte bei Dateigr&ouml;&szlig;en'';\r\n$mip_form[''12''][''cms_var''] = ''MOD_VAR[12]'';\r\n$mip_form[''12''][''cms_val''] = $dedi_mod[''value''][''12''];\r\n$mip_form[''12''][''cms_val_default''] = ''mByte'';\r\n$mip_form[''12''][''tab''] = ''0'';\r\n\r\n//Erweitertes Bearbeitungsmenü\r\n$mip_form[''2''][''cat''] = ''radio'';\r\n$mip_form[''2''][''type''] = '''';\r\n$mip_form[''2''][''desc''] = ''Bearbeitungsmen&uuml;<br />\r\n<small>Ein <b>normales Men&uuml;</b> besteht aus der Schalfl&auml;che "bearbeiten", das <b>erweiterte Men&uuml;</b> \r\nbietet dar&uuml;berhinaus die Schaltfl&auml;chen "neu, l&oouml;schen, nach oben, nach unten". Wird <b>kein Men&uuml;</b> gew&auml;hlt, ist der \r\nContent nicht editierbar.</small>'';\r\n$mip_form[''2''][''cms_var''] = ''MOD_VAR[2]'';\r\n$mip_form[''2''][''cms_val''] = $dedi_mod[''value''][''2''];\r\n$mip_form[''2''][''cms_val_default''] = ''true'';\r\n$mip_form[''2''][''option_desc''][''0''] = ''Normales Men&uuml;'';\r\n$mip_form[''2''][''option_val''][''0''] = ''true'';\r\n$mip_form[''2''][''option_desc''][''1''] = ''Erweitertes Men&uuml;'';\r\n$mip_form[''2''][''option_val''][''1''] = ''advanced'';\r\n$mip_form[''2''][''option_desc''][''2''] = ''Kein Men&uuml;'';\r\n$mip_form[''2''][''option_val''][''2''] = ''false'';\r\n$mip_form[''2''][''tab''] = ''0'';\r\n\r\n// Template\r\n$mip_form[''3''][''desc''] = ''Template'';\r\n$mip_form[''3''][''cat''] = ''txtarea'';\r\n$mip_form[''3''][''rows''] = ''6'';\r\n$mip_form[''3''][''type''] = ''long'';\r\n$mip_form[''3''][''cms_var''] = ''MOD_VAR[3]'';\r\n$mip_form[''3''][''cms_val''] = $dedi_mod[''value''][''3''];\r\n$mip_form[''3''][''cms_val_default''] = ''<p><a href="{url}">{name}</a> {size}{editbutton}\\n<br /><span class="{style}">&nbsp; &nbsp; {desc?}</span>\\n</p>'';\r\n\r\n//if simple mode\r\nif($dedi_mod[''value''][''99''] == ''''){\r\n   foreach ($mip_form[''hide_in_standard_mode'']  AS $ke=>$va){\r\n     $mip_form[$va][''cat''] = ''hidden'';\r\n   }\r\n }\r\nmip_formsp($mip_form[''0'']);//Formularfeldname\r\nmip_formsp($mip_form[''1'']);//Style\r\nmip_formsp($mip_form[''8'']);//Tausender-Trennzeichen\r\nmip_formsp($mip_form[''9'']);//Kommastellen-Trennzeichen\r\nmip_formsp($mip_form[''10'']);//Byte\r\nmip_formsp($mip_form[''11'']);//kByte\r\nmip_formsp($mip_form[''12'']);//mByte\r\nmip_formsp($mip_form[''4'']);//Dateitypen\r\nmip_formsp($mip_form[''5'']);//Ordner\r\nmip_formsp($mip_form[''7'']);//Unterordner anzeigen\r\nmip_formsp($mip_form[''6'']);//Target verstecken\r\nmip_formsp($mip_form[''2'']);//Menü\r\nmip_formsp($mip_form[''3'']);//Template\r\necho '' <small><b>Legende:</b><br /> \r\nKompletter Dateilink: {filelink}, URL: {url}, Dateipfad: {path}, Zielfenster: {target}, <br />\r\nid_upl der Datei aus Tabelle dedi_upl {id}, Stylesheet: {style}, Beschreibung: {desc}, <br />\r\nBedingte Beschreibung: {desc?} (Der umliegende Text wird nur ausgegeben, wenn die Bechreibung nicht leer ist), <br />\r\nDateiname: {name}, Dateiname oder falls vorhanden Beschreibung: {nameordesc}, <br />\r\nDateidatum: {date}, Dateizeit: {time}, Dateigr&ouml;&szlig;e: {size}, Bearbeiten-Symbol: {editbutton}<br />\r\nPhp-Code: &lt;?PHP echo "Ich bin gecachter phpcode! Ich werde immer nur dann neu generiert, wenn es eine <br />\r\n&Auml;nderung auf der Seite gegeben hat"; ?&gt;<br />\r\n&lt;DEDIPHP&gt; echo "Ich bin ungecachter phpcode! Ich werde bei jedem Aufruf der Seite ausgef&uuml;hrt";&lt;/DEDIPHP&gt;<br />\r\n</small>'';\r\n}\r\nunset($mip_form);\r\n\r\n?>\r\n', `output` = '<?PHP\r\n$myLink[''url''] = <dedi:mod type="file" id="1" mode="url" addslashes="true" />;\r\n$myLink[''path''] = <dedi:mod type="file" id="1" mode="path" addslashes="true" />;\r\n$myLink[''desc''] = <dedi:mod type="file" id="1" mode="desc"  addslashes="true" />;\r\nif ( !empty($myLink[''desc'']) ) $myLink[''desc''] = ''$1''.$myLink[''desc''].''$2'';\r\n$myLink[''target''] = <dedi:mod type="file" id="1" mode="target" addslashes="true" />;\r\n$myLink[''id''] = <dedi:mod type="file" id="1" mode="id" addslashes="true" />;\r\n$myLink[''style''] = "MOD_VALUE[1]";\r\n//Gibt es mehrere Tags, bei denen type und id gleich sind, ist es wichtig, dass das letzt "gleiche" Element alle erweiterten\r\n//Konfigurationsvariablen enthält (z.B. folders, subfolders) . Den nur die Variablen des "letzten" Tags können im Formular\r\n//weiterverarbeitet werden. Andernfalls bleibt z.B. die Auswahl von bestimmten Dateitypen ohne Wirkung.\r\n$myLink[''filelink''] = <dedi:mod type="file" id="1" title="MOD_VALUE[0]" styleclass="MOD_VALUE[1]" hidetarget ="MOD_VALUE[6]" folders = "MOD_VALUE[5]" subfolders ="MOD_VALUE[7]" filetypes = "MOD_VALUE[4]" menuoptions ="MOD_VALUE[2]" addslashes="true" />;\r\n$myLink[''name''] = file_exists($myLink[''path'']) ? basename($myLink[''path'']) : "";\r\n$myLink[''editbutton''] = <dedi:mod type="typegroup" elements="file[1]" menuoptions="advanced" title="MOD_VALUE[0]" addslashes="true" />;\r\n$myLink[''date''] = file_exists($myLink[''path'']) ? date($cfg_dedi[''FormatDate''],filemtime($myLink[''path''])) : "";\r\n$myLink[''time''] = file_exists($myLink[''path'']) ? date($cfg_dedi[''FormatTime''],filemtime($myLink[''path''])) : "";\r\n$myLink[''size''] = file_exists($myLink[''path'']) ? filesize($myLink[''path'']) : "";\r\n$myLink[''nameordesc''] = empty($myLink[''desc'']) ? $myLink[''name''] : $myLink[''desc''];\r\n\r\nif ($myLink[''size''] > 1048576) {\r\n   $myLink[''size''] = number_format($myLink[''size'']/1048576, 2, ''MOD_VALUE[9]'', ''MOD_VALUE[8]'');\r\n   $myLink[''size''] .= '' ''.''MOD_VALUE[12]'';\r\n} else {\r\n   if ($myLink[''size''] > 1024) {\r\n   $myLink[''size''] = number_format($myLink[''size'']/1024, 2, ''MOD_VALUE[9]'', ''MOD_VALUE[8]'');\r\n   $myLink[''size''] .= '' ''.''MOD_VALUE[11]'';\r\n   } else {\r\n      $myLink[''size''] = number_format($myLink[''size''], 2, ''MOD_VALUE[9]'', ''MOD_VALUE[8]'');\r\n      $myLink[''size''] .= '' ''.''MOD_VALUE[10]'';\r\n   }  \r\n}\r\n\r\n$myTplVars[''url''] = ''/\\{url\\}/'';\r\n$myTplVars[''path''] = ''/\\{path\\}/'';\r\n$myTplVars[''desc''] = ''/\\{desc\\}|(.*)\\{desc\\?\\}(.*)/'';\r\n$myTplVars[''target''] = ''/\\{target\\}/'';\r\n$myTplVars[''id''] = ''/\\{id\\}/'';\r\n$myTplVars[''style''] = ''/\\{style\\}/'';\r\n$myTplVars[''filelink''] = ''/\\{filelink\\}/'';\r\n$myTplVars[''name''] = ''/\\{name\\}/'';\r\n$myTplVars[''editbutton''] = ''/\\{editbutton\\}/'';\r\n$myTplVars[''date''] = ''/\\{date\\}/'';\r\n$myTplVars[''time''] = ''/\\{time\\}/'';\r\n$myTplVars[''size''] = ''/\\{size\\}/'';\r\n$myTplVars[''nameordesc''] = ''/\\{nameordesc\\}/'';\r\n\r\n$myTpl = "MOD_VALUE[3]";\r\n    \r\n$myTpl = preg_replace($myTplVars, $myLink, $myTpl);\r\n\r\neval(''?>''.$myTpl); \r\nunset($myTpl, $myTplVars, $myLink, $myFilename);\r\n?>', `config` = '', `idclient` = 0, `deletable` = 1, `author` = 1, `created` = 1066927900, `lastmodified` = 1135555775, `repository_id` = 'mod:dfbc83af929dc44d0bb85fdef4ef3010:8d2a75bd', `install_sql` = '', `uninstall_sql` = '', `update_sql` = '', `source_id` = 0, `is_install` = '0', `verbose` = 'Dateilink', `checked` = '1' WHERE `repository_id` LIKE 'mod:dfbc83af929dc44d0bb85fdef4ef3010:%' AND `idclient` = 0;
UPDATE `dedi_mod` SET `name` = 'DeDi-Flex', `version` = '0.92', `cat` = 'Contentliste', `description` = 'Dieses Modul bietet die Möglichkeit beim erstellen der Seite flexibel Elemente, oder Elementgruppen wie z.b. "Text links - Bild rechts" einzufügen.', `input` = '<?php\r\n// ----------------------------------------------------------------------------\r\n//configmode\r\n$mip_form[''999''][''desc''] = ''Konfigurationsmodus'';\r\n$mip_form[''999''][''cat''] = ''option'';\r\n$mip_form[''999''][''size''] = ''1'';\r\n$mip_form[''999''][''option_desc''][] = ''Normal'';\r\n$mip_form[''999''][''option_val''][] =  '''';\r\n$mip_form[''999''][''option_desc''][] = ''Erweitert'';\r\n$mip_form[''999''][''option_val''][] =  ''advanced'';\r\n$mip_form[''999''][''option_desc''][] = ''Ausgeblendet'';\r\n$mip_form[''999''][''option_val''][] =  ''hidden'';\r\n$mip_form[''999''][''cms_var''] = ''MOD_VAR[999]'';\r\n$mip_form[''999''][''cms_val''] = $dedi_mod[''value''][''999''];\r\n$mip_form[''999''][''flag''] = ''reload'';\r\nmip_formsp($mip_form[''999'']);//configmode\r\n\r\n// Hier werden alle Nummern angegeben die in der Normal-Ansicht nicht erscheinen \r\n$mip_form[''hide_in_standard_mode''] = array(0,1,2,3,4,5);\r\n\r\n//hidden config\r\nif($dedi_mod[''value''][''999''] == ''hidden''){\r\n  foreach($dedi_mod[''value''] AS $ke=>$va){\r\n    if($ke != ''999''){\r\n    ?>\r\n      <input name="MOD_VAR[<?php echo $ke; ?>]" type="hidden" value="<?php echo htmlentities($va);?>">\r\n    <?php\r\n     }\r\n  }\r\n}\r\n//simple, advanced and all config (not hidden config)\r\nelse if($dedi_mod[''value''][''999''] == '''' || $dedi_mod[''value''][''999''] == ''advanced''){\r\n\r\n// ----------------------------------------------------------------------------\r\n\r\n// Normale Konfiguration \r\n\r\n\r\n// Anzahl der Spalten\r\nif ($dedi_mod[''value''][''0''] == '''' || $dedi_mod[''value''][''0''] <= ''0'') $dedi_mod[''value''][''0''] = ''8'';\r\nif ($dedi_mod[''value''][''9''] != ''0'') $dedi_mod[''value''][''0''] = round($dedi_mod[''value''][''0'']+$dedi_mod[''value''][''9'']);\r\n$mip_form[''0''][''cat''] = ''hidden'';\r\n$mip_form[''0''][''cms_var''] = ''MOD_VAR[0]'';\r\n$mip_form[''0''][''cms_val''] = $dedi_mod[''value''][''0''];\r\n\r\n$mip_form[''1''][''desc''] = $mod_lang[''gen_font''].'' {font1}'';\r\n$mip_form[''1''][''cat''] = ''app_css'';\r\n$mip_form[''1''][''output_cat''] = ''option'';\r\n$mip_form[''1''][''cms_var''] = ''MOD_VAR[1]'';\r\n$mip_form[''1''][''cms_val''] = $dedi_mod[''value''][''1''];\r\n$mip_form[''1''][''flag''] = ''class_only'';\r\n\r\n$mip_form[''2''][''desc''] = $mod_lang[''gen_font''].'' {font2}'';\r\n$mip_form[''2''][''cat''] = ''app_css'';\r\n$mip_form[''2''][''output_cat''] = ''option'';\r\n$mip_form[''2''][''cms_var''] = ''MOD_VAR[2]'';\r\n$mip_form[''2''][''cms_val''] = $dedi_mod[''value''][''2''];\r\n$mip_form[''2''][''flag''] = ''class_only'';\r\n\r\n$mip_form[''3''][''desc''] = $mod_lang[''gen_font''].'' {font3}'';\r\n$mip_form[''3''][''cat''] = ''app_css'';\r\n$mip_form[''3''][''output_cat''] = ''option'';\r\n$mip_form[''3''][''cms_var''] = ''MOD_VAR[3]'';\r\n$mip_form[''3''][''cms_val''] = $dedi_mod[''value''][''3''];\r\n$mip_form[''3''][''flag''] = ''class_only'';\r\n\r\n$mip_form[''4''][''desc''] = $mod_lang[''gen_font''].'' {font4}'';\r\n$mip_form[''4''][''cat''] = ''app_css'';\r\n$mip_form[''4''][''output_cat''] = ''option'';\r\n$mip_form[''4''][''cms_var''] = ''MOD_VAR[4]'';\r\n$mip_form[''4''][''cms_val''] = $dedi_mod[''value''][''4''];\r\n$mip_form[''4''][''flag''] = ''class_only'';\r\n\r\n$mip_form[''5''][''desc''] = $mod_lang[''gen_font''].'' {font5}'';\r\n$mip_form[''5''][''cat''] = ''app_css'';\r\n$mip_form[''5''][''output_cat''] = ''option'';\r\n$mip_form[''5''][''cms_var''] = ''MOD_VAR[5]'';\r\n$mip_form[''5''][''cms_val''] = $dedi_mod[''value''][''5''];\r\n$mip_form[''5''][''flag''] = ''class_only'';\r\n\r\n$mip_form[''6''][''desc''] = ''Template-Beschriftung ausgeben'';\r\n$mip_form[''6''][''cat''] = ''chk'';\r\n$mip_form[''6''][''option_var''][''0''] = ''MOD_VAR[6]'';\r\n$mip_form[''6''][''option_val''][''0''] = $dedi_mod[''value''][''6''];\r\n$mip_form[''6''][''option_desc''][''0''] = ''ja'';\r\n$mip_form[''6''][''option_val_select''][''0''] = ''true'';\r\n\r\n$mip_form[''7''][''desc''] = ''Element auch an 1.Position einfügen'';\r\n$mip_form[''7''][''cat''] = ''chk'';\r\n$mip_form[''7''][''option_var''][''0''] = ''MOD_VAR[7]'';\r\n$mip_form[''7''][''option_val''][''0''] = $dedi_mod[''value''][''7''];\r\n$mip_form[''7''][''option_desc''][''0''] = ''ja'';\r\n$mip_form[''7''][''option_val_select''][''0''] = ''true'';\r\n\r\n$mip_form[''8''][''desc''] = ''Elemente auf jeder Zeile einfügen'';\r\n$mip_form[''8''][''cat''] = ''chk'';\r\n$mip_form[''8''][''option_var''][''0''] = ''MOD_VAR[8]'';\r\n$mip_form[''8''][''option_val''][''0''] = $dedi_mod[''value''][''8''];\r\n$mip_form[''8''][''option_desc''][''0''] = ''ja'';\r\n$mip_form[''8''][''option_val_select''][''0''] = ''true'';\r\n\r\n// Ende der Konfiguration\r\n\r\n// ----------------------------------------------------------------------------\r\n// Ausgabe\r\n//if simple mode\r\nif($dedi_mod[''value''][''999''] == ''''){\r\n   foreach ($mip_form[''hide_in_standard_mode'']  AS $ke=>$va){\r\n     $mip_form[$va][''cat''] = ''hidden'';\r\n   }\r\n }\r\n\r\n\r\nmip_formsp($mip_form[''0'']);\r\nmip_formsp($mip_form[''1'']);\r\nmip_formsp($mip_form[''2'']);\r\nmip_formsp($mip_form[''3'']);\r\nmip_formsp($mip_form[''4'']);\r\nmip_formsp($mip_form[''5'']);\r\nmip_formsp($mip_form[''6'']);\r\nmip_formsp($mip_form[''7'']);\r\nmip_formsp($mip_form[''8'']);\r\n\r\nif ($dedi_mod[''value''][10] == '''') $dedi_mod[''value''][10] = ''Titel'';\r\nif ($dedi_mod[''value''][11] == '''') $dedi_mod[''value''][11] = ''<h1>{text}</h1>'';\r\nif ($dedi_mod[''value''][20] == '''') $dedi_mod[''value''][20] = ''Untertitel'';\r\nif ($dedi_mod[''value''][21] == '''') $dedi_mod[''value''][21] = ''<h2>{text}</h2>'';\r\nif ($dedi_mod[''value''][30] == '''') $dedi_mod[''value''][30] = ''Text'';\r\nif ($dedi_mod[''value''][31] == '''') $dedi_mod[''value''][31] = ''{textarea}'';\r\nif ($dedi_mod[''value''][40] == '''') $dedi_mod[''value''][40] = ''Bild'';\r\nif ($dedi_mod[''value''][41] == '''') $dedi_mod[''value''][41] = ''{image}'';\r\nif ($dedi_mod[''value''][50] == '''') $dedi_mod[''value''][50] = ''WYSIWYG2'';\r\nif ($dedi_mod[''value''][51] == '''') $dedi_mod[''value''][51] = ''{wysiwyg2}'';\r\nif ($dedi_mod[''value''][60] == '''') $dedi_mod[''value''][60] = ''WYSIWYG'';\r\nif ($dedi_mod[''value''][61] == '''') $dedi_mod[''value''][61] = ''{wysiwyg}'';\r\nif ($dedi_mod[''value''][70] == '''') $dedi_mod[''value''][70] = ''Link'';\r\nif ($dedi_mod[''value''][71] == '''') $dedi_mod[''value''][71] = ''{link}'';\r\nif ($dedi_mod[''value''][80] == '''') $dedi_mod[''value''][80] = ''Bildpopup'';\r\nif ($dedi_mod[''value''][81] == '''') $dedi_mod[''value''][81] = ''<a href="javascript:new_imagepopup(\\''{imageurl}\\'',\\''\\'',\\''Fenster schliessen\\'',\\''\\'',\\''{imagewidth}\\'',\\''{imageheight}\\'',\\''true\\'')" onmouseover="on(\\''Bild anzeigen\\'');" onmouseout="off();">{imagethumb}</a>'';\r\n?>\r\n<br>\r\n<table cellspacing="0" cellpadding="0" border="0" width="640">\r\n  <tr>\r\n    <td width="100%">&nbsp;Name&nbsp;</td>\r\n    <td>&nbsp;Elementgruppe <br><small>{text}, {textarea}, {wysiwyg}, {wysiwyg2}, {sourceode}, {image}, {imageurl}, {imagethumb}, {imagewidth}, {imageheight}, {link}, {linkurl}, {linkdesc} ,{linktarget}, {editlink}, {fileurl}, {editfile}, {filedesc}, {filename}, {filesize}, {font1-5}</small>&nbsp;</td>\r\n  </tr>\r\n<?php\r\n// Konfiguration der einzelnen Spalten\r\nfor ($tmp_mod[''i''] = 1; $tmp_mod[''i''] <= $dedi_mod[''value''][''0'']; $tmp_mod[''i'']++) {\r\n    $y = round($tmp_mod[''i'']*10);\r\n    $tmp_mod[''row''][''1''] = $y+1;\r\n?>\r\n  <tr>\r\n    <td valign="top" width="100%" nowrap>&nbsp;<?php echo $tmp_mod[''i'']; ?>. Elementgruppe&nbsp;<br>\r\n   <input name="MOD_VAR[<?php echo $y; ?>]" type="text" value="<?php echo $dedi_mod[''value''][$y];?>" size="50">&nbsp;</td>\r\n    <td>&nbsp;<textarea name="MOD_VAR[<?php echo $tmp_mod[''row''][''1'']; ?>]" cols="45" rows="6" style="width:400"><?php echo $dedi_mod[''value''][$tmp_mod[''row''][''1'']];?></textarea>&nbsp;</td>\r\n  </tr>\r\n<?php\r\n}\r\n?>\r\n  <tr>\r\n    <td colspan="6" align="right"><select name="MOD_VAR[9]" size="1" onchange="document.editform.action.value=''change'';document.editform.submit();">\r\n      <option value="0" selected>Elementgruppe erstellen - löschen</option>\r\n      <?php if ($dedi_mod[''value''][''0''] >= ''4'') echo "<option value=\\"-3\\">-3</option>"; ?>\r\n      <?php if ($dedi_mod[''value''][''0''] >= ''3'') echo "<option value=\\"-2\\">-2</option>"; ?>\r\n      <?php if ($dedi_mod[''value''][''0''] >= ''2'') echo "<option value=\\"-1\\">-1</option>"; ?>\r\n      <option value="1">+1</option>\r\n      <option value="2">+2</option>\r\n      <option value="3">+3</option>\r\n    </select></td>\r\n  </tr>\r\n</table>\r\n<?php \r\n\r\n// ----------------------------------------------------------------------------\r\n}\r\n\r\nunset($mip_form, $tmp_mod, $y); \r\n?>', `output` = '<?PHP\r\n// ************************************************************************************************\r\n// Seite neu laden\r\nif (!function_exists(''clear_cache'')) {\r\n	function clear_cache () {\r\n		global $mod, $dedi_mod, $con_side, $cfg_dedi,$db, $dedi_db, $idcatside;\r\n\r\n		// Seitenkopien suchen\r\n		$sql = "SELECT idcatside\r\n                 	FROM ".$dedi_db[''side_lang'']." A\r\n                         LEFT JOIN ".$dedi_db[''cat_side'']." B USING(idside)\r\n                         WHERE A.idsidelang=''".$con_side[$idcatside][''idsidelang'']."''";\r\n		$db->query($sql);\r\n		while ($db->next_record()) $list[] = $db->f(''idcatside'');\r\n\r\n		// Status der Seite auf geändert stellen\r\n		change_code_status($list, ''1'', ''idcatside'');\r\n	}\r\n}\r\n\r\n// Element hinzufügen ausführen;\r\n// $element_nr entspricht $entry beim Löschen, definiert den Ort\r\n// $template_nr entspricht $entry beim hinzufügen\r\nif (!function_exists(''newElement'')) {\r\n	function newElement ($template_nr,$element_nr) {\r\n		global $mod, $dedi_mod, $con_side, $cfg_dedi, $dedi_db, $db, $idcatside;\r\n\r\n		// Template Reihenfolge auslesen\r\n		$sql = "SELECT *\r\n                 	FROM ".$dedi_db[''content_external'']."\r\n                         WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                         AND container=''".$dedi_mod[''container''][''id'']."''\r\n                         AND idtype=''flex_sort''";\r\n		$db->query($sql);\r\n		echo $db->f(''value'');\r\n\r\n		// wenn bereits Template vorhanden sind , das neue Template einfügen; ansonsten einen neune Eintrag\r\n		if ($db->next_record()) {\r\n			// Template an Position\r\n			$mod[''sort''] = explode('','', $db->f(''value''));\r\n			array_splice($mod[''sort''],$element_nr-1,0,$template_nr);\r\n			$mod[''sort''] = implode('','', $mod[''sort'']);\r\n			$sql = "UPDATE ".$dedi_db[''content_external'']."\r\n                         	SET value=''".$mod[''sort'']."''\r\n                                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                                 AND idtype=''flex_sort''";\r\n		} else {\r\n                 	$sql = "INSERT INTO ".$dedi_db[''content_external'']."\r\n                         	(idsidelang, container, idtype, value)\r\n                                 VALUES (''".$con_side[$idcatside][''idsidelang'']."'', ''".$dedi_mod[''container''][''id'']."'', ''flex_sort'', ''".$template_nr."'')";\r\n		}\r\n		$db->query($sql);\r\n\r\n		// Alle unter dem neuen Element nach unten schieben\r\n		// Container die weiter unten sind nach unten verschieben (typenumber=typenumber+100)\r\n		$mod[''sort''] = round($element_nr*100);\r\n		$sql = "UPDATE ".$dedi_db[''content'']."\r\n                 	SET typenumber=typenumber+100\r\n                         WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                         AND container=''".$dedi_mod[''container''][''id'']."''\r\n                         AND typenumber>''".$mod[''sort'']."''";\r\n		$db->query($sql);\r\n	}\r\n}\r\n\r\n// Element hinzufügene ausführen\r\nif (${''flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']} == ''new'') {\r\n	$sql = "SELECT *\r\n         	FROM ".$dedi_db[''content_external'']."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND idtype=''flex_sort''";\r\n	$db->query($sql);\r\n	if ($db->next_record()) {\r\n		$sql = "UPDATE ".$dedi_db[''content_external'']."\r\n                 	SET value=''".$db->f(''value'').'',''.$entry."''\r\n                         WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                         AND container=''".$dedi_mod[''container''][''id'']."''\r\n                         AND idtype=''flex_sort''";\r\n	} else {\r\n		$sql = "INSERT INTO ".$dedi_db[''content_external'']."\r\n                 	(idsidelang, container, idtype, value)\r\n                         VALUES (''".$con_side[$idcatside][''idsidelang'']."'', ''".$dedi_mod[''container''][''id'']."'', ''flex_sort'', ''".$entry."'')";\r\n         }\r\n         $db->query($sql);\r\n}\r\n\r\n// erstes Element hinzufügen\r\nif (${''flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']} == ''first'') {\r\n	newElement($entry,1);\r\n\r\n	// Cache löschen\r\n	clear_cache();\r\n\r\n	// Seite neu laden\r\n	header (''Status: 302 Moved Temporarily'');\r\n	header (''Location:''.str_replace(''&amp;'',''&'',$con_side[$idcatside][''link'']));\r\n	exit;\r\n}\r\n\r\n// Element nach unten verschieben\r\nif (${''flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']} == ''down'') {\r\n	$sql = "SELECT *\r\n         	FROM ".$dedi_db[''content_external'']."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND idtype=''flex_sort''";\r\n	$db->query($sql);\r\n	$db->next_record();\r\n	$mod[''sort''] = explode('','', $db->f(''value''));\r\n	$mod[''sort2''] = $mod[''sort''][$entry];\r\n	$mod[''sort''][$entry] = $mod[''sort''][$entry-1];\r\n	$mod[''sort''][$entry-1] = $mod[''sort2''];\r\n	$mod[''sort''] = implode('','', $mod[''sort'']);\r\n	$sql = "UPDATE ".$dedi_db[''content_external'']."\r\n         	SET value=''".$mod[''sort'']."''\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND idtype=''flex_sort''";\r\n	$db->query($sql);\r\n	$mod[''sort''] = round($entry*100);\r\n	$mod[''sort2''] = round($entry*100+100);\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber-".round($mod[''sort'']+100)."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN ".round($mod[''sort'']+100)." AND ".round($mod[''sort2'']+100)."";\r\n	$db->query($sql);\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber+100\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN ".$mod[''sort'']." AND ".$mod[''sort2'']."";\r\n	$db->query($sql);\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber+".$mod[''sort'']."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN 0 AND 100";\r\n	$db->query($sql);\r\n\r\n	// Cache löschen\r\n	clear_cache();\r\n\r\n	// Seite neu laden\r\n	header (''Status: 302 Moved Temporarily'');\r\n	header (''Location:''.str_replace(''&amp;'',''&'',$con_side[$idcatside][''link'']));\r\n	exit;\r\n}\r\n\r\n// Element nach oben verschieben\r\nif (${''flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']} == ''up'') {\r\n	$sql = "SELECT *\r\n         	FROM ".$dedi_db[''content_external'']."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND idtype=''flex_sort''";\r\n	$db->query($sql);\r\n	$db->next_record();\r\n	$mod[''sort''] = explode('','', $db->f(''value''));\r\n	$mod[''sort2''] = $mod[''sort''][$entry-1];\r\n	$mod[''sort''][$entry-1] = $mod[''sort''][$entry-2];\r\n	$mod[''sort''][$entry-2] = $mod[''sort2''];\r\n	$mod[''sort''] = implode('','', $mod[''sort'']);\r\n	$sql = "UPDATE ".$dedi_db[''content_external'']."\r\n         	SET value=''".$mod[''sort'']."''\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND idtype=''flex_sort''";\r\n	$db->query($sql);\r\n	$mod[''sort''] = round($entry*100-100);\r\n	$mod[''sort2''] = round($entry*100);\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber-".round($mod[''sort'']+100)."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n     \r\n            AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN ".round($mod[''sort'']+100)." AND ".round($mod[''sort2'']+100)."";\r\n	$db->query($sql);\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber+100\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN ".$mod[''sort'']." AND ".$mod[''sort2'']."";\r\n	$db->query($sql);\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber+".$mod[''sort'']."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN 0 AND 100";\r\n	$db->query($sql);\r\n\r\n	// Cache löschen\r\n	clear_cache();\r\n\r\n	// Seite neu laden\r\n	header (''Status: 302 Moved Temporarily'');\r\n	header (''Location:''.str_replace(''&amp;'',''&'',$con_side[$idcatside][''link'']));\r\n	exit;\r\n}\r\n\r\n// Element löschen\r\nif (${''flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']} == ''delete'') {\r\n	// Template reihenfolge auslesen\r\n	$sql = "SELECT *\r\n         	FROM ".$dedi_db[''content_external'']."\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND idtype=''flex_sort''";\r\n	$db->query($sql);\r\n	$db->next_record();\r\n\r\n	// Template löschen\r\n	$mod[''sort''] = explode('','', $db->f(''value''));\r\n	unset($mod[''sort''][$entry-1]);\r\n	$mod[''sort''] = implode('','', $mod[''sort'']);\r\n\r\n	//wenn noch Template vorhanden sind: Eintrag updaten ansonsten Eintrag löschen (in [content_external])\r\n	if (!empty($mod[''sort''])) {\r\n		$sql = "UPDATE ".$dedi_db[''content_external'']."\r\n                 	SET value=''".$mod[''sort'']."''\r\n                         WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                         AND container=''".$dedi_mod[''container''][''id'']."''\r\n                         AND idtype=''flex_sort''";\r\n	} else {\r\n		$sql = "DELETE FROM ".$dedi_db[''content_external'']."\r\n                 	WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                         AND container=''".$dedi_mod[''container''][''id'']."''\r\n                         AND idtype=''flex_sort''";\r\n	}\r\n	$db->query($sql);\r\n\r\n	// alte Container des zu löschenden Templates auch löschen (alle Container zwischen Nr*100 und Nr*100+100)\r\n	$mod[''sort''] = round($entry*100);\r\n	$mod[''sort2''] = round($entry*100+100);\r\n	$sql = "DELETE FROM ".$dedi_db[''content'']."\r\n         	WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber BETWEEN ".$mod[''sort'']." AND ".$mod[''sort2'']."";\r\n	$db->query($sql);\r\n\r\n	// Container die weiter unten sind nach oben verschieben (typenumber=typenumber-100)\r\n	$sql = "UPDATE ".$dedi_db[''content'']."\r\n         	SET typenumber=typenumber-100\r\n                 WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."''\r\n                 AND container=''".$dedi_mod[''container''][''id'']."''\r\n                 AND typenumber > ''".$mod[''sort'']."''";\r\n	$db->query($sql);\r\n\r\n	// Cache löschen\r\n	clear_cache();\r\n\r\n	// Seite neu laden\r\n	header (''Status: 302 Moved Temporarily'');\r\n	header (''Location:''.str_replace(''&amp;'',''&'',$con_side[$idcatside][''link'']));\r\n	exit;\r\n}\r\n\r\n// neues Element an Position x einfügen\r\nif (${''flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']} == ''insert'') {\r\n	newElement($templ,$entry);\r\n\r\n	// Cache löschen\r\n	clear_cache();\r\n\r\n	// Seite neu laden\r\n	header (''Status: 302 Moved Temporarily'');\r\n	header (''Location:''.str_replace(''&amp;'',''&'',$con_side[$idcatside][''link'']));\r\n	exit;\r\n}\r\n\r\n// ************************************************************************************************\r\n// Ausgabe\r\n\r\nif (!function_exists(''popup_menu'')) {\r\n	function popup_menu($nr) {\r\n		global $mod, $dedi_mod,$dedi_side,$con_side, $cfg_dedi,$idcatside;\r\n\r\n		// Element hinzufügen\r\n		if ($dedi_mod[''modul''][''id''] == ''1'' && ($dedi_side[''edit''] || $dedi_side[''edit_all''])) {\r\n			echo "<a href=\\"javascript:void(0)\\" onMouseover=\\"showmenu(event,linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_''.$nr."''])\\" onMouseout=\\"delayhidemenu()\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_plus.gif\\" border=\\"0\\"></a><script language=\\"JavaScript1.2\\">\\n";\r\n			echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_''.$nr."'']=''<table width=\\"140\\" border=\\"0\\" cellpadding=\\"1\\" cellspacing=\\"0\\" bgcolor=\\"#5A7BAD\\"><tr><td><table width=\\"100%\\" border=\\"0\\" cellpadding=\\"0\\" cellspacing=\\"0\\"><tr><td class=\\"menutitle\\"><b><font size=\\"1\\">&nbsp;Element hinzufügen&nbsp;:".$nr."</font></b></td></tr></table><table width=\\"100%\\" border=\\"0\\" cellpadding=\\"2\\" cellspacing=\\"0\\" bgcolor=\\"#FFFFFF\\">''\\n";\r\n			for ($mod[''i''] = 1; $mod[''i''] <= $dedi_mod[''value''][''0'']; $mod[''i'']++) {\r\n				$mod[''y''] = round($mod[''i'']*10);\r\n				echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_''.$nr."'']+=''<tr><td class=\\"menurow\\" onclick=\\"document.location.href=\\''".$con_side[$idcatside][''link''].''&flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."=insert&entry=".$nr."&templ=".$mod[''i'']."\\'' \\" onMouseOver=\\"on(\\''".htmlentities(dedi_addslashes($dedi_mod[''value''][$mod[''y'']]))."\\'');return true;\\" onMouseOut=\\"off();return true;\\">";\r\n				echo "<a href=\\"#\\" ><font face=\\"Verdana, Arial, Helvetica\\" size=\\"1\\">".htmlentities(dedi_addslashes($dedi_mod[''value''][$mod[''y'']]))."</font></a></td></tr>''\\n";\r\n			}\r\n			echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_''.$nr."'']+=''</table></td></tr></table>''\\n";\r\n			echo "</script>\\n";\r\n		}\r\n	}\r\n}\r\n\r\nif (("MOD_VALUE[7]" == ''true'') && ("MOD_VALUE[8]" != ''true'')) {\r\n	// Element am Anfang hinzufügen;\r\n	if ($dedi_mod[''modul''][''id''] == ''1'' && ($dedi_side[''edit''] || $dedi_side[''edit_all''])) {\r\n		echo "<div align=\\"right\\"><a href=\\"javascript:void(0)\\" onMouseover=\\"showmenu(event,linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_0''."''])\\" onMouseout=\\"delayhidemenu()\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_plus.gif\\" border=\\"0\\"></a><script language=\\"JavaScript1.2\\">\\n";\r\n		echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_0''."'']=''<table width=\\"140\\" border=\\"0\\" cellpadding=\\"1\\" cellspacing=\\"0\\" bgcolor=\\"#5A7BAD\\"><tr><td><table width=\\"100%\\" border=\\"0\\" cellpadding=\\"0\\" cellspacing=\\"0\\"><tr><td class=\\"menutitle\\"><b><font size=\\"1\\">&nbsp;Element hinzufügen&nbsp;:1</font></b></td></tr></table><table width=\\"100%\\" border=\\"0\\" cellpadding=\\"2\\" cellspacing=\\"0\\" bgcolor=\\"#FFFFFF\\">''\\n";\r\n		for ($mod[''i''] = 1; $mod[''i''] <= $dedi_mod[''value''][''0'']; $mod[''i'']++) {\r\n			$mod[''y''] = round($mod[''i'']*10);\r\n			echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_0''."'']+=''<tr><td class=\\"menurow\\"><a href=\\"".$con_side[$idcatside][''link''].''&flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."=first&entry=".$mod[''i'']."\\" onMouseOver=\\"on(\\''".htmlentities(dedi_addslashes($dedi_mod[''value''][$mod[''y'']]))."\\'');return true;\\" onMouseOut=\\"off();return true;\\"><font face=\\"Verdana, Arial, Helvetica\\" size=\\"1\\">".htmlentities(dedi_addslashes($dedi_mod[''value''][$mod[''y'']]))."</font></a></td></tr>''\\n";\r\n		}\r\n		echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id''].''_0''."'']+=''</table></td></tr></table>''\\n";\r\n		echo "</script>\\n</div>";\r\n	}\r\n}\r\n\r\n// auf alles auf einmal bearbeiten umschalten\r\nif ($dedi_side[''edit'']) {\r\n	$dedi_side[''edit_all''] = ''true'';\r\n	unset($dedi_side[''edit'']);\r\n}\r\n\r\n$sql = "SELECT * FROM ".$dedi_db[''content_external'']." WHERE idsidelang=''".$con_side[$idcatside][''idsidelang'']."'' AND container=''".$dedi_mod[''container''][''id'']."'' AND idtype=''flex_sort''";\r\n$db->query($sql);\r\nif ($db->next_record()) {\r\n	$mod[''order''] = explode('','', $db->f(''value''));\r\n	if (is_array($mod[''order''])) {\r\n		$mod[''entry''] = 0;\r\n		$mod[''count''] = count($mod[''order'']);\r\n		foreach ($mod[''order''] as $key=>$val) {\r\n			$mod[''entry''] = $mod[''entry'']+1;\r\n\r\n			// Elementgruppe erstellen\r\n			$mod[''start''] = round(($key+1)*100+1);\r\n\r\n			// Schriftarten ersetzen\r\n			$mod[''output''] = str_replace("{font1}", "MOD_VALUE[1]", $dedi_mod[''value''][round($val*10+1)]);\r\n			$mod[''output''] = str_replace("{font2}", "MOD_VALUE[2]", $mod[''output'']);\r\n			$mod[''output''] = str_replace("{font3}", "MOD_VALUE[3]", $mod[''output'']);\r\n			$mod[''output''] = str_replace("{font4}", "MOD_VALUE[4]", $mod[''output'']);\r\n			$mod[''output''] = str_replace("{font5}", "MOD_VALUE[5]", $mod[''output'']);\r\n\r\n			// Elemente ersetzen\r\n			$mod[''elements''] = array(''text'',''textarea'',''wysiwyg'',''wysiwyg2'',''sourcecode'',''image'',''imagethumb'',''imageurl'',\r\n						''imagewidth'',''imageheight'',''link'',''linkurl'',''linktarget'',''linkdesc'',''editlink'',''fileurl'',''editfile'',''filedesc'',''filename'',''filesize'');\r\n			foreach ($mod[''elements''] as $mod[''element'']) $mod[$mod[''element'']] = (int) $mod[''start''];\r\n			while(preg_match("/\\{(".implode(''|'',$mod[''elements'']).")\\}/",$mod[''output''],$match)){\r\n				switch($match[1]) {\r\n					case "text":\r\n						$mod[''tmp''] = <dedi:mod type="text" id="$mod[''text'']" addslashes="true">;\r\n						$mod[''text'']++;\r\n						break;\r\n					case "textarea":\r\n						$test = ''textarea'';\r\n						$mod[''tmp''] = <dedi:mod type="textarea" id="$mod[''textarea'']" title="$test" addslashes="true">;\r\n						$mod[''textarea'']++;\r\n						break;\r\n					case "wysiwyg":\r\n						$mod[''tmp''] = <dedi:mod type="wysiwyg" id="$mod[''wysiwyg'']" addslashes="true">;\r\n						$mod[''wysiwyg'']++;\r\n						break;\r\n					case "wysiwyg2":\r\n						$mod[''tmp''] = <dedi:mod type="wysiwyg2" id="$mod[''wysiwyg2'']" addslashes="true">;\r\n						$mod[''wysiwyg2'']++;\r\n						break;\r\n					case "sourcecode":\r\n						$mod[''tmp''] = <dedi:mod type="sourcecode" id="$mod[''sourcecode'']" addslashes="true">;\r\n						$mod[''sourcecode'']++;\r\n						break;\r\n					case "image":\r\n						$mod[''tmp''] = <dedi:mod type="image" id="$mod[''image'']" addslashes="true">;\r\n						$mod[''image'']++;\r\n						break;\r\n					case "imagethumb":\r\n						$mod[''tmp''] = <dedi:mod type="image" id="$mod[''imagethumb'']" mode="thumb" addslashes="true">;\r\n						$mod[''imagethumb'']++;\r\n						break;\r\n					case "imageurl":\r\n						$mod[''tmp''] = <dedi:mod type="image" id="$mod[''imageurl'']" mode="url" addslashes="true">;\r\n						$mod[''imageurl'']++;\r\n						break;\r\n					case "imagewidth":\r\n						$mod[''tmp''] = <dedi:mod type="image" id="$mod[''imagewidth'']" mode="width" addslashes="true">;\r\n						$mod[''imagewidth'']++;\r\n						break;\r\n					case "imageheight":\r\n						$mod[''tmp''] = <dedi:mod type="image" id="$mod[''imageheight'']" mode="height" addslashes="true">;\r\n						$mod[''imageheight'']++;\r\n						break;\r\n					case "link":\r\n						$mod[''tmp''] = <dedi:mod type="link" id="$mod[''link'']" addslashes="true">;\r\n						$mod[''link'']++;\r\n						break;\r\n					case "linkurl":\r\n						$mod[''tmp''] = <dedi:mod type="link" id="$mod[''linkurl'']" mode="url" addslashes="true">;\r\n						$mod[''linkurl'']++;\r\n						break;\r\n					case "linkdesc":\r\n						$mod[''tmp''] = <dedi:mod type="link" id="$mod[''linkdesc'']" mode="desc" addslashes="true">;\r\n						$mod[''linkdesc'']++;\r\n						break;\r\n					case "linktarget":\r\n						$mod[''tmp''] = <dedi:mod type="link" id="$mod[''linktarget'']" mode="target" addslashes="true">;\r\n						$mod[''linktarget'']++;\r\n						break;\r\n					case "editlink":\r\n						$mod[''tmp''] = <dedi:mod type="link" id="$mod[''editlink'']" mode="editbutton" addslashes="true">;\r\n						$mod[''editlink'']++;\r\n						break;\r\n					case "fileurl":\r\n						$mod[''tmp''] = <dedi:mod type="file" id="$mod[''fileurl'']" mode="url" addslashes="true">;\r\n						$mod[''fileurl'']++;\r\n						break;\r\n					case "editfile":\r\n						$mod[''tmp''] = <dedi:mod type="file" id="$mod[''editfile'']" mode="editbutton" addslashes="true">;\r\n						$mod[''editfile'']++;\r\n						break;\r\n					case "filedesc":\r\n						$mod[''tmp''] = <dedi:mod type="file" id="$mod[''filedesc'']" mode="desc" addslashes="true">;\r\n						$mod[''filedesc'']++;\r\n						break;\r\n					case "filename":\r\n						$mod[''tmp''] = <dedi:mod type="file" id="$mod[''filename'']" mode="url" addslashes="true">;\r\n						$mod[''tmp''] = substr(strrchr($mod[''tmp''], ''/''), 1);\r\n						$mod[''filename'']++;\r\n						break;\r\n					case "filesize":\r\n						$mod[''tmp''] = <dedi:mod type="file" id="$mod[''filesize'']" mode="path" addslashes="true">;\r\n						if (is_file($mod[''tmp''])) {\r\n							$mod[''tmp''] = filesize($mod[''tmp'']);\r\n							if ($mod[''tmp''] > 1048576) $mod[''tmp''] = sprintf( "%01.2f", $mod[''tmp'']/1048576).'' mByte'';\r\n							else $mod[''tmp''] = ($mod[''tmp''] > 1024) ? sprintf( "%01.2f", $mod[''tmp'']/1024).'' kByte'': $mod[''tmp''].'' Byte'';\r\n						} else $mod[''tmp''] = '''';\r\n						$mod[''filesize'']++;\r\n						break;\r\n				}\r\n				$mod[''output''] = preg_replace("/".$match[0]."/",$mod[''tmp''],$mod[''output''],1);\r\n			}\r\n\r\n			// Steuerungsausgabe\r\n			if ($dedi_mod[''modul''][''id''] == ''1'' && ($dedi_side[''edit''] || $dedi_side[''edit_all''])) {\r\n				echo ''<div align="right">'';\r\n				if ("MOD_VALUE[6]" == ''true'') echo ''<font face="Verdana, Arial, Helvetica" size="1">''.$dedi_mod["value"][$val*10].''</font> '';\r\n				if ($mod[''entry''] != $mod[''count'']) echo "<a href=\\"".$con_side[$idcatside][''link''].''&flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."=down&entry=".$mod[''entry'']."\\" onMouseOver=\\"on(''nach unten verschieben'');return true;\\" onMouseOut=\\"off();return true;\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_onentrybottom.gif\\" width=\\"11\\" height=\\"11\\" border=\\"0\\" alt=\\"nach unten verschieben\\" title=\\"nach unten verschieben\\"></a>&nbsp;";\r\n				else  echo "<img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_offentrybottom.gif\\" border=\\"0\\" width=\\"11\\" height=\\"11\\">&nbsp;";\r\n				if ($mod[''entry''] != 1) echo "<a href=\\"".$con_side[$idcatside][''link''].''&flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."=up&entry=".$mod[''entry'']."\\" onMouseOver=\\"on(''nach oben verschieben'');return true;\\" onMouseOut=\\"off();return true;\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_onentrytop.gif\\" border=\\"0\\" width=\\"11\\" height=\\"11\\" alt=\\"nach oben verschieben\\" title=\\"nach oben verschieben\\"></a>&nbsp;";\r\n				else echo "<img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_offentrytop.gif\\" border=\\"0\\" width=\\"11\\" height=\\"11\\">&nbsp;";\r\n				$mod[''editpath''] = <dedi:mod type="edit_container" mode="editurl" addslashes="true">;\r\n				if ($mod[''editpath''] != '''') echo "<a href=\\"".$mod[''editpath'']."\\" onMouseOver=\\"on(''bearbeiten'');return true;\\" onMouseOut=\\"off();return true;\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_onedit.gif\\" border=\\"0\\" width=\\"22\\" height=\\"13\\" alt=\\"bearbeiten\\" title=\\"bearbeiten\\"></a>&nbsp;";\r\n				else echo "<img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_offedit.gif\\" border=\\"0\\" width=\\"22\\" height=\\"13\\">&nbsp;";\r\n				echo "<a href=\\"".$con_side[$idcatside][''link''].''&flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."=delete&entry=".$mod[''entry'']."\\" onMouseOver=\\"on(''Eintrag löschen'');return true;\\" onMouseOut=\\"off();return true;\\" onclick=\\"return delete_confirm()\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_trash.gif\\" border=\\"0\\" width=\\"13\\" height=\\"13\\" alt=\\"Eintrag löschen\\" title=\\"Eintrag löschen\\"></a>&nbsp;";\r\n				if ("MOD_VALUE[8]" == ''true'') popup_menu($mod[''entry'']);\r\n				echo "</div>";\r\n			}\r\n			echo $mod[''output''];\r\n			unset($dedi_edittype[$dedi_mod[''container''][''id'']]);\r\n			unset($mod[''editpath'']);\r\n		}\r\n	}\r\n}\r\n\r\n// Element am Ende hinzufügen\r\nif ($dedi_mod[''modul''][''id''] == ''1'' && ($dedi_side[''edit''] || $dedi_side[''edit_all''])) {\r\n	echo "<div align=\\"right\\"><a href=\\"javascript:void(0)\\" onMouseover=\\"showmenu(event,linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."''])\\" onMouseout=\\"delayhidemenu()\\"><img src=\\"".$cfg_dedi[''dedi_html_path'']."tpl/standard/img/but_plus.gif\\" border=\\"0\\"></a><script language=\\"JavaScript1.2\\">\\n";\r\n	echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."'']=''<table width=\\"140\\" border=\\"0\\" cellpadding=\\"1\\" cellspacing=\\"0\\" bgcolor=\\"#5A7BAD\\"><tr><td><table width=\\"100%\\" border=\\"0\\" cellpadding=\\"0\\" cellspacing=\\"0\\"><tr><td class=\\"menutitle\\"><b><font size=\\"1\\">&nbsp;Element hinzufügen&nbsp;</font></b></td></tr></table><table width=\\"100%\\" border=\\"0\\" cellpadding=\\"2\\" cellspacing=\\"0\\" bgcolor=\\"#FFFFFF\\">''\\n";\r\n	for ($mod[''i''] = 1; $mod[''i''] <= $dedi_mod[''value''][''0'']; $mod[''i'']++) {\r\n		$mod[''y''] = round($mod[''i'']*10);\r\n		echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."'']+=''<tr><td class=\\"menurow\\"><a href=\\"".$con_side[$idcatside][''link''].''&flex''.$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."=new&entry=".$mod[''i'']."\\" onMouseOver=\\"on(\\''".htmlentities(dedi_addslashes($dedi_mod[''value''][$mod[''y'']]))."\\'');return true;\\" onMouseOut=\\"off();return true;\\"><font face=\\"Verdana, Arial, Helvetica\\" size=\\"1\\">".htmlentities(dedi_addslashes($dedi_mod[''value''][$mod[''y'']]))."</font></a></td></tr>''\\n";\r\n	}\r\n	echo "linkset[''flex".$dedi_mod[''container''][''id''].''_''.$dedi_mod[''modul''][''id'']."'']+=''</table></td></tr></table>''\\n";\r\n	echo "</script>\\n</div>";\r\n}\r\nunset($mod);\r\n\r\nif ($dedi_side[''edit_all'']) {\r\n	$dedi_side[''edit''] = ''true'';\r\n	unset($dedi_side[''edit_all'']);\r\n}\r\n?>', `config` = '', `idclient` = 0, `deletable` = 1, `author` = 1, `created` = 1098044658, `lastmodified` = 1135558824, `repository_id` = 'mod:27c2c0f9459f80a760b14dcc3ea917a8:5210c37b', `install_sql` = '', `uninstall_sql` = '', `update_sql` = '', `source_id` = 0, `is_install` = '0', `verbose` = '', `checked` = '1' WHERE  `repository_id` LIKE 'mod:27c2c0f9459f80a760b14dcc3ea917a8:%' AND `idclient` = 0;
#entfernt - ContentFlex
#entfernt - Pic-Galerie

# 28.12.2005 Modul "Kontaktformular" auf v1.0.6 gupdated
#entfernt

# Alten Code entfernen und Tabellen optimieren
DELETE FROM dedi_code;
DELETE FROM dedi_db_cache;
OPTIMIZE TABLE `dedi_backendmenu`;
OPTIMIZE TABLE `dedi_cat`;
OPTIMIZE TABLE `dedi_cat_expand`;
OPTIMIZE TABLE `dedi_cat_lang`;
OPTIMIZE TABLE `dedi_cat_side`;
OPTIMIZE TABLE `dedi_clients`;
OPTIMIZE TABLE `dedi_clients_lang`;
OPTIMIZE TABLE `dedi_code`;
OPTIMIZE TABLE `dedi_container`;
OPTIMIZE TABLE `dedi_container_conf`;
OPTIMIZE TABLE `dedi_content`;
OPTIMIZE TABLE `dedi_content_external`;
OPTIMIZE TABLE `dedi_css`;
OPTIMIZE TABLE `dedi_css_upl`;
OPTIMIZE TABLE `dedi_directory`;
OPTIMIZE TABLE `dedi_filetype`;
OPTIMIZE TABLE `dedi_groups`;
OPTIMIZE TABLE `dedi_js`;
OPTIMIZE TABLE `dedi_lang`;
OPTIMIZE TABLE `dedi_lay`;
OPTIMIZE TABLE `dedi_lay_upl`;
OPTIMIZE TABLE `dedi_mod`;
OPTIMIZE TABLE `dedi_perms`;
OPTIMIZE TABLE `dedi_sessions`;
OPTIMIZE TABLE `dedi_side`;
OPTIMIZE TABLE `dedi_side_lang`;
OPTIMIZE TABLE `dedi_tpl`;
OPTIMIZE TABLE `dedi_tpl_conf`;
OPTIMIZE TABLE `dedi_type`;
OPTIMIZE TABLE `dedi_upl`;
OPTIMIZE TABLE `dedi_uplcontent`;
OPTIMIZE TABLE `dedi_users`;
OPTIMIZE TABLE `dedi_users_groups`;
OPTIMIZE TABLE `dedi_values`;
OPTIMIZE TABLE `dedi_db_cache`;