function voz_canal() { $conexion = new Connex(); $mysqlconn = $conexion->conectar(); $consulta = new reporte(); $resultado = $consulta->voz_can($mysqlconn); if ($resultado) { for ($i = 0; $i < mysqli_num_rows($resultado); $i++) { $row = mysqli_fetch_array($resultado, MYSQLI_ASSOC); $a = $row["num"]; $b = $row["voz_canal"]; $array[$i] = array('label' => $b, 'value' => $a); $cons = json_encode($array[$i]); echo " {$cons},"; } } // if }
//aqui va la cantidad que llevará cada parte del grafico $graph = new PieGraph(640, 480); //tamaño de la letra del titulo y la leyenda $graph->SetShadow(); $db = new PgDB(); //QUERY PARA EL PERIDO ACTIVO $queryPer = "SELECT tipo, anio FROM periodo WHERE activo = TRUE"; $recoPer = pg_query($queryPer); $rowPer = pg_fetch_array($recoPer); $graph->title->Set(utf8_decode("REPORTE TOTAL\n{$rowPer['tipo']} - {$rowPer['anio']}")); $graph->title->SetFont(FF_FONT2, FS_BOLD); $p1 = new PiePlot($data); $p1->value->Show(true); $p1->SetLegends(array("Registradas", "Aceptadas", "Numeros Asignados", "Selladas", "Entrega de Copias", "Entrega de Borrador", "Retiro de Borrador", "Finalizaron")); //la leyenda del gráfico $p1->SetSize(0.3); //el radio del gráfico //$p1->SetAngle(45); //setear el angulo $graph->Add($p1); $graph->Stroke("asd.png"); $this->Image("asd.png", -15, 85, 240, 180); // x, y, ancho, altura. $this->Image("logotipo.jpg", 20, 12, -280); unlink("asd.png"); } } $pdf = new reporte('P', 'mm', 'Letter'); $pdf->AddPage(); $pdf->SetFont("Arial", "B", 12); $pdf->graficarPDF(); $pdf->Output("estadisticas_hitos.pdf", "D");
LEFT JOIN estatus es ON exp.id_estatus=es.id_estatus LEFT JOIN estatus_ike esi ON exp.id_estatus_ike=esi.id_estatus_ike LEFT JOIN empleado emp ON exp.id_tecnico=emp.id_empleado WHERE exp.fecha >= '".$_GET['fecha_inicio']."' AND exp.fecha <= '".$_GET['fecha_final']."' ORDER BY fecha";*/ $locacionConsulta = "AND exp.locacion LIKE '%" . $_GET['locacion'] . "%' "; if ($_GET['eike'] == 1) { $locacionConsulta = "AND exp.locacion LIKE '%" . $_GET['locacion'] . "%' AND exp.locacion != 'DF' "; } $consulta = "SELECT exp.fecha,\n\t\texp.id_expediente,\n\t\texp.capturista,\n\t\texp.locacion,\n\t\temp.nombre,\n\t\temp.apaterno,\n\t\temp.amaterno,\n\t\tes.estatus ,\n\t\tesi.estatus as esi,\n\t\texp.pagado\n\t\tFROM expediente exp\n\t\tLEFT JOIN estatus es\n\t\tON exp.id_estatus=es.id_estatus\n\t\tLEFT JOIN estatus_ike esi\n\t\tON exp.id_estatus_ike=esi.id_estatus_ike\n\t\tLEFT JOIN empleado emp\n\t\tON\n\t\texp.id_tecnico=emp.id_empleado\n\t\tWHERE exp.fecha >= '" . $_GET['fecha_inicio'] . "' AND exp.fecha <= '" . $_GET['fecha_final'] . "'\n\t\tAND exp.id_tecnico LIKE '%" . $_GET['tecnico'] . "%' \n\t\tAND exp.capturista LIKE '%" . $_GET['capturo'] . "%' \n\t\tAND exp.id_estatus_ike LIKE '%" . $_GET['eike'] . "%' \n\t\tAND exp.id_estatus LIKE '%" . $_GET['etecnico'] . "%' \n\t\tAND exp.pagado LIKE '%" . $_GET['epago'] . "%' \n\t\tAND exp.tipo LIKE '%" . $_GET['tipo'] . "%' \n\t\t" . $locacionConsulta . "\n\t\tORDER BY fecha"; $datos = mysqli_query($conexion, $consulta); $reporte = new reporte('L', 'mm', 'Letter'); $reporte->addPage(); $reporte->SetTextColor(0, 0, 0); $reporte->SetFillColor(255, 255, 255); while ($fila = mysqli_fetch_array($datos)) { $reporte->Cell(1); $reporte->Cell(10, 5, $fila['fecha'], 0, 0, "L", true); $reporte->Cell(10); $reporte->Cell(10, 5, $fila['id_expediente'], 0, 0, "L", true); $reporte->Cell(11); $reporte->Cell(30, 5, utf8_decode($fila['capturista']), 0, 0, "L", true); $reporte->Cell(2); $reporte->Cell(30, 5, utf8_decode($fila['nombre'] . " " . $fila['apaterno'] . " " . $fila['amaterno']), 0, 0, "L", true); $reporte->Cell(2); if ($_GET['eike'] != 1) { $reporte->Cell(30, 5, $fila['esi'], 0, 0, "C", true);