require_once $CFG->dirroot . '/blocks/webgd_community/lib/class/CssResources.php'; require_login(1); global $USER, $CFG; $PAGE->requires->css(CssResources::HOME_COMMUNITY); $PAGE->set_url('/course/index.php'); $PAGE->set_context(context_system::instance()); $PAGE->set_pagelayout('standard'); $idCommunity = optional_param('community', 0, PARAM_INTEGER); $idFile = optional_param('file', 0, PARAM_INTEGER); echo $OUTPUT->header('themeselector'); $webgdCommunityDao = new WebgdCommunityDao(); $community = $webgdCommunityDao->findCommunityById($idCommunity); $url = $CFG->wwwroot . '/blocks/webgd_community/view.php?community=' . $idCommunity; if ($idFile) { $webgdCommunityDao = new WebgdCommunityDao(); if (!$webgdCommunityDao->searchFileMovieById($idCommunity, $idFile)) { redirect("{$CFG->wwwroot}/blocks/webgd_community/view.php?community={$idCommunity}&option=7", 'Video não encontrado', 10); echo $OUTPUT->footer(); die; } else { echo $OUTPUT->heading('<span class="titulo_list">' . '<a href="' . $url . '" >' . $OUTPUT->heading($community->name . ' - Editar Vídeo', 2, 'titulo_comunidade') . '</a>'); } } else { echo $OUTPUT->heading('<span class="titulo_list">' . '<a href="' . $url . '" >' . $OUTPUT->heading($community->name, 2, 'titulo_comunidade') . '</a><br/></span>'); echo "<div class='subTitle'>Gravar Vídeo</div>"; } ?> <script src= "<?php echo $CFG->wwwroot; ?> /blocks/webgd_community/menus/record/js/whammy.min.js"></script>