<?php
include ('../Conexion/cnx_php.php');
include('fusion/cnx.php');
include('fusion/DWFChart.inc.php');
include('fusion/fc_data.php');
$gestion='GES03';
$sql ="
DROP TABLE A
SELECT t02.DES_FECHA AS FECHA,COD_GES,D1,D2
INTO A
FROM TAB_PH3_ANUAL_01 t01
INNER JOIN TAB_MES t02
ON t01.FECHA=t02.COD_FECHA
WHERE COD_GES='$gestion'
DROP TABLE B
SELECT *
INTO B
FROM TAB_PH3_ANUAL_02
WHERE COD_GES='$gestion' ";
?>
<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript">
<!--
function final(){
parent.location="#final"
}
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::</title>
<script type="text/javascript" src="fusion/FusionCharts.js"></script>
<link href="estilo.css" rel="stylesheet" type="text/css" />
<!--Inicio Extjs-->
<link rel="stylesheet" type="text/css" href="../../ext-3.4.0/resources/css/ext-all.css" />
<script type="text/javascript" src="../../ext-3.4.0/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/ext-all-debug.js"></script>
<!-- Otros Extjs--->
<link rel="stylesheet" type="text/css" href="../../ext-3.4.0/examples/ux/gridfilters/css/GridFilters.css" />
<link rel="stylesheet" type="text/css" href="../../ext-3.4.0/examples/ux/gridfilters/css/RangeMenu.css" />
<link rel="stylesheet" type="text/css" href="../../ext-3.4.0/examples/ux/css/LockingGridView.css" />
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/menu/RangeMenu.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/menu/ListMenu.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/GridFilters.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/filter/Filter.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/filter/StringFilter.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/filter/DateFilter.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/filter/ListFilter.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/filter/NumericFilter.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/gridfilters/filter/BooleanFilter.js"></script>
<script type="text/javascript" src="../../ext-3.4.0/examples/ux/LockingGridView.js"></script>
<script type="text/javascript" src="currency.js"></script>
<script type="text/javascript" src="02.lock-grid.js"></script>
<!--Fin Extjs-->
</head>
<form name="form1" method="post" action="">
<!--Extjs-->
<table width= 1033 border=0>
<tr>
<td class="titulo">
Gestión de Proveedores
<br>
</td>
</tr>
<tr>
<td>
<table border=0 width=450 style="margin-left:30px">
<tr>
<td class="Tema2">
<br>
Elija una Gestión:
</td>
<td>
<br>
<select name="cb1">
<option value=''>--</option>
<?php
//include "../Conexion/cnx_php.php";
$SQL = "SELECT COD_GES,DES_GES FROM TAB_GESTION";
echo "<option value='".$row['0']."'>".$row['1']."</option>";
}
?>
</select>
</td>
<td>
<br>
<input type="submit" name='b1' value="Actualizar">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<?php
if(isset($_REQUEST['cb1'])){
$gestion= $_REQUEST['cb1'];
if ($gestion ==""){
?>
<script>
alert ("¡Debe seleccionar una Gestión! ");
window.location = '#';
</script>
<?php
}
$sql ="
DROP TABLE A
SELECT t02.DES_FECHA AS FECHA,COD_GES,D1,D2
INTO A
FROM TAB_PH3_ANUAL_01 t01
INNER JOIN TAB_MES t02
ON t01.FECHA=t02.COD_FECHA
WHERE COD_GES='$gestion'
DROP TABLE B
SELECT *
INTO B
FROM TAB_PH3_ANUAL_02
WHERE COD_GES='$gestion' ";
}
?>
</td>
</tr>
<tr>
<td class="Tema2"><center><b><h1>
GESTIÓN
<?php
$SQL = "SELECT DES_GES FROM TAB_GESTION WHERE COD_GES='$gestion'";
echo $row['0'];
}
?>
</h1></b></center>
</td>
</tr>
</table>
<!--Fusion Chart-->
<?php
//require_once('fusion/cnx.php');
//include('fusion/DWFChart.inc.php');
//fusionchart data include
//include('fusion/fc_data.php');
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = function_exists("mssql_real_escape_string") ? mssql_real_escape_string
($theValue) : mssql_escape_string
($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
// conexion data
$query_rs =
"SELECT * FROM A";
// fusionchart dynamic filter data 00FFFF
$dFC = new DWFChart("FusionChart", "MSColumn2D", "fusion/", 1000, 330, "", "", "", "", "", "");
$dFC->setVersion("1.1.1");
$dFC->setConfigXML($dataXML);
$dFC->setCategory($rs, "FECHA", "", "");
$dFC->addSeries($rs, "D1", "", "color='FFCC67' seriesName='Gasto' renderAs='Area' parentYAxis='P'", "default", "");
$dFC->addSeries($rs, "D2", "", "color='00527A' seriesName='Presupuesto' renderAs='Line' parentYAxis='P'", "default", "");
$dFC->setOrdering('None', 'asc');
$dFC->prepareData();
?>
<table width="951" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="margin-left:30px">
<tr>
<td height="20" colspan="3" valign="top" class="Tema">Gasto Vs Presupuesto - Anual - Gestión
<?php
$SQL = "SELECT DES_GES FROM TAB_GESTION WHERE COD_GES='$gestion'";
echo $row['0'];
}
?>
- 2013
</td>
</tr>
<tr>
<td height="280" colspan="3" valign="top">
<?php
renderFusionChart($dFC,"","");
?>
</td>
</tr>
<tr>
<td>
<div id="02.grid"></div>
<br><br>
</td>
</tr>
</table>
</form>
<!-- <form name="form2" method="post" action="">
<table width="910" style="margin-left:30px" border=0>
<tr>
<td align="right"><a href="#top"><img src="botonSubir.gif"></a>
</td>
</tr>
</table>
<a name="final"></a>
</form>-->
</body>
</html>