Gestion des activités

if (isloggedin() and !isguestuser()) { redirect("$CFG->wwwroot/");

} else {

   include("index_form.html");
   if ($errormsg) {
       $PAGE->requires->js_init_call('M.util.focus_login_error', null, true);
   } else if (!empty($CFG->loginpageautofocus)) {
       //focus username or password
       $PAGE->requires->js_init_call('M.util.focus_login_form', null, true);
   }

}

echo $OUTPUT->footer();  ?>