if ($size) { require $link_to_pagination_init_template; for ($i = $from; $i <= $to; ++$i) { $direction = $directions[$i]; $content .= $direction->ToHTMLAutoShortForTable(GetUserPrivileges()); if ($i != $to) { $content .= '<hr><div style="background-color: #eeeeee;"><br></div><hr>'; } } } else { $content .= ToPageHeader(Language::Word('no directions'), 'h3', 'black'); } $header .= Language::PublicMenu('directions'); } else { if ($_GET['content_type'] == $content_types_short['projects']) { $directions = Direction::FetchAll(); $projects = array(); for ($i = 0, $size = count($directions); $i < $size; ++$i) { $tmp = Project::FetchByDirectionID($directions[$i]->id); if ($tmp !== NULL) { $projects = array_merge($projects, $tmp); } } $size = count($projects); if ($size) { require $link_to_pagination_init_template; for ($i = $from; $i <= $to; ++$i) { $project = $projects[$i]; if ($i === $from || $i > $from && $projects[$i - 1]->direction_id != $project->direction_id) { if ($i != $from) { $content .= '<hr>';