From ad3edca025c9e1cbc5b75449d44ab4f45d95a344 Mon Sep 17 00:00:00 2001 From: "o.pinke" Date: Mon, 23 May 2022 19:07:57 +0200 Subject: [PATCH] fixed #29 --- .../external/frontend/data/config/.gitignore | 2 + .../frontend/data/config/production/.keep | 1 + .../data/config/production/config.php | 52 ++ conlite/external/frontend/environment.php | 19 + conlite/external/frontend/favicon.ico | Bin 0 -> 29038 bytes .../Modules/Contenido_NavMain_Util.class.php | 85 +++ .../Modules/Contenido_Sitemap_Util.class.php | 66 +++ .../frontend/includes/functions.include.php | 40 ++ .../includes/functions.navigation.php | 521 ++++++++++++++++++ .../external/frontend/includes/rss.inc.php | 59 ++ .../external/frontend/includes/rss_php.php | 160 ++++++ conlite/external/frontend/logs/deprecated.txt | 2 + 12 files changed, 1007 insertions(+) create mode 100644 conlite/external/frontend/data/config/.gitignore create mode 100644 conlite/external/frontend/data/config/production/.keep create mode 100644 conlite/external/frontend/data/config/production/config.php create mode 100644 conlite/external/frontend/environment.php create mode 100644 conlite/external/frontend/favicon.ico create mode 100644 conlite/external/frontend/includes/Util/Modules/Contenido_NavMain_Util.class.php create mode 100644 conlite/external/frontend/includes/Util/Modules/Contenido_Sitemap_Util.class.php create mode 100644 conlite/external/frontend/includes/functions.include.php create mode 100644 conlite/external/frontend/includes/functions.navigation.php create mode 100644 conlite/external/frontend/includes/rss.inc.php create mode 100644 conlite/external/frontend/includes/rss_php.php create mode 100644 conlite/external/frontend/logs/deprecated.txt diff --git a/conlite/external/frontend/data/config/.gitignore b/conlite/external/frontend/data/config/.gitignore new file mode 100644 index 0000000..5493b99 --- /dev/null +++ b/conlite/external/frontend/data/config/.gitignore @@ -0,0 +1,2 @@ +/local +/localhost diff --git a/conlite/external/frontend/data/config/production/.keep b/conlite/external/frontend/data/config/production/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/conlite/external/frontend/data/config/production/.keep @@ -0,0 +1 @@ + diff --git a/conlite/external/frontend/data/config/production/config.php b/conlite/external/frontend/data/config/production/config.php new file mode 100644 index 0000000..f987795 --- /dev/null +++ b/conlite/external/frontend/data/config/production/config.php @@ -0,0 +1,52 @@ + + * @license http://www.contenido.org/license/LIZENZ.txt + * @link http://www.4fb.de + * @link http://www.contenido.org + * + * + * + * {@internal + * created unknown + * modified 2008-07-03, bilal arslan, added security fix + * + * $Id$: + * }} + * + */ + +if(!defined('CON_FRAMEWORK')) { + die('Illegal call'); +} + + +// Relative path to contenido directory, for all inclusions, in most cases: "../contenido/" +$contenido_path = "../conlite/"; + +// If language isn't specified, set this client and language (ID) +$load_lang = "1"; +$load_client = "1"; + +/* Various debugging options */ +$frontend_debug["container_display"] = false; +$frontend_debug["module_display"] = false; +$frontend_debug["module_timing"] = false; +$frontend_debug["module_timing_summary"]= false; + +/* Set to 1 to brute-force module regeneration */ +$force = 0; +?> diff --git a/conlite/external/frontend/environment.php b/conlite/external/frontend/environment.php new file mode 100644 index 0000000..180842c --- /dev/null +++ b/conlite/external/frontend/environment.php @@ -0,0 +1,19 @@ +D8og^o^?%pY{;wD`d67&ORQ|i`h4$+X|q2RX=p~& znBX$Ut#8Tpm1^P&?$^#Z{Or9b-VUlZkrGqOCS2Y>dAKChEptJ4UY)X1sDf1f3keh^ z%5m>=D$G+5qYNkKJ$*M)Hw}@JGKVsDH6u1}_0SaO4$viNS2Pk)yLg|!!~e}%)T=aX zjZ%;hgJs^1tjjVyB_WF#Uf3I!y|@nyA}SK&;Gn@r*>YgaQu#Vjjx=Ji`>~?AigwTy zk!E98mPCakZ}OMSaPDq~vowC-#8HAgOA# zIL}j!Ez)GTc0IRii$s!2)Gp)cU*L1Mcwf=RDH;TnwT7>F%cMHLpS`HpLC;}@z7vZ4 zCgcCv-J4Vxs9v;E^fN*aqft}uMb&(;_sJ(o^k2+czRNq6YrrBUv0g-jAaZ!^=u_eD z=i`E}WygPi=HxF|EAU?wqCKKPKr|N``Jl`vZpWX?D_*4BtWCN3l9zCOe{A;RUQ#Av zoHq;p?sFedksP31qwc$h?$w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I3x$v&DEF3*S`|#@g{1Q}NDo)i6o^9|gH+uN8pM zkFUY_ISzg3pExJUl8*{_1v!iGEYLXsq5q(DA$O(^YbwRM(t>%pTtn>1B$%r28R2 zYZ6*t4*?YGdv1N5inG3LH;ruB*?&~)Py2YtX)Zu{afXG{P5EU?`&;1bj71!vume|@ zf1pl}1}z*J_ipIJYsgP|1dt6>`VZtKe+$ZC!HxNn_P}mfJn@?*+ke8?$K}6(&_d8H z4Ure;!7N;1k2})*6!%>`vAjvh_uk0M)wwjEdK~#1Ax}48A}|@~k9#`%fBOB9N(R3N aVvXMgvCXt&iUIsa2xFiHbYJcFL;f56R8$%O literal 0 HcmV?d00001 diff --git a/conlite/external/frontend/includes/Util/Modules/Contenido_NavMain_Util.class.php b/conlite/external/frontend/includes/Util/Modules/Contenido_NavMain_Util.class.php new file mode 100644 index 0000000..8ed6b08 --- /dev/null +++ b/conlite/external/frontend/includes/Util/Modules/Contenido_NavMain_Util.class.php @@ -0,0 +1,85 @@ + + * + * $Id$ + */ + +class Contenido_NavMain_Util { + /** + * Recursive Loop over all (sub)categories. + * Each level will be assigned a css class navmainStandardLevel_x + * + * @param Contenido_Category $oCategory + * @param Contenido_FrontendNavigation $oFrontendNavigation + * @param Template $oTpl + * @param string $sUrlStyle + * @param array $aCfg + * @param int $iLang + * @param array $aLevelInfo Information for marking active cat per levels + * @param array $aDepthInfo Info on level depth / where to stop. Format: array(iCurrentLoopCount, iMaxLoopCount) + * @return void + */ + public static function loopCats(Contenido_Category $oCategory, Contenido_FrontendNavigation $oFrontendNavigation, Template $oTpl, array $aCfg, $iLang, array $aLevelInfo, $iCurrentPageIdcat, array $aDepthInfo = array()) { + $aDepthInfo[0] = isset($aDepthInfo[0]) ? $aDepthInfo[0] + 1 : 1; + $aDepthInfo[1] = isset($aDepthInfo[1]) ? $aDepthInfo[1] : 1; + // display current item + $iItemLevel = $oFrontendNavigation->getLevel($oCategory->getIdCat()); + if (!isset($aLevelInfo[$oCategory->getIdCat()])) { + $aLevelInfo[$oCategory->getIdCat()] = array(); + } + $oCurrentSubcategories = $oFrontendNavigation->getSubCategories($oCategory->getIdCat()); + $aLevelInfo[$oCategory->getIdCat()]['has_children'] = $oCurrentSubcategories->count() > 0; + $aLevelInfo[$oCategory->getIdCat()]['first_child_item'] = -1; + $aLevelInfo[$oCategory->getIdCat()]['last_child_item'] = -1; + $bMarkActive = $oCategory->getIdCat() == $iCurrentPageIdcat || $oFrontendNavigation->isInPathToRoot($oCategory->getIdCat(), $iCurrentPageIdcat); + if ($oCurrentSubcategories->count() > 0) { + $aLevelInfo[$oCategory->getIdCat()]['first_child_item'] = $oCurrentSubcategories[0]->getIdCat(); + $aLevelInfo[$oCategory->getIdCat()]['last_child_item'] = $oCurrentSubcategories[$oCurrentSubcategories->count()-1]->getIdCat(); + } + // this is just for sample client - modify to your needs! + if (($aCfg['url_builder']['name'] == 'front_content') || ($aCfg['url_builder']['name'] == 'MR')) { + $aParams = array('lang' => $iLang, 'idcat' => $oCategory->getIdCat()); + } else { + $aParams = array('a' => $oCategory->getIdCat(), + 'idcat' => $oCategory->getIdCat(), // needed to build category path + 'lang' => $iLang, // needed to build category path + 'level' => 1); // needed to build category path + } + // fill template with values + $oTpl->set('d', 'name', $oCategory->getCategoryLanguage()->getName()); + $oTpl->set('d', 'css_level', $iItemLevel); + $oTpl->set('d', 'css_first_item', ($aLevelInfo[$oCategory->getIdParent()]['first_child_item'] == $oCategory->getIdCat() ? ' first' : '')); + $oTpl->set('d', 'css_last_item', ($aLevelInfo[$oCategory->getIdParent()]['last_child_item'] == $oCategory->getIdCat() ? ' last' : '')); + $oTpl->set('d', 'css_active_item', ($bMarkActive === true ? ' active' : '')); + try { + $oTpl->set('d', 'url', Contenido_Url::getInstance()->build($aParams)); + } catch (InvalidArgumentException $e) { + $oTpl->set('d', 'url', '#'); + } + $oTpl->next(); + // continue until max level depth + if ($aDepthInfo[1] > $aDepthInfo[0]) { + // check if current item has sub-items to be displayed + $bShowFollowUps = ($oCategory->getIdCat() == $iCurrentPageIdcat || $oFrontendNavigation->isInPathToRoot($oCategory->getIdCat(), $iCurrentPageIdcat)) + ? true : false; + if ($bShowFollowUps === true && $oCurrentSubcategories->count() > 0) { + $oSubCategories = $oCurrentSubcategories; + foreach ($oSubCategories as $oSubCategory) { + self::loopCats($oSubCategory, $oFrontendNavigation, $oTpl, $aCfg, $iLang, $aLevelInfo, $iCurrentPageIdcat, $aDepthInfo); + } + } + } + } +} +?> \ No newline at end of file diff --git a/conlite/external/frontend/includes/Util/Modules/Contenido_Sitemap_Util.class.php b/conlite/external/frontend/includes/Util/Modules/Contenido_Sitemap_Util.class.php new file mode 100644 index 0000000..f04de2b --- /dev/null +++ b/conlite/external/frontend/includes/Util/Modules/Contenido_Sitemap_Util.class.php @@ -0,0 +1,66 @@ + + * + * $Id$ + */ +class Contenido_Sitemap_Util { + /** + * Recursive Loop over all (sub)categories. + * Each level will be assigned a css class sitemapStandardLevel_x + * + * @param Contenido_Category $oCategory + * @param Contenido_FrontendNavigation $oFrontendNavigation + * @param Template $oTpl + * @param string $sUrlStyle + * @param array $aCfg + * @param int $iLang + * @param array $aDepthInfo Info on level depth / where to stop. Format: array(iCurrentLoopCount, iMaxLoopCount) + * @return void + */ + public static function loopCats(Contenido_Category $oCategory, Contenido_FrontendNavigation $oFrontendNavigation, Template $oTpl, $sUrlStyle, array $aCfg, $iLang, array $aDepthInfo = array()) { + $aDepthInfo[0] = isset($aDepthInfo[0]) ? $aDepthInfo[0] + 1 : 1; + $aDepthInfo[1] = isset($aDepthInfo[1]) ? $aDepthInfo[1] : 1; + // display current item + $iItemLevel = $oFrontendNavigation->getLevel($oCategory->getIdCat()); + // this is just for sample client - modify to your needs! + if (($aCfg['url_builder']['name'] == 'front_content') || ($aCfg['url_builder']['name'] == 'MR')) { + $aParams = array('lang' => $iLang, 'idcat' => $oCategory->getIdCat()); + } else { + $aParams = array('a' => $oCategory->getIdCat(), + 'idcat' => $oCategory->getIdCat(), // needed to build category path + 'lang' => $iLang, // needed to build category path + 'level' => 1); // needed to build category path + } + // fill template with values + $oTpl->set('d', 'name', $oCategory->getCategoryLanguage()->getName()); + $oTpl->set('d', 'css_level', $iItemLevel); + try { + $oTpl->set('d', 'url', Contenido_Url::getInstance()->build($aParams)); + } catch (InvalidArgumentException $e) { + $oTpl->set('d', 'url', '#'); + } + $oTpl->next(); + // continue until max level depth + if ($aDepthInfo[1] > $aDepthInfo[0]) { + // check if current item has sub-items + $oSubCategories = $oFrontendNavigation->getSubCategories($oCategory->getIdCat()); + if ($oSubCategories->count() > 0) { + foreach ($oSubCategories as $oSubCategory) { + self::loopCats($oSubCategory, $oFrontendNavigation, $oTpl, $sUrlStyle, $aCfg, $iLang, $aDepthInfo); + } + } + } + } +} +?> \ No newline at end of file diff --git a/conlite/external/frontend/includes/functions.include.php b/conlite/external/frontend/includes/functions.include.php new file mode 100644 index 0000000..f611b9c --- /dev/null +++ b/conlite/external/frontend/includes/functions.include.php @@ -0,0 +1,40 @@ + + * @license http://www.contenido.org/license/LIZENZ.txt + * @link http://www.4fb.de + * @link http://www.contenido.org + * + * $Id$: + */ + +if(!defined('CON_FRAMEWORK')) { + die('Illegal call'); +} + +function getTeaserImage ($text,$return = 'path') { + $regEx = "/]*?>.*?/i"; + $match = array(); + preg_match($regEx, $text, $match); + + $regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i"; + $img = array(); + preg_match($regEx, $match[0], $img); + + if ($return == 'path') { + return $img[4]; + } else { + return $match[0]; + } +} +?> \ No newline at end of file diff --git a/conlite/external/frontend/includes/functions.navigation.php b/conlite/external/frontend/includes/functions.navigation.php new file mode 100644 index 0000000..066a31d --- /dev/null +++ b/conlite/external/frontend/includes/functions.navigation.php @@ -0,0 +1,521 @@ + + * @license http://www.contenido.org/license/LIZENZ.txt + * @link http://www.4fb.de + * @link http://www.contenido.org + * + * $Id$: + */ +if (!defined('CON_FRAMEWORK')) { + die('Illegal call'); +} + +// create Navigation array for one level +function createNavigationArray($start_id, $db) { + global $user, $cfg, $client, $lang, $auth; + + $navigation = array(); + $FrontendPermissionCollection = new FrontendPermissionCollection; + +// SECURITY-FIX + $sql = "SELECT + A.idcat, + C.name, + C.public, + C.idcatlang + FROM + " . $cfg["tab"]["cat_tree"] . " AS A, + " . $cfg["tab"]["cat"] . " AS B, + " . $cfg["tab"]["cat_lang"] . " AS C + WHERE + A.idcat = B.idcat AND + B.idcat = C.idcat AND + B.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + C.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + C.visible = '1' AND + B.parentid = '" . Contenido_Security::escapeDB($start_id, $db) . "' + ORDER BY + A.idtree"; + $db->query($sql); + + while ($db->next_record()) { + $cat_id = $db->f("idcat"); + $cat_idlang = $db->f("idcatlang"); + $visible = false; + if ($db->f("public") != 0) { + $visible = true; + } elseif (($auth->auth['uid'] != '') && ($auth->auth['uid'] != 'nobody')) { + $FrontendGroupMemberCollection = new FrontendGroupMemberCollection; + + $FrontendGroupMemberCollection->setWhere("idfrontenduser", $auth->auth['uid']); + $FrontendGroupMemberCollection->query(); + $groups = array(); + while ($member = $FrontendGroupMemberCollection->next()) { + $groups[] = $member->get("idfrontendgroup"); + } + } + if (count($groups) > 0) { + for ($i = 0; $i < count($groups); $i++) { + if ($FrontendPermissionCollection->checkPerm($groups[$i], 'category', 'access', $cat_idlang, true)) { + $visible = true; + } + } + } + if ($visible) { + $navigation[$cat_id] = array("idcat" => $cat_id, + "name" => $db->f("name"), + "target" => '_self', # you can not call getTarget($cat_id, &$db) at this point with the same db instance! + "public" => $db->f("public")); + } + } // end while + + $db->free(); + + return $navigation; +} + +/** + * Return target of a given category id + * + * @deprecated + */ +function getTarget($cat_id, $db) { + global $cfg, $client, $lang; + +// SECURITY-FIX + $sql = "SELECT + a.external_redirect AS ext + FROM + " . $cfg["tab"]["art_lang"] . " AS a, + " . $cfg["tab"]["cat_art"] . " AS b, + " . $cfg["tab"]["cat"] . " AS c + WHERE + b.idcat = '" . Contenido_Security::escapeDB($cat_id, $db) . "' AND + c.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + c.idcat = b.idcat AND + a.idart = b.idart AND + a.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "'"; + + $db->query($sql); + $db->next_record(); + + $target = ( $db->f('ext') == 0 ) ? '_self' : '_blank'; + + $db->free(); + return $target; +} + +/** + * Return true if $parentid is parent of $catid + */ +function isParent($parentid, $catid, $db) { + + + global $cfg, $client, $lang; + // SECURITY-FIX + $sql = "SELECT + a.parentid + FROM + " . $cfg["tab"]["cat"] . " AS a, + " . $cfg["tab"]["cat_lang"] . " AS b + WHERE + a.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + b.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + a.idcat = b.idcat AND + a.idcat = '" . Contenido_Security::escapeDB($catid, $db) . "'"; + + $db->query($sql); + $db->next_record(); + + $pre = $db->f("parentid"); + + if ($parentid == $pre) { + return true; + } else { + return false; + } +} + +function getParent($preid, &$db) { + + global $cfg, $client, $lang; + +// SECURITY-FIX + $sql = "SELECT + a.parentid + FROM + " . $cfg["tab"]["cat"] . " AS a, + " . $cfg["tab"]["cat_lang"] . " AS b + WHERE + a.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + b.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + a.idcat = b.idcat AND + a.idcat = '" . Contenido_Security::escapeDB($preid, $db) . "'"; + + $db->query($sql); + + if ($db->next_record()) { + return $db->f("parentid"); + } else { + return false; + } +} + +function getLevel($catid, &$db) { + global $cfg, $client, $lang; + +// SECURITY-FIX + $sql = "SELECT + level + FROM + " . $cfg["tab"]["cat_tree"] . " + WHERE + idcat = '" . Contenido_Security::escapeDB($catid, $db) . "' "; + + $db->query($sql); + + if ($db->next_record()) { + return $db->f("level"); + } else { + return false; + } +} + +/** + * Return path of a given category up to a certain level + */ +function getCategoryPath($cat_id, $level, $reverse = true, &$db) { + $root_path = array(); + + array_push($root_path, $cat_id); + + $parent_id = $cat_id; + + while (getLevel($parent_id, $db) != false AND getLevel($parent_id, $db) > $level AND getLevel($parent_id, $db) >= 0) { + + $parent_id = getParent($parent_id, $db); + if ($parent_id != false) { + array_push($root_path, $parent_id); + } + } + + if ($reverse == true) { + $root_path = array_reverse($root_path); + } + + return $root_path; +} + +/** + * Return location string of a given category + */ +function getLocationString($iStartCat, $level, $seperator, $sLinkStyleClass, $sTextStyleClass, $fullweblink = false, $reverse = true, $mod_rewrite = true, $db) { + global $sess, $cfgClient, $client; + + $aCatPath = getCategoryPath($iStartCat, $level, $reverse, $db); + + if (is_array($aCatPath) AND count($aCatPath) > 0) { + $aLocation = array(); + foreach ($aCatPath as $value) { + if (!$fullweblink) { + if ($mod_rewrite == true) { + $linkUrl = $sess->url("index-a-$value.html"); + } else { + $linkUrl = $sess->url("front_content.php?idcat=$value"); + } + } else { + if ($mod_rewrite == true) { + $linkUrl = $sess->url($cfgClient[$client]["path"]["htmlpath"] . "index-a-$value.html"); + } else { + $linkUrl = $sess->url($cfgClient[$client]["path"]["htmlpath"] . "front_content.php?idcat=$value"); + } + } + $name = getCategoryName($value, $db); + $aLocation[] = '' . $name . ''; + } + } + + $sLocation = implode($seperator, $aLocation); + $sLocation = '' . $sLocation . ''; + + + return $sLocation; +} + +/** + * + * get subtree by a given id + * + * @param int $idcat Id of category + * @return array Array with all deeper categories + * + * @copyright four for business AG + */ +function getSubTree($idcat_start, $db) { + global $client, $cfg; + + // SECURITY-FIX + $sql = "SELECT + B.idcat, A.level + FROM + " . $cfg["tab"]["cat_tree"] . " AS A, + " . $cfg["tab"]["cat"] . " AS B + WHERE + A.idcat = B.idcat AND + idclient = '" . Contenido_Security::escapeDB($client, $db) . "' + ORDER BY + idtree"; + + $db->query($sql); + + $subCats = false; + $curLevel = 0; + while ($db->next_record()) { + if ($db->f("idcat") == $idcat_start) { + $curLevel = $db->f("level"); + $subCats = true; + } else if ($db->f("level") <= $curLevel) { // ending part of tree + $subCats = false; + } + + if ($subCats == true) { //echo "true"; echo $db->f("idcat"); echo "
"; + $deeper_cats[] = $db->f("idcat"); + } + } + return $deeper_cats; +} + +function getTeaserDeeperCategories($iIdcat, $db) { + global $client, $cfg, $lang; + + // SECURITY-FIX + $sql = "SELECT + B.parentid, B.idcat + FROM + " . $cfg["tab"]["cat_tree"] . " AS A, + " . $cfg["tab"]["cat"] . " AS B, + " . $cfg["tab"]["cat_lang"] . " AS C + WHERE + A.idcat = B.idcat AND + B.idcat = C.idcat AND + C.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + C.visible = '1' AND + B.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' + ORDER BY + idtree"; + $db->query($sql); + + $subCats = false; + $curLevel = 0; + while ($db->next_record()) { + if ($db->f("idcat") == $iIdcat) { + $curLevel = $db->f("level"); + $subCats = true; + } else if ($curLevel == $db->f("level")) { // ending part of tree + $subCats = false; + } + + if ($subCats == true) { + $deeper_cats[] = $db->f("idcat"); + } + } + return $deeper_cats; +} + +/** + * + * get subtree by a given id, without protected and invisible categories + * + * @param int $idcat Id of category + * @return array Array with all deeper categories + * + * @copyright four for business AG + */ +function getProtectedSubTree($idcat_start, $db) { + global $client, $cfg, $lang; + + // SECURITY-FIX + $sql = "SELECT + B.parentid, B.idcat + FROM + " . $cfg["tab"]["cat_tree"] . " AS A, + " . $cfg["tab"]["cat"] . " AS B, + " . $cfg["tab"]["cat_lang"] . " AS C + WHERE + A.idcat = B.idcat AND + B.idcat = C.idcat AND + C.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + C.visible = '1' AND + C.public = '1' AND + B.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' + ORDER BY + idtree"; + + $db->query($sql); + + $subCats = false; + $curLevel = 0; + while ($db->next_record()) { + if ($db->f("idcat") == $idcat_start) { + $curLevel = $db->f("level"); + $subCats = true; + } else if ($curLevel == $db->f("level")) { // ending part of tree + $subCats = false; + } + + if ($subCats == true) { //echo "true"; echo $db->f("idcat"); echo "
"; + $deeper_cats[] = $db->f("idcat"); + } + } + return $deeper_cats; +} + +/** + * Return category name + */ +function getCategoryName($cat_id, &$db) { + + global $cfg, $client, $lang; + + // SECURITY-FIX + $sql = "SELECT + * + FROM + " . $cfg["tab"]["cat"] . " AS A, + " . $cfg["tab"]["cat_lang"] . " AS B + WHERE + A.idcat = B.idcat AND + A.idcat = '" . Contenido_Security::escapeDB($cat_id, $db) . "' AND + A.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + B.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' + "; + + $db->query($sql); + + if ($db->next_record()) { + $cat_name = $db->f("name"); + return $cat_name; + } else { + return ''; + } +} + +// end function + +// get direct subcategories of a given category +function getSubCategories($parent_id, $db) { + + $subcategories = array(); + + global $cfg, $client, $lang; + +// SECURITY-FIX + $sql = "SELECT + A.idcat + FROM + " . $cfg["tab"]["cat_tree"] . " AS A, + " . $cfg["tab"]["cat"] . " AS B, + " . $cfg["tab"]["cat_lang"] . " AS C + WHERE + A.idcat = B.idcat AND + B.idcat = C.idcat AND + B.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + C.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + C.visible = '1' AND + C.public = '1' AND + B.parentid = '" . Contenido_Security::escapeDB($parent_id, $db) . "' + ORDER BY + A.idtree"; + + $db->query($sql); + + while ($db->next_record()) { + + $subcategories[] = $db->f("idcat"); + } // end while + + return $subcategories; +} + +// end function + +// get direct subcategories with protected categories +function getProtectedSubCategories($parent_id, $db) { + + $subcategories = array(); + unset($subcategories); + + global $cfg, $client, $lang; + +// SECURITY-FIX + $sql = "SELECT + A.idcat + FROM + " . $cfg["tab"]["cat_tree"] . " AS A, + " . $cfg["tab"]["cat"] . " AS B, + " . $cfg["tab"]["cat_lang"] . " AS C + WHERE + A.idcat = B.idcat AND + B.idcat = C.idcat AND + B.idclient = '" . Contenido_Security::escapeDB($client, $db) . "' AND + C.idlang = '" . Contenido_Security::escapeDB($lang, $db) . "' AND + B.parentid = '" . Contenido_Security::escapeDB($parent_id, $db) . "' + ORDER BY + A.idtree"; + + $db->query($sql); + + while ($db->next_record()) { + + $subcategories[] = $db->f("idcat"); + } // end while + + return $subcategories; +} + +// end function + +function checkCatPermission($idcatlang, $public) { + #Check if current user has permissions to access cat + + global $auth; + + $oDB = new DB_ConLite(); + + $FrontendPermissionCollection = new FrontendPermissionCollection; + $visible = false; + + if ($public != 0) { + $visible = true; + $groups = array(); + } elseif (($auth->auth['uid'] != '') && ($auth->auth['uid'] != 'nobody')) { + $FrontendGroupMemberCollection = new FrontendGroupMemberCollection; + $FrontendGroupMemberCollection->setWhere("idfrontenduser", $auth->auth['uid']); + $FrontendGroupMemberCollection->query(); + $groups = array(); + while ($member = $FrontendGroupMemberCollection->next()) { + $groups[] = $member->get("idfrontendgroup"); + } + } + if (count($groups) > 0) { + for ($i = 0; $i < count($groups); $i++) { + if ($FrontendPermissionCollection->checkPerm($groups[$i], 'category', 'access', $idcatlang, true)) { + $visible = true; + } + } + } + + return $visible; +} \ No newline at end of file diff --git a/conlite/external/frontend/includes/rss.inc.php b/conlite/external/frontend/includes/rss.inc.php new file mode 100644 index 0000000..2202b9e --- /dev/null +++ b/conlite/external/frontend/includes/rss.inc.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/conlite/external/frontend/includes/rss_php.php b/conlite/external/frontend/includes/rss_php.php new file mode 100644 index 0000000..1456313 --- /dev/null +++ b/conlite/external/frontend/includes/rss_php.php @@ -0,0 +1,160 @@ + + Published: 200801 :: blacknet :: via rssphp.net + + RSS_PHP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. + + Usage: + See the documentation at http://rssphp.net/documentation + Examples: + Can be found online at http://rssphp.net/examples +*/ + +class rss_php { + + public $document; + public $channel; + public $items; + +/**************************** + public load methods +***/ + # load RSS by URL + public function load($url=false, $unblock=true) { + if($url) { + if($unblock) { + $this->loadParser(file_get_contents($url, false, $this->randomContext())); + } else { + $this->loadParser(file_get_contents($url)); + } + } + } + # load raw RSS data + public function loadRSS($rawxml=false) { + if($rawxml) { + $this->loadParser($rawxml); + } + } + +/**************************** + public load methods + @param $includeAttributes BOOLEAN + return array; +***/ + # return full rss array + public function getRSS($includeAttributes=false) { + if($includeAttributes) { + return $this->document; + } + return $this->valueReturner(); + } + # return channel data + public function getChannel($includeAttributes=false) { + if($includeAttributes) { + return $this->channel; + } + return $this->valueReturner($this->channel); + } + # return rss items + public function getItems($includeAttributes=false) { + if($includeAttributes) { + return $this->items; + } + return $this->valueReturner($this->items); + } + +/**************************** + internal methods +***/ + private function loadParser($rss=false) { + if($rss) { + $this->document = array(); + $this->channel = array(); + $this->items = array(); + $DOMDocument = new DOMDocument; + $DOMDocument->strictErrorChecking = false; + $DOMDocument->loadXML($rss); + $this->document = $this->extractDOM($DOMDocument->childNodes); + } + } + + private function valueReturner($valueBlock=false) { + if(!$valueBlock) { + $valueBlock = $this->document; + } + foreach($valueBlock as $valueName => $values) { + if(isset($values['value'])) { + $values = $values['value']; + } + if(is_array($values)) { + $valueBlock[$valueName] = $this->valueReturner($values); + } else { + $valueBlock[$valueName] = $values; + } + } + return $valueBlock; + } + + private function extractDOM($nodeList,$parentNodeName=false) { + $itemCounter = 0; + foreach($nodeList as $values) { + if(substr($values->nodeName,0,1) != '#') { + if($values->nodeName == 'item') { + $nodeName = $values->nodeName.':'.$itemCounter; + $itemCounter++; + } else { + $nodeName = $values->nodeName; + } + $tempNode[$nodeName] = array(); + if($values->attributes) { + for($i=0;$values->attributes->item($i);$i++) { + $tempNode[$nodeName]['properties'][$values->attributes->item($i)->nodeName] = $values->attributes->item($i)->nodeValue; + } + } + if(!$values->firstChild) { + $tempNode[$nodeName]['value'] = $values->textContent; + } else { + $tempNode[$nodeName]['value'] = $this->extractDOM($values->childNodes, $values->nodeName); + } + if(in_array($parentNodeName, array('channel','rdf:RDF'))) { + if($values->nodeName == 'item') { + $this->items[] = $tempNode[$nodeName]['value']; + } elseif(!in_array($values->nodeName, array('rss','channel'))) { + $this->channel[$values->nodeName] = $tempNode[$nodeName]; + } + } + } elseif(substr($values->nodeName,1) == 'text') { + $tempValue = trim(preg_replace('/\s\s+/',' ',str_replace("\n",' ', $values->textContent))); + if($tempValue) { + $tempNode = $tempValue; + } + } elseif(substr($values->nodeName,1) == 'cdata-section'){ + $tempNode = $values->textContent; + } + } + return $tempNode; + } + + private function randomContext() { + $headerstrings = array(); + $headerstrings['User-Agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.'.rand(0,2).'; en-US; rv:1.'.rand(2,9).'.'.rand(0,4).'.'.rand(1,9).') Gecko/2007'.rand(10,12).rand(10,30).' Firefox/2.0.'.rand(0,1).'.'.rand(1,9); + $headerstrings['Accept-Charset'] = rand(0,1) ? 'en-gb,en;q=0.'.rand(3,8) : 'en-us,en;q=0.'.rand(3,8); + $headerstrings['Accept-Language'] = 'en-us,en;q=0.'.rand(4,6); + $setHeaders = 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'."\r\n". + 'Accept-Charset: '.$headerstrings['Accept-Charset']."\r\n". + 'Accept-Language: '.$headerstrings['Accept-Language']."\r\n". + 'User-Agent: '.$headerstrings['User-Agent']."\r\n"; + $contextOptions = array( + 'http'=>array( + 'method'=>"GET", + 'header'=>$setHeaders + ) + ); + return stream_context_create($contextOptions); + } + +} + +?> \ No newline at end of file diff --git a/conlite/external/frontend/logs/deprecated.txt b/conlite/external/frontend/logs/deprecated.txt new file mode 100644 index 0000000..0e406df --- /dev/null +++ b/conlite/external/frontend/logs/deprecated.txt @@ -0,0 +1,2 @@ +This folder is marked as deprecated and will be deleted in next versions of ConLite. +Please use folders in data-directory instead! \ No newline at end of file