//////////////////////////////////////////////////// $color = $ESTADOS_COLOR["{$estado}"]; //////////////////////////////////////////////////// //SELECCION //////////////////////////////////////////////////// $estadotxt = $ESTADOS["{$estado}"]; $respuestatxt = $BOOLEAN["{$respuesta}"]; $helpicon = "<a href='JavaScript:void(null)' onclick='toggleHelp(this)'><img src='img/help.png' width='15em'></a>"; $readonly = 0; if (!isBlank($perm1)) { $readonly = 1; } $tiposel = generateSelection($TIPO_EVENTO, "tipoevento", "{$tipoevento}", "", $readonly); $programasel = generateSelection($PROGRAMAS_FCEN, "programa", "{$programa}", "", $readonly); $apoyosel = generateSelection($APOYOS, "apoyo", "{$apoyo}", "", $readonly); $estadosel = generateSelection($ESTADOS, "estado", "{$estado}", "", $readonly); //////////////////////////////////////////////////// //DISPLAY //////////////////////////////////////////////////// if ($estado == "nueva") { $content .= <<<FORM <style> .escondida{ display:none; } </style> <style> .nonueva{ display:none; } </style>
</table> </form> C; } else { if ($mode == "cambiar") { if (isset($EMAIL)) { $email = $EMAIL; $pass = $PASS; } $results = mysqlCmd("select * from Usuarios where email='{$email}'"); $spass = $results["password"]; $nombre = $results["nombre"]; $documento = $results["documento"]; $tipo = $results["tipo"]; $spass = $results["password"]; $tiposel = generateSelection($TIPOS, "tipo", $tipo); if ($pass == $spass) { $content .= <<<C {$FORM} <h3>Cambio de Información para {$nombre}</h3> <table> <tr> <td>Nombre:</td> <td><input name="nombre" value="{$nombre}"></td> </tr> <tr> <td>Documento:</td> <td><input name="documento" value="{$documento}"></td> </tr> <tr> <td>Tipo:</td>
}else{ //\$msg.html("Conectado como usuario {$email}..."); setTimeout(function(){document.location="{$urlref}";},0); } } </script> V; } else { //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //UPDATE COURSE //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if ($action == "updatecourses") { $ps = parseParams($params); $planid = $ps["planid"]; $cursos = updateCursos($planid); $html .= generateSelection($cursos, "curso", ""); } else { //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //UPDATE COURSE //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if ($action == "updateinstituto") { $ps = parseParams($params); $planid = $ps["planid"]; preg_match("/(\\d+)-/", $planid, $matches); $programaid = $matches[1]; $results = mysqlCmd("select instituto from Programas where programaid='{$programaid}'"); $instituto = $results["instituto"]; //$instituto=$INSTITUTOS["$instituto"]; $html .= "{$instituto}"; } else { //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$i = 0; foreach ($results as $actividad) { foreach (array_keys($ACTIVIDADES_FIELDS) as $field) { $name = "act_{$field}"; ${$name} = $actividad["{$field}"]; } if ($i == 0 and !isset($Actividades_actid)) { $Actividades_actid = $act_actid; } $act_tipo = $TIPOS_ACTIVIDAD["{$act_tipo}"]; $act_nombre = substr($act_nombre, 0, 20) . "..."; $act_encargado = substr($act_encargado, 0, 10) . "..."; $actividades["{$act_actid}"] = "{$act_tipo} : {$act_nombre} / {$act_encargado} / {$act_fechaini},{$act_horaini}"; $i++; } $actsel = generateSelection($actividades, "Actividades_actid", "{$Actividades_actid}"); $content .= <<<C <form action="comaca.php" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <table border=0px width=60% cellspacing=0px> <tr class="field"> <td class="campo" id="documento">Documento del asistente{$HELPICON}</td> <td class="form"> <input type="text" name="Usuarios_documento" value="{$Usuarios_documento}" onchange="updateStudentForm(this)" readonly> </td> </tr> <tr class="ayuda" id="documento_help" > <td colspan=2>Documento de identidad del asistente.</td> </tr>