Exemplo n.º 1
0
         Elfic::cosRedirect('index2.php', MSG_NOPERM_COM);
     } else {
         if (isset($_do_save) && $_do_save == "do") {
             $a = new Agendas();
             $a->registrarAgenda();
         } else {
             $a = new Agendas();
             $a->cargarAgenda($_cid, $_tutor_id);
         }
     }
     break;
 case 'borrarAgenda':
     if (!$uperms['cursos_w']) {
         Elfic::cosRedirect('index2.php?com=cursos', MSG_NOPERM_ACC);
     } else {
         if ($uperms['superusuario'] || Cursos::getTutor($_cid) == $uid) {
             $a = new Agendas();
             $a->borrarAgenda($_cid);
             Elfic::cosRedirect('index2.php?com=cursos&do=view&cid=' . $_cid);
         } else {
             Elfic::cosRedirect('index2.php?com=cursos', MSG_NOPERM_ACC);
         }
     }
     break;
 case 'view':
     $smarty->assign('id', $_cid);
     $smarty->display('cursos/cursos_menubar.tpl');
     $smarty->display('end_menubar.tpl');
     if (!$uperms['cursos_w']) {
         Elfic::cosRedirect('index2.php?com=cursos', MSG_NOPERM_ACC);
     } else {