1, "archived" => 0), "object", "course");
if (is_array($frontpage_courses) && sizeof($frontpage_courses) > 0) {
foreach ($frontpage_courses as $course) {
$featured_course_text .= "
";
$featured_course_text .= "";
if (getImageFileExists("small_" . $course->guid . ".jpg", $course->getOwner())) {
$course_img_url = getImageFileURL("small_" . $course->guid . ".jpg", $course->getOwner());
$featured_course_text .= "
";
}
$course_beginning_date = $course->beginning_date;
if ($course_beginning_date > 86400) {
$course_beginning_date = date("d.m.Y", $course_beginning_date);
}
$course_ending_date = $course->ending_date;
if ($course_ending_date > 86400) {
$course_ending_date = date("d.m.Y", $course_ending_date);
}
/*translation:Time*/
$featured_course_text .= elgg_echo('koolielu:Time').": {$course_beginning_date} - {$course_ending_date}
";
/*translation:Place*/
$featured_course_text .= elgg_echo('koolielu:Place').": {$course->place}
";
$featured_course_text .= $course->brief_description . "
";
/*translation:View*/
$featured_course_text .= "getUrl()}\">" . elgg_echo("koolielu:link_view") . "";
}
}
$latest_courses = get_entities_from_metadata_and_subtypes(array("approved" => "1", "archived" => "0"), "object", array("course"), "", 5);
$courses_div = "";
if (is_array($latest_courses) && sizeof($latest_courses) > 0) {
/*translation:Courses*/
$courses_div .= "". elgg_echo('koolielu:Courses') ."";
$courses_div .= elgg_view_entity_list($latest_courses, count($latest_courses), 0, 5, false);
}
$courses_div .= "
";
$latest_ads = get_entities_from_metadata_and_subtypes(array("approved" => "1", "archived" => "0"), "object", array("job_offering", "job_wanted_ad"), "", 5);
$jobmarket_div = "";
if (is_array($latest_ads) && sizeof($latest_ads) > 0) {
/*translation:Job ads*/
$jobmarket_div .= "". elgg_echo('koolielu:Job_ads') ."";
$jobmarket_div .= elgg_view_entity_list($latest_ads, count($latest_ads), 0, 5, false);
}
$jobmarket_div .= "
";
$area2 = $featured_course_text;
$area2 .= "
";
$area2 .= $courses_div;
$area2 .= $jobmarket_div;
// display areas in the page
$body = elgg_view_layout("two_columns", '', $area2);
// display page
page_draw($page_title, $body);
?>