} $all_title = implode(", ", $all_title); } $sql = "select certificate_term from #__guru_program where id = " . intval($program->id); $db->setQuery($sql); $db->query(); $certificate_term = $db->loadResult(); $sql = "select avg_certc from #__guru_program where id = " . intval($program->id); $db->setQuery($sql); $db->query(); $avg_cert = $db->loadResult(); $sql = "SELECT max_score FROM #__guru_quiz WHERE is_final= 1 LIMIT 1"; $db->setQuery($sql); $result_maxs = $db->loadResult(); if ($config->display_media == 1) { $the_media = $guruModelguruProgram->find_intro_media($program->id); $no_plugin_for_code = 0; $aheight = 0; $awidth = 0; $vheight = 0; $vwidth = 0; if (isset($the_media)) { $the_media->code = stripslashes($the_media->code); if ($the_media->type == 'video') { if ($the_media->source == 'url' || $the_media->source == 'local') { if ($the_media->width == 0 || $the_media->height == 0) { $vheight = 300; $vwidth = 400; } else { $vheight = $the_media->height; $vwidth = $the_media->width;