<?php include '../graficos/consultas.php'; $json = new graficos("peral"); $json->json();
<?php /** * */ if (strcasecmp($_SERVER['REQUEST_METHOD'], 'post') === 0) { $grafico = new graficos(); if (isset($_POST['grafico_por_periodo'])) { $grafico->grafico_por_periodo(); } if (isset($_POST['grafico_diario'])) { $grafico->grafico_diario(); } }
<?php require './graficos.php'; //http://localhost/SegundoProyecto/trunk/Imgs/imagen.php?x=800&y=800&zi=0&mx=0&my=0&capa=hospitales&tipo=MULTIPOINT&conn=host=localhost%20port=5432%20dbname=cursoGIS%20user=postgres%20password=12345&rgb=[223, 24, 52] header('Content-Type: image/png'); $x = $_GET['x']; $y = $_GET['y']; $zi = $_GET['zi']; $mx = $_GET['mx']; $my = $_GET['my']; $capa = $_GET['capa']; $type = $_GET['tipo']; $conn = $_GET['conn']; $rgb = $_GET['rgb']; //print_r($conn); $conn = pg_connect($conn) or die('{"status":1 , "error":"Error de Conexion con la base de datos"}'); $graficos = new graficos(); $img = $graficos->crearImagen($x, $y, $zi, $mx, $my, $capa, $type, $rgb, $conn); echo imagepng($img); imagedestroy($img);
header('Content-Type: image/png'); //http://localhost:8000/image/imagen.php?type=POINT&strconn=host=localhost%20port=5432%20dbname=cursoGIS%20user=postgres%20password=12345&schema=public&table=distritos&column=centroide&srid=5367&x=640&y=480&r=23&g=23&b=43&trans=10&zoom=0&despX=0&despY=0 //http://localhost:8000/image/imagen.php?type=MULTIPOLYGON&strconn=host=localhost%20port=5432%20dbname=cursoGIS%20user=postgres%20password=12345&schema=public&table=distritos&column=geom&srid=5367&x=640&y=480&r=23&g=23&b=43&trans=10&zoom=0&despX=0&despY=0 //http://localhost:8000/image/imagen.php?type=MULTILINESTRING&strconn=host=localhost%20port=5432%20dbname=cursoGIS%20user=postgres%20password=12345&schema=public&table=rios&column=geom&srid=5367&x=640&y=480&r=23&g=23&b=43&trans=10&zoom=0&despX=0&despY=0 $type = $_REQUEST['type']; $strconn = $_REQUEST['strconn']; $schema = $_REQUEST['schema']; $table = $_REQUEST['table']; $column = $_REQUEST['column']; $srid = $_REQUEST['srid']; $largo = $_REQUEST['x']; $ancho = $_REQUEST['y']; $r = $_REQUEST['r']; $g = $_REQUEST['g']; $b = $_REQUEST['b']; $trans = $_REQUEST['trans']; $zoom = $_REQUEST['zoom']; $despX = $_REQUEST['despX']; $despY = $_REQUEST['despY']; $graficos = new graficos(); if ($type == "POLYGON" || $type == "MULTIPOLYGON") { $img = $graficos->CreatePolygon($strconn, $schema, $table, $column, $srid, $largo, $ancho, $r, $g, $b, $trans, $zoom, $despX, $despY); } if ($type == "POINT" || $type == "MULTIPOINT") { $img = $graficos->CreatePoint($strconn, $schema, $table, $column, $srid, $largo, $ancho, $r, $g, $b, $trans, $zoom, $despX, $despY); } if ($type == "LINESTRING" || $type == "MULTILINESTRING") { $img = $graficos->CreateLine($strconn, $schema, $table, $column, $srid, $largo, $ancho, $r, $g, $b, $trans, $zoom, $despX, $despY); } imagepng($img); imagedestroy($img);
<?php $estacion = $_POST['estacionSelect']; $anio = $_POST['anio']; $nombreArchivo = $estacion . "_" . $anio; // The function header by sending raw excel header("Content-type: application/vnd-ms-excel"); // Defines the name of the export file "codelution-export.xls" header("Content-Disposition: attachment; filename={$nombreArchivo}.xls"); // Add data table include 'db.php'; $excel = new graficos(); echo ' <table border="1"> <tr> <th>Fecha</th> <th>Hora</th> <th>Estacion</th> <th>Temperatura Exterior</th> <th>Humedad Exterior</th> <th>Punto de Rocio</th> <th>Velocidad Viento Promedio</th> <th>Velocidad Viento Rafaga</th> <th>Direccion del Viento</th> <th>Precitipacion Actual</th> <th>Precipiracion Hoy</th> <th>Presion Atmosferica</th> <th>Precipitacion Total</th> <th>Temperatura Interior</th> <th>Humedad Interior</th> <th>Ultimo Viento Detectado</th>
<?php require './graficos.php'; header('Content-Type: image/png'); $type = $_REQUEST['type']; $capa = $_REQUEST['capa']; $trans = $_REQUEST['trans']; $i = $_REQUEST['i']; $j = $_REQUEST['j']; $width = $_REQUEST['x']; $height = $_REQUEST['y']; $filas = $_REQUEST['rowsColumns']; $columnas = $_REQUEST['rowsColumns']; $zoom = $_REQUEST['zoom']; // 0.0 a 0.95 $despX = $_REQUEST['despX']; //-0.9 a 0.9 Se puede mas pero queda en blanco no se controla eso $despY = $_REQUEST['despY']; //-0.9 a 0.9 Se puede mas pero queda en blanco no se controla eso $graficos = new graficos(); if ($type == "Polygon") { $img = $graficos->CreatePolygon($capa, $width, $height, $filas, $columnas, $trans, $zoom, $despX, $despY, $i, $j); } if ($type == "Point") { $img = $graficos->CreatePoint($capa, $width, $height, $filas, $columnas, $trans, $zoom, $despX, $despY, $i, $j); } if ($type == "Line") { $img = $graficos->CreateLine($capa, $width, $height, $filas, $columnas, $trans, $zoom, $despX, $despY, $i, $j); } imagepng($img); imagedestroy($img);
<?php require_once './clases/graficos.php'; $ObjGraficos = new graficos($_POST['fecha_inicial'], $_POST['fecha_final']); if ($_POST['tipo'] == 'Lineas_Entra') { $ObjGraficos->graficar_lineas_Entra(); } if ($_POST['tipo'] == 'Lineas_Sale') { $ObjGraficos->graficar_lineas_Sale(); } if ($_POST['tipo'] == 'Barras') { $ObjGraficos->graficar_barras(); } if ($_POST['tipo'] == 'Pastel') { $ObjGraficos->graficar_pastel(); }
<?php /** * Created by IntelliJ IDEA. * User: Oscar * Date: 22/11/2015 * Time: 21:41 */ include 'scr/php/graficos/consultas.php'; $graficosYali = new graficos($pag); ?> <!-- Grafico Temperatura 1 Hora --> <script type="text/javascript"> var f = new Date(); setInterval(function () { $('#GraficoTemperatura').highcharts().reflow(); }, 10); $(function () { $('#GraficoTemperatura').highcharts({ title: { text: 'Temperatura Interior - Temperatura Exterior' }, subtitle: { text: 'Tendencia de las ultimas 12 horas' }, exporting: { buttons: { contextButton: { symbol: 'url(scr/img/save.gif)' }
<?php require './graficos.php'; //http://localhost/GIS/imagen.php?x=1024&y=1024&zi=0.1&mx=2&my=2 header('Content-Type: image/png'); $x = $_GET['x']; $y = $_GET['y']; $zi = $_GET['zi']; $mx = $_GET['mx']; $my = $_GET['my']; $capa = $_GET['capa']; $type = $_GET['tipo']; $graficos = new graficos(); $img = $graficos->crearImagen($x, $y, $zi, $mx, $my, $capa, $type); echo imagepng($img); //imagedestroy($img);