Пример #1
0
if (isset($_REQUEST['ADJUNTAEVENTO'])) {
    $_SESSION['ERRORESSUBIRARCHIVO'] = '';
    $partes_ruta = pathinfo($_FILES["uploadedfileEvento"]['name']);
    try {
        $filename = NexValOracle('legales.SEQ_LEA_ID');
        $contratoID = $_SESSION["NUMEROJUICIO"];
        $id = $_REQUEST['id'];
        $filenameServer = '';
        // $pathServerEventos = DATA_IMAGE_RAIZ_PATH.'\juicios\\';
        $pathServerEventos = Get_Lpa_Parametro('DIRECTORIOARCHIVOS');
        if (!ValidarControlInput('textdescripcion', "Error : Debe completar la descripcion <p>") or !ValidarControlFile('uploadedfileEvento', "Error : Debe seleccionar un archivo para Asociar al Evento <p>")) {
            header("Location: /index.php?pageid=134&id=" . $id);
            return false;
        }
        //1000000 = 1mb = 10000kb == 1048576bytes = 1mb
        if (!subirArchivo($_FILES["uploadedfileEvento"], $pathServerEventos, $filename, '', MAX_FILE_UPLOAD, $contratoID, $filenameServer, $nomArchivo)) {
            $_SESSION['ERRORESSUBIRARCHIVO'] = "Error : " . $_SESSION['ERRORESSUBIRARCHIVO'] . '<p>';
        } else {
            $ea_id = $filename;
            $ea_descripcion = $_REQUEST['textdescripcion'];
            //$ea_patharchivo = $filenameServer;
            $idjuicio = $contratoID;
            // $nomArchivo  SE OBTIENE DE LA FUNCION subirArchivo
            $ea_ideventojuicioentramite = $id;
            InsertAdjuntoEvento($ea_id, $ea_descripcion, $idjuicio, $nomArchivo, $ea_ideventojuicioentramite);
            $_SESSION['ERRORESSUBIRARCHIVO'] .= "Archivo : " . $partes_ruta['basename'] . " ( " . redondeo_tamano_archivo(filesize($_FILES["uploadedfileEvento"]['tmp_name'])) . " ) fue subido correctamente <p>";
        }
        //echo $_SESSION['ERRORESSUBIRARCHIVO'];
        header("Location: /index.php?pageid=134&id=" . $id);
        return true;
    } catch (Exception $e) {
Пример #2
0

$extension = "";
$filename = "";
$mostrarImagen = false;
if ((isset($_REQUEST["cargar"])) and ($_REQUEST["cargar"] == "t")) {
	if (!isFechaValida($_POST["fecha"], false))
		echo "<span style='color:#f00;'>Debe ingresar una fecha válida.</span>";
	elseif (!isset($_REQUEST["tipoSello"]))
		echo "<span style='color:#f00;'>Debe indicar el tipo de sello.</span>";
	elseif ($_FILES["imagen"]["name"] == "")
		echo "<span style='color:#f00;'>Debe seleccionar un archivo.</span>";
	else {
		$error = "";
		$filename = date("Ymdhmi")."_".getWindowsLoginName();
		if (!subirArchivo($_FILES["imagen"], DATA_AVISO_OBRA_PATH, $filename, array("jpg", "jpeg", "pdf", "png"), $error, $extension))
			echo "<span style='color:#f00;'>".$error."</span>";
		else		// Si entra acá es porque pasó todas las validaciones..
			$mostrarImagen = true;
	}
}


$fecha = date("d/m/Y");
if (isset($_REQUEST["fecha"]))
	$fecha = $_REQUEST["fecha"];

$tipoSello = "";
if (isset($_REQUEST["tipoSello"]))
	$tipoSello = $_REQUEST["tipoSello"];
Пример #3
0
        $mensaje = $_REQUEST['mensaje'];
        addMensajeProyecto($proyecto, $mensaje);
        break;
    case 'verMensajesProyecto':
        $idProyecto = $_REQUEST['idProyecto'];
        verMensajesProyecto($idProyecto);
        break;
    case 'getProyectoAlumno':
        getProyectoAlumno();
        break;
    case 'cambiarProgreso':
        cambiarProgreso($_REQUEST['progreso']);
        break;
    case 'subirArchivo':
        $idProyecto = $_REQUEST['id'];
        subirArchivo($idProyecto);
        break;
    case 'mostrarArchivos':
        $idProyecto = $_REQUEST['idProyecto'];
        mostrarArchivos($idProyecto);
        break;
}
?>







Пример #4
0
                    echo '<div class="alert alert-danger" id="events-result" data-es="">ERROR: Al subir su imagen la razon es:(' . $file['error'] . ').</div>';
                } else {
                    // Hacer consutla a base de datos todoc orrectamente
                    echo '   <div class="alert alert-success" id="events-result" data-es=""><strong>Su libro se Agrego con Exito!<br>Nombre del libro:</strong> ' . $_POST['titulo'] . '
		               <br><img src="up/' . $file['filename'] . '"  width="80">	
		               <br>Enlace directo de libro:  <a href="' . $_POST['enlace'] . '" target="_blank">Enlace</a>	</div>';
                    $dao->crearLibro($_POST, $file['filename'], '');
                }
                // sin subir libro  $_POST['enlace']
            }
        } else {
            // post sin imagen
            if (isset($_POST['SubeLibro'])) {
                // subir libro
                //echo "subirlibro Sin imagen";
                $error = subirArchivo('librofile', false, true);
                if ($error['error']) {
                    // 	echo $error['error'];
                    echo '<div class="alert alert-danger" id="events-result" data-es="">ERROR: Al subir su libro la razon es:(' . $error['error'] . ').</div>';
                } else {
                    // todo correcto hacr consulta de libro sin imagen en base de datos
                    echo '   <div class="alert alert-success" id="events-result" data-es=""><strong>Su libro se Agrego con Exito!<br>Nombre del libro:</strong> ' . $_POST['titulo'] . '
		                   <br><img src="img/book.png"  width="80">	
		                   <br>Enlace directo de libro:  <a href="up/libros/' . $error['filename'] . '" target="_blank">Enlace</a></div>';
                    $dao->crearLibro($_POST, '', $error['filename']);
                }
            } else {
                // Correcto > echo "enlace Sin imagen";
                // sin subir libro  $_POST['enlace']
                echo '   <div class="alert alert-success" id="events-result" data-es=""><strong>Su libro se Agrego con Exito!<br>Nombre del libro:</strong> ' . $_POST['titulo'] . '
		<br><img src="img/book.png"  width="80">	
Пример #5
0
function validar($filename) {
	global $fileCV;
	global $fileFoto;

	$errores = false;

	echo "<script type='text/javascript'>";
	echo "with (window.parent.document) {";
	echo "var errores = '';";

	if (trim($_POST["nombre1"]) == "") {
		echo "errores+= '- Nombre 1 vacío.<br />';";
		$errores = true;
	}

	if (trim($_POST["apellido1"]) == "") {
		echo "errores+= '- Apellido 1 vacío.<br />';";
		$errores = true;
	}

	if (!isFechaValida($_POST["fechaNacimiento"], false)) {
		echo "errores+= '- Fecha de Nacimiento vacía o errónea.<br />';";
		$errores = true;
	}

	if (!isset($_POST["sexo"])) {
		echo "errores+= '- Sexo sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["estadoCivil"] == -1) {
		echo "errores+= '- Estado Civil sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["paisNacimiento"] == -1) {
		echo "errores+= '- País de Nacimiento sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["nacionalidad"] == -1) {
		echo "errores+= '- Nacionalidad sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["tipoDocumento"] == -1) {
		echo "errores+= '- Tipo de Documento sin elegir.<br />';";
		$errores = true;
	}

	if (trim($_POST["numeroDocumento"]) == "") {
		echo "errores+= '- Nro. de Documento vacío.<br />';";
		$errores = true;
	}
	else {
		if (!validarEntero($_POST["numeroDocumento"])) {
			echo "errores+= '- El Nro. de Documento es inválido.<br />';";
			$errores = true;
		}
	}

	if (trim($_POST["telefonoFijo"]) == "") {
		echo "errores+= '- Teléfono Fijo vacío.<br />';";
		$errores = true;
	}

	if (trim($_POST["email"]) != "") {
		$params = array(":email" => $_POST["email"]);
		$sql = "SELECT art.varios.is_validaemail(:email) FROM DUAL";
		if (valorSql($sql, "", $params) != "S") {
			echo "errores+= '- El e-Mail es inválido.<br />';";
			$errores = true;
		}
	}

	if (trim($_POST["calle"]) == "") {
		echo "errores+= '- Calle vacía.<br />';";
		$errores = true;
	}

	if (trim($_POST["numeroCalle"]) == "") {
		echo "errores+= '- Número de la Calle vacío.<br />';";
		$errores = true;
	}

	if (trim($_POST["cp"]) == "") {
		echo "errores+= '- CP vacío.<br />';";
		$errores = true;
	}

	if ($_POST["localidad"] == -1) {
		echo "errores+= '- Localidad sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["provincia"] == -1) {
		echo "errores+= '- Provincia sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["pais"] == -1) {
		echo "errores+= '- País sin elegir.<br />';";
		$errores = true;
	}

	if ($_FILES["foto"]["name"] != "") {
		$error = "";
		if (!subirArchivo($_FILES["foto"], DATA_CV_PATH, $filename, array("jpg"), 71680, $error, $fileFoto)) {
			echo "errores+= '- ".$error."<br />';";
			$errores = true;
		}
	}

//------------------------------------------------------------------------------------

	if ($_POST["nivelFormacion1"] == -1) {
		echo "errores+= '- Nivel 1 sin elegir.<br />';";
		$errores = true;
	}

	if (!isset($_POST["completo1"])) {
		echo "errores+= '- Completo 1 sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["titulo1"] == -1) {
		echo "errores+= '- Título 1 sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["institucion1"] == -1) {
		echo "errores+= '- Institución 1 sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["carrera1"] == -1) {
		echo "errores+= '- Carrera 1 sin elegir.<br />';";
		$errores = true;
	}

	if ($_POST["formacion2visible"] == "t") {
		if ($_POST["nivelFormacion2"] == -1) {
			echo "errores+= '- Nivel 2 sin elegir.<br />';";
			$errores = true;
		}

		if (!isset($_POST["completo2"])) {
			echo "errores+= '- Completo 2 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["titulo2"] == -1) {
			echo "errores+= '- Título 2 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["institucion2"] == -1) {
			echo "errores+= '- Institución 2 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["carrera2"] == -1) {
			echo "errores+= '- Carrera 2 sin elegir.<br />';";
			$errores = true;
		}
	}

	if ($_POST["formacion3visible"] == "t") {
		if ($_POST["nivelFormacion3"] == -1) {
			echo "errores+= '- Nivel 3 sin elegir.<br />';";
			$errores = true;
		}

		if (!isset($_POST["completo3"])) {
			echo "errores+= '- Completo 3 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["titulo3"] == -1) {
			echo "errores+= '- Título 3 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["institucion3"] == -1) {
			echo "errores+= '- Institución 3 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["carrera3"] == -1) {
			echo "errores+= '- Carrera 3 sin elegir.<br />';";
			$errores = true;
		}
	}

	if ($_POST["formacion4visible"] == "t") {
		if ($_POST["nivelFormacion4"] == -1) {
			echo "errores+= '- Nivel 4 sin elegir.<br />';";
			$errores = true;
		}

		if (!isset($_POST["completo4"])) {
			echo "errores+= '- Completo 4 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["titulo4"] == -1) {
			echo "errores+= '- Título 4 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["institucion4"] == -1) {
			echo "errores+= '- Institución 4 sin elegir.<br />';";
			$errores = true;
		}

		if ($_POST["carrera4"] == -1) {
			echo "errores+= '- Carrera 4 sin elegir.<br />';";
			$errores = true;
		}
	}

//------------------------------------------------------------------------------------

	if (!isFechaValida($_POST["fechaDesde1"], false)) {
		echo "errores+= '- Fecha desde 1 vacía o errónea.<br />';";
		$errores = true;
	}

	if ($_POST["fechaHasta1"] != "")
		if (!isFechaValida($_POST["fechaHasta1"], false)) {
			echo "errores+= '- Fecha hasta 1 errónea.<br />';";
			$errores = true;
		}

	if (trim($_POST["empresa1"]) == "") {
		echo "errores+= '- Empresa 1 vacía.<br />';";
		$errores = true;
	}

	if (trim($_POST["tareas1"]) == "") {
		echo "errores+= '- Descripción Tareas 1 vacía.<br />';";
		$errores = true;
	}

	if ($_POST["experienciaLaboral2visible"] == "t") {
		if (!isFechaValida($_POST["fechaDesde2"], false)) {
			echo "errores+= '- Fecha desde 2 vacía o errónea.<br />';";
			$errores = true;
		}

		if ($_POST["fechaHasta2"] != "")
			if (!isFechaValida($_POST["fechaHasta2"], false)) {
				echo "errores+= '- Fecha hasta 2 errónea.<br />';";
				$errores = true;
			}

		if (trim($_POST["empresa2"]) == "") {
			echo "errores+= '- Empresa 2 vacía.<br />';";
			$errores = true;
		}

		if (trim($_POST["tareas2"]) == "") {
			echo "errores+= '- Descripción Tareas 2 vacía.<br />';";
			$errores = true;
		}
	}

	if ($_POST["experienciaLaboral3visible"] == "t") {
		if (!isFechaValida($_POST["fechaDesde3"], false)) {
			echo "errores+= '- Fecha desde 3 vacía o errónea.<br />';";
			$errores = true;
		}

		if ($_POST["fechaHasta3"] != "")
			if (!isFechaValida($_POST["fechaHasta3"], false)) {
				echo "errores+= '- Fecha hasta 3 errónea.<br />';";
				$errores = true;
			}

		if (trim($_POST["empresa3"]) == "") {
			echo "errores+= '- Empresa 3 vacía.<br />';";
			$errores = true;
		}

		if (trim($_POST["tareas3"]) == "") {
			echo "errores+= '- Descripción Tareas 3 vacía.<br />';";
			$errores = true;
		}
	}

	if ($_POST["experienciaLaboral4visible"] == "t") {
		if (!isFechaValida($_POST["fechaDesde4"], false)) {
			echo "errores+= '- Fecha desde 4 vacía o errónea.<br />';";
			$errores = true;
		}

		if ($_POST["fechaHasta4"] != "")
			if (!isFechaValida($_POST["fechaHasta4"], false)) {
				echo "errores+= '- Fecha hasta 4 errónea.<br />';";
				$errores = true;
			}

		if (trim($_POST["empresa4"]) == "") {
			echo "errores+= '- Empresa 4 vacía.<br />';";
			$errores = true;
		}

		if (trim($_POST["tareas4"]) == "") {
			echo "errores+= '- Descripción Tareas 4 vacía.<br />';";
			$errores = true;
		}
	}

//------------------------------------------------------------------------------------

	if ($_POST["fechaCurso1"] != "")
		if (!isFechaValida($_POST["fechaCurso1"], false)) {
			echo "errores+= '- Fecha de Curso 1 errónea.<br />';";
			$errores = true;
		}

	if ($_POST["curso2visible"] == "t") {
		if ($_POST["fechaCurso2"] != "")
			if (!isFechaValida($_POST["fechaCurso2"], false)) {
				echo "errores+= '- Fecha de Curso 2 errónea.<br />';";
				$errores = true;
			}
	}

	if ($_POST["curso3visible"] == "t") {
		if ($_POST["fechaCurso3"] != "")
			if (!isFechaValida($_POST["fechaCurso3"], false)) {
				echo "errores+= '- Fecha de Curso 3 errónea.<br />';";
				$errores = true;
			}
	}

	if ($_POST["curso4visible"] == "t") {
		if ($_POST["fechaCurso4"] != "")
			if (!isFechaValida($_POST["fechaCurso4"], false)) {
				echo "errores+= '- Fecha de Curso 4 errónea.<br />';";
				$errores = true;
			}
	}

//------------------------------------------------------------------------------------

	if (trim($_POST["remuneracion"]) != "") {
		if (!validarNumero($_POST["remuneracion"])) {
			echo "errores+= '- La Remuneración pretendida es inválida.<br />';";
			$errores = true;
		}
	}

	if ($_FILES["cv"]["name"] != "") {
		$error = "";
		if (!subirArchivo($_FILES["cv"], DATA_CV_PATH, $filename, array("doc", "docx", "pdf"), 10485760, $error, $fileCV)) {
			echo "errores+= '- ".$error."<br />';";
			$errores = true;
		}
	}

	if (!isset($_SESSION["captcha"])) {
		echo "errores+= '- El captcha es inválido, por favor refrésquelo.<br />';";
		$errores = true;
	}
	elseif ($_POST["captcha"] != $_SESSION["captcha"]) {
		echo "errores+= '- El captcha es erróneo.<br />';";
		$errores = true;
	}


	if ($errores) {
		echo "getElementById('imgEnviar').style.display = 'inline';";
		echo "getElementById('imgProcesando').style.display = 'none';";
		echo "getElementById('errores').innerHTML = errores;";
		echo "getElementById('divErrores').style.display = 'inline';";
		echo "getElementById('foco').style.display = 'block';";
		echo "getElementById('foco').focus();";
		echo "getElementById('foco').style.display = 'none';";
	}
	else {
		echo "getElementById('divErrores').style.display = 'none';";
	}

	echo "}";
	echo "</script>";

	return !$errores;
}
Пример #6
0
	if ($_POST["tipo"] == "M") {
		// Guardo el artículo propiamente dicho..
		$blobParamName = "the_clob";
		$sql =
			"UPDATE web.wai_articulosintranet
					SET ai_articulo = EMPTY_CLOB()
				WHERE ai_id = ".$_POST["id"]."
		RETURNING ai_articulo INTO :".$blobParamName;
		DBSaveLob($conn, $sql, $blobParamName, $_POST["cuerpo"], OCI_B_CLOB);
	}

	if ($_POST["tipo"] == "X")
		if ($_FILES["archivo"]["name"] != "") {
			$msgError = "";
			if (subirArchivo($_FILES["archivo"], DATA_ARTICULOS_ARCHIVOS_PATH, array("pdf"), 20971520, $file, $msgError)) {
				$params = array(":id" => $_POST["id"], ":nombrearchivo" => $_FILES["archivo"]["name"]);
				$sql =
					"UPDATE web.wai_articulosintranet
							SET ai_nombrearchivo = :nombrearchivo
						WHERE ai_id = :id";
				DBExecSql($conn, $sql, $params, OCI_DEFAULT);
			}
			else
				throw new Exception($msgError);
		}

	// Actualizo el orden de los artículos..
	$params = array(":id" => $_POST["id"],
									":posicion" => zeroIfEmpty($_POST["posicion"]),
									":ubicacion" => $_POST["ubicacion"]);
        $MontoGeneral = $cnf['Valor'];
    } else {
        $cnf = $conf->mostrarConfig("MontoGeneral");
        $MontoGeneral = $cnf['Valor'];
    }
    $valuesDoc = array('CodDocumento' => 'Null', 'CodAlumno' => $CodAlumno, 'CertificadoNac' => $CertificadoNac, 'LibretaEsc' => $LibretaEsc, 'LibretaVac' => $LibretaVac, 'CedulaId' => $CedulaId, 'CedulaIdP' => $CedulaIdP, 'CedulaIdM' => $CedulaIdM, 'Observaciones' => "LOWER('{$ObservacionesDoc}')");
    $valuesAl = array('CodAlumno' => "{$CodAlumno}", 'Paterno' => "LOWER('{$Paterno}')", 'Materno' => "LOWER('{$Materno}')", 'Nombres' => "LOWER('{$Nombres}')", 'Sexo' => $Sexo, 'LugarNac' => "LOWER('{$LugarNac}')", 'FechaNac' => "'{$FechaNac}'", 'Ci' => "'{$Ci}'", 'CiExt' => "'{$CiExt}'", 'Zona' => "LOWER('{$Zona}')", 'Calle' => "LOWER('{$Calle}')", 'Numero' => "LOWER('{$Numero}')", 'TelefonoCasa' => "'{$TelefonoCasa}'", 'Celular' => "'{$Celular}'", 'CelularSMS' => "'{$CelularSMS}'", 'ActivarSMS' => "'{$ActivarSMS}'", 'Procedencia' => "LOWER('{$Procedencia}')", 'Repitente' => $Repitente, 'Traspaso' => $Traspaso, 'Becado' => $Becado, 'MontoBeca' => $MontoBeca, 'PorcentajeBeca' => $PorcentajeBeca, 'Retirado' => $Retirado, 'FechaRetiro' => "'{$FechaRetiro}'", 'Rude' => "'{$Rude}'", 'Observaciones' => "LOWER('{$Observaciones}')", 'ApellidosPadre' => "LOWER('{$ApellidosPadre}')", 'NombrePadre' => "LOWER('{$NombrePadre}')", 'CiPadre' => "'{$CiPadre}'", 'CiExtP' => "'{$CiExtP}'", 'OcupPadre' => "LOWER('{$OcupPadre}')", 'CelularP' => "'{$CelularP}'", 'ApellidosMadre' => "LOWER('{$ApellidosMadre}')", 'NombreMadre' => "LOWER('{$NombreMadre}')", 'CiMadre' => "'{$CiMadre}'", 'CiExtM' => "'{$CiExtM}'", 'OcupMadre' => "LOWER('{$OcupMadre}')", 'CelularM' => "'{$CelularM}'", 'Email' => "LOWER('{$Email}')", 'Nit' => "'{$Nit}'", 'FacturaA' => "LOWER('{$FacturaA}')", 'CodCurso' => $CodCurso, 'FechaIns' => "'{$FechaInsc}'", 'HoraIns' => "'{$HoraIns}'", 'UsuarioAlumno' => "'{$CodUsuarioAlumno}'", 'CodBarra' => "'{$CodBarra}'", 'Password' => "'{$Password}'", 'PasswordP' => "'{$PasswordP}'", 'UsuarioPadre' => "'{$UsuarioPadre}'");
    $fechaCuota = date("Y-m-d H:i:s");
    for ($i = 1; $i <= 10; $i++) {
        if ($i == 1) {
            $valuesCuota = array('CodCuota' => 'NULL', 'CodAlumno' => $CodAlumno, 'Numero' => $i, 'MontoPagar' => $MontoGeneral, 'Factura' => "''", 'Cancelado' => 0, 'Fecha' => "'{$fechaCuota}'", 'Observaciones' => "''");
        } else {
            $valuesCuota = array('CodCuota' => 'NULL', 'CodAlumno' => $CodAlumno, 'Numero' => $i, 'MontoPagar' => $MontoPagar, 'Factura' => "''", 'Cancelado' => 0, 'Fecha' => "'{$fechaCuota}'", 'Observaciones' => "''");
        }
        //echo "<br>";
        //print_r($valuesCuota);
        $cuota->guardar($valuesCuota);
    }
    if ($NombreFoto = subirArchivo($_FILES['Foto'], "imagenes/alumnos/")) {
        $valuesAl = array_merge(array("Foto" => "'{$NombreFoto}'"), $valuesAl);
    }
    $alumno->insertarAlumno($valuesAl);
    $documento->guardarDocumento($valuesDoc);
    $valuesRude = array('CodAlumno' => $CodAlumno, 'PaisN' => "'" . $tmprude['PaisN'] . "'", 'ProvinciaN' => "'" . $tmprude['ProvinciaN'] . "'", 'LocalidadN' => "'" . $tmprude['LocalidadN'] . "'", 'Documento' => $tmprude['Documento'], 'CertOfi' => "'" . $tmprude['CertOfi'] . "'", 'CertLibro' => "'" . $tmprude['CertLibro'] . "'", 'CertPartida' => "'" . $tmprude['CertPartida'] . "'", 'CertFolio' => "'" . $tmprude['CertFolio'] . "'", 'Paralelo' => "'" . $tmprude['Paralelo'] . "'", 'Turno' => "'" . $tmprude['Turno'] . "'", 'CodigoSie' => "''", 'NombreUnidad' => "''", 'ProvinciaE' => "'" . $tmprude['ProvinciaE'] . "'", 'MunicipioE' => "'" . $tmprude['MunicipioE'] . "'", 'ComunidadE' => "'" . $tmprude['ComunidadE'] . "'", 'LenguaMater' => "'" . $tmprude['LenguaMater'] . "'", 'CastellanoI' => $tmprude['CastellanoI'], 'AymaraI' => $tmprude['AymaraI'], 'InglesI' => $tmprude['InglesI'], 'PerteneceA' => "'" . $tmprude['PerteneceA'] . "'", 'CentroSalud' => $tmprude['CentroSalud'], 'VecesCentro' => "'" . $tmprude['VecesCentro'] . "'", 'Discapacidad' => "'" . $tmprude['Discapacidad'] . "'", 'AguaDomicilio' => $tmprude['AguaDomicilio'], 'Electricidad' => $tmprude['Electricidad'], 'Alcantarillado' => $tmprude['Alcantarillado'], 'Trabaja' => "'" . $tmprude['Trabaja'] . "'", 'InternetCasa' => $tmprude['InternetCasa'], 'Transporte' => "'" . $tmprude['Transporte'] . "'", 'TiempoLlegada' => "'" . $tmprude['TiempoLlegada'] . "'", 'InstruccionP' => "'" . $tmprude['InstruccionP'] . "'", 'IdiomaP' => "'" . $tmprude['IdiomaP'] . "'", 'ParentescoP' => "'" . $tmprude['ParentescoP'] . "'", 'InstruccionM' => "'" . $tmprude['InstruccionM'] . "'", 'IdiomaM' => "'" . $tmprude['IdiomaM'] . "'", 'Lugar' => "'" . $tmprude['Lugar'] . "'", 'FechaReg' => "'" . date("Y-m-d H:i:s") . "'");
    $classrude->insertarAlumno($valuesRude);
    $tmpalumno->actualizarVisor($CodAlu);
    include_once "../class/tmpcola.php";
    $tmpcola = new tmpcola();
    $tmpcola->insertarRegistro(array("CodAlumno" => $CodAlumno, "Estado" => "'Espera'"));
    header("Location:../rude/esperarude/?CodAlumno=" . $CodAlumno);
}
Пример #8
0
<?php

include_once "../../login/check.php";
if (isset($_POST)) {
    extract($_POST);
    include_once "../../class/usuario.php";
    $usuario = new usuario();
    $valores = array("Usuario" => "'{$Usuario}'", "Nombres" => "'{$Nombres}'", "Paterno" => "'{$Paterno}'", "Materno" => "'{$Materno}'", "Nick" => "'{$Nick}'", "Idioma" => "'{$Idioma}'");
    $_SESSION['Idioma'] = "{$Idioma}";
    if (!empty($Pass) || $Pass != "") {
        $valores = array_merge(array("Pass" => "'{$Pass}'"), $valores);
    }
    $folder = "../../";
    if ($Foto = subirArchivo($_FILES['Foto'], "imagenes/usuario/")) {
        $valores = array_merge(array("Foto" => "'{$Foto}'"), $valores);
    }
    $usuario->actualizarDatos($valores, $_SESSION['CodUsuarioLog']);
    header("Location:index.php?s=1");
}
Пример #9
0
             echo 'ok';
         }
     }
     break;
 case "upload_file":
     if (isset($_POST['paciente'])) {
         $patient = new Patient($db);
         $result = $patient->getPatient('info', $_POST['paciente']);
         if ($result->resultado) {
             $destino = text2url($result->datos[0]['id_patient'] . '_' . $result->datos[0]['nombre'] . ' ' . $result->datos[0]['apellidos']);
         }
     } else {
         $destino = text2url($_SESSION['user']['id'] . '_' . $_SESSION['user']['name']);
     }
     $name = text2url($_POST['nombre']);
     $ruta = subirArchivo($_FILES['fichero'], $destino, $name);
     $documentation = new Documentation($db);
     $data = array();
     if (isset($_POST['paciente'])) {
         $data['id_patient'] = $_POST['paciente'];
     } else {
         $data['id_patient'] = $_SESSION['user']['id'];
     }
     $data['emisor'] = $_SESSION['user']['type'];
     $data['url'] = $ruta;
     $data['nombre'] = $_POST['nombre'];
     $result = $documentation->insertDocumentation($data);
     if ($result->resultado) {
         echo 'ok';
     }
     break;
Пример #10
0
        ?>
        <div class="alert alert-success">
        	<?php 
        echo $idioma['DatosGuardadosError'];
        ?>
        </div>
        <?php 
    }
    if (empty($_FILES)) {
        exit;
    }
    $files = rearrange($_FILES['files']);
    foreach ($files as $f) {
        $CodClasesArchivos = $clasesarchivos->estadoTabla();
        $CodClasesArchivos = $CodClasesArchivos['Auto_increment'];
        if ($nombreArchivo = subirArchivo($f, "documentos/clases/", "", $CodClasesArchivos)) {
            $valoresArchivo = array("CodClases" => $CodClases, "NombreArchivo" => "'{$nombreArchivo}'", "Tipo" => "'" . $f['type'] . "'");
            //print_r($valoresArchivo);
            //echo "<br>";
            $clasesarchivos->insertarRegistro($valoresArchivo);
        }
    }
    //print_r($archivos);
}
function rearrange($arr)
{
    foreach ($arr as $key => $all) {
        foreach ($all as $i => $val) {
            $new[$i][$key] = $val;
        }
    }
Пример #11
0
<?php

include_once "../../login/check.php";
if (isset($_POST)) {
    extract($_POST);
    $folder = "../../";
    include_once "../../class/docente.php";
    $docente = new docente();
    $Usuario = $CodDocente . mb_strtolower(quitarSimbolos($Paterno), "utf8");
    $contra = mb_strtolower(generarPalabra(), "utf8");
    $CodBarra = "P" . rand(100000, 999999) . "" . rand(10, 99);
    $valores = array("Paterno" => "'{$Paterno}'", "Materno" => "'{$Materno}'", "Nombres" => "'{$Nombres}'", "Sexo" => "'{$Sexo}'", "Ci" => "'{$Ci}'", "FechaNac" => "'" . fecha2Str($FechaNac, 0) . "'", "Departamento" => "'{$Departamento}'", "Provincia" => "'{$Provincia}'", "Direccion" => "'{$Direccion}'", "Telefono" => "'{$Telefono}'", "Celular" => "'{$Celular}'", "EstadoCivil" => "'{$EstadoCivil}'", "Email" => "'{$Email}'", "RDA" => "'{$RDA}'", "DPDepartamento" => "'{$DPDepartamento}'", "DPUniversidad" => "'{$DPUniversidad}'", "DPAnoIngreso" => "'{$DPAnoIngreso}'", "DPAnoEgreso" => "'{$DPAnoEgreso}'", "DPAnoTitulacion" => "'{$DPAnoTitulacion}'", "DPTitulo" => "'{$DPTitulo}'", "DTCargo" => "'{$DTCargo}'", "DTCargaHoraria" => "'{$DTCargaHoraria}'", "DTAntiguedad" => "'{$DTAntiguedad}'", "DTCategoria" => "'{$DTCategoria}'", "Observacion" => "'{$Observacion}'", "Usuario" => "'{$Usuario}'", "Password" => "'{$contra}'", "CodBarra" => "'{$CodBarra}'");
    if ($NombreFoto = subirArchivo($_FILES['Foto'], "imagenes/docentes/")) {
        $valores = array_merge(array("Foto" => "'{$NombreFoto}'"), $valores);
    }
    if ($docente->insertarRegistro($valores)) {
        ?>
	<div class="alert alert-success">
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		<?php 
        echo $idioma['DatosGuardadosCorrectamente'];
        ?>
        <a href="" id="actualizarventana" class="btn"><?php 
        echo $idioma['ActualizarVentana'];
        ?>
</a>	
	</div>
	<?php 
    } else {
        ?>
	<div class="alert alert-error">
Пример #12
0
		DBExecSql($conn, $sql, $params, OCI_DEFAULT);
	}

	if ($_REQUEST["tipoOp"] == "B") {		// Baja..
		$params = array(":id" => $_REQUEST["id"], ":usubaja" => GetWindowsLoginName());
		$sql =
			"UPDATE rrhh.rnp_novedadespersonales
					SET np_fechabaja = SYSDATE,
							np_usubaja = UPPER(:usubaja)
				WHERE np_id = :id";
		DBExecSql($conn, $sql, $params, OCI_DEFAULT);
	}

	if ($_FILES["imagen"]["name"] != "") {
		$error = "";
		if (!subirArchivo($_FILES["imagen"], DATA_CELEBRACIONES_PATH, $_REQUEST["id"], array("gif", "jpeg", "jpg", "png"), $error))
			throw new Exception($error);
	}

	DBCommit($conn);
}
catch (Exception $e) {
	DBRollback($conn);
?>
<script>
	alert(unescape('<?= rawurlencode($e->getMessage())?>'));
</script>
<?
	exit;
}
?>