<?php $t->set_file("block_body", "header.html"); // LOGOUT BUTTON $user_type_id = get_session("session_user_type_id"); if ($user_type_id != '') { $t->parse("logout_button", false); $t->set_var("loginClass", ""); $t->set_var("logoutClass", "hide"); } else { $t->set_var("loginClass", "hide"); $t->set_var("logoutClass", ""); } $t->set_var("menu", ""); $request_uri_path = get_request_path(); $request_uri_base = basename($request_uri_path); // set site logo $logo_image = get_translation(get_setting_value($settings, "logo_image", "images/tr.gif")); $logo_image_alt = get_translation(get_setting_value($settings, "logo_image_alt", HOME_PAGE_TITLE)); $logo_width = get_setting_value($settings, "logo_image_width", ""); $logo_height = get_setting_value($settings, "logo_image_height", ""); $logo_size = ""; if ($logo_width || $logo_height) { if ($logo_width) { $logo_size = "width=\"" . $logo_width . "\""; } if ($logo_height) { $logo_size .= " height=\"" . $logo_height . "\""; } } elseif ($logo_image && !preg_match("/^http\\:\\/\\//", $logo_image)) { //$logo_image = $absolute_url . $logo_image;
function check_selected_url($script_url, $match_type = 2) { global $current_page; $request_page = get_request_page(); if (!isset($current_page)) { $current_page = $request_page; } $request_uri_path = get_request_path(); $parsed_url = parse_url($script_url); if (isset($parsed_url["path"])) { $script_name = $parsed_url["path"]; if (isset($parsed_url["query"])) { parse_str($parsed_url["query"], $script_vars); } else { $script_vars = array(); } } else { $script_name = $script_url; } $url_matched = false; if ($match_type > 0) { if ($script_name == $request_page || $script_name == $current_page || $script_name == $request_uri_path) { $url_matched = true; } if ($url_matched && $match_type == 2 && $script_vars) { foreach ($script_vars as $key => $var) { if (get_param($key) != $var) { $url_matched = false; break; } } } } return $url_matched; }