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 { if (isset($do_edit) && $do_edit == "do") { $c = new Cursos($_cid); $c->save(); } else { $c = new Cursos($_cid); $c->edit(); } } break; case 'ajax': include 'cursos.ajax.php'; break; }