diff --git a/setup/data/base/base_misc1.sql b/setup/data/base/base_misc1.sql
index 0f35934..246266a 100644
--- a/setup/data/base/base_misc1.sql
+++ b/setup/data/base/base_misc1.sql
@@ -1 +1 @@
-UPDATE !PREFIX!_art_lang SET published=lastmodified, publishedby=modifiedby WHERE online=1 and published="0000-00-00 00:00:00";
\ No newline at end of file
+UPDATE !PREFIX!_art_lang SET published=lastmodified, publishedby=modifiedby WHERE online=1 and published="1970-01-01 00:00:01";
\ No newline at end of file
diff --git a/setup/data/base/base_type1.sql b/setup/data/base/base_type1.sql
index 192cec8..ff293a4 100644
--- a/setup/data/base/base_type1.sql
+++ b/setup/data/base/base_type1.sql
@@ -1,23 +1,23 @@
DELETE FROM !PREFIX!_type WHERE idtype < 10000;
-INSERT INTO !PREFIX!_type VALUES('22', 'CMS_QRCODE', '/**\r\n * CMS_QRCODE\r\n */ \r\n$tmp = $a_content[''CMS_QRCODE''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''", "''", $tmp); \r\n$tmp = str_replace("\\$", ''\\\\\\$'', $tmp); \r\n\r\n$q = array("", "L", "M", "Q", "H");\r\n$quality = intval(getEffectiveSetting("qrcode", "quality"));\r\nif ($quality == 0) {\r\n setSystemProperty("qrcode", "quality", 1);\r\n setSystemProperty("qrcode", "blocksize", 3);\r\n setSystemProperty("qrcode", "border", 2);\r\n $quality = 1;\r\n}\r\n$quality = $q[$quality];\r\n$blocksize = intval(getEffectiveSetting("qrcode", "blocksize", 3));\r\n$border = intval(getEffectiveSetting("qrcode", "border", 2));\r\n\r\nif ($edit) {\r\n # In editor we always generate a new image because of possible changes\r\n $tmp2 = "\r\necho ''QR Code (online only) '';\r\n@unlink(''" . $cfgClient[$client]["path"]["frontend"] . "cache/QR-Code-" . $idart . "-" . $val . ".png'');";\r\n \r\n # Edit anchor and image\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_QRCODE&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_QRCODE_'' . $val . ''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'', ''" . $editLink . "'');");\r\n # Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"] . $cfg["path"]["images"] . "but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n # Process for tmp2put with echo\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp2 .= "echo ''" . $finalEditButton . "'';";\r\n} else {\r\n # In frontend and preview we only generate a new image if it was deleted\r\n $tmp2 = "\r\nif (!is_file(''" . $cfgClient[$client][''path''][''frontend''] . "cache/QR-Code-" . $idart . "-" . $val . ".png'')) {\r\n define(''QR_CACHE_DIR'', ''" . $cfgClient[$client][''path''][''frontend''] . "cache/phpqrcode/'');\r\n if (!is_dir(QR_CACHE_DIR)) {\r\n mkdir(QR_CACHE_DIR);\r\n }";\r\n if (isStartArticle($idartlang, $idcat, $lang)) {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n } else {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''idart'' => $idart, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n }\r\n $tmp2 .= "\r\n}\r\necho '' '';";\r\n}\r\n$tmp = $tmp2;', 'QR Code', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_type VALUES('18', 'CMS_EASYIMGEDIT', '/**\r\n * CMS_EASYIMGEDIT\r\n */\r\n$tmp = "";\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_EASYIMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_EASYIMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
-INSERT INTO !PREFIX!_type VALUES('19', 'CMS_DATE', '$tmp = $a_content["CMS_DATE"][$val];\r\n\r\n$oCmsDate = new Cms_Date($tmp, $val, $idartlang, $editLink, $cfg, $db, count($a_content["CMS_DATE"]), $belang);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsDate->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsDate->getAllWidgetView();\r\n\r\n}', 'Date', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_type VALUES('20', 'CMS_TEASER', '$tmp = $a_content["CMS_TEASER"][$val];\r\n\r\n$oCmsTeaser = new Cms_Teaser($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetView();\r\n\r\n}', 'Teaser', '0', '', '2009-04-20 13:12:14', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_type VALUES('21', 'CMS_FILELIST', '$tmp = $a_content["CMS_FILELIST"][$val];\r\n\r\n$oCmsFileList = new Cms_FileList($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsFileList->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsFileList->getAllWidgetView();\r\n\r\n}', '', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
+INSERT INTO !PREFIX!_type VALUES('22', 'CMS_QRCODE', '/**\r\n * CMS_QRCODE\r\n */ \r\n$tmp = $a_content[''CMS_QRCODE''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''", "''", $tmp); \r\n$tmp = str_replace("\\$", ''\\\\\\$'', $tmp); \r\n\r\n$q = array("", "L", "M", "Q", "H");\r\n$quality = intval(getEffectiveSetting("qrcode", "quality"));\r\nif ($quality == 0) {\r\n setSystemProperty("qrcode", "quality", 1);\r\n setSystemProperty("qrcode", "blocksize", 3);\r\n setSystemProperty("qrcode", "border", 2);\r\n $quality = 1;\r\n}\r\n$quality = $q[$quality];\r\n$blocksize = intval(getEffectiveSetting("qrcode", "blocksize", 3));\r\n$border = intval(getEffectiveSetting("qrcode", "border", 2));\r\n\r\nif ($edit) {\r\n # In editor we always generate a new image because of possible changes\r\n $tmp2 = "\r\necho ''QR Code (online only) '';\r\n@unlink(''" . $cfgClient[$client]["path"]["frontend"] . "cache/QR-Code-" . $idart . "-" . $val . ".png'');";\r\n \r\n # Edit anchor and image\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_QRCODE&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_QRCODE_'' . $val . ''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'', ''" . $editLink . "'');");\r\n # Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"] . $cfg["path"]["images"] . "but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n # Process for tmp2put with echo\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp2 .= "echo ''" . $finalEditButton . "'';";\r\n} else {\r\n # In frontend and preview we only generate a new image if it was deleted\r\n $tmp2 = "\r\nif (!is_file(''" . $cfgClient[$client][''path''][''frontend''] . "cache/QR-Code-" . $idart . "-" . $val . ".png'')) {\r\n define(''QR_CACHE_DIR'', ''" . $cfgClient[$client][''path''][''frontend''] . "cache/phpqrcode/'');\r\n if (!is_dir(QR_CACHE_DIR)) {\r\n mkdir(QR_CACHE_DIR);\r\n }";\r\n if (isStartArticle($idartlang, $idcat, $lang)) {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n } else {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''idart'' => $idart, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n }\r\n $tmp2 .= "\r\n}\r\necho '' '';";\r\n}\r\n$tmp = $tmp2;', 'QR Code', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_type VALUES('18', 'CMS_EASYIMGEDIT', '/**\r\n * CMS_EASYIMGEDIT\r\n */\r\n$tmp = "";\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_EASYIMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_EASYIMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '1970-01-01 00:00:01', '2009-04-14 13:56:58');
+INSERT INTO !PREFIX!_type VALUES('19', 'CMS_DATE', '$tmp = $a_content["CMS_DATE"][$val];\r\n\r\n$oCmsDate = new Cms_Date($tmp, $val, $idartlang, $editLink, $cfg, $db, count($a_content["CMS_DATE"]), $belang);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsDate->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsDate->getAllWidgetView();\r\n\r\n}', 'Date', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_type VALUES('20', 'CMS_TEASER', '$tmp = $a_content["CMS_TEASER"][$val];\r\n\r\n$oCmsTeaser = new Cms_Teaser($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetView();\r\n\r\n}', 'Teaser', '0', '', '2009-04-20 13:12:14', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_type VALUES('21', 'CMS_FILELIST', '$tmp = $a_content["CMS_FILELIST"][$val];\r\n\r\n$oCmsFileList = new Cms_FileList($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsFileList->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsFileList->getAllWidgetView();\r\n\r\n}', '', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01');
INSERT INTO !PREFIX!_type VALUES('17', 'CMS_HTMLTEXT', '/**\r\n * CMS_HTMLTEXT\r\n */\r\ncInclude("includes", "functions.lang.php");\r\n\r\n$content = $a_content[''CMS_HTMLTEXT''][$val];\r\n$content = urldecode($content);\r\n$content = htmldecode($content);\r\n$content = strip_tags($content);\r\n\r\n$content = str_replace(" ", " ", $content);\r\n\r\n$content = htmlspecialchars($content);\r\nif ($content == "")\r\n{\r\n $content = " ";\r\n}\r\n\r\n$content = nl2br($content);\r\n\r\nif ($edit) {\r\n\r\n $div = new cHTMLDiv;\r\n $div->setID("HTMLTEXT_".$db->f("idtype")."_".$val);\r\n $div->setEvent("focus", "this.style.border=''1px solid #bb5577''");\r\n $div->setEvent("blur", "this.style.border=''1px dashed #bfbfbf''");\r\n $div->setStyleDefinition("border", "1px dashed #bfbfbf");\r\n $div->updateAttributes(array("contentEditable" => "true"));\r\n $div->setStyleDefinition("direction", langGetTextDirection($lang));\r\n \r\n $editlink = new cHTMLLink;\r\n $editlink->setClass(''CMS_HTMLTEXT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editlink->setLink($sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLTEXT&typenr=$val&lang=$lang"));\r\n \r\n $editimg = new cHTMLImage;\r\n $editimg->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif");\r\n \r\n $savelink = new cHTMLLink;\r\n $savelink->setClass(''CMS_HTMLTEXT_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $savelink->setLink("javascript:setcontent(''$idartlang'',''0'')");\r\n \r\n $saveimg = new cHTMLImage;\r\n $saveimg->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif");\r\n \r\n $savelink->setContent($saveimg);\r\n \r\n $editlink->setContent($editimg);\r\n \r\n $div->setContent($content);\r\n\r\n $tmp = implode("", array($div->render(), $editlink->render(), " ", $savelink->render()));\r\n $tmp = str_replace(''"'', ''\\"'', $tmp);\r\n} else {\r\n $tmp = $content;\r\n $tmp = str_replace(''"'', ''\\"'', $tmp);\r\n}\r\n\r\n\r\n$tmp = addslashes($tmp);\r\n$tmp = str_replace(''$'', ''\\\\\\$'', $tmp);', 'Text / Standard', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58');
-INSERT INTO !PREFIX!_type VALUES('16', 'CMS_SIMPLELINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\nif ($edit) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SIMPLELINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SIMPLELINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
-INSERT INTO !PREFIX!_type VALUES('14', 'CMS_IMGEDIT', '/**\r\n * CMS_IMGEDIT\r\n */\r\n$tmp = '''';\r\n\r\nif ($edit) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Edit button for an image', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:58:44');
-INSERT INTO !PREFIX!_type VALUES('15', 'CMS_IMGTITLE', '/**\r\n * CMS_IMGTITLE\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);', 'Title of an image', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_type VALUES('13', 'CMS_RAWLINK', '/**\r\n* CMS_RAWLINK\r\n*/\r\nglobal $cfgClient;\r\nglobal $client;\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if ($edit) $tmp = $sess->url("$tmp");\r\n\r\n}', 'Raw Link without transformation', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_type VALUES('11', 'CMS_LINKTITLE', '/**\r\n * CMS_LINKTITLE\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);\r\n\r\n', 'Title of a Link', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_type VALUES('12', 'CMS_LINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\n\r\nif ($edit) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $finalEditButton;\r\n \r\n}', 'Link edit button', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
+INSERT INTO !PREFIX!_type VALUES('16', 'CMS_SIMPLELINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\nif ($edit) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SIMPLELINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SIMPLELINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '1970-01-01 00:00:01', '2009-04-14 13:56:58');
+INSERT INTO !PREFIX!_type VALUES('14', 'CMS_IMGEDIT', '/**\r\n * CMS_IMGEDIT\r\n */\r\n$tmp = '''';\r\n\r\nif ($edit) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Edit button for an image', '0', '', '1970-01-01 00:00:01', '2009-04-14 13:58:44');
+INSERT INTO !PREFIX!_type VALUES('15', 'CMS_IMGTITLE', '/**\r\n * CMS_IMGTITLE\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);', 'Title of an image', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_type VALUES('13', 'CMS_RAWLINK', '/**\r\n* CMS_RAWLINK\r\n*/\r\nglobal $cfgClient;\r\nglobal $client;\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if ($edit) $tmp = $sess->url("$tmp");\r\n\r\n}', 'Raw Link without transformation', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_type VALUES('11', 'CMS_LINKTITLE', '/**\r\n * CMS_LINKTITLE\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);\r\n\r\n', 'Title of a Link', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_type VALUES('12', 'CMS_LINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\n\r\nif ($edit) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $finalEditButton;\r\n \r\n}', 'Link edit button', '0', '', '1970-01-01 00:00:01', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('9', 'CMS_HEAD', '/**\r\n * CMS_HEAD\r\n */\r\n$tmp = $a_content["CMS_HEAD"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HEAD&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_HEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Headline / Standard', '0', '', '2002-05-13 19:02:34', '2009-04-14 13:56:58');
-INSERT INTO !PREFIX!_type VALUES('10', 'CMS_SWF', '/**\r\n * CMS_SWF\r\n */\r\n\r\nif ( !is_object($db2) ) $db2 = new DB_Contenido;\r\n\r\n$tmp_id = $a_content[''CMS_SWF''][$val];\r\n\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp_id."'' AND filetype = ''swf''";\r\n\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n \r\n $aImgSize = @getimagesize($tmp_swf);\r\n\r\n $width = $aImgSize[0];\r\n $height = $aImgSize[1];\r\n\r\n $tmp = ''\r\n \r\n \r\n '';\r\n} else {\r\n $tmp = '''';\r\n}\r\n\r\n\r\nif( $edit ) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SWF_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editswf.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp = ''
''.$tmp.'' ''.$finalEditButton.''
'';\r\n}\r\n\r\n$tmp = addslashes( addslashes($tmp) ); \r\n$tmp = str_replace( "\\\\\\''", "''", $tmp ); ', 'Flash Movie', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
+INSERT INTO !PREFIX!_type VALUES('10', 'CMS_SWF', '/**\r\n * CMS_SWF\r\n */\r\n\r\nif ( !is_object($db2) ) $db2 = new DB_Contenido;\r\n\r\n$tmp_id = $a_content[''CMS_SWF''][$val];\r\n\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp_id."'' AND filetype = ''swf''";\r\n\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n \r\n $aImgSize = @getimagesize($tmp_swf);\r\n\r\n $width = $aImgSize[0];\r\n $height = $aImgSize[1];\r\n\r\n $tmp = ''\r\n \r\n \r\n '';\r\n} else {\r\n $tmp = '''';\r\n}\r\n\r\n\r\nif( $edit ) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SWF_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editswf.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp = ''''.$tmp.'' ''.$finalEditButton.''
'';\r\n}\r\n\r\n$tmp = addslashes( addslashes($tmp) ); \r\n$tmp = str_replace( "\\\\\\''", "''", $tmp ); ', 'Flash Movie', '0', '', '1970-01-01 00:00:01', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('7', 'CMS_LINKTARGET', '/**\r\n * CMS_LINKTARGET\r\n */\r\n$tmp = $a_content["CMS_LINKTARGET"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = urldecode($tmp);', 'Frame', '0', '', '2002-05-13 19:04:43', '2002-05-13 19:04:43');
INSERT INTO !PREFIX!_type VALUES('8', 'CMS_LINKDESCR', '/**\r\n * CMS_LINKDESCR\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\nif ($edit) {\r\n\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKDESCR_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Description', '0', '', '2002-05-13 19:05:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('6', 'CMS_LINK', '/**\r\n* CMS_LINK\r\n*/\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if ($edit) $tmp = $sess->url("$tmp");\r\n\r\n} else {\r\n\r\n if (!preg_match(''/^(http|https|ftp|telnet|gopher):\\/\\/((?:[a-zA-Z0-9_-]+\\.?)+):?(\\d*)/'', $tmp)) {\r\n // it''s a relative link, or an absolute link with unsupported protocol\r\n if (substr($tmp,0,4) == "www." || $tmp == "") { // only check if it could be a domainname\r\n $tmp = "http://".$tmp;\r\n }\r\n }\r\n\r\n}', 'Link', '0', '', '2002-05-13 19:04:36', '2002-05-13 19:04:36');
INSERT INTO !PREFIX!_type VALUES('4', 'CMS_IMG', '/**\r\n * CMS_IMG\r\n */\r\n \r\n$tmp = $a_content["CMS_IMG"][$val];\r\n$tmp = urldecode($tmp);\r\nif($tmp==""||$tmp=="0"){\r\n$tmp="";\r\n\r\n}else{\r\n\r\nif (is_numeric($tmp))\r\n{\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp."''";\r\n\r\n$db2 = new DB_Contenido;\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp = $cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$db2->f("dirname").$db2->f("filename");\r\n }\r\n}\r\n\r\n $tmp = htmlspecialchars($tmp);\r\n$tmp = urldecode($tmp);\r\n $tmp = str_replace("''", "\\''", $tmp);\r\n}', 'Image', '0', '', '2002-05-13 19:04:21', '2002-05-13 19:04:21');
INSERT INTO !PREFIX!_type VALUES('5', 'CMS_IMGDESCR', '/**\r\n * CMS_IMGDESCR\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlentities($tmp,ENT_QUOTES);\r\n\r\n\r\nif ($edit) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGDESCR_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Description', '0', '', '2002-05-13 19:04:28', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('3', 'CMS_TEXT', '/**\r\n * CMS_TEXT\r\n */\r\ncInclude("includes", "functions.lang.php");\r\n\r\n$tmp = $a_content["CMS_TEXT"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = nl2br($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp);\r\n\r\n$tmp = str_replace(" "," ", $tmp);\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_TEXT&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_TEXT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Text / Standard', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58');
-INSERT INTO !PREFIX!_type VALUES('1', 'CMS_HTMLHEAD', '/**\r\n * CMS_HTMLHEAD\r\n */ \r\n$tmp = $a_content[''CMS_HTMLHEAD''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif ($edit) {\r\n if ($tmp == "") { \r\n $tmp = " "; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTMLHEAD_".$db->f("idtype")."_".$val);\r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val");\r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Headline / HTML', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
+INSERT INTO !PREFIX!_type VALUES('1', 'CMS_HTMLHEAD', '/**\r\n * CMS_HTMLHEAD\r\n */ \r\n$tmp = $a_content[''CMS_HTMLHEAD''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif ($edit) {\r\n if ($tmp == "") { \r\n $tmp = " "; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTMLHEAD_".$db->f("idtype")."_".$val);\r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val");\r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Headline / HTML', '0', '', '1970-01-01 00:00:01', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('2', 'CMS_HTML', '/** \r\n * CMS_HTML \r\n */ \r\n$tmp = $a_content[''CMS_HTML''][$val]; \r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif ($edit) { \r\n if ($tmp == "") { \r\n $tmp = " "; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTML_".$db->f("idtype")."_".$val); \r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val"); \r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTML_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif"); \r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTML_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Text / HTML', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58');
\ No newline at end of file
diff --git a/setup/data/client/client1.sql b/setup/data/client/client1.sql
index b4a2325..af37860 100644
--- a/setup/data/client/client1.sql
+++ b/setup/data/client/client1.sql
@@ -1,3 +1,3 @@
-INSERT INTO !PREFIX!_clients VALUES('1', 'ConLite Demo', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '/cms/', '/cms/', '4', '2');
+INSERT INTO !PREFIX!_clients VALUES('1', 'ConLite Demo', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '', '/cms/', '/cms/', '4', '2');
INSERT INTO !PREFIX!_clients_lang VALUES('1', '1', '1');
INSERT INTO !PREFIX!_lang VALUES('1', 'Deutsch', '1', '48a365b4ce1e322a55ae9017f3daf0c0', '2015-06-22 14:33:45', '2015-06-22 14:34:17', 'utf-8', 'ltr');
\ No newline at end of file
diff --git a/setup/data/examples/examples_articles1.sql b/setup/data/examples/examples_articles1.sql
index 02cd91c..45ed384 100644
--- a/setup/data/examples/examples_articles1.sql
+++ b/setup/data/examples/examples_articles1.sql
@@ -1,6 +1,6 @@
INSERT INTO !PREFIX!_art VALUES('1', '1');
INSERT INTO !PREFIX!_art VALUES('2', '1');
INSERT INTO !PREFIX!_art VALUES('3', '1');
-INSERT INTO !PREFIX!_art_lang VALUES('1', '1', '1', '6', 'Startseite', 'Startseite', '', '', '0', '2015-06-22 14:41:52', '2015-06-22 14:41:52', 'sysadmin', 'sysadmin', '2015-06-22 14:42:10', 'sysadmin', '1', '0', '0', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '', '', '', '0', '1', '0', '0', '0');
-INSERT INTO !PREFIX!_art_lang VALUES('2', '2', '1', '0', 'Fehlerseite', 'Fehlerseite', '', '', '0', '2015-06-22 14:42:43', '2015-06-22 14:42:43', 'sysadmin', 'sysadmin', '2015-06-22 14:43:00', 'sysadmin', '1', '0', '0', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '', '', '', '0', '1', '0', '0', '0');
-INSERT INTO !PREFIX!_art_lang VALUES('3', '3', '1', '0', 'Home', 'Home', '', '', '0', '2016-03-15 18:33:54', '2016-05-23 15:46:24', 'sysadmin', 'sysadmin', '2016-03-15 18:34:04', 'sysadmin', '1', '0', '0', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '', '', '', '0', '1', '0', '0', '0');
\ No newline at end of file
+INSERT INTO !PREFIX!_art_lang VALUES('1', '1', '1', '6', 'Startseite', 'Startseite', '', '', '0', '2015-06-22 14:41:52', '2015-06-22 14:41:52', 'sysadmin', 'sysadmin', '2015-06-22 14:42:10', 'sysadmin', '1', '0', '0', '0', '0', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '0', '0', '0', '0', '0', '1', '0', '0', '0');
+INSERT INTO !PREFIX!_art_lang VALUES('2', '2', '1', '0', 'Fehlerseite', 'Fehlerseite', '', '', '0', '2015-06-22 14:42:43', '2015-06-22 14:42:43', 'sysadmin', 'sysadmin', '2015-06-22 14:43:00', 'sysadmin', '1', '0', '0', '0', '0', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '0', '0', '0', '0', '0', '1', '0', '0', '0');
+INSERT INTO !PREFIX!_art_lang VALUES('3', '3', '1', '0', 'Home', 'Home', '', '', '0', '2016-03-15 18:33:54', '2016-05-23 15:46:24', 'sysadmin', 'sysadmin', '2016-03-15 18:34:04', 'sysadmin', '1', '0', '0', '0', '0', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '0', '0', '0', '0', '0', '1', '0', '0', '0');
\ No newline at end of file
diff --git a/setup/data/examples/examples_categories1.sql b/setup/data/examples/examples_categories1.sql
index 2155d35..bc50904 100644
--- a/setup/data/examples/examples_categories1.sql
+++ b/setup/data/examples/examples_categories1.sql
@@ -8,9 +8,9 @@ INSERT INTO !PREFIX!_cat VALUES('7', '1', '0', '1', '2', '0', 'sysadmin', '2016-
INSERT INTO !PREFIX!_cat VALUES('8', '1', '3', '0', '11', '0', 'sysadmin', '2016-03-15 18:44:09', '2016-03-15 18:48:31');
INSERT INTO !PREFIX!_cat VALUES('11', '1', '3', '8', '12', '0', 'sysadmin', '2016-03-15 18:48:31', '2016-03-15 18:48:42');
INSERT INTO !PREFIX!_cat VALUES('12', '1', '3', '11', '0', '0', 'sysadmin', '2016-03-15 18:48:42', '2016-03-15 18:48:42');
-INSERT INTO !PREFIX!_cat_art VALUES('1', '3', '1', '0', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '1');
-INSERT INTO !PREFIX!_cat_art VALUES('2', '4', '2', '0', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '1');
-INSERT INTO !PREFIX!_cat_art VALUES('3', '5', '3', '0', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '1');
+INSERT INTO !PREFIX!_cat_art VALUES('1', '3', '1', '0', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '1');
+INSERT INTO !PREFIX!_cat_art VALUES('2', '4', '2', '0', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '1');
+INSERT INTO !PREFIX!_cat_art VALUES('3', '5', '3', '0', '0', '', '1970-01-01 00:00:01', '1970-01-01 00:00:01', '1');
INSERT INTO !PREFIX!_cat_lang VALUES('1', '1', '1', '2', 'Hauptnavigation', '1', '1', '0', 'sysadmin', '2015-06-22 14:39:53', '2015-06-22 14:39:53', '0', 'Hauptnavigation', 'Hauptnavigation');
INSERT INTO !PREFIX!_cat_lang VALUES('2', '2', '1', '3', 'Systemseiten', '1', '1', '0', 'sysadmin', '2015-06-22 14:40:21', '2015-06-22 14:40:21', '0', 'Systemseiten', 'Systemseiten');
INSERT INTO !PREFIX!_cat_lang VALUES('3', '3', '1', '4', 'Features', '1', '1', '0', 'sysadmin', '2015-06-22 14:40:53', '2016-03-15 18:40:59', '1', 'Features', 'Hauptnavigation/Features');
diff --git a/setup/data/examples/examples_misc1.sql b/setup/data/examples/examples_misc1.sql
index 1a50564..bdd3db8 100644
--- a/setup/data/examples/examples_misc1.sql
+++ b/setup/data/examples/examples_misc1.sql
@@ -1,17 +1,17 @@
-INSERT INTO !PREFIX!_lay VALUES('1', '1', 'cl demo default', '', '', '\r\n\r\n\r\n\r\n \r\n\r\n \r\n\r\nConLite 2.0 Demo \r\n \r\n \r\n\r\n\r\n \r\n\r\n \r\n\r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\nEU Cookie Directive \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Main Navigation \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n Headline 1 \r\n Html 1 \r\n Portal Buttons \r\n
\r\n
\r\n CL Flex Slider \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\r\n
\r\n \r\n
\r\n \r\n
\r\n
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\r\n
\r\n \r\n
\r\n \r\n
\r\n
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n \r\n\r\n \r\n
\r\n
CL Social Media Links \r\n
\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n', 'sysadmin', '0000-00-00 00:00:00', '2017-08-09 14:31:21');
-INSERT INTO !PREFIX!_template VALUES('1', '1', '1', '1', 'CL Default', '', '1', '', '1', 'sysadmin', '2015-06-22 14:37:44', '2017-08-09 14:31:38');
-INSERT INTO !PREFIX!_template_conf VALUES('1', '1', '', 'sysadmin', '', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('2', '1', '0', 'sysadmin', '20150622143953', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('3', '1', '0', 'sysadmin', '20150622144021', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('4', '1', '0', 'sysadmin', '20150622144053', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('5', '1', '0', 'sysadmin', '20150622144118', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('6', '1', '', '', '', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('7', '1', '0', 'sysadmin', '20160315182527', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('8', '1', '0', 'sysadmin', '20160315184214', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('9', '1', '0', 'sysadmin', '20160315184302', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('10', '1', '0', 'sysadmin', '20160315184409', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('14', '1', '0', 'sysadmin', '20160315184842', '0000-00-00 00:00:00');
-INSERT INTO !PREFIX!_template_conf VALUES('13', '1', '0', 'sysadmin', '20160315184831', '0000-00-00 00:00:00');
+INSERT INTO !PREFIX!_lay VALUES('1', '1', 'cl demo default', '', NULL, '\r\n\r\n\r\n\r\n \r\n\r\n \r\n\r\nConLite 2.0 Demo \r\n \r\n \r\n\r\n\r\n \r\n\r\n \r\n\r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\nEU Cookie Directive \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Main Navigation \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n Headline 1 \r\n Html 1 \r\n Portal Buttons \r\n
\r\n
\r\n CL Flex Slider \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\r\n
\r\n \r\n
\r\n \r\n
\r\n
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\r\n
\r\n \r\n
\r\n \r\n
\r\n
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n \r\n\r\n \r\n
\r\n
CL Social Media Links \r\n
\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n', 'sysadmin', '1970-01-01 00:00:01', '2017-08-09 14:31:21');
+INSERT INTO !PREFIX!_template VALUES('1', '1', '1', '1', 'CL Default', '', '1', '0', '1', 'sysadmin', '2015-06-22 14:37:44', '2017-08-09 14:31:38');
+INSERT INTO !PREFIX!_template_conf VALUES('1', '1', '0', 'sysadmin', '', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('2', '1', '0', 'sysadmin', '20150622143953', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('3', '1', '0', 'sysadmin', '20150622144021', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('4', '1', '0', 'sysadmin', '20150622144053', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('5', '1', '0', 'sysadmin', '20150622144118', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('6', '1', '0', '', '', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('7', '1', '0', 'sysadmin', '20160315182527', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('8', '1', '0', 'sysadmin', '20160315184214', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('9', '1', '0', 'sysadmin', '20160315184302', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('10', '1', '0', 'sysadmin', '20160315184409', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('14', '1', '0', 'sysadmin', '20160315184842', '1970-01-01 00:00:01');
+INSERT INTO !PREFIX!_template_conf VALUES('13', '1', '0', 'sysadmin', '20160315184831', '1970-01-01 00:00:01');
INSERT INTO !PREFIX!_upl VALUES('5', '1', 'basic-pic1.jpg', 'Flexslider/', 'jpg', '149587', 'Love+Brazil+%21%21%21+Sea+view+from+Rio+de+Janeiro+fort.', '0', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-10-12 11:33:29', '2016-10-12 15:33:49', '48a365b4ce1e322a55ae9017f3daf0c0');
INSERT INTO !PREFIX!_upl VALUES('2', '1', 'IMG_1522.JPG', 'lightslider/', 'JPG', '2386646', '', '0', '48a365b4ce1e322a55ae9017f3daf0c0', '2015-09-15 16:36:11', '2015-09-15 16:36:11', '48a365b4ce1e322a55ae9017f3daf0c0');
INSERT INTO !PREFIX!_upl VALUES('3', '1', 'IMG_1523.JPG', 'lightslider/', 'JPG', '2168414', '', '0', '48a365b4ce1e322a55ae9017f3daf0c0', '2015-09-15 16:36:35', '2015-09-15 16:36:35', '48a365b4ce1e322a55ae9017f3daf0c0');
diff --git a/setup/data/standard/standard_modules1.sql b/setup/data/standard/standard_modules1.sql
index 1ed68a7..345610c 100644
--- a/setup/data/standard/standard_modules1.sql
+++ b/setup/data/standard/standard_modules1.sql
@@ -1,8 +1,8 @@
-INSERT INTO !PREFIX!_mod VALUES('1', '1', 'CL Main Navi', 'Navigation', 'none', '', '', '?>\r\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\r\n * @link http://conlite.org ConLite Portal\r\n * \r\n * \r\n * $Id$\r\n */\r\ndefined("CON_FRAMEWORK") || die(''Illegal call: Missing framework initialization - request aborted.'');\r\n$oTpl = new Template();\r\n$oTpl->reset();\r\ncInclude(''frontend'', ''includes/Util/Modules/Contenido_NavMain_Util.class.php'');\r\n\r\n$iStartIdcat = getEffectiveSetting(''navigation'', ''idcat-home'', 1);\r\n$iSelectedDepth = getEffectiveSetting(''navigation'', ''level-depth'', 3);\r\n$bWithFeLogin = boolval(getEffectiveSetting(''navigation'', ''with-fe-login'', FALSE));\r\n\r\nfunction clBuildNavArray(Contenido_FrontendNavigation &$oNav, $iStartIdcat) {\r\n $aNavArray = array();\r\n $aCategories = $oNav->getSubCategories($iStartIdcat, false, true, 1);\r\n $oCatLangCol = new cApiCategoryLanguageCollection();\r\n\r\n if (count($aCategories) > 0) {\r\n $i = 0;\r\n foreach ($aCategories as $iCategory) {\r\n $oNav->setRootCat($iCategory);\r\n $aNavArray[$i][''idcat''] = $iCategory;\r\n // get catname\r\n /* @var $oCatLang cApiCategoryLanguage */\r\n $oCatLangCol->setWhere(''idcat'', $iCategory);\r\n $oCatLangCol->setWhere(''idlang'', cRegistry::getLanguageId());\r\n $oCatLangCol->query();\r\n $oCatLang = $oCatLangCol->next();\r\n //print_r($oCatLang);\r\n if ($oCatLang->isLoaded()) {\r\n $aNavArray[$i][''name''] = $oCatLang->getField(''name'');\r\n $aNavArray[$i][''urlname''] = $oCatLang->getField(''urlname'');\r\n }\r\n\r\n $aNavArray[$i][''subnav''] = clBuildNavArray($oNav, $iCategory);\r\n $i++;\r\n }\r\n }\r\n\r\n unset($oCatLangCol);\r\n return $aNavArray;\r\n}\r\n\r\nfunction clBuildNavList($aNavArray, $aBreadcrumb, $iLevel = 0) {\r\n global $auth, $bWithFeLogin;\r\n $sNavList = '''';\r\n if (is_array($aNavArray) && !empty($aNavArray)) {\r\n if ($iLevel == 0) {\r\n $sNavList .= '''';\r\n } else {\r\n $sNavList .= '''';\r\n }\r\n foreach ($aNavArray as $aNavEntry) {\r\n if (in_array($aNavEntry[''idcat''], $aBreadcrumb)) {\r\n $sNavList .= '''';\r\n } else {\r\n $sNavList .= '' '';\r\n }\r\n $sNavList .= '''' . $aNavEntry[''name''] . '' '';\r\n if (!empty($aNavEntry[''subnav''])) {\r\n $sNavList .= clBuildNavList($aNavEntry[''subnav''], $aBreadcrumb, $iLevel + 1);\r\n }\r\n $sNavList .= '' '';\r\n }\r\n // add user login\r\n if ($iLevel == 0 && $bWithFeLogin) {\r\n $sLoginForm = "";\r\n $oTpl = new Template();\r\n if ($auth->auth["uid"] == "nobody") {\r\n $sTargetIdcat = getEffectiveSetting(''login'', ''idcat'', cRegistry::getCategoryId());\r\n $sTargetIdart = getEffectiveSetting(''login'', ''idart'', cRegistry::getArticleId());\r\n $sFormAction = ''front_content.php?idcat='' . $sTargetIdcat . ''&idart='' . $sTargetIdart;\r\n\r\n $oTpl->set(''s'', ''headline'', mi18n("Geschlossener Bereich Login"));\r\n $oTpl->set(''s'', ''form_action'', $sFormAction);\r\n $oTpl->set(''s'', ''label_name'', mi18n("user"));\r\n $oTpl->set(''s'', ''label_pass'', mi18n("pass"));\r\n $oTpl->set(''s'', ''label_login'', mi18n("send"));\r\n $sLoginForm .= $oTpl->generate(''cl_login_form.html'', TRUE);\r\n } else {\r\n \r\n }\r\n\r\n $sNavList .= '''' . $sLoginForm . '' '';\r\n }\r\n $sNavList .= '' '';\r\n }\r\n\r\n\r\n return $sNavList;\r\n}\r\n\r\nif ($iStartIdcat > 0) {\r\n $oFeNavBreadcrumb = new Contenido_FrontendNavigation_Breadcrumb(\r\n cRegistry::getDb()\r\n , cRegistry::getConfig()\r\n , cRegistry::getClientId()\r\n , cRegistry::getLanguageId()\r\n , cRegistry::getClientConfig()\r\n );\r\n\r\n $aBreadcrumb = $oFeNavBreadcrumb->getAsArray(cRegistry::getCategoryId(), $iStartIdcat);\r\n\r\n $oFeNav = new Contenido_FrontendNavigation(\r\n cRegistry::getDb(),\r\n cRegistry::getConfig(),\r\n cRegistry::getClientId(),\r\n cRegistry::getLanguageId(),\r\n cRegistry::getClientConfig()\r\n );\r\n $oFeNav->setAuth($auth);\r\n $oFeNav->setRootCat($iStartIdcat);\r\n\r\n $aNavArray = clBuildNavArray($oFeNav, $iStartIdcat);\r\n\r\n echo '''';\r\n echo clBuildNavList($aNavArray, $aBreadcrumb);\r\n} else {\r\n if(cRegistry::isBackendEditMode()) {\r\n echo ''Navigation not configured correctly.
'';\r\n }\r\n}\r\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2015-06-22 14:35:54', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('4', '1', 'CL Flex Slider', 'media', 'none', '', '', ' ?> "CMS_VALUE[0]",\n \n );\n \n $aCfgClient = cRegistry::getClientConfig(cRegistry::getClientId());\n $path = realpath($aCfgClient[''upl''][''path'']);\n $aFolders = array();\n $aFolders[] = mi18n("-- Select Folder --");\n $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n foreach($objects as $name=>$object) {\n if(is_dir($name)) {\n if(in_array(basename($name), array(''.'',''..''))) {\n continue;\n }\n $folder = str_replace($path.DIRECTORY_SEPARATOR, "", $name);\n $aFolders[$folder] = $folder;\n }\n }\n asort($aFolders);\n //print_r($aFolders);\n \n $oFolderSelect = new cHTMLSelectElement("CMS_VAR[0]");\n $oFolderSelect->autoFill($aFolders);\n $oFolderSelect->setDefault($aModCfg[''folder'']);\n \n $oCfgTable = new UI_Config_Table();\n \n $oCfgTable->setCell(0, 0, mi18n("Select Image Folder"));\n $oCfgTable->setCell(0, 1, $oFolderSelect->render());\n \n $oCfgTable->render(true);\n ?> "CMS_VALUE[0]",\n ''show_caption'' => "CMS_VALUE[10]",\n ''img_width'' => "CMS_VALUE[20]",\n ''img_height'' => "CMS_VALUE[21]",\n ''thumb_width'' => "CMS_VALUE[30]",\n ''thumb_height'' => "CMS_VALUE[31]",\n);\n\n$aOptionsSet[''show_caption''] = ($aOptionsSet[''show_caption''] == ''true'')?TRUE:FALSE;\n\n$aDefaultArray = array( \n ''img_width'' => "500",\n ''img_height'' => "300",\n ''img_quality''=> 30,\n ''thumb_width'' => "50",\n ''thumb_height'' => "50",\n);\n\n$aModCfg = array_merge($aOptionsSet, $aDefaultArray);\n\nif (!empty($aModCfg[''folder''])) {\n $oUplColl = new cApiUploadCollection();\n $oUplColl->setWhere(''dirname'', $aModCfg[''folder''], ''like'');\n $oUplColl->link(''cApiUploadMetaCollection'');\n $oUplColl->query();\n\n $aItems = array();\n /* @var $oUpl cApiUpload */\n while ($oUpl = $oUplColl->next()) {\n $aItems[] = $oUpl->toArray();\n }\n\n $oTpl = new Template();\n\n if (count($aItems) > 0) {\n $aClientCfg = cRegistry::getClientConfig(cRegistry::getClientId());\n\n foreach ($aItems as $iKey => $aItem) {\n $sOrgImgPath = $aClientCfg[''upl''][''frontendpath''] . $aItem[''dirname''] . $aItem[''filename''];\n if (file_exists($sOrgImgPath)) {\n // generate thumb\n $sThumbPath = capiImgScale($sOrgImgPath, $aModCfg[''thumb_width''], $aModCfg[''thumb_height'']);\n // generate scaled image with heigh quality\n $sImgPath = capiImgScale($sOrgImgPath, $aModCfg[''img_width''], $aModCfg[''img_height''], NULL, NULL, 0, TRUE, $aModCfg[''img_quality'']);\n\n $oTpl->set(''d'', ''IMG_THUMB'', $sThumbPath);\n $oTpl->set(''d'', ''IMG'', $sImgPath);\n if($aOptionsSet[''show_caption'']) {\n $oTpl->set(''d'', ''IMG_CAPTION'', $aItem[''description'']);\n } else {\n $oTpl->set(''d'', ''IMG_CAPTION'', '''');\n }\n $oTpl->next();\n }\n }\n $oTpl->generate("cl_flex_slider.html");\n }\n/*\n echo '' '';\n print_r($aModCfg);\n print_r($aItems);\n print_r($aClientCfg);\n echo '' '';\n * \n */\n}\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 14:42:01', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('5', '1', 'CL Portal Buttons', 'navigation', 'none', '', '', '?> array(\n ''href'' => ''http://forum.conlite.org'',\n ''label''=> mi18n("CL-User-Forum")\n ),\n ''faq'' => array(\n ''href'' => ''http://faq.conlite.org'',\n ''label''=> mi18n("CL-FAQ")\n ),\n ''bugtracker'' => array(\n ''href'' => ''http://dev.conlite.org/tickets'',\n ''label''=> mi18n("CL-Bugtracker")\n )\n);\n\n$oLink = new cHTMLLink();\n$oLink->setClass("buttonlink");\n\nforeach($aButtons as $aButton) {\n $oLink->setAttribute(''title'', mi18n("to")." ".$aButton[''label'']);\n $oLink->setLink($aButton[''href'']);\n $oLink->setContent($aButton[''label'']);\n echo $oLink->render();\n $oLink->advanceID();\n}\nunset($oLink);\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 14:55:40', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('6', '1', 'CL Headline', 'content', 'none', '', '', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\nif (!isset($oTpl) || !is_object($oTpl)) {\n $oTpl = new Template();\n}\n\n$sText = "CMS_HTMLHEAD[1]";\n$sTemplate = "headline_h1.html";\n\n$oTpl->reset();\nif (cRegistry::isBackendEditMode()) {\n $oTpl->set(''s'', ''HEADLINE'', $sText);\n $oTpl->generate($sTemplate);\n} else {\n if(!empty($sText)) {\n $oTpl->set(''s'', ''HEADLINE'', strip_tags($sText));\n $oTpl->generate($sTemplate);\n }\n}\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 15:01:13', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('7', '1', 'CL Subheadline', 'content', 'none', '', '', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\nif (!isset($oTpl) || !is_object($oTpl)) {\n $oTpl = new Template();\n}\n\n$sText = "CMS_HTMLHEAD[2]";\n$sTemplate = "subheadline_h2.html";\n\n$oTpl->reset();\nif (cRegistry::isBackendEditMode()) {\n $oTpl->set(''s'', ''SUBHEADLINE'', $sText);\n $oTpl->generate($sTemplate);\n} else {\n if(!empty($sText)) {\n $oTpl->set(''s'', ''SUBHEADLINE'', strip_tags($sText));\n $oTpl->generate($sTemplate);\n }\n}\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 15:01:51', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('11', '1', 'CL HTML Text', 'content', 'none', '', '', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\nif (!isset($oTpl) || !is_object($oTpl)) {\n $oTpl = new Template();\n}\n\n$oTpl->reset();\n$oTpl->set(''s'', ''text'', "CMS_HTML[1]");\n$oTpl->generate(''text_html.html'');\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 15:29:56', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('12', '1', 'CL Cookie Directive', 'navigation', 'none', '', '', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\n\ndefined("CON_FRAMEWORK") || die(''Illegal call: Missing framework initialization - request aborted.'');\n\n$aCfgMod = array(\n ''debug'' => FALSE\n);\n\n$aCookieOpt = array(\n ''explicitConsent'' => ''false'',\n ''position'' => ''top'',\n ''message'' => mi18n("This site uses cookies. Some of the cookies we use are essential for parts of the site to operate and have already been set."),\n ''message'' => mi18n("We have placed cookies on your computer to help make this website better."),\n// Messages\n ''multipleCookieScriptBeginningLabel'' => mi18n("We use"),\n ''and'' => '' ''.mi18n("and").'' '',\n ''multipleCookieScriptEndLabel'' => '' ''.mi18n("scripts, which all set cookies.").'' '',\n ''singleCookieScriptBeginningLabel'' => ''!!! ''.mi18n("We use a").'' '',\n ''singleCookieScriptEndLabel'' => '' ''.mi18n("script which sets cookies."),\n ''explicitCookieDeletionWarning'' => mi18n("You may delete and block all cookies from this site, but parts of the site will not work."),\n ''explicitFindOutMore'' => mi18n("To find out more about cookies on this website, see our"),\n ''privacyPolicyLinkText'' => '' ''.mi18n("privacy policy"),\n ''explicitCheckboxLabel'' => mi18n("You must tick the \\"I accept cookies from this site\\" box to accept"),\n ''explicitCookieAcceptanceLabel'' => mi18n("I accept cookies from this site"),\n ''explicitCookieAcceptButtonText'' => mi18n("Continue"),\n ''impliedDisclosureText'' => '' ''.mi18n("More details can be found in our"),\n ''impliedSubmitText'' => mi18n("Do not show this message again")\n);\n?>\n', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-07-18 15:20:44', '2017-08-11 12:41:45');
-INSERT INTO !PREFIX!_mod VALUES('13', '1', 'CL Social Media Links', 'navigation', 'none', '', '', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\n\ndefined("CON_FRAMEWORK") || die(''Illegal call: Missing framework initialization - request aborted.'');\n\n$aCfgMod = array(\n ''debug'' => FALSE\n);\n\n$aSupportedSocialNets = array(\n ''xing'',\n ''twitter'',\n ''google-plus'',\n ''pinterest'',\n ''youtube'',\n ''flickr'',\n ''rss'',\n ''vimeo'',\n ''dribble'',\n ''linkedin''\n);\n\n$aLinks = array(\n ''twitter'' => array(\n ''href'' => ''https://twitter.com/conlite_cms'',\n ''label'' => mi18n("Meet us on Twitter")\n ),\n ''xing'' => array(\n ''href'' => ''https://www.xing.com/communities/groups/conlite-the-lightweight-and-userfriendly-cms-cec9-1045289'',\n ''label'' => mi18n("Link in Modul-Output")\n )\n);\n\n$aUserLinks = getEffectiveSettingsByType("social-media-links");\n$aUserLinksArray = array();\nif (count($aUserLinks) > 0) {\n foreach ($aUserLinks as $key => $value) {\n $sKey = strtolower(trim($key));\n if (in_array($sKey, $aSupportedSocialNets)) {\n $aValues = explode("::", $value);\n $sLabel = (isset($aValues[1]) && !empty($aValues[1])) ? $aValues[1] : "";\n $aUserLinksArray[$sKey] = array(\n ''href'' => $aValues[0],\n ''label'' => $sLabel\n );\n }\n }\n}\n\n$aLinks = array_merge($aLinks, $aUserLinksArray);\n\n$oTpl = new Template();\n\nforeach ($aLinks as $sName => $aEntry) {\n $oTpl->set(''d'', ''SM_CSS_WHAT'', $sName);\n $oTpl->set(''d'', ''SM_HREF'', $aEntry[''href'']);\n $oTpl->set(''d'', ''SM_LABEL'', $aEntry[''label'']);\n $oTpl->next();\n}\n\n$oTpl->generate("cl_social_media_links.html");\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-07-19 12:54:20', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('1', '1', 'CL Main Navi', 'Navigation', 'none', '', '0', '?>\r\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\r\n * @link http://conlite.org ConLite Portal\r\n * \r\n * \r\n * $Id$\r\n */\r\ndefined("CON_FRAMEWORK") || die(''Illegal call: Missing framework initialization - request aborted.'');\r\n$oTpl = new Template();\r\n$oTpl->reset();\r\ncInclude(''frontend'', ''includes/Util/Modules/Contenido_NavMain_Util.class.php'');\r\n\r\n$iStartIdcat = getEffectiveSetting(''navigation'', ''idcat-home'', 1);\r\n$iSelectedDepth = getEffectiveSetting(''navigation'', ''level-depth'', 3);\r\n$bWithFeLogin = boolval(getEffectiveSetting(''navigation'', ''with-fe-login'', FALSE));\r\n\r\nfunction clBuildNavArray(Contenido_FrontendNavigation &$oNav, $iStartIdcat) {\r\n $aNavArray = array();\r\n $aCategories = $oNav->getSubCategories($iStartIdcat, false, true, 1);\r\n $oCatLangCol = new cApiCategoryLanguageCollection();\r\n\r\n if (count($aCategories) > 0) {\r\n $i = 0;\r\n foreach ($aCategories as $iCategory) {\r\n $oNav->setRootCat($iCategory);\r\n $aNavArray[$i][''idcat''] = $iCategory;\r\n // get catname\r\n /* @var $oCatLang cApiCategoryLanguage */\r\n $oCatLangCol->setWhere(''idcat'', $iCategory);\r\n $oCatLangCol->setWhere(''idlang'', cRegistry::getLanguageId());\r\n $oCatLangCol->query();\r\n $oCatLang = $oCatLangCol->next();\r\n //print_r($oCatLang);\r\n if ($oCatLang->isLoaded()) {\r\n $aNavArray[$i][''name''] = $oCatLang->getField(''name'');\r\n $aNavArray[$i][''urlname''] = $oCatLang->getField(''urlname'');\r\n }\r\n\r\n $aNavArray[$i][''subnav''] = clBuildNavArray($oNav, $iCategory);\r\n $i++;\r\n }\r\n }\r\n\r\n unset($oCatLangCol);\r\n return $aNavArray;\r\n}\r\n\r\nfunction clBuildNavList($aNavArray, $aBreadcrumb, $iLevel = 0) {\r\n global $auth, $bWithFeLogin;\r\n $sNavList = '''';\r\n if (is_array($aNavArray) && !empty($aNavArray)) {\r\n if ($iLevel == 0) {\r\n $sNavList .= '''';\r\n } else {\r\n $sNavList .= '''';\r\n }\r\n foreach ($aNavArray as $aNavEntry) {\r\n if (in_array($aNavEntry[''idcat''], $aBreadcrumb)) {\r\n $sNavList .= '''';\r\n } else {\r\n $sNavList .= '' '';\r\n }\r\n $sNavList .= '''' . $aNavEntry[''name''] . '' '';\r\n if (!empty($aNavEntry[''subnav''])) {\r\n $sNavList .= clBuildNavList($aNavEntry[''subnav''], $aBreadcrumb, $iLevel + 1);\r\n }\r\n $sNavList .= '' '';\r\n }\r\n // add user login\r\n if ($iLevel == 0 && $bWithFeLogin) {\r\n $sLoginForm = "";\r\n $oTpl = new Template();\r\n if ($auth->auth["uid"] == "nobody") {\r\n $sTargetIdcat = getEffectiveSetting(''login'', ''idcat'', cRegistry::getCategoryId());\r\n $sTargetIdart = getEffectiveSetting(''login'', ''idart'', cRegistry::getArticleId());\r\n $sFormAction = ''front_content.php?idcat='' . $sTargetIdcat . ''&idart='' . $sTargetIdart;\r\n\r\n $oTpl->set(''s'', ''headline'', mi18n("Geschlossener Bereich Login"));\r\n $oTpl->set(''s'', ''form_action'', $sFormAction);\r\n $oTpl->set(''s'', ''label_name'', mi18n("user"));\r\n $oTpl->set(''s'', ''label_pass'', mi18n("pass"));\r\n $oTpl->set(''s'', ''label_login'', mi18n("send"));\r\n $sLoginForm .= $oTpl->generate(''cl_login_form.html'', TRUE);\r\n } else {\r\n \r\n }\r\n\r\n $sNavList .= '''' . $sLoginForm . '' '';\r\n }\r\n $sNavList .= '' '';\r\n }\r\n\r\n\r\n return $sNavList;\r\n}\r\n\r\nif ($iStartIdcat > 0) {\r\n $oFeNavBreadcrumb = new Contenido_FrontendNavigation_Breadcrumb(\r\n cRegistry::getDb()\r\n , cRegistry::getConfig()\r\n , cRegistry::getClientId()\r\n , cRegistry::getLanguageId()\r\n , cRegistry::getClientConfig()\r\n );\r\n\r\n $aBreadcrumb = $oFeNavBreadcrumb->getAsArray(cRegistry::getCategoryId(), $iStartIdcat);\r\n\r\n $oFeNav = new Contenido_FrontendNavigation(\r\n cRegistry::getDb(),\r\n cRegistry::getConfig(),\r\n cRegistry::getClientId(),\r\n cRegistry::getLanguageId(),\r\n cRegistry::getClientConfig()\r\n );\r\n $oFeNav->setAuth($auth);\r\n $oFeNav->setRootCat($iStartIdcat);\r\n\r\n $aNavArray = clBuildNavArray($oFeNav, $iStartIdcat);\r\n\r\n echo '''';\r\n echo clBuildNavList($aNavArray, $aBreadcrumb);\r\n} else {\r\n if(cRegistry::isBackendEditMode()) {\r\n echo ''Navigation not configured correctly.
'';\r\n }\r\n}\r\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2015-06-22 14:35:54', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('4', '1', 'CL Flex Slider', 'media', 'none', '', '0', ' ?> "CMS_VALUE[0]",\n \n );\n \n $aCfgClient = cRegistry::getClientConfig(cRegistry::getClientId());\n $path = realpath($aCfgClient[''upl''][''path'']);\n $aFolders = array();\n $aFolders[] = mi18n("-- Select Folder --");\n $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n foreach($objects as $name=>$object) {\n if(is_dir($name)) {\n if(in_array(basename($name), array(''.'',''..''))) {\n continue;\n }\n $folder = str_replace($path.DIRECTORY_SEPARATOR, "", $name);\n $aFolders[$folder] = $folder;\n }\n }\n asort($aFolders);\n //print_r($aFolders);\n \n $oFolderSelect = new cHTMLSelectElement("CMS_VAR[0]");\n $oFolderSelect->autoFill($aFolders);\n $oFolderSelect->setDefault($aModCfg[''folder'']);\n \n $oCfgTable = new UI_Config_Table();\n \n $oCfgTable->setCell(0, 0, mi18n("Select Image Folder"));\n $oCfgTable->setCell(0, 1, $oFolderSelect->render());\n \n $oCfgTable->render(true);\n ?> "CMS_VALUE[0]",\n ''show_caption'' => "CMS_VALUE[10]",\n ''img_width'' => "CMS_VALUE[20]",\n ''img_height'' => "CMS_VALUE[21]",\n ''thumb_width'' => "CMS_VALUE[30]",\n ''thumb_height'' => "CMS_VALUE[31]",\n);\n\n$aOptionsSet[''show_caption''] = ($aOptionsSet[''show_caption''] == ''true'')?TRUE:FALSE;\n\n$aDefaultArray = array( \n ''img_width'' => "500",\n ''img_height'' => "300",\n ''img_quality''=> 30,\n ''thumb_width'' => "50",\n ''thumb_height'' => "50",\n);\n\n$aModCfg = array_merge($aOptionsSet, $aDefaultArray);\n\nif (!empty($aModCfg[''folder''])) {\n $oUplColl = new cApiUploadCollection();\n $oUplColl->setWhere(''dirname'', $aModCfg[''folder''], ''like'');\n $oUplColl->link(''cApiUploadMetaCollection'');\n $oUplColl->query();\n\n $aItems = array();\n /* @var $oUpl cApiUpload */\n while ($oUpl = $oUplColl->next()) {\n $aItems[] = $oUpl->toArray();\n }\n\n $oTpl = new Template();\n\n if (count($aItems) > 0) {\n $aClientCfg = cRegistry::getClientConfig(cRegistry::getClientId());\n\n foreach ($aItems as $iKey => $aItem) {\n $sOrgImgPath = $aClientCfg[''upl''][''frontendpath''] . $aItem[''dirname''] . $aItem[''filename''];\n if (file_exists($sOrgImgPath)) {\n // generate thumb\n $sThumbPath = capiImgScale($sOrgImgPath, $aModCfg[''thumb_width''], $aModCfg[''thumb_height'']);\n // generate scaled image with heigh quality\n $sImgPath = capiImgScale($sOrgImgPath, $aModCfg[''img_width''], $aModCfg[''img_height''], NULL, NULL, 0, TRUE, $aModCfg[''img_quality'']);\n\n $oTpl->set(''d'', ''IMG_THUMB'', $sThumbPath);\n $oTpl->set(''d'', ''IMG'', $sImgPath);\n if($aOptionsSet[''show_caption'']) {\n $oTpl->set(''d'', ''IMG_CAPTION'', $aItem[''description'']);\n } else {\n $oTpl->set(''d'', ''IMG_CAPTION'', '''');\n }\n $oTpl->next();\n }\n }\n $oTpl->generate("cl_flex_slider.html");\n }\n/*\n echo '' '';\n print_r($aModCfg);\n print_r($aItems);\n print_r($aClientCfg);\n echo '' '';\n * \n */\n}\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 14:42:01', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('5', '1', 'CL Portal Buttons', 'navigation', 'none', '', '0', '?> array(\n ''href'' => ''http://forum.conlite.org'',\n ''label''=> mi18n("CL-User-Forum")\n ),\n ''faq'' => array(\n ''href'' => ''http://faq.conlite.org'',\n ''label''=> mi18n("CL-FAQ")\n ),\n ''bugtracker'' => array(\n ''href'' => ''http://dev.conlite.org/tickets'',\n ''label''=> mi18n("CL-Bugtracker")\n )\n);\n\n$oLink = new cHTMLLink();\n$oLink->setClass("buttonlink");\n\nforeach($aButtons as $aButton) {\n $oLink->setAttribute(''title'', mi18n("to")." ".$aButton[''label'']);\n $oLink->setLink($aButton[''href'']);\n $oLink->setContent($aButton[''label'']);\n echo $oLink->render();\n $oLink->advanceID();\n}\nunset($oLink);\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 14:55:40', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('6', '1', 'CL Headline', 'content', 'none', '', '0', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\nif (!isset($oTpl) || !is_object($oTpl)) {\n $oTpl = new Template();\n}\n\n$sText = "CMS_HTMLHEAD[1]";\n$sTemplate = "headline_h1.html";\n\n$oTpl->reset();\nif (cRegistry::isBackendEditMode()) {\n $oTpl->set(''s'', ''HEADLINE'', $sText);\n $oTpl->generate($sTemplate);\n} else {\n if(!empty($sText)) {\n $oTpl->set(''s'', ''HEADLINE'', strip_tags($sText));\n $oTpl->generate($sTemplate);\n }\n}\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 15:01:13', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('7', '1', 'CL Subheadline', 'content', 'none', '', '0', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\nif (!isset($oTpl) || !is_object($oTpl)) {\n $oTpl = new Template();\n}\n\n$sText = "CMS_HTMLHEAD[2]";\n$sTemplate = "subheadline_h2.html";\n\n$oTpl->reset();\nif (cRegistry::isBackendEditMode()) {\n $oTpl->set(''s'', ''SUBHEADLINE'', $sText);\n $oTpl->generate($sTemplate);\n} else {\n if(!empty($sText)) {\n $oTpl->set(''s'', ''SUBHEADLINE'', strip_tags($sText));\n $oTpl->generate($sTemplate);\n }\n}\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 15:01:51', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('11', '1', 'CL HTML Text', 'content', 'none', '', '0', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\nif (!isset($oTpl) || !is_object($oTpl)) {\n $oTpl = new Template();\n}\n\n$oTpl->reset();\n$oTpl->set(''s'', ''text'', "CMS_HTML[1]");\n$oTpl->generate(''text_html.html'');\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-05-23 15:29:56', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('12', '1', 'CL Cookie Directive', 'navigation', 'none', '', '0', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\n\ndefined("CON_FRAMEWORK") || die(''Illegal call: Missing framework initialization - request aborted.'');\n\n$aCfgMod = array(\n ''debug'' => FALSE\n);\n\n$aCookieOpt = array(\n ''explicitConsent'' => ''false'',\n ''position'' => ''top'',\n ''message'' => mi18n("This site uses cookies. Some of the cookies we use are essential for parts of the site to operate and have already been set."),\n ''message'' => mi18n("We have placed cookies on your computer to help make this website better."),\n// Messages\n ''multipleCookieScriptBeginningLabel'' => mi18n("We use"),\n ''and'' => '' ''.mi18n("and").'' '',\n ''multipleCookieScriptEndLabel'' => '' ''.mi18n("scripts, which all set cookies.").'' '',\n ''singleCookieScriptBeginningLabel'' => ''!!! ''.mi18n("We use a").'' '',\n ''singleCookieScriptEndLabel'' => '' ''.mi18n("script which sets cookies."),\n ''explicitCookieDeletionWarning'' => mi18n("You may delete and block all cookies from this site, but parts of the site will not work."),\n ''explicitFindOutMore'' => mi18n("To find out more about cookies on this website, see our"),\n ''privacyPolicyLinkText'' => '' ''.mi18n("privacy policy"),\n ''explicitCheckboxLabel'' => mi18n("You must tick the \\"I accept cookies from this site\\" box to accept"),\n ''explicitCookieAcceptanceLabel'' => mi18n("I accept cookies from this site"),\n ''explicitCookieAcceptButtonText'' => mi18n("Continue"),\n ''impliedDisclosureText'' => '' ''.mi18n("More details can be found in our"),\n ''impliedSubmitText'' => mi18n("Do not show this message again")\n);\n?>\n', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-07-18 15:20:44', '2017-08-11 12:41:45');
+INSERT INTO !PREFIX!_mod VALUES('13', '1', 'CL Social Media Links', 'navigation', 'none', '', '0', '?>\n * @license http://www.gnu.de/documents/gpl.de.html GPL v3\n * @link http://conlite.org ConLite Portal\n * \n * \n * $Id$\n */\n\ndefined("CON_FRAMEWORK") || die(''Illegal call: Missing framework initialization - request aborted.'');\n\n$aCfgMod = array(\n ''debug'' => FALSE\n);\n\n$aSupportedSocialNets = array(\n ''xing'',\n ''twitter'',\n ''google-plus'',\n ''pinterest'',\n ''youtube'',\n ''flickr'',\n ''rss'',\n ''vimeo'',\n ''dribble'',\n ''linkedin''\n);\n\n$aLinks = array(\n ''twitter'' => array(\n ''href'' => ''https://twitter.com/conlite_cms'',\n ''label'' => mi18n("Meet us on Twitter")\n ),\n ''xing'' => array(\n ''href'' => ''https://www.xing.com/communities/groups/conlite-the-lightweight-and-userfriendly-cms-cec9-1045289'',\n ''label'' => mi18n("Link in Modul-Output")\n )\n);\n\n$aUserLinks = getEffectiveSettingsByType("social-media-links");\n$aUserLinksArray = array();\nif (count($aUserLinks) > 0) {\n foreach ($aUserLinks as $key => $value) {\n $sKey = strtolower(trim($key));\n if (in_array($sKey, $aSupportedSocialNets)) {\n $aValues = explode("::", $value);\n $sLabel = (isset($aValues[1]) && !empty($aValues[1])) ? $aValues[1] : "";\n $aUserLinksArray[$sKey] = array(\n ''href'' => $aValues[0],\n ''label'' => $sLabel\n );\n }\n }\n}\n\n$aLinks = array_merge($aLinks, $aUserLinksArray);\n\n$oTpl = new Template();\n\nforeach ($aLinks as $sName => $aEntry) {\n $oTpl->set(''d'', ''SM_CSS_WHAT'', $sName);\n $oTpl->set(''d'', ''SM_HREF'', $aEntry[''href'']);\n $oTpl->set(''d'', ''SM_LABEL'', $aEntry[''label'']);\n $oTpl->next();\n}\n\n$oTpl->generate("cl_social_media_links.html");\n?>', '', '0', '', '', '48a365b4ce1e322a55ae9017f3daf0c0', '2016-07-19 12:54:20', '2017-08-11 12:41:45');
diff --git a/setup/data/sysadmin/sysadmin1.sql b/setup/data/sysadmin/sysadmin1.sql
index f35f443..c5bb50c 100644
--- a/setup/data/sysadmin/sysadmin1.sql
+++ b/setup/data/sysadmin/sysadmin1.sql
@@ -1 +1 @@
-INSERT INTO !PREFIX!_phplib_auth_user_md5 VALUES('48a365b4ce1e322a55ae9017f3daf0c0', 'sysadmin', '48a365b4ce1e322a55ae9017f3daf0c0', 'sysadmin', 'Systemadministrator', 'sysadmin@IhreSite.de', '', '', '', '', '', '1', '0000-00-00', '0000-00-00', '0000-00-00 00:00:00', '', '0');
\ No newline at end of file
+INSERT INTO !PREFIX!_phplib_auth_user_md5 VALUES('48a365b4ce1e322a55ae9017f3daf0c0', 'sysadmin', '48a365b4ce1e322a55ae9017f3daf0c0', 'sysadmin', 'Systemadministrator', 'sysadmin@IhreSite.de', '', '', '', '', '', '1', '1000-01-01', '1000-01-01', '1000-01-01 00:00:01', '', '0');
\ No newline at end of file
diff --git a/setup/data/tables.txt b/setup/data/tables.txt
index 1775052..cb2f1e1 100644
--- a/setup/data/tables.txt
+++ b/setup/data/tables.txt
@@ -39,16 +39,16 @@
"art_lang";"redirect";"int(6)";"NO";"";"0";"";""
"art_lang";"redirect_url";"varchar(255)";"NO";"";"";"";""
"art_lang";"artsort";"int(10)";"NO";"";"0";"";""
-"art_lang";"timemgmt";"tinyint(1)";"YES";"";"";"";""
+"art_lang";"timemgmt";"tinyint(1)";"NO";"";"0";"";""
"art_lang";"datestart";"datetime";"YES";"";"";"";""
"art_lang";"dateend";"datetime";"YES";"";"";"";""
"art_lang";"status";"int(10)";"NO";"";"0";"";""
-"art_lang";"free_use_01";"mediumint(7)";"YES";"";"";"";""
-"art_lang";"free_use_02";"mediumint(7)";"YES";"";"";"";""
-"art_lang";"free_use_03";"mediumint(7)";"YES";"";"";"";""
-"art_lang";"time_move_cat";"mediumint(7)";"YES";"";"";"";""
-"art_lang";"time_target_cat";"mediumint(7)";"YES";"";"";"";""
-"art_lang";"time_online_move";"mediumint(7)";"YES";"";"";"";""
+"art_lang";"free_use_01";"mediumint(7)";"NO";"";"0";"";""
+"art_lang";"free_use_02";"mediumint(7)";"NO";"";"0";"";""
+"art_lang";"free_use_03";"mediumint(7)";"NO";"";"0";"";""
+"art_lang";"time_move_cat";"mediumint(7)";"NO";"";"0";"";""
+"art_lang";"time_target_cat";"mediumint(7)";"NO";"";"0";"";""
+"art_lang";"time_online_move";"mediumint(7)";"NO";"";"0";"";""
"art_lang";"external_redirect";"char(1)";"NO";"";"";"";""
"art_lang";"locked";"int(1)";"NO";"";"0";"";""
"art_spec";"idartspec";"int(10)";"NO";"PRI";"0";"";"1"
@@ -72,8 +72,8 @@
"cat_art";"is_start";"tinyint(1)";"NO";"MUL";"0";"";""
"cat_art";"status";"int(10)";"NO";"";"0";"";""
"cat_art";"author";"varchar(32)";"NO";"";"";"";""
-"cat_art";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"cat_art";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"cat_art";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"cat_art";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"cat_art";"createcode";"tinyint(1)";"NO";"";"1";"";""
"cat_lang";"idcatlang";"int(10)";"NO";"PRI";"0";"";"1"
"cat_lang";"idcat";"int(10)";"NO";"MUL";"0";"";""
@@ -84,8 +84,8 @@
"cat_lang";"public";"tinyint(1)";"NO";"";"0";"";""
"cat_lang";"status";"int(10)";"NO";"";"0";"";""
"cat_lang";"author";"varchar(32)";"NO";"";"";"";""
-"cat_lang";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"cat_lang";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"cat_lang";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"cat_lang";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"cat_lang";"startidartlang";"int(10)";"NO";"";"0";"";""
"cat_lang";"urlname";"varchar(64)";"NO";"";"";"";""
"cat_lang";"urlpath";"varchar(255)";"NO";"";"";"";""
@@ -98,8 +98,8 @@
"clients";"idclient";"int(10)";"NO";"PRI";"0";"";"1"
"clients";"name";"varchar(255)";"NO";"";"";"";""
"clients";"author";"varchar(32)";"NO";"";"";"";""
-"clients";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"clients";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"clients";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"clients";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"clients";"path";"varchar(255)";"NO";"";"";"";""
"clients";"frontendpath";"varchar(255)";"NO";"";"";"";""
"clients";"htmlpath";"varchar(255)";"NO";"";"";"";""
@@ -120,9 +120,9 @@
"communications";"message";"text";"NO";"";"";"";""
"communications";"recipient";"varchar(32)";"NO";"";"";"";""
"communications";"author";"varchar(32)";"NO";"";"";"";""
-"communications";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"communications";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"communications";"modifiedby";"varchar(32)";"NO";"";"";"";""
-"communications";"modified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"communications";"modified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"config";"idconfig";"int(10)";"NO";"PRI";"0";"";"1"
"config";"abs_path";"varchar(255)";"YES";"";"";"";""
"config";"url_path";"varchar(255)";"YES";"";"";"";""
@@ -151,8 +151,8 @@
"content";"value";"longtext";"NO";"";"";"";""
"content";"version";"varchar(32)";"NO";"";"";"";""
"content";"author";"varchar(32)";"NO";"";"";"";""
-"content";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"content";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"content";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"content";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"data";"iddata";"int(10)";"NO";"PRI";"0";"";"1"
"data";"idclient";"int(10)";"YES";"";"";"";""
"data";"abs_path";"varchar(255)";"YES";"";"";"";""
@@ -167,16 +167,16 @@
"dbfs";"mimetype";"varchar(64)";"NO";"";"";"";""
"dbfs";"size";"int(10)";"NO";"";"0";"";""
"dbfs";"content";"longblob";"NO";"";"";"";""
-"dbfs";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"dbfs";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"dbfs";"author";"varchar(32)";"NO";"";"";"";""
-"dbfs";"modified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"dbfs";"modified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"dbfs";"modifiedby";"varchar(32)";"NO";"";"";"";""
"file_information";"idsfi";"int(11)";"NO";"PRI";"";"";"1"
"file_information";"idclient";"int(11)";"NO";"MUL";"";"";""
"file_information";"type";"varchar(32)";"NO";"MUL";"";"";""
"file_information";"filename";"varchar(255)";"NO";"MUL";"";"";""
-"file_information";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"file_information";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"file_information";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"file_information";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"file_information";"author";"varchar(32)";"NO";"";"";"";""
"file_information";"modifiedby";"varchar(32)";"NO";"";"";"";""
"file_information";"description";"text";"NO";"";"";"";""
@@ -207,11 +207,11 @@
"frontendusers";"password";"varchar(32)";"NO";"";"";"";""
"frontendusers";"active";"tinyint(1)";"NO";"";"0";"";""
"frontendusers";"author";"varchar(32)";"NO";"";"";"";""
-"frontendusers";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"frontendusers";"modified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"frontendusers";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"frontendusers";"modified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"frontendusers";"modifiedby";"varchar(32)";"NO";"";"";"";""
-"frontendusers";"valid_from";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"frontendusers";"valid_to";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"frontendusers";"valid_from";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"frontendusers";"valid_to";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"group_prop";"idgroupprop";"int(10)";"NO";"PRI";"0";"";"1"
"group_prop";"group_id";"varchar(32)";"YES";"";"";"";""
"group_prop";"type";"varchar(96)";"YES";"";"";"";""
@@ -240,8 +240,8 @@
"lang";"name";"varchar(255)";"NO";"";"";"";""
"lang";"active";"tinyint(1)";"NO";"";"0";"";""
"lang";"author";"varchar(32)";"NO";"";"";"";""
-"lang";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"lang";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"lang";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"lang";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"lang";"encoding";"varchar(32)";"NO";"";"";"";""
"lang";"direction";"char(3)";"NO";"";"ltr";"";""
"lay";"idlay";"int(10)";"NO";"PRI";"0";"";"1"
@@ -251,8 +251,8 @@
"lay";"deletable";"tinyint(1)";"YES";"";"";"";""
"lay";"code";"text";"NO";"";"";"";""
"lay";"author";"varchar(32)";"NO";"";"";"";""
-"lay";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"lay";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"lay";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"lay";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"link";"idlink";"int(6)";"NO";"PRI";"0";"";"1"
"link";"idartlang";"int(10)";"YES";"";"";"";""
"link";"idcat";"int(10)";"YES";"";"";"";""
@@ -275,7 +275,7 @@
"mod";"type";"varchar(32)";"NO";"";"";"";""
"mod";"error";"varchar(32)";"NO";"";"none";"";""
"mod";"description";"text";"YES";"";"";"";""
-"mod";"deletable";"tinyint(1)";"YES";"";"";"";""
+"mod";"deletable";"tinyint(1)";"NO";"";"0";"";""
"mod";"input";"longtext";"NO";"";"";"";""
"mod";"output";"longtext";"NO";"";"";"";""
"mod";"template";"text";"NO";"";"";"";""
@@ -283,8 +283,8 @@
"mod";"package_guid";"varchar(64)";"YES";"";"";"";""
"mod";"package_data";"text";"YES";"";"";"";""
"mod";"author";"varchar(32)";"NO";"";"";"";""
-"mod";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"mod";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"mod";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"mod";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"mod_translations";"idmodtranslation";"int(10)";"NO";"PRI";"0";"";"1"
"mod_translations";"idmod";"int(10)";"NO";"";"0";"";""
"mod_translations";"idlang";"int(10)";"NO";"";"0";"";""
@@ -319,8 +319,8 @@
"news";"dispatch_count";"int(5)";"NO";"";"50";"";""
"news";"dispatch_delay";"int(5)";"NO";"";"5";"";""
"news";"author";"varchar(32)";"NO";"";"";"";""
-"news";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"news";"modified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"news";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"news";"modified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"news";"modifiedby";"varchar(32)";"NO";"";"";"";""
"news_groupmembers";"idnewsgroupmember";"int(10)";"NO";"PRI";"0";"";"1"
"news_groupmembers";"idnewsgroup";"int(10)";"NO";"";"0";"";""
@@ -336,14 +336,14 @@
"news_jobs";"idnews";"int(10)";"NO";"";"0";"";""
"news_jobs";"status";"tinyint(1)";"NO";"";"0";"";""
"news_jobs";"use_cronjob";"tinyint(1)";"NO";"";"0";"";""
-"news_jobs";"started";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"news_jobs";"finished";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"news_jobs";"started";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"news_jobs";"finished";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"news_jobs";"name";"varchar(255)";"NO";"";"";"";""
"news_jobs";"type";"varchar(10)";"NO";"";"text";"";""
"news_jobs";"encoding";"varchar(32)";"NO";"";"iso-8859-1";"";""
"news_jobs";"newsfrom";"varchar(255)";"NO";"";"";"";""
"news_jobs";"newsfromname";"varchar(255)";"NO";"";"";"";""
-"news_jobs";"newsdate";"datetime";"YES";"";"0000-00-00 00:00:00";"";""
+"news_jobs";"newsdate";"datetime";"YES";"";"1970-01-01 00:00:01";"";""
"news_jobs";"subject";"text";"YES";"";"";"";""
"news_jobs";"idart";"int(10)";"NO";"";"0";"";""
"news_jobs";"message_text";"longtext";"NO";"";"";"";""
@@ -356,8 +356,8 @@
"news_jobs";"authorname";"varchar(32)";"NO";"";"";"";""
"news_jobs";"rcpcount";"int(10)";"NO";"";"0";"";""
"news_jobs";"sendcount";"int(10)";"NO";"";"0";"";""
-"news_jobs";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"news_jobs";"modified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"news_jobs";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"news_jobs";"modified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"news_jobs";"modifiedby";"varchar(32)";"NO";"";"";"";""
"news_log";"idnewslog";"int(10)";"NO";"PRI";"0";"";"1"
"news_log";"idnewsjob";"int(10)";"NO";"";"0";"";""
@@ -367,25 +367,25 @@
"news_log";"rcphash";"varchar(32)";"NO";"";"";"";""
"news_log";"rcpnewstype";"tinyint(1)";"NO";"";"0";"";""
"news_log";"status";"varchar(255)";"NO";"";"";"";""
-"news_log";"sent";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"news_log";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"news_log";"sent";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"news_log";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"news_rcp";"idnewsrcp";"int(10)";"NO";"PRI";"0";"";"1"
"news_rcp";"idclient";"int(10)";"NO";"";"0";"";""
"news_rcp";"idlang";"int(10)";"NO";"";"0";"";""
"news_rcp";"email";"varchar(255)";"YES";"";"";"";""
"news_rcp";"confirmed";"tinyint(1)";"NO";"";"0";"";""
-"news_rcp";"confirmeddate";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"news_rcp";"confirmeddate";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"news_rcp";"lastaction";"varchar(32)";"YES";"";"";"";""
"news_rcp";"name";"varchar(255)";"YES";"";"";"";""
"news_rcp";"hash";"varchar(32)";"NO";"";"";"";""
"news_rcp";"deactivated";"tinyint(1)";"NO";"";"0";"";""
"news_rcp";"news_type";"tinyint(1)";"NO";"";"0";"";""
"news_rcp";"author";"varchar(32)";"NO";"";"";"";""
-"news_rcp";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"news_rcp";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"news_rcp";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"news_rcp";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"news_rcp";"modifiedby";"varchar(32)";"NO";"";"";"";""
"online_user";"user_id";"varchar(32)";"NO";"PRI";"";"";"1"
-"online_user";"lastaccessed";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"online_user";"lastaccessed";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"phplib_active_sessions";"sid";"varchar(32)";"NO";"PRI";"";"";"1"
"phplib_active_sessions";"name";"varchar(32)";"NO";"";"";"";""
"phplib_active_sessions";"val";"longblob";"YES";"";"";"";""
@@ -402,9 +402,9 @@
"phplib_auth_user_md5";"address_city";"varchar(255)";"YES";"";"";"";""
"phplib_auth_user_md5";"address_country";"varchar(255)";"YES";"";"";"";""
"phplib_auth_user_md5";"wysi";"tinyint(2)";"YES";"";"";"";""
-"phplib_auth_user_md5";"valid_from";"date";"NO";"";"0000-00-00";"";""
-"phplib_auth_user_md5";"valid_to";"date";"NO";"";"0000-00-00";"";""
-"phplib_auth_user_md5";"last_pw_request";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"phplib_auth_user_md5";"valid_from";"date";"NO";"";"1970-01-01";"";""
+"phplib_auth_user_md5";"valid_to";"date";"NO";"";"1970-01-01";"";""
+"phplib_auth_user_md5";"last_pw_request";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"phplib_auth_user_md5";"tmp_pw_request";"varchar(32)";"YES";"";"";"";""
"phplib_auth_user_md5";"using_pw_request";"tinyint(1)";"NO";"";"0";"";""
"plugins";"idplugin";"int(10)";"NO";"PRI";"0";"";"1"
@@ -419,7 +419,7 @@
"plugins";"folder";"varchar(255)";"NO";"";"";"";""
"plugins";"uuid";"varchar(255)";"NO";"";"";"";""
"plugins";"executionorder";"int(11)";"NO";"";"0";"";""
-"plugins";"installed";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"plugins";"installed";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"plugins";"active";"tinyint(1)";"YES";"";"";"";""
"plugins";"path";"varchar(255)";"NO";"";"";"";""
"plugins_rel";"idpluginrelation";"int(11)";"NO";"PRI";"";"auto_increment";"1"
@@ -434,8 +434,8 @@
"properties";"name";"varchar(96)";"NO";"";"";"";""
"properties";"value";"text";"NO";"";"";"";""
"properties";"author";"varchar(32)";"NO";"";"";"";""
-"properties";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"properties";"modified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"properties";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"properties";"modified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"properties";"modifiedby";"varchar(32)";"NO";"";"";"";""
"rights";"idright";"int(10)";"NO";"PRI";"0";"";"1"
"rights";"user_id";"varchar(32)";"NO";"MUL";"";"";""
@@ -463,8 +463,8 @@
"status";"idstatus";"int(10)";"NO";"PRI";"0";"";"1"
"status";"description";"varchar(255)";"NO";"";"";"";""
"status";"author";"varchar(32)";"NO";"";"";"";""
-"status";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"status";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"status";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"status";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"system_prop";"idsystemprop";"int(10)";"NO";"PRI";"0";"";"1"
"system_prop";"type";"varchar(96)";"YES";"MUL";"";"";""
"system_prop";"name";"varchar(96)";"YES";"";"";"";""
@@ -475,26 +475,26 @@
"template";"idtplcfg";"int(10)";"YES";"MUL";"";"";""
"template";"name";"varchar(255)";"YES";"";"";"";""
"template";"description";"varchar(255)";"YES";"";"";"";""
-"template";"deletable";"tinyint(1)";"YES";"";"";"";""
-"template";"status";"int(10)";"YES";"";"";"";""
+"template";"deletable";"tinyint(1)";"NO";"";"0";"";""
+"template";"status";"int(10)";"NO";"";"0";"";""
"template";"defaulttemplate";"tinyint(1)";"NO";"";"0";"";""
"template";"author";"varchar(32)";"YES";"";"";"";""
-"template";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"template";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"template";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"template";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"template_conf";"idtplcfg";"int(10)";"NO";"PRI";"0";"";"1"
-"template_conf";"idtpl";"int(10)";"YES";"";"";"";""
-"template_conf";"status";"int(10)";"YES";"";"";"";""
+"template_conf";"idtpl";"int(10)";"NO";"";"0";"";""
+"template_conf";"status";"int(10)";"NO";"";"0";"";""
"template_conf";"author";"varchar(255)";"YES";"";"";"";""
"template_conf";"created";"varchar(14)";"YES";"";"";"";""
-"template_conf";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"template_conf";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"type";"idtype";"int(6)";"NO";"PRI";"0";"";"1"
"type";"type";"varchar(255)";"NO";"";"";"";""
"type";"code";"text";"NO";"";"";"";""
"type";"description";"varchar(255)";"NO";"";"";"";""
"type";"status";"int(11)";"NO";"";"0";"";""
"type";"author";"varchar(32)";"NO";"";"";"";""
-"type";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"type";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"type";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"type";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"upl";"idupl";"int(10)";"NO";"PRI";"0";"";"1"
"upl";"idclient";"int(10)";"NO";"MUL";"0";"";""
"upl";"filename";"varchar(255)";"NO";"";"";"";""
@@ -504,8 +504,8 @@
"upl";"description";"text";"NO";"";"";"";""
"upl";"status";"int(11)";"NO";"";"0";"";""
"upl";"author";"varchar(32)";"NO";"";"";"";""
-"upl";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
-"upl";"lastmodified";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"upl";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
+"upl";"lastmodified";"datetime";"NO";"";"1970-01-01 00:00:01";"";""
"upl";"modifiedby";"varchar(32)";"NO";"";"";"";""
"upl_meta";"id_uplmeta";"int(10)";"NO";"PRI";"";"";"1"
"upl_meta";"idupl";"int(10)";"NO";"";"";"";""
diff --git a/setup/data/tables_pi.txt b/setup/data/tables_pi.txt
index ae41a00..c723fe2 100644
--- a/setup/data/tables_pi.txt
+++ b/setup/data/tables_pi.txt
@@ -41,4 +41,4 @@
"piwf_workflow";"idauthor";"varchar(32)";"NO";"";"";"";""
"piwf_workflow";"name";"varchar(255)";"NO";"";"";"";""
"piwf_workflow";"description";"text";"NO";"";"";"";""
-"piwf_workflow";"created";"datetime";"NO";"";"0000-00-00 00:00:00";"";""
+"piwf_workflow";"created";"datetime";"NO";"";"1970-01-01 00:00:01";"";""