<?php include_once "../../login/check.php"; if (!empty($_POST)) { include_once "../../class/preguntas.php"; $preguntas = new preguntas(); extract($_POST); //empieza la copia de archivos $valores = array("codparalelo" => "'{$codparalelo}'", "bimestre" => "'{$bimestre}'", "pregunta" => "'{$pregunta}'", "opcion1" => "'{$opcion1}'", "opcion2" => "'{$opcion2}'", "opcion3" => "'{$opcion3}'", "opcion4" => "'{$opcion4}'", "opcion5" => "'{$opcion5}'", "correcta" => "'{$correcta}'"); if ($_FILES['preguntaaudio']['name'] != "") { @copy($_FILES['preguntaaudio']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['preguntaaudio']['name']); $valores['preguntaaudio'] = "'" . $_FILES['preguntaaudio']['name'] . "'"; } if ($_FILES['imagen1']['name'] != "") { @copy($_FILES['imagen1']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen1']['name']); $valores['imagen1'] = "'" . $_FILES['imagen1']['name'] . "'"; } if ($_FILES['imagen2']['name'] != "") { @copy($_FILES['imagen2']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen2']['name']); $valores['imagen2'] = "'" . $_FILES['imagen2']['name'] . "'"; } if ($_FILES['imagen3']['name'] != "") { @copy($_FILES['imagen3']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen3']['name']); $valores['imagen3'] = "'" . $_FILES['imagen3']['name'] . "'"; } if ($_FILES['imagen4']['name'] != "") { @copy($_FILES['imagen4']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen4']['name']); $valores['imagen4'] = "'" . $_FILES['imagen4']['name'] . "'"; } if ($_FILES['imagen5']['name'] != "") { @copy($_FILES['imagen5']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen5']['name']);
<?php include_once "../../login/check.php"; if (!empty($_POST)) { include_once "../../class/preguntas.php"; $preguntas = new preguntas(); extract($_POST); //empieza la copia de archivos /* if(($_FILES['curriculum']['type']=="application/pdf" || $_FILES['curriculum']['type']=="application/msword" || $_FILES['curriculum']['type']=="application/vnd.openxmlformats-officedocument.wordprocessingml.document") && $_FILES['curriculum']['size']<="500000000"){ @$curriculum=$_FILES['curriculum']['name']; @copy($_FILES['curriculum']['tmp_name'],"../curriculum/".$_FILES['curriculum']['name']); }else{ //mensaje que no es valido el tipo de archivo $mensaje[]="Archivo no válido. Verifique e intente nuevamente"; } */ if ($_FILES['preguntaaudio']['name'] != "") { @copy($_FILES['preguntaaudio']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['preguntaaudio']['name']); $valores['preguntaaudio'] = "'" . $_FILES['preguntaaudio']['name'] . "'"; } if ($_FILES['imagen1']['name'] != "") { @copy($_FILES['imagen1']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen1']['name']); } if ($_FILES['imagen2']['name'] != "") { @copy($_FILES['imagen1']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen1']['name']); } if ($_FILES['imagen3']['name'] != "") { @copy($_FILES['imagen1']['tmp_name'], "../../contenido/evaluacion/" . $_FILES['imagen1']['name']); } if ($_FILES['imagen4']['name'] != "") {
<?php include_once '../../login/check.php'; $folder = "../../"; $titulo = "Modificar Pregunta"; $id = $_GET['id']; include_once '../../class/preguntas.php'; $preguntas = new preguntas(); $pre = array_shift($preguntas->mostrar($id)); $bimestre = array("1" => "1", "2" => "2", "3" => "3", "4" => "4"); $ncorrecta = array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5"); include_once "../../class/paralelo.php"; $paralelo = new paralelo(); $par = todolista($paralelo->mostrarTodo(), "codparalelo", "nombre", ""); include_once '../../funciones/funciones.php'; include_once '../../cabecerahtml.php'; include_once '../../cabecera.php'; ?> <div class="grid_12"> <div class="contenido imagenfondo"> <div class="prefix_0 grid_11 alpha"> <fieldset> <div class="titulo"><?php echo $titulo; ?> </div> <form action="actualizar.php" method="post" enctype="multipart/form-data"> <?php campos("", "id", "hidden", $id); ?> <table class="tablareg">
<?php include_once '../../login/check.php'; if (!empty($_POST)) { $folder = "../../"; include_once '../../class/preguntas.php'; $preguntas = new preguntas(); include_once '../../class/paralelo.php'; $paralelo = new paralelo(); extract($_POST); $codparalelo = $codparalelo != "" ? $codparalelo : "%"; $bimestre = $bimestre != "" ? $bimestre : "%"; $est = $preguntas->mostrarTodo("codparalelo LIKE '{$codparalelo}' and bimestre LIKE '{$bimestre}' and pregunta LIKE '%{$pregunta}%'", "pregunta"); foreach ($est as $e) { $i++; $par = array_shift($paralelo->mostrar($e['codparalelo'])); $datos[$i]['codpreguntas'] = $e['codpreguntas']; $datos[$i]['pregunta'] = $e['pregunta']; $datos[$i]['bimestre'] = $e['bimestre']; $datos[$i]['paralelo'] = $par['nombre']; } $titulo = array("pregunta" => "Pregunta", "bimestre" => "Bimestre", "paralelo" => "Paralelo"); listadoTabla($titulo, $datos, 1, "modificar.php", "eliminar.php", ""); }
<?php session_start(); require_once "../modelos/modelo.registrar_preguntas_eva.php"; $mensaje = array(); $rs = array(); if (isset($_POST["id_evaluacion"]) && $_POST["id_evaluacion"] != "") { $evaluacion = $_POST["id_evaluacion"]; } else { $mensaje[0] = "campos_blancos"; die(json_encode($mensaje)); } ////////////////////////////////////////////////// $obj_pregunta = new preguntas(); $rs = $obj_pregunta->consultar_preguntas_form($evaluacion); if ($rs == "error") { $mensaje[0] = "error_bd"; die(json_encode($mensaje)); } else { $mensaje[0] = $rs; $mensaje[1] = $obj_pregunta->consultar_estatus_aula($evaluacion); die(json_encode($mensaje)); } //////////////////////////////////////////////////
//$evaluacion=$_POST["evaluacion_p"]; $evaluacion = $_POST["id_evaluacion"]; $preguntas_evaluacion = $_POST["pregunta_evaluacion"]; $n_pregunta = $_POST["pr_n"]; $pregunta_respuesta1 = $_POST["pregunta_respuesta1"]; $pregunta_respuesta2 = $_POST["pregunta_respuesta2"]; $pregunta_respuesta3 = $_POST["pregunta_respuesta3"]; $pregunta_respuesta4 = $_POST["pregunta_respuesta4"]; $id_pregunta = $_POST["id_pregunta"]; $r_op = $_POST["r_op"]; //valido si el id es blanco if ($id_pregunta == "") { $id_pregunta = 0; } //creo el objeto $objeto_preguntas = new preguntas(); $recordset = $objeto_preguntas->cargar_preguntas($aula, $evaluacion, $preguntas_evaluacion, $n_pregunta, $pregunta_respuesta1, $pregunta_respuesta2, $pregunta_respuesta3, $pregunta_respuesta4, $id_pregunta, $r_op); //die(json_encode($recordset)); if ($recordset == "error") { $mensaje[0] = "error_bd"; } else { $mensaje[0] = "registro_exitoso"; $mensaje[1] = $recordset[0][0]; //$mensaje[2]=$objeto_preguntas->consultar_cuantas_preguntas($evaluacion); /////////////////////////////////////////////////--AUDITORIA--/////////////////////////////////////// $auditoria_preguntas = new auditoria("Evaluacion preguntas", "Carga de preguntas(ID:" . $mensaje[1] . "-EVALUACION:" . $evaluacion . ")"); $auditoria = $auditoria_preguntas->registrar_auditoria(); if ($auditoria == false) { $mensaje[0] = 'error_auditoria'; die(json_encode($mensaje)); }
<?php session_start(); require "../modelos/modelo.registrar_preguntas_eva.php"; $mensaje = array(); $rs = array(); if (isset($_POST["id_pregunta"]) && $_POST["id_pregunta"] != "") { $id_pregunta = $_POST["id_pregunta"]; } //declaro la clase $obj_pregunta = new preguntas(); $rs = $obj_pregunta->consultar_preguntas($id_pregunta); die(json_encode($rs)); if ($rs == "error") { $mensaje[0] = "error"; die(json_encode($mensaje)); } else { die(json_encode($rs)); }
if (isset($_POST["f_aula"]) && $_POST["f_aula"] != "" || isset($_POST["f_ev"]) && $_POST["f_ev"] != "" || isset($_POST["f_pr"]) && $_POST["f_pr"] != "") { $faula = strtoupper($_POST["f_aula"]); $fev = strtoupper($_POST["f_ev"]); $fpr = strtoupper($_POST["f_pr"]); } else { $faula = ''; $fev = ''; $fpr = ''; } $offset = $_POST["offset"]; $limit = $_POST["limit"]; $actual = $_POST["actual"]; $nom_fun = "consultar_cuerpo_tabla_preguntas"; /////////////////////////////////////////////// //declaro la clase $obj_preguntas = new preguntas(); $rs = $obj_preguntas->consultar_cuerpo_preguntas($faula, $fev, $fpr, $offset, $limit); //die(json_encode($rs)); if ($rs == "error") { $mensaje[0] = "error"; die(json_encode($mensaje)); } else { for ($i = 0; $i <= count($rs) - 1; $i++) { $k = $i + 1; $cuerpo_preguntas .= "<tr>\n\t\t\t\t\t\t\t<td width='25%'>" . $rs[$i][0] . "</td>\n\t\t\t\t\t\t\t<td width='25%'>" . $rs[$i][1] . "</td>\n\t\t\t\t\t\t\t<td width='25%'>" . $rs[$i][2] . "</td>\n\t\t\t\t\t\t\t<td width='25%'>" . $rs[$i][3] . "</td>\n\t\t\t\t\t\t\t<td width='25%'><button class='btn btn-danger' id='btn_selec" . $k . "' onmouseover='cambiar_color_btn(this);' onmouseout='cambiar_color_btn2(this);' onclick='pregunta_select(" . $rs[$i][0] . ");' ><span class='glyphicon glyphicon-ok'></span></button></td>\t\n\t\t\t\t\t </tr>"; } if ($actual == "") { $actual = 0; } $obj_paginador = new paginacion($actual, $obj_preguntas->num_rows, $nom_fun); $mensaje[0] = $cuerpo_preguntas;