%frontend_asset_frontend_metadata% %begin_frontend_asset_parent^eq:157% %else_begin_frontend_asset_parent^eq:489% %else_begin_frontend_asset_parent^eq:3553% %else_asset% %end_asset% registerInternalVar('get', array_keys($processed_get_vars)); $old_get[$asset_cache_key] = $_GET; $_GET = array_merge($_GET, $processed_get_vars); // $_REQUEST by default is supposed to contain the contnets of $_GET $old_request[$asset_cache_key] = $_REQUEST; $_REQUEST = array_merge($_REQUEST, $processed_get_vars); $GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key] = 1; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid, '', TRUE); $asset_contents = ''; if ($nested_asset->id && $nested_asset->readAccess()) { ob_start(); $nested_asset->printAssetBody(); $asset_contents = ob_get_contents(); ob_end_clean(); $keywords = extract_keywords($asset_contents); $replacements = Array(); foreach ($keywords as $idx => $keyword) { if (strpos($keyword, 'nested_get_') === 0) { $modifiers = NULL; $part_keyword = parse_keyword($keyword, $modifiers); $get_var = substr($part_keyword, 11); $value = array_get_index($_GET, $get_var, ''); if ($part_keyword != $keyword) { apply_keyword_modifiers($value, $modifiers, Array('assetid' => $nested_asset->id)); } $replacements[$keyword] = $value; } } replace_keywords($asset_contents, $replacements); } echo $asset_contents; unset($GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key]); $_GET = $old_get[$asset_cache_key]; $_REQUEST = $old_request[$asset_cache_key]; // Un-register the nested get vars $GLOBALS['SQ_SYSTEM']->unRegisterInternalVar('get', array_keys($processed_get_vars)); } else { echo '[ ** '.translate('RECURSION WARNING').' ** ]
'.translate('You are nesting the content of this page inside itself').'
'; } ?>"/> registerInternalVar('get', array_keys($processed_get_vars)); $old_get[$asset_cache_key] = $_GET; $_GET = array_merge($_GET, $processed_get_vars); // $_REQUEST by default is supposed to contain the contnets of $_GET $old_request[$asset_cache_key] = $_REQUEST; $_REQUEST = array_merge($_REQUEST, $processed_get_vars); $GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key] = 1; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid, '', TRUE); $asset_contents = ''; if ($nested_asset->id && $nested_asset->readAccess()) { ob_start(); $nested_asset->printAssetBody(); $asset_contents = ob_get_contents(); ob_end_clean(); $keywords = extract_keywords($asset_contents); $replacements = Array(); foreach ($keywords as $idx => $keyword) { if (strpos($keyword, 'nested_get_') === 0) { $modifiers = NULL; $part_keyword = parse_keyword($keyword, $modifiers); $get_var = substr($part_keyword, 11); $value = array_get_index($_GET, $get_var, ''); if ($part_keyword != $keyword) { apply_keyword_modifiers($value, $modifiers, Array('assetid' => $nested_asset->id)); } $replacements[$keyword] = $value; } } replace_keywords($asset_contents, $replacements); } echo $asset_contents; unset($GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key]); $_GET = $old_get[$asset_cache_key]; $_REQUEST = $old_request[$asset_cache_key]; // Un-register the nested get vars $GLOBALS['SQ_SYSTEM']->unRegisterInternalVar('get', array_keys($processed_get_vars)); } else { echo '[ ** '.translate('RECURSION WARNING').' ** ]
'.translate('You are nesting the content of this page inside itself').'
'; } ?>"/> registerInternalVar('get', array_keys($processed_get_vars)); $old_get[$asset_cache_key] = $_GET; $_GET = array_merge($_GET, $processed_get_vars); // $_REQUEST by default is supposed to contain the contnets of $_GET $old_request[$asset_cache_key] = $_REQUEST; $_REQUEST = array_merge($_REQUEST, $processed_get_vars); $GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key] = 1; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid, '', TRUE); $asset_contents = ''; if ($nested_asset->id && $nested_asset->readAccess()) { ob_start(); $nested_asset->printAssetBody(); $asset_contents = ob_get_contents(); ob_end_clean(); $keywords = extract_keywords($asset_contents); $replacements = Array(); foreach ($keywords as $idx => $keyword) { if (strpos($keyword, 'nested_get_') === 0) { $modifiers = NULL; $part_keyword = parse_keyword($keyword, $modifiers); $get_var = substr($part_keyword, 11); $value = array_get_index($_GET, $get_var, ''); if ($part_keyword != $keyword) { apply_keyword_modifiers($value, $modifiers, Array('assetid' => $nested_asset->id)); } $replacements[$keyword] = $value; } } replace_keywords($asset_contents, $replacements); } echo $asset_contents; unset($GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key]); $_GET = $old_get[$asset_cache_key]; $_REQUEST = $old_request[$asset_cache_key]; // Un-register the nested get vars $GLOBALS['SQ_SYSTEM']->unRegisterInternalVar('get', array_keys($processed_get_vars)); } else { echo '[ ** '.translate('RECURSION WARNING').' ** ]
'.translate('You are nesting the content of this page inside itself').'
'; } ?>"/> registerInternalVar('get', array_keys($processed_get_vars)); $old_get[$asset_cache_key] = $_GET; $_GET = array_merge($_GET, $processed_get_vars); // $_REQUEST by default is supposed to contain the contnets of $_GET $old_request[$asset_cache_key] = $_REQUEST; $_REQUEST = array_merge($_REQUEST, $processed_get_vars); $GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key] = 1; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid, '', TRUE); $asset_contents = ''; if ($nested_asset->id && $nested_asset->readAccess()) { ob_start(); $nested_asset->printAssetBody(); $asset_contents = ob_get_contents(); ob_end_clean(); $keywords = extract_keywords($asset_contents); $replacements = Array(); foreach ($keywords as $idx => $keyword) { if (strpos($keyword, 'nested_get_') === 0) { $modifiers = NULL; $part_keyword = parse_keyword($keyword, $modifiers); $get_var = substr($part_keyword, 11); $value = array_get_index($_GET, $get_var, ''); if ($part_keyword != $keyword) { apply_keyword_modifiers($value, $modifiers, Array('assetid' => $nested_asset->id)); } $replacements[$keyword] = $value; } } replace_keywords($asset_contents, $replacements); } echo $asset_contents; unset($GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key]); $_GET = $old_get[$asset_cache_key]; $_REQUEST = $old_request[$asset_cache_key]; // Un-register the nested get vars $GLOBALS['SQ_SYSTEM']->unRegisterInternalVar('get', array_keys($processed_get_vars)); } else { echo '[ ** '.translate('RECURSION WARNING').' ** ]
'.translate('You are nesting the content of this page inside itself').'
'; } ?>"/> am->getAsset($nested_assetid, '', TRUE); if ($nested_asset == null) { $nested_assetid = '8554'; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid); } } else { $nested_assetid = '8554'; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid); } $nesting_assetid = '8568'; $temp_parent_array = $GLOBALS['SQ_SYSTEM']->am->getDependantParents($nesting_assetid, '' , TRUE, FALSE); $parents_nesting_asset_id = $temp_parent_array[0]; $parents_nesting_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($parents_nesting_asset_id); $asset_cache_key = $nested_assetid.'-40cd750bba9870f18aada2478b24840a'; if (method_exists($nested_asset, '_getCacheKey')) { $asset_cache_key .= $nested_asset->_getCacheKey(); } if (!isset($GLOBALS['SQ_NEST_CONTENT_PAINTED'])) $GLOBALS['SQ_NEST_CONTENT_PAINTED'] = Array(); if (!isset($GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key])) { $additional_get_vars = array ( ); $processed_get_vars = Array(); foreach ($additional_get_vars as $get_var) { $get_name = $get_var['name']; $get_value = str_replace('%', '%', $get_var['value']); $keywords_list = extract_keywords($get_value); foreach ($keywords_list as $keyword) { if(strpos($keyword, 'nested_') === 0) { $nested_asset_keyword = str_replace('nested_','',$keyword); $replacement = $nested_asset->getKeywordReplacement($nested_asset_keyword); if (!is_null($replacement)) { $get_value = str_replace('nested_','',$get_value); $get_value = str_replace('%'.$nested_asset_keyword.'%', $replacement, $get_value); } } else if (strpos($keyword, 'globals_') === 0) { replace_global_keywords($get_value); } else if (strpos($keyword, 'list_current_') === 0) { if(isset($_SESSION[SQ_SESSION_SANDBOX_INDEX]['list_current_asset_id']) && !empty($_SESSION[SQ_SESSION_SANDBOX_INDEX]['list_current_asset_id'])) { $asset_keyword = str_replace('list_current_','',$keyword); $current_list_asset_id = $_SESSION[SQ_SESSION_SANDBOX_INDEX]['list_current_asset_id']; $current_list_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($current_list_asset_id); $replacement = $current_list_asset->getKeywordReplacement($asset_keyword); if (!is_null($replacement)) { $get_value = str_replace('list_current_','',$get_value); $get_value = str_replace('%'.$asset_keyword.'%', $replacement, $get_value); } } } else { // for all keywords replacement except globals and nested asset $replacement = $parents_nesting_asset->getKeywordReplacement($keyword); if (!is_null($replacement)) { $get_value = str_replace('%'.$keyword.'%', $replacement, $get_value); } } } preg_match('/([^\[]*)(.*)/', $get_name, $base_name); $array_bits = $base_name[2]; if (empty($array_bits)) { $processed_get_vars[$base_name[1]] = $get_value; } else { $array_els = Array(); if (!isset($processed_get_vars[$base_name[1]])) { $processed_get_vars[$base_name[1]] = Array(); } $done = FALSE; while (!empty($array_bits)) { $found = preg_match('/\[([^\]]*)\](.*)/', $array_bits, $base_name); if (!$found) break; $array_bits = $base_name[2]; $array_els[] = addslashes($base_name[1]); } $eval_str = '$processed_get_vars[\''.addslashes($base_name[1]).'\'][\''.implode('\'][\'', $array_els).'\'] = \''.addslashes($get_value).'\';'; eval($eval_str); } } // Register the nested get vars as "internal" vars $GLOBALS['SQ_SYSTEM']->registerInternalVar('get', array_keys($processed_get_vars)); $old_get[$asset_cache_key] = $_GET; $_GET = array_merge($_GET, $processed_get_vars); // $_REQUEST by default is supposed to contain the contnets of $_GET $old_request[$asset_cache_key] = $_REQUEST; $_REQUEST = array_merge($_REQUEST, $processed_get_vars); $GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key] = 1; $nested_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($nested_assetid, '', TRUE); $asset_contents = ''; if ($nested_asset->id && $nested_asset->readAccess()) { ob_start(); $nested_asset->printAssetBody(); $asset_contents = ob_get_contents(); ob_end_clean(); $keywords = extract_keywords($asset_contents); $replacements = Array(); foreach ($keywords as $idx => $keyword) { if (strpos($keyword, 'nested_get_') === 0) { $modifiers = NULL; $part_keyword = parse_keyword($keyword, $modifiers); $get_var = substr($part_keyword, 11); $value = array_get_index($_GET, $get_var, ''); if ($part_keyword != $keyword) { apply_keyword_modifiers($value, $modifiers, Array('assetid' => $nested_asset->id)); } $replacements[$keyword] = $value; } } replace_keywords($asset_contents, $replacements); } echo $asset_contents; unset($GLOBALS['SQ_NEST_CONTENT_PAINTED'][$asset_cache_key]); $_GET = $old_get[$asset_cache_key]; $_REQUEST = $old_request[$asset_cache_key]; // Un-register the nested get vars $GLOBALS['SQ_SYSTEM']->unRegisterInternalVar('get', array_keys($processed_get_vars)); } else { echo '[ ** '.translate('RECURSION WARNING').' ** ]
'.translate('You are nesting the content of this page inside itself').'
'; } ?>