diff --git a/cms/templates/cl_uuid_form.tpl b/cms/templates/cl_uuid_form.tpl new file mode 100644 index 0000000..6e2d9d0 --- /dev/null +++ b/cms/templates/cl_uuid_form.tpl @@ -0,0 +1,14 @@ +
+
+ {$legend} +

{$description}

+ + + + + + {if $uuid_generated} +

Generated UUID is: {$uuid_generated}

+ {/if} +
+
\ No newline at end of file diff --git a/conlite/includes/functions.general.php b/conlite/includes/functions.general.php index de82584..06fd505 100644 --- a/conlite/includes/functions.general.php +++ b/conlite/includes/functions.general.php @@ -737,6 +737,7 @@ function rereadClients() { } $sql = "SELECT + name, idclient, frontendpath, htmlpath, @@ -752,14 +753,14 @@ function rereadClients() { } while ($db->next_record()) { $cfgClient["set"] = "set"; - $cfgClient[$db->f("idclient")]["path"]["frontend"] = $db->f("frontendpath"); - $cfgClient[$db->f("idclient")]["path"]["htmlpath"] = $db->f("htmlpath"); - $errsite_idcat[$db->f("idclient")] = $db->f("errsite_cat"); - $errsite_idart[$db->f("idclient")] = $db->f("errsite_art"); + $cfgClient[$db->f("idclient")]["name"] = $db->f("name"); + $cfgClient[$db->f("idclient")]["errsite"]["idcat"] = $db->f("errsite_cat"); + $cfgClient[$db->f("idclient")]["errsite"]["idart"] = $db->f("errsite_art"); $cfgClient[$db->f("idclient")]["images"] = $db->f("htmlpath") . "images/"; $cfgClient[$db->f("idclient")]["upload"] = "upload/"; - + $cfgClient[$db->f("idclient")]["path"]["frontend"] = $db->f("frontendpath"); + $cfgClient[$db->f("idclient")]["path"]["htmlpath"] = $db->f("htmlpath"); $cfgClient[$db->f("idclient")]["htmlpath"]["frontend"] = $cfgClient[$db->f("idclient")]["path"]["htmlpath"]; $cfgClient[$db->f("idclient")]["upl"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "upload/"; $cfgClient[$db->f("idclient")]["upl"]["htmlpath"] = $cfgClient[$db->f("idclient")]["htmlpath"]["frontend"] . "upload/"; @@ -767,6 +768,30 @@ function rereadClients() { $cfgClient[$db->f("idclient")]["css"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "css/"; $cfgClient[$db->f("idclient")]["js"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "js/"; $cfgClient[$db->f("idclient")]["tpl"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "templates/"; + // added new path variables since v2.0.2 + $cfgClient[$db->f("idclient")]["cache"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "cache/"; + $cfgClient[$db->f("idclient")]["cache"]["frontendpath"] = "cache/"; + $cfgClient[$db->f("idclient")]["code"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "cache/code/"; + $cfgClient[$db->f("idclient")]["code"]["frontendpath"] = "cache/code/"; + + $cfgClient[$db->f("idclient")]["xml"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "xml/"; + $cfgClient[$db->f("idclient")]["xml"]["frontendpath"] = "xml/"; + $cfgClient[$db->f("idclient")]["template"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "templates/"; + $cfgClient[$db->f("idclient")]["template"]["frontendpath"] = "templates/"; + $cfgClient[$db->f("idclient")]["data"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "data/"; + $cfgClient[$db->f("idclient")]["module"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "data/modules/"; + $cfgClient[$db->f("idclient")]["module"]["frontendpath"] = "data/modules/"; + $cfgClient[$db->f("idclient")]["config"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "data/config/production/"; + $cfgClient[$db->f("idclient")]["config"]["frontendpath"] = "data/config/"; + $cfgClient[$db->f("idclient")]["layout"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "data/layouts/"; + $cfgClient[$db->f("idclient")]["layout"]["frontendpath"] = "data/layouts/"; + $cfgClient[$db->f("idclient")]["log"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "data/logs/"; + $cfgClient[$db->f("idclient")]["log"]["frontendpath"] = "data/logs/"; + $cfgClient[$db->f("idclient")]["version"]["path"] = $cfgClient[$db->f("idclient")]["path"]["frontend"] . "data/version/"; + $cfgClient[$db->f("idclient")]["version"]["frontendpath"] = "data/version/"; + + $errsite_idcat[$db->f("idclient")] = $db->f("errsite_cat"); + $errsite_idart[$db->f("idclient")] = $db->f("errsite_art"); } } @@ -1965,7 +1990,7 @@ function checkMySQLConnectivity() { $res = NULL; } } else { - if(function_exists("mysql_connect")) { + if (function_exists("mysql_connect")) { $res = mysql_connect($contenido_host, $contenido_user, $contenido_password); } else { $res = NULL; diff --git a/conlite/includes/include.default_subnav.php b/conlite/includes/include.default_subnav.php index 3e1cf24..4ec8342 100644 --- a/conlite/includes/include.default_subnav.php +++ b/conlite/includes/include.default_subnav.php @@ -1,4 +1,5 @@ $sTempValue ) - { - if( in_array($sTempKey, $aBasicParams) ) - { - /* Basic parameters attached */ - $iCountBasicVal++; - } - else if( ( substr($sTempKey,0,2)=='id' || substr($sTempKey, -2, 2)=='id' ) - && ( (int)$sTempValue==$sTempValue // check integer - || preg_match("/^[0-9a-f]{32}$/", $sTempValue) ) // check md5 - ) - { - /* complement the selected data */ - $sUrlParams.= '&'.$sTempKey.'='.$sTempValue; - } - } - +$sUrlParams = ''; # URL-Parameter as string "&..." + "&..." +$iCountBasicVal = 0; # Count of basic Parameter in URL + +foreach ($_GET as $sTempKey => $sTempValue) { + if (in_array($sTempKey, $aBasicParams)) { + /* Basic parameters attached */ + $iCountBasicVal++; + } else if (( substr($sTempKey, 0, 2) == 'id' || substr($sTempKey, -2, 2) == 'id' ) + && ( (int) $sTempValue == $sTempValue // check integer + || preg_match("/^[0-9a-f]{32}$/", $sTempValue) ) // check md5 + ) { + /* complement the selected data */ + $sUrlParams .= '&' . $sTempKey . '=' . $sTempValue; + } +} + /* * is loading from main.php * dann ist die Anzahl aller g�ltigen Variablen mit den in GET identisch */ - if( $iCountBasicVal == count($_GET) ) - { - $bVirgin = true; - } +if ($iCountBasicVal == count($_GET)) { + $bVirgin = true; +} /* * Area-Url-Params * * for special params * - switch( $area ) { - case 'style': case 'js': case 'htmltpl': - if(array_key_exists('file', $_GET)) { - $sUrlParams.= '&file='.$_GET['file']; - } - break; - default: echo ""; - } -*/ + switch( $area ) { + case 'style': case 'js': case 'htmltpl': + if(array_key_exists('file', $_GET)) { + $sUrlParams.= '&file='.$_GET['file']; + } + break; + default: echo ""; + } + */ /* Debug */ - $sDebugMsg.= 'Url-Params: '.$sUrlParams."\n"; - +$sDebugMsg .= 'Url-Params: ' . $sUrlParams . "\n"; + /* * Select NavSubItems from DB */ - $nav = new Contenido_Navigation; - - $sql = "SELECT +$nav = new Contenido_Navigation; + +$sql = "SELECT navsub.location AS location, area.name AS name, area.menuless AS menuless FROM - ".$cfg["tab"]["area"]." AS area, - ".$cfg["tab"]["nav_sub"]." AS navsub + " . $cfg["tab"]["area"] . " AS area, + " . $cfg["tab"]["nav_sub"] . " AS navsub WHERE area.idarea = navsub.idarea AND @@ -130,78 +125,75 @@ $area = Contenido_Security::escapeDB($area, $db); AND area.online = 1 AND ( - area.parent_id = '".$area."' + area.parent_id = '" . $area . "' OR - area.name = '".$area."' + area.name = '" . $area . "' ) ORDER BY area.parent_id ASC, navsub.idnavs ASC"; /* Debug */ - $sDebugMsg.= ''."\n"; - - - $db->query($sql); - - while($db->next_record()) { - /* Name */ - $sArea = $db->f("name"); - - /* Set translation path */ - $sCaption = $nav->getName( $db->f("location") ); - - /* for Main-Area*/ - if( $sArea == $area ) { - /* Menueless */ - $bMenuless = $db->f("menuless") ? true : false; - - if( $bVirgin && !$bMenuless && $db->f("name") == $area ) - { - // ist loading fron Main, Main-Area and Menuless -> stop this "while" - break; - } - } - - /* Link */ - $sLink = $sess->url("main.php?area=".$sArea."&frame=4".(isset($appendparameters)?'&appendparameters='.$appendparameters:'')."&contenido=".$sess->id.$sUrlParams); - - /* Class */ - if($sArea == $area) - $sClass = ' current'; - else - $sClass = ''; - - /* fill template */ - $tpl->set("d", "ID", 'c_'.$tpl->dyn_cnt ); - $tpl->set("d", "CLASS", 'item '.$sArea ); - $tpl->set("d", "CAPTION", ''.$sCaption.''); - $tpl->next(); - } +$sDebugMsg .= '' . "\n"; - if( !$bVirgin || (isset($bMenuless) && $bMenuless)) - { - $tpl->set('s', 'CLASS', (isset($bMenuless) && $bMenuless)?'menuless' : ''); - $tpl->set('s', 'SESSID', $sess->id); - - $sTpl = $tpl->generate( $cfg["path"]["templates"] . $cfg['templates']['default_subnav'], true ); - - if($bDebug === true) { - - $aExectime["fullend"] = getmicrotime(); - $sExectime = ($aExectime["fullend"] - $aExectime["fullstart"]); - $sDebugMsg.= 'sExectime: '.substr($sExectime,0,7)." sec"."\n"; - - $sTpl = str_replace( '', '
'.nl2br( $sDebugMsg ).'
'.'', $sTpl ); - } - - echo $sTpl; - } else { - /* - * Is loading from main.php - */ - $tpl->reset(); - $tpl->generate( $cfg["path"]["templates"] . $cfg['templates']['right_top_blank'] ); - } +$db->query($sql); + +while ($db->next_record()) { + /* Name */ + $sArea = $db->f("name"); + + /* Set translation path */ + $sCaption = $nav->getName($db->f("location")); + + /* for Main-Area */ + if ($sArea == $area) { + /* Menueless */ + $bMenuless = $db->f("menuless") ? true : false; + + if ($bVirgin && !$bMenuless && $db->f("name") == $area) { + // ist loading fron Main, Main-Area and Menuless -> stop this "while" + break; + } + } + + /* Link */ + $sLink = $sess->url("main.php?area=" . $sArea . "&frame=4" . (isset($appendparameters) ? '&appendparameters=' . $appendparameters : '') . "&contenido=" . $sess->id . $sUrlParams); + + /* Class */ + if ($sArea == $area) + $sClass = ' current'; + else + $sClass = ''; + + /* fill template */ + $tpl->set("d", "ID", 'c_' . $tpl->dyn_cnt); + $tpl->set("d", "CLASS", 'item ' . $sArea); + $tpl->set("d", "CAPTION", '' . $sCaption . ''); + $tpl->next(); +} + +if (!$bVirgin || (isset($bMenuless) && $bMenuless)) { + $tpl->set('s', 'CLASS', (isset($bMenuless) && $bMenuless) ? 'menuless' : ''); + $tpl->set('s', 'SESSID', $sess->id); + + $sTpl = $tpl->generate($cfg["path"]["templates"] . $cfg['templates']['default_subnav'], true); + + if ($bDebug === true) { + + $aExectime["fullend"] = getmicrotime(); + $sExectime = ($aExectime["fullend"] - $aExectime["fullstart"]); + $sDebugMsg .= 'sExectime: ' . substr($sExectime, 0, 7) . " sec" . "\n"; + + $sTpl = str_replace('', '
' . nl2br($sDebugMsg) . '
' . '', $sTpl); + } + + echo $sTpl; +} else { + /* + * Is loading from main.php + */ + $tpl->reset(); + $tpl->generate($cfg["path"]["templates"] . $cfg['templates']['right_top_blank']); +} ?> diff --git a/conlite/includes/startup.php b/conlite/includes/startup.php index bec43d0..8d97cb6 100644 --- a/conlite/includes/startup.php +++ b/conlite/includes/startup.php @@ -71,7 +71,7 @@ if (!defined('CL_ENVIRONMENT')) { */ if (!defined('CL_VERSION')) { - define('CL_VERSION', '2.0.1'); + define('CL_VERSION', '2.0.2'); } diff --git a/conlite/plugins/smarty/cl_plugin.xml b/conlite/plugins/smarty/cl_plugin.xml index dcfee41..a7809ef 100644 --- a/conlite/plugins/smarty/cl_plugin.xml +++ b/conlite/plugins/smarty/cl_plugin.xml @@ -12,7 +12,7 @@ 1.0.2 GNU Lesser General Public License - +