1); $categories = $util->getCategories($db); $sub_category = $util->getSubCategoryFromCategories($categories, $directories); $category = $util->getValueFromArray($sub_category['category_id'], $categories); $sub_categories = $category['sub_categories']; setDirectoryValues($directories, $util, $sub_category); $list_content = isListContent($db, $util, $language, $sub_category); //$lc = $list_content ? 'true' : 'false'; //echo("list_content: " .$lc."

"); $navigation_content = $util->getNavigationContent($db); $nav_projects = $navigation_content['projects']; $nav_people = $navigation_content['people']; if (BASE_DIRECTORY == 'home') { $template = $sub_category['entry_template']; $entry = $util->getHomepageProject($db); } else if (BASE_DIRECTORY == 'search') { $template = $sub_category['list_template']; $search_categories = $util->getSearchResults($db, ENTRY_TEXT); } else if (BASE_DIRECTORY == 'rss') { $template = $sub_category['list_template']; $content = $util->getRSSContent($db); } else if (BASE_DIRECTORY == 'list') { $template = $sub_category['list_template']; $entry = $util->getContentEntry($db, $language, FILTER_ID); if (isset($entry['id']) && intval($entry['id']) > 0) { if ($entry['sub_category_id'] == 2) { $projects[0]['id'] = $entry['id']; } else if ($entry['sub_category_id'] == 3) { $projects = $util->getContentProjects($db, $entry['id']); } $list_categories = $util->countContentProjectLinks($db, $projects, true); $list_category = $util->getValueFromArray(ENTRY_TEXT, $list_categories, true, 'directory'); $content = $util->getProjectsContentList($db, $projects, $list_category['id']); } } else if (ENTRY_ID > 0 && $list_content == false) { $template = $sub_category['entry_template']; $entry = $util->getContent($db, $language, $sub_category, ENTRY_ID); } else if (ENTRY_ID > 0 && $list_content && $sub_category['filterable']) { $template = $sub_category['entry_template']; $content = $util->getSubCategoryFilteredContent($db, $language, $sub_category, ENTRY_ID); $entry = $util->getSubCategoryFilter($db, $sub_category, ENTRY_ID); } else if (ENTRY_ID > 0 && $list_content) { $template = $sub_category['list_template']; $content = $util->getSubCategoryContent($db, $language, $sub_category); $entry = $util->getValueFromArray(ENTRY_ID, $content); } else if ($list_content && $sub_category['filterable']) { $template = $sub_category['list_template']; $filters = $util->getSubCategoryFilters($db, $sub_category); for ($i=0; $igetSubCategoryFilteredContent($db, $language, $sub_category, $filters[$i]['id']); } $filter = $util->getValueFromArray(OFFSET_ID, $filters); $content = $filter['content']; } else if ($sub_category['use_pagenumbers']) { $template = $sub_category['list_template']; $years = $util->getContentYears($db, $sub_category, FILTER_ID); $years = $util->getSubCategoryYearContent($db, $years, $sub_category); $count = $util->countContentYears($db, $sub_category); $offset = $util->getOffset(FILTER_ID, YEAR_LIMIT, $count); for ($i=0; $i= 4 && $sub_categories[$i]['id'] <= 7) { $list_categories[] = $sub_categories[$i]; } } $list_category = $util->getValueFromArray($sub_category['id'], $list_categories); } else if ($list_content && $sub_category['use_pagenumbers'] == false) { $template = $sub_category['list_template']; $content = $util->getSubCategoryContent($db, $language, $sub_category); $entry = $util->getValueFromArray(ENTRY_ID, $content); } else if ($list_content == false) { $template = $sub_category['entry_template']; $content = $util->getSubCategoryContent($db, $language, $sub_category); $entry = $util->getValueFromArray(ENTRY_ID, $content); } if ($sub_category['sibling_id'] > 0) { $sibling_sub_category = $util->getSubCategory($db, $sub_category['sibling_id']); $sibling_content = $util->getSubCategoryContent($db, $language, $sibling_sub_category); $sibling_entry = $util->getValueFromArray(0, $sibling_content); } if (isset($entry['id']) && $entry['id'] > 0) { $images = null; $documents = null; $videos = null; $internal_links = null; $external_links = null; $contents_links = null; $audios = null; $texts = null; $entry_projects = null; $project_links = null; if (isset($entry['images'])) { $images = $entry['images']; } if (isset($entry['documents'])) { $documents = $entry['documents']; } if (isset($entry['videos'])) { $videos = $entry['videos']; } if (isset($entry['audios'])) { $audios = $entry['audios']; } if (isset($entry['texts'])) { $texts = $entry['texts']; } if (isset($entry['internal_links'])) { $internal_links = $entry['internal_links']; } if (isset($entry['external_links'])) { $external_links = $entry['external_links']; } if (isset($entry['contents_links'])) { $contents_links = $entry['contents_links']; } if (isset($entry['entry_projects'])) { $entry_projects = $entry['entry_projects']; } if (isset($entry['project_links'])) { $project_links = $entry['project_links']; } } $db->close(); //echo("../docs/".$template); include("../docs/".$template); function isListContent($db, $util, $language, $sub_category) { $list_content = true; if ($sub_category['list_template'] <> '' && $sub_category['entry_template'] == '') { $list_content = true; } else if ($sub_category['list_template'] == '' && $sub_category['entry_template'] <> '') { $list_content = false; } else if (ENTRY_ID > 0 && $sub_category['list_content']) { $list_content = true; } else if (ENTRY_ID > 0) { if ($util->contentExists($db, $language, $sub_category, ENTRY_ID)) { $list_content = false; } else { $list_content = true; } } return $list_content; } function setDirectoryValues($directories, $util, $sub_category) { define("BASE_DIRECTORY",$sub_category['directory']); define("ENTRY_ID",intval($util->getDirectoryValue($directories, 1, 0, true))); define("ENTRY_TEXT",$util->getDirectoryValue($directories, 1, '', false)); define("FILTER_ID",intval($util->getDirectoryValue($directories, 2, 0, true))); define("OFFSET_ID",intval($util->getDirectoryValue($directories, 3, 0, true))); define("OFFSET_TEXT",$util->getDirectoryValue($directories, 3, '', false)); } function echoDirectories($directories) { for ($i=0; $i"); } } ?>