@dirname($_SERVER["SCRIPT_FILENAME"]), "filter" => DIRECTORY_FILTER)); $_directory_list = $reader->read(); if($_file) { $_content_path = sprintf("%s/%s", @dirname($_SERVER["SCRIPT_FILENAME"]), $_file); } else { $_content_path = (isset($_directory_list[0])) ? $_directory_list[0]["path"] : ""; } if(!@file_exists($_content_path)) $_content_path = ""; $_product_mask = 0; $_product_type = 0; $_specref = "not defined"; $_content_id = 0; $_content_title = ""; $_content_stylesheet = sprintf("%s%s/styles/styles.css", $_rel_to_root, DIRECTORY_DATA); $_content_file = null; if($_content_path && @is_file($_content_path)) { $_content_file = ContentFileFactory::createInstance(array("path" => $_content_path)); $_content_file->read(); $_content_title = $_content_file->getTitle(); $_content_stylesheet = sprintf("%s%s/%s", $_rel_to_root, DIRECTORY_DATA, $_content_file->getStylesheet()); $_product_type = $_content_file->getProductType(); $_specref = $_content_file->getSpecref(); $_content_id = $_content_file->getContentId(); $mcript = McryptFactory::createInstance(array("iv" => sprintf("%s%s", $_rel_to_root, PH_IV_FILE), "data" => $_license_key)); $_license_key = $mcript->decryptData(); if(!@preg_match("/^[0-9a-zA-Z]{" . PH_LENGTH_KEY . "}$/", $_license_key)) $_license_key = 0; $_connection = ConnectionFactory::createInstance(); $list = $_connection->getLicense($_license_key); if($list) { foreach($list as $item) { $_product_mask |= $item["product_type"]; } } } @include_once(DIRECTORY_TEMPLATES . "/header.php"); @include_once(DIRECTORY_TEMPLATES . "/nav_menu.php"); @include_once(DIRECTORY_TEMPLATES . "/nav_tree.php"); @include_once(DIRECTORY_TEMPLATES . "/content.php"); @include_once(DIRECTORY_TEMPLATES . "/footer.php"); } catch(Exception $e) { Logger::debug($e->getMessage()); $_location = sprintf("Location: http%s://%s%s/error.php", ($_SERVER["SERVER_PORT"] == 443) ? "s" : "", $_SERVER["HTTP_HOST"], $_root); @header($_location); } ?>