} catch (Exception $e) { echo "<br> Wrong php expression in visibility option" . $e->getMessage(); } $show_block_flag = $vis_val == 1 ? true : false; } return $show_block_flag; } if (!empty($_POST['all_blocks']) && $_POST['all_blocks'] == 1) { $block = new block(); $all_blocks_array = $block->findAll_AvailableBlocks(); $parameters = !empty($_POST['parameters']) ? $_POST['parameters'] : null; $blocks_by_position = array(); $block_count = 0; $url = $_POST['pathname']; $session_id = session_id(); $bc = new block_cache(); foreach ($all_blocks_array as $records) { $block_cache = false; $block_count++; $position = $records->position; $title = $records->title; $visibility_option = $records->visibility_option; $block_visibility = base64_decode($records->visibility); $reference_table = $records->reference_table; $show_block_flag = get_showFlag_from_visibilityOption($block_visibility, $visibility_option, $url); if (!$show_block_flag) { continue; } // echo "<br> block id " . $records->block_id . ' : show bock flag is '. $show_block_flag; //get content from block cahche or block content or from the block function if (!empty($session_id) && $records->cached_cb == 1) {
<?php ob_start(); include_once '../../includes/basics/header_simple.inc'; session_start(); $bc = new block_cache(); $bc->session_id = session_id(); $bc->delete_allBy_sessionId(); $session->logout(); $_SESSION = array(); //if (isset($_COOKIE['session_name()'])) { // setcookie(session_name(), '', time() - 4200, '/'); //} if (ini_get("session.use_cookies")) { $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]); } session_destroy(); redirect_to(HOME_URL); ob_flush();