예제 #1
0
$menu[] = array("img" => "", "url" => "#", "text" => "Cursos", "title" => "Cursos", "alt" => "Cursos", "id" => "", "class" => "current_page_item");
$menu[] = array("img" => "", "url" => "UTP-mantenedorCursos.php", "text" => "Mantenedor Cursos", "title" => "Agregar/Eliminar Cursos", "alt" => "");
$smarty->assign("menu", $menu);
$smarty->assign("titulo_principal", "Modificar Cursos");
$smarty->assign("title", "UTP: Modificar Cursos");
$smarty->assign("titulo_secundario", "");
$smarty->assign("file_content", "utp/UTP-modificar_cursos.tpl");
$smarty->display('layout/main.tpl');
if (isset($_POST['libt_ID'])) {
    if (is_array($vals_alum_con)) {
        $alumnos_sacar = array_diff($vals_alum_con, $_POST['libt_ID']);
        $alumnos_poner = array_diff($_POST['libt_ID'], $vals_alum_con);
    } else {
        $alumnos_poner = $_POST['libt_ID'];
    }
    if (count($alumnos_poner) > 0) {
        foreach ($alumnos_poner as $key => $rut_poner) {
            $class_alumno->modificarCursoAlumno($rut_poner, $_POST['curso']);
        }
    }
    if (count($alumnos_sacar) > 0) {
        foreach ($alumnos_sacar as $key => $rut_sacar) {
            $class_alumno->modificarCursoAlumno($rut_sacar);
        }
    }
    $_SESSION['curso_seleccionado'] = $_POST['curso'];
    unset($_POST);
    moveLocation("modificar_cursos.php", 0);
} elseif (isset($_POST['libt_ID2'])) {
    if (is_array($vals_alum_sin)) {
        $alumnos_sacar = array_diff($_POST['libt_ID2'], $vals_alum_sin);