$sql = 'SELECT * FROM examenes WHERE id_examen = ' . (int) $id_examen; $ejecutar = mysql_query($sql); $examenes = mysql_fetch_array($ejecutar); // // // require_once XFS . 'pdf/pdf.php'; $pdf = new _pdf('LEGAL', 'landscape'); $pdf->cp->selectFont(XFS . 'pdf/helvetica.afm'); $page_count = 0; $coord_sum = 0; $str_grado = 'Grado: ' . $secciones['nombre'] . ' ' . $secciones['nombre_seccion']; $str_examen = 'Tiempo de examen: ' . $examenes['examen']; $pdf->text(35, $pdf->top(25), $str_grado, 12); $pdf->text(200, $pdf->top(25, true), $str_examen, 12); /* $pdf->cp->line(15, $pdf->cp->cy(10), $pdf->page_width(15), $pdf->cp->cy(10)); $pdf->cp->line(15, 17, $pdf->page_width(15), 17); $pdf->cp->line(15, $pdf->cp->cy(10), 15, 17); $pdf->cp->line($pdf->page_width(15), $pdf->cp->cy(10), $pdf->page_width(15), 17); */ //$pdf->new_page(); $sql = "SELECT *\r\n\tFROM cursos\r\n\tWHERE id_grado = " . $secciones['id_grado'] . ' ORDER BY id_curso'; $ejecutar2 = mysql_query($sql); $ls_cursos = array(); $id_cursos = array(); $i = 0; $table = array();
$sql = 'SELECT * FROM reinscripcion r, secciones s, grado g, alumno a WHERE r.id_grado = ' . $secciones['id_grado'] . ' AND r.id_seccion = ' . $secciones['id_seccion'] . ' AND r.anio = ' . $anio . ' AND r.id_seccion = s.id_seccion AND r.id_alumno = a.id_alumno AND r.id_grado = g.id_grado'; $ejecutar = mysql_query($sql); $i = 0; while ($arreglo = mysql_fetch_assoc($ejecutar)) { if ($i) { $pdf->new_page(); } $pdf->cp->addJpegFromFile('../images/logo.jpg', 40, $pdf->cp->cy(80), 60); $pdf->text(100, $pdf->top(25), 'INSTITUTO NACIONAL DE EDUCACION BASICA', 8, 'center', $pdf->page_width(125)); $pdf->text(100, $pdf->top(11), 'ESCUELA NORMAL RURAL No. 5', 8, 'center', $pdf->page_width(125)); $pdf->text(100, $pdf->top(11), '"Prof. Julio Edmundo Rosado Pinelo"', 8, 'center', $pdf->page_width(125)); $pdf->text(100, $pdf->top(11), 'Santa Elena, Flores, Petén. Tel. 79262393', 8, 'center', $pdf->page_width(125)); $pdf->text(100, $pdf->top(11), '"SIMIENTE DE CULTURA EN PETÉN"', 8, 'center', $pdf->page_width(125)); $pdf->text(100, $pdf->top(20), 'FICHA DE RENDIMIENTO ESCOLAR', 11, 'center', $pdf->page_width(125)); $datos = array(array(array('text' => 'Carné:', 'align' => 'right'), array('text' => $arreglo['carne'], 'align' => 'left'), array('text' => 'Fecha:', 'align' => 'right'), array('text' => $arreglo['fecha'], 'align' => 'left')), array(array('text' => 'Nombres y Apellidos:', 'align' => 'right'), array('text' => $arreglo['nombre_alumno'] . ', ' . $arreglo['apellido'], 'align' => 'left'), array('text' => 'Telefono:', 'align' => 'right'), array('text' => $arreglo['telefono1'], 'align' => 'left')), array(array('text' => 'Email:', 'align' => 'right'), array('text' => $arreglo['email'], 'align' => 'left'), array('text' => 'Código:', 'align' => 'right'), array('text' => $arreglo['codigo_alumno'], 'align' => 'left')), array(array('text' => 'Grado:', 'align' => 'right'), array('text' => $arreglo['nombre'] . ' ' . $arreglo['nombre_seccion'], 'align' => 'left'), array('text' => '', 'align' => 'right'), array('text' => '', 'align' => 'left')), array(array('text' => 'Encargado:', 'align' => 'right'), array('text' => $arreglo['encargado_reinscripcion'], 'align' => 'left'), array('text' => '', 'align' => 'right'), array('text' => '', 'align' => 'left'))); $pdf->multitable($datos, 35, $pdf->top(15), 5, 9, 0); $infot = array(array(array('text' => 'Curso', 'align' => 'center'))); $sql = 'SELECT * FROM examenes WHERE examen NOT LIKE \'%Recup%\' ORDER BY id_examen'; $ejecutar2 = mysql_query($sql); while ($row = mysql_fetch_array($ejecutar2)) { $infot[0][] = array('text' => $row['examen'], 'align' => 'center', 'width' => 75);